hi i am doing a project where i have to scan for near by ble device using nrf52840 as ble central device,
and connect with customer's ble sensors which have a overparticular adv name. so i decided to use ble_app_multilink_central example from sdk14.2,
and changed m_target_periph_name[] = "Nordic_Blinky"; to m_target_periph_name[] = "vSensVIOT";
but the central device didn't connected for long time so i tried to debug it and changed it to.
static void on_adv_report(const ble_evt_t * const p_ble_evt) { ret_code_t err_code; data_t adv_data; data_t dev_name; bool do_connect = false; const uint8_t mac[] = {0x91,0x49,0xf0,0xf9,0x81,0x00}; // For readibility. ble_gap_evt_t const * p_gap_evt = &p_ble_evt->evt.gap_evt; ble_gap_addr_t const * peer_addr = &p_gap_evt->params.adv_report.peer_addr; // Initialize advertisement report for parsing adv_data.p_data = (uint8_t *)p_gap_evt->params.adv_report.data; adv_data.data_len = p_gap_evt->params.adv_report.dlen; if(!memcmp(mac,peer_addr->addr,6)) { NRF_LOG_INFO("FOUND!"); } }
and kept one break point in if condition and checked the p_adv_report structure data but i didn't find adv name of sensor,
so i asked customer about it and they said i have to enable active scanning to get adv name.
but in scan parameter i can see that active scanning is already active by default.
but adv name can be seen from nrf connect mobile app.
so tested with some other ble device(esp32) and performed ble scan and i got adv name from that sensor(only when active scanning is enabled).
my question is where can i see active scanning(scan req and scan resp) data.
please help.