Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

callback when sending scan request PDU to a peripheral.

Hi Team,

      We have developed an application where we are able to receive scan request notification in peripheral and scan response notification in central.

Is it possible to set/receive callback in central when sending scan request PDU(prior to scan response callback) during active scanning.

I am using softdevice s140_nrf52_6.1.0_softdevice.

Thanks in advance,

Vishnu.

Parents
  • Hi Vishnu, 

    On the peripheral side you will receive BLE_GAP_EVT_SCAN_REQ_REPORT event when there is a scan request. 

    On the central side you receive BLE_GAP_EVT_ADV_REPORT when you receive an advertising packet, and when you receive a scan response packet. 
    So you don't receive an event when you sent scan request but you do receive an event when the advertiser reply with a scan response packet. To be able to detect if the data is from an advertising packet or scan response packet you need to check the "type" value inside ble_gap_evt_adv_report_t struct when you receive the event. 

  • Thanks for your reply .

    Buy any chance can we abort sending scan request PDU from central for particular peripheral devices?

    in other words.. can we restrict scan request PDUs before sending from central(when active scanning) ..so that peripheral device may not receive BLE_GAP_EVT_SCAN_REQ_REPORT event?

Reply Children
Related