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

RX Radio Stopped for 100uS after each adv packet on scanner

Hi,

I just want to know if this is an expected behaviour of the Softdevice. I have a central that scans every 2 seconds for 1.7 seconds (leaving 300ms for connections). When it is scanning every time it receives an advertisement from another device (any device) it briefly stops the RX Radio. I am using the PA and LNA out pins connected to a logic analyzer. 

Here is a closeup with both Central and peripheral in the shot. Note that the peripheral is advertising in extended advertisment so the central will stop the RX radio again after the data is received in the secondary channel.

Sorry for my ignorance, but is this expected? Wouldn't there be a possibility of a packet loss if the radio is off for that much time in a situation where there are many devices advertising? I would have expected for the radio to remain ON receiving and for the core to process the data without turning off the radio so that it could receive a new packet if it was sent very close to the previous one. 

I just want to make sure I'm not missing some configuration.


Regards.

Parents
  • Hi,

    Yes, there is a small time before starting scanning again after receiving an advertisement packet. In this case, The application has to restart/continue scanning, and that is typically done when receiving an advertising report event. You will miss any advertisement packets on air during this time. However, there are several other reasons why you could miss an advertisement packet as well, so you should never base a system on the assumption that you can receive (almost) all advertisement packets.

Reply
  • Hi,

    Yes, there is a small time before starting scanning again after receiving an advertisement packet. In this case, The application has to restart/continue scanning, and that is typically done when receiving an advertising report event. You will miss any advertisement packets on air during this time. However, there are several other reasons why you could miss an advertisement packet as well, so you should never base a system on the assumption that you can receive (almost) all advertisement packets.

Children
  • Hi Einar, thanks a lot for your reply. 

    I am not restarting the scan inside the adv report event so this must be done by the Softdevice. I tried to manually enable the scan again while inside the event (the first thing I do) but I see the same delay of 93uS before the scan starts again. Is there any way to make this period shorter? Is there any configuration I am missing?

  • Hi,

    Which SoftDevice version are you using? Older SoftDevices did resume scanning automatically, but from version 6 (if I don't remember wrong) this has to be done by the application. However, you may not notice it if you use the scan module since this does it for you (you can search for sd_ble_gap_scan_start in nrf_ble_scan.c to see how it is used).

    I cannot think of any other way to speed this up than to call sd_ble_gap_scan_start() as soon as possible (directly or via a SDK library)

Related