I'm trying to build a quick application to scan for all devices in the vicinity and print out their details (device name, manf data, RSSI, and BLE address). I am parsing the p_scan_evt->params.p_not_found object to do this. It looks like it's working to read manufacturing info and address of all devices, however the packets appear to be missing the device name. The length of the data packet confirms this.
If I scan in the nRF Connect Android app, I am able to verify the same data my nRF52 does, but the raw advertising packet data has additional data. It contains the buffer the nRF52 sees and the device name in addition.
Do I need to issue a scan request from the device? If so how do I do that? I tried to handle the NRF_BLE_SCAN_EVT_SCAN_REQ_REPORT event but I never enter that case.
Any other suggestions?
static void scan_evt_handler(scan_evt_t const * p_scan_evt) { ret_code_t err_code; switch(p_scan_evt->scan_evt_id) { case NRF_BLE_SCAN_EVT_NOT_FOUND: device_found(p_scan_evt->params.p_not_found); break; case NRF_BLE_SCAN_EVT_SCAN_REQ_REPORT: NRF_LOG_INFO("--------------------- SCAN REQ--------------"); break; } }