Hi!
I am trying to get scan_req_notification to fire notifications when central devices issue scan reqs but without success until now. Here is my code:
Env: SDK15, SES, nrf52DK
In a ble template derived project, in the advertising_start() function I added this code before calling ble_advertising_start():
...
m_advertising.adv_params.scan_req_notification = 1;
m_advertising.adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED;
ret_code_t err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
...
Then from the ble_cus_on_ble_evt (observer) handler, I added a new case with:
case BLE_GAP_EVT_SCAN_REQ_REPORT:
printf("\n SCAN_REQ called ...\n");
const ble_gap_evt_t * p_gap_evt = &p_ble_evt->evt.gap_evt;
break;
I also added a breakpoint to the printf line
However, the BLE_GAP_EVT_SCAN_REQ_REPORT notification is never fired when using nRFConnect app or a Linux Bluez C app used for scan BLE devices. This linux C app was configured in order to do scan request:
...
le_set_scan_parameters_cp scan_params_cp;
memset(&scan_params_cp, 0, sizeof(scan_params_cp));
scan_params_cp.type = 0x01; //00 Passive 01 Active
...
What am I doing wrong?
Thanks
Alex