Hi, I am developing an IoT sensor (peripheral device) using SDK v11.
On my sensor, I have defined an advertising packet that broadcasts the complete local name and a scan response packet that broadcasts manufacturer specific data. Both of these are set as follows:
err_code = ble_advdata_set(&advdata, &scanrsp);
APP_ERROR_CHECK(err_code);
I have also created a central device using a nRF51 development board and firmware based on the "ble_app_multirole_lesc" example project. In my derivative project I have removed all peripheral mode functionality so that it just behaves as a central device, and I have temporarily blocked connections in order to process scan responses.
In my sensor FW, I have added the BLE_GAP_EVT_SCAN_REQ_REPORT case to my on_ble_evt. All I am doing at the moment is triggering an output pin to indicate that the sensor did receive a scan request. I have confirmed that the softdevice in the sensor does in fact raise this event when I start scanning with the central device.
However, I don't see how to access the scan response data on the central device. I tried adding BLE_GAP_EVT_SCAN_REQ_REPORT case to my on_ble_evt but this event is never raised.
My questions:
1) I have assumed that the peripheral soft device automatically sends the scan response upon receiving a scan request, and then sends the BLE_GAP_EVT_SCAN_REQ_REPORT event to the application only after successfully sending the scan response. Is this true? Is there something more I need to do on the peripheral side besides just setting the scan response data as I did above?
2) In the central device, is the scan response data accessible to me when the BLE_GAP_EVT_ADV_REPORT is raised? Or is there another event that I need to respond to?