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

ble_app_hrs_c --scan stopped

I programmed nRF51822 with S120 softdevice and ble_app_hrs_c application to scan beacons. It works fine but have one problem.

  • It scans beacons for about 10 seconds then stop scanning for about 10 seconds and repeat scanning.

What makes this kind of symptoms scanning-stop-scanning-stop every 10 seconds period.

Parents
  • I have captured beacon data at "on_ble_evt" S120 reply event for 10 seconds then no reply for 10 seconds, I tested with one nordic format beacon.

    Symptom:

    • using one beacon every second advertising.
    • successfully scan beacon and send UART 10~11 times, it's about 10 seconds then halt
    • After about 10 seconds again scan beacon and send UART.
    • Repeat above situation.

    Durig halt state, I advertise anothe beacon then it scan successfully so this symptom is related in scanning same beacon continueously.

  • ...

    #define SCAN_INTERVAL              0x00A0                             /**< Determines scan interval in units of 0.625 millisecond. */
    
    #define SCAN_WINDOW                0x0050                             /**< Determines scan window in units of 0.625 millisecond. */
    

    Above is default setting interval I used. I mean that in the case I advertise only one beacon, it scans 10 seconds and stop 10 seconds then repeat scan and stop. During scanning stopped if I advertise another beacon, it scans another beacon.

Reply
  • ...

    #define SCAN_INTERVAL              0x00A0                             /**< Determines scan interval in units of 0.625 millisecond. */
    
    #define SCAN_WINDOW                0x0050                             /**< Determines scan window in units of 0.625 millisecond. */
    

    Above is default setting interval I used. I mean that in the case I advertise only one beacon, it scans 10 seconds and stop 10 seconds then repeat scan and stop. During scanning stopped if I advertise another beacon, it scans another beacon.

Children
No Data
Related