Target is nrf52832+SoftDeviceS132
When run ActiveScan,
Is SCAN_RSP advertise_report notified only after ADV_SCAN_IND advertise_report?
If I receive only the SCAN_RSP of the SCAN_REQ performed by another device, will it be notified?
Target is nrf52832+SoftDeviceS132
When run ActiveScan,
Is SCAN_RSP advertise_report notified only after ADV_SCAN_IND advertise_report?
If I receive only the SCAN_RSP of the SCAN_REQ performed by another device, will it be notified?
Hi Suiji Biwa,
The Scan response is sent by the advertiser only after receiving Scan request, which the scanner sends only after receiving the ADV_SCAN_IND from the advertiser.

OK.Thanks.
Additional comments,
DeviceB and DeviceD is running by Active Scan.
Figure.1
(A) Will adv_report never be notified ?
Figure.2
(B) Will adv_report never be notified ?
(When the BDADDR is the same, or not same, DeviceA and DeviceC)

Again question,
On Figure1,
Is SCAN_RSP not adv_reported by itself?
Is it always adv_reported with the combination of ADV_SCAN_IND / SCAN_RSP?(or ADV_SCAN_IND only)
On Figure.2,
Is it possible that ADV_SCAN_IND and SCAN_RSP have different BDADDR cases?
I want to process only when the SCAN_RSP received by DeviceB is sent from the same device (DeviceA) as ADV_SCAN_IND.
When multiple peripherals are sending ADV_SCAN_IND / SCAN_RSP,
I would like to know how to associate ADV_SCAN_IND and SCAN_RSP on the central side.
Should it be judged by BDADDR?
Or should I put the same identification ID in ADV_SCAN_IND and SCAN_RSP?
And one more question,
ADV_SCAN_IND Message Sequence Charts,
ADV_REPORT is notified only once.
However, in reality, ADV_REPORT is notified twice (ADV_SCAN_IND, SCAN_RSP). I think the chart is wrong, please tell me the correct time chart.
Hi,
Sorry for the late response.
When the scanner sends a scan request, it will accept scan response from only that advertiser to which it has sent scan request to. The link layer in the softdevice will verify the BDADDR of scan request and scan response are the same. So it is not possible for the scanner to process the scan response data of any advertisement for which it has not sent a scan request.
OK Thanks.
And, once more.
ADV_SCAN_IND Message Sequence Charts,
ADV_REPORT is notified only once.
However, in reality, ADV_REPORT is notified twice (ADV_SCAN_IND, SCAN_RSP). I think the chart is wrong, please tell me the correct time chart.
Advertiser sends SCAN_RSP only if it receives a SCAN_REQ from the scanner. The scanner does not send SCAN_REQ if it is not doing an active scanning and hence the top layer of the MSC only shows passive scanning, where the scanner does not send the scan request and the advertiser does not send the scan response.
The Variant #1 of the chart shows the active scanning where the scanner sends the SCAN_REQ and only after receiving this packet the advertiser will send the SCAN_RSP.
The chart seems correct.
In the figure below, which is correct, the red case or the green case?

In the figure below, which is correct, the red case or the green case?

None of them is correct.

Does it mean that the app will not receive ADV_REPORT (SCAN_RSP) if the app cannot set a new buffer by scan_start () between the time the app receives ADV_REPORT (ADV_SCAN_IND) and the time SoftDevice receives SCAN_RSP?
SCAN_RSP will only be sent everytime by the advertiser when it receives SCN_REQ from the scanner.
In the previous figure, we want to allocate adv_report_buffer1 by malloc.
Shouldn't I free adv_report_buffer1 until I receive the SCAN_RSP?
Please look at the documentation for the API before using it. In the documentation for sd_ble_gap_scan_start, it is clearly mentioned for p_adv_report_buffer, the buffer used to store incoming advertising data should be kept alive until the scanning is stopped. So if you allocated memory using malloc, you cannot free the memory while scanner is running.