This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52 Connect Slow

We have a mobile app on iPhone and Android, the NRF52 advertises every 3 seconds. The app can discover the NRF52 quickly but it takes a long time to connect. The iPhone is about 8 seconds, sometimes android takes up to a minute to connect or doesn't connect at all. We are doing a GATT connect we are not pairing. We search for bluetooth devices, match the MAC address against a know value and the connect. What can we do to improve the connection time?

Thank You

Parents
  • Hi,

    We don't have any control over the scanning parameters in Android (scan windows or scan interval), but unless they have changed it since the last time we looked into it, then it seems to be close to this:

    ScanSettings.Builder#setScanMode(int) sets the scan mode.

    There are three options to choose from:

    In the balanced and low power modes, the interval is 5 seconds. In the balanced mode, it scans for 2 seconds, then waits for 3 seconds, while in low power mode, it scans for 0.5 seconds and waits for 4.5 seconds. Packets should also be reported when another app scans in a more aggressive mode.

    In low latency mode it seem to scan continuously.

    Also take a look at this blog post and the document found there:
    https://devzone.nordicsemi.com/b/blog/posts/what-to-keep-in-mind-when-developing-your-ble-andr 

    Best regards,
    Kenneth

  • Hi , I have a question on similar lines. Sometimes the Android takes forever to connect. I captured the exchange on a sniffer. The BLE peripheral device is advertising (general slow unlimited advertising , every 540ms). The phone seems to hear the advertisement, I see Scan request packet coming in and my peripheral sends the scan response (I see this exchange several times),  but the phone does not send a connection indication packet for a very long time (in this case it look 18 minutes!). My question is 

    1) When does the Android decide when to send the connection indication packet? 

    2) If the phone is sending scan request then the phone is hearing the packets from the peripheral right? 

    3) Can anything  be done on the peripheral side to make phone respond faster (like doing a direct advertisement instead of general ?) 

Reply
  • Hi , I have a question on similar lines. Sometimes the Android takes forever to connect. I captured the exchange on a sniffer. The BLE peripheral device is advertising (general slow unlimited advertising , every 540ms). The phone seems to hear the advertisement, I see Scan request packet coming in and my peripheral sends the scan response (I see this exchange several times),  but the phone does not send a connection indication packet for a very long time (in this case it look 18 minutes!). My question is 

    1) When does the Android decide when to send the connection indication packet? 

    2) If the phone is sending scan request then the phone is hearing the packets from the peripheral right? 

    3) Can anything  be done on the peripheral side to make phone respond faster (like doing a direct advertisement instead of general ?) 

Children
Related