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

BLE scanning issues with SoftDevice 6.1.0

Hi,

We are currently in a testing phase of our software where we use an nRF52832 for extended advertising and an nRF52840 for scanning that has a scan interval and scan window of 10ms. The scan duration is infinite and we are connectionless.

After a period of about 1 hour or so, we will see that the nRF52840 will not be receiving any BLE packets or will miss packets entirely. Waking up from SYSTEM ON using button interrupts in our nRF52832 will cause the nRF52840 to start receiving packets again intermittently. We hypothesize that this 'reactivates' the SoftDevice on the nRF52832. Both devices are running SoftDevice 6.1.0, but we have tested with 6.1.1 on the nRF52840 and the problem persists. This is also the case with the RSCS SDK example. See something like this for reference: https://github.com/nicslabdev/NRF52840-Beacon_Scanner

In addition, if we set up 2 nRF52840 DK boards and reset the nRF52832, we may see that one nRF52840 will receive packets and the other nRF52840 will not. Is this a possible bug in the SoftDevice or is this something related to the channels in which BLE is communicated? Is there a regulatory limit on how long it is possible to transmit on a specific channel?

We would also like to know what scanning issues were fixed in SoftDevice 6.1.1? And does the nRF sniffer v2 beta 3 support BT5 completely? We cannot see any of our packets in Wireshark.

Thank you.

Parents Reply Children
  • Hi Hung,

    Sorry for the confusion. Yes, when we switched to 10/10ms and it worked fine. Previously we were not using these defines. As you can see it was NRF_BLE_SCAN_SCAN_INTERVAL and NRF_BLE_SCAN_SCAN_WINDOW.

    In the source code I provided on GitHub it was an example application that was running as expected. But the code I pasted in the comment yesterday was from our actual application.

  • My suspicion is that due to the duty cycle of 50% and since your scanning interval is an factor of the advertising interval, when the clock is drifting long enough (can take hours), the advertising will only happen in the non-scanning window and then results in that you can't capture the advertising package. 

    When the issue occurs, if you reset the beacon(s) would you see the scanner working again ? 

    I would suggest to have another beacon advertising with different interval, for example 30ms just to make sure the duty cycle would not be the problem here.  

  • Hi Hung,

    My thoughts were something along these lines also, but are we saying that scanning with a 100/50ms interval/window and a 400ms advertising interval, this would 'correct' itself over a matter of time? On a related note, doesn't this also mean that with a duty cycle of 100% 10/10ms this would still happen, but on a tiny and unnoticable level such that clock drift becomes in sync?

    Yes, when we reset the beacons these would show up on the scanner. Sometimes starting/resetting the scanner would result in no packets received. Would this mean that we started it in a non-advertising window?

  • Actually BLE protocol has a solution to mitigate this issue as each advertising event would have a random delay (<10ms) to avoid being insync. But this wouldn't help if we have a gap of 50ms of not scanning. 

  • Ok, thanks! We can mark this as solved then.

Related