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

nRF52840 stops scanning

Hi.

We have a strange issue we are seeing with a nRF52840 where scanning fails, but it is very rare.

Setup - nRF52840 is a central device, and there are 20 x nRF52832's peripherals advertising. The central reports the status of all the peripherals to a PC via CDC usb.

The system can be running fine like this for 1 / 2 weeks 24 hours a day, then out of the blue the nRF52840 stops picking up any peripherals. It could be in the middle of the night, when the system isn't doing anything complicated like connecting / mass data transfer etc.

The fact that all the peripherals 'disappear' at the same time suggests the central is at fault. The peripherals have all been started at different times and have power etc.

I can't monitor / debug as it is a almost finished system, and the fault is too rare to wait and see it.

Are there any obvious properties I could monitor and report over so they are logged on the PC? All the BLE functions result in a hard restart if they fail which I am not seeing. This problem just occurs randomly, like the radio has just switched off etc.

Thanks

Phil

Parents
  • Hi Phillip, 

    The system can be running fine like this for 1 / 2 weeks 24 hours a day, then out of the blue the nRF52840 stops picking up any peripherals. It could be in the middle of the night, when the system isn't doing anything complicated like connecting / mass data transfer etc.

    The fact that all the peripherals 'disappear' at the same time suggests the central is at fault. The peripherals have all been started at different times and have power etc.

     It sounds like the nRF52840 stops scanning. Is the nRF52840 only scanning for the nRF52832 devices or or is it connected to all the nRF52832 devices? You could start a "watchdog" timer that is reset every time you receive an advertisment packet from one of the nRF52832 devices. If the timer times out, then you can call the SD-api to restart scanning. 

    Do you log any debug information through the CDC USB interface?

    Best regards

    Bjørn

  • Hi Bjørn.

    When it has had the problem it is only scanning, it is not connected to any of the nRF52832 devices.

    What could cause the scanning to randomly stop?

    I could add a watchdog timer, but would be better to figure out what the issue.

    Is there any variables / functions I can monitor regarding scanning that I could log? e.g. is there a function that tells you if scanning is running, or has failed?

    Thanks

    Phil

Reply
  • Hi Bjørn.

    When it has had the problem it is only scanning, it is not connected to any of the nRF52832 devices.

    What could cause the scanning to randomly stop?

    I could add a watchdog timer, but would be better to figure out what the issue.

    Is there any variables / functions I can monitor regarding scanning that I could log? e.g. is there a function that tells you if scanning is running, or has failed?

    Thanks

    Phil

Children
No Data
Related