NRF52 scan request notification with Zephyr

Hello guys,

I would like to execute code once a scan request from any other BLE device is received by the NRF52 using Zephyr.

Unfortunately, I am not able to receive such an event. I am using the current kernel version (1.9.0) of Zephyr. Several CONFIG parameters for the kernel are defined and according to the Zephyr documentation [1] BT_HCI, BT, BT_CTLR, BT_CTLR_ADV_EXT and BT_CTLR_SCAN_REQ_NOTIFY have to be set in prj.conf in order to received notifications on a scan request. The result is no compile errors but also no difference than with unset parameters. I am scanning with two different devices, both receive the scan response. But I am not able to identify when the request is received on the nRF52. In order to test if the general configuration is working I set the BT_CTLR_ADV_INDICATION parameter. Every time an advertising packet is sent, I receive an "encode_control" message. Therefore the mentioned function is enabled and also reached. The problem is that the case NODE_RX_TYPE_SCAN_REQ in hci.c never applies and therefore the function le_scan_req_received is also never called...

Does anybody know what is going wrong? Has someone a similar problem? Is my setup incorrect or incomplete? Is the feature in general working? Is there a different method (in Zephyr) in order to execute code after a scan request is received?

Thanks in advance, Tobi

[1] zephyr-docs.s3-website-us-east-1.amazonaws.com/.../CONFIG_BT_CTLR_SCAN_REQ_NOTIFY.html

Parents Reply Children
No Data
Related