I can read peer address and rssi field in the scan request report. But how can I read the AdvA address field in the scan request to make sure that the scan request packet is sent for a particular advertiser.
I can read peer address and rssi field in the scan request report. But how can I read the AdvA address field in the scan request to make sure that the scan request packet is sent for a particular advertiser.
Hi,
The SoftDevice does this for you, and it will make sure that the AdvA address in the scan request PDU is correct. The application don't need to handle that.
In order to receive scan response packets from an advertiser, the only thing the application need to do is to enable active scanning, i.e. set the active paramter in ble_gap_scan_params_t m_scan_params to 1.
Snippet:
. . /**@brief Scan parameters requested for scanning and connection. */ static ble_gap_scan_params_t const m_scan_params = { .active = 1, .interval = SCAN_INTERVAL, .window = SCAN_WINDOW, .timeout = SCAN_TIMEOUT, . . .
If the SoftDevice receives a scannable PDU from an advertiser, it will then automatically respond with a scan
request PDU and then listen for the scan response PDU if the .active paramter is set to 1.
Hi,
The SoftDevice does this for you, and it will make sure that the AdvA address in the scan request PDU is correct. The application don't need to handle that.
In order to receive scan response packets from an advertiser, the only thing the application need to do is to enable active scanning, i.e. set the active paramter in ble_gap_scan_params_t m_scan_params to 1.
Snippet:
. . /**@brief Scan parameters requested for scanning and connection. */ static ble_gap_scan_params_t const m_scan_params = { .active = 1, .interval = SCAN_INTERVAL, .window = SCAN_WINDOW, .timeout = SCAN_TIMEOUT, . . .
If the SoftDevice receives a scannable PDU from an advertiser, it will then automatically respond with a scan
request PDU and then listen for the scan response PDU if the .active paramter is set to 1.
I am clear now. Many thanks.