ble_gap_evt_adv_report_t beacons

Hi,

In one of my application based on SDK 15.2, I am using nRF52832 as a central scanning  device for 128 BLE beacons

My question is how often is the ble_gap_evt_adv_report_t data instance updated if I set the timeout value as BLE_GAP_SCAN_TIMEOUT_UNLIMITED

My understanding here is setting the timeout to BLE_GAP_SCAN_TIMEOUT_UNLIMITED  allows me for a continuous scan forever , but I need to know how is the gap advertisement report updated.

Thanks

Abhi

Parents Reply Children
  • Hi Hung,

    Thanks for the response. 

    I think I was not able to explain my question fully

    1) I understand that sd_ble_gap_scan_start() needs to be started everytime we want to update to the report BLE_GAP_EVT_ADV_REPORT,

    2) in the sd_ble_gap_scan_start()  there is a parameter scan_params--> timeout, this timeout if set to  BLE_GAP_SCAN_TIMEOUT_UNLIMITED  means scanning all the time and we do not need to call the sd_ble_gap_scan_start() again to start scanning again( correct me if I am wrong)

    In this case how is the BLE_GAP_EVT_ADV_REPORT updated?

    For example I have a beacon in surroundings which is advertising every 1 second , does the report BLE_GAP_EVT_ADV_REPORT also get updated every second ? 

    Thanks

    Abhi

  • Hi, 

    Abhishek said:
    this timeout if set to  BLE_GAP_SCAN_TIMEOUT_UNLIMITED  means scanning all the time and we do not need to call the sd_ble_gap_scan_start() again to start scanning again( correct me if I am wrong)

    No this is not correct. You will have to restart scanning regardless what timeout you set. 

    If you have a beacon advertising every 1 second, you will receive BLE_GAP_EVT_ADV_REPORT every one second or earlier, if there are other advertisers around. 

  • Hi,

    Can you be more specific on what does the BLE_GAP_SCAN_TIMEOUT_UNLIMITED imply ?

    Thanks

    Abhi

  • Hi, 

    If you set the timeout to a specific number , let says 10 seconds. If there isn't any advertising packet received in such 10 seconds you will receive an event BLE_GAP_EVT_TIMEOUT and scan will stop. 

    If you set the timeout to BLE_GAP_SCAN_TIMEOUT_UNLIMITED , you will not receive BLE_GAP_EVT_TIMEOUT and scanning will not stop if there isn't any advertising packet received. 

Related