Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Discovery and Connection Latency

Hi!

I'm developing a  peripheral device using nrf52840 to communicate with our android developed app. I'm testing the latency between connections of device. the configurations are below.

Android Phone (Central)

  • Sanning Mode: Active
  • Scan Window - 4.096s
  • Scan Interval - 4.096s

Peripheral(nRF52840)

  • ADV Interval - 1s

Measured Average Latency: 2s

What we observed is whenever we change the ADV interval, the connection latency is always almost twice the value of ADV interval. Based on the measurement result, this is how we understand what is happening

when the central receives the ADV, it sends a scan request. We guess that the scan response or maybe the connection response is being sent in the next ADV cycle. That is why we always get latency almost twice the adv interval.

but based on this video: Everything you need to know about Bluetooth LE advertising - Nordic Semiconductor, what we understand is this is what should've happened

My real question is, we want to know what is the right timing sequence from the device discovery up to connection. Was it the first timing sequence or the latter?

Thanks,

Miguel

Parents
  • I am not sure what options are available in android in terms of scanning vs. connection, but in our softdevice there are two different api's, one to scan (sd_ble_gap_scan())and one to connect (sd_ble_gap_connect()). Normally you first scan, wait for advertisement and then choose to connect by using the second api. But there is nothing preventing you to use the connect api directly if you know which peer to connect.

    Kenneth

Reply
  • I am not sure what options are available in android in terms of scanning vs. connection, but in our softdevice there are two different api's, one to scan (sd_ble_gap_scan())and one to connect (sd_ble_gap_connect()). Normally you first scan, wait for advertisement and then choose to connect by using the second api. But there is nothing preventing you to use the connect api directly if you know which peer to connect.

    Kenneth

Children
No Data
Related