Hello, we are trying to receive BLE extended advertisement pakcets from Thingy53 using a nRF52840DK as a HCI controller with a Raspberry Pi 5. I just added this one line in the hci_usb sample's prj.conf file:
CONFIG_BT=y CONFIG_BT_HCI_RAW=y CONFIG_BT_HCI=y CONFIG_BT_LL_SOFTDEVICE=y CONFIG_BT_CTLR_ADV_EXT=y CONFIG_BT_EXT_ADV=y CONFIG_BT_OBSERVER=y CONFIG_BT_CENTRAL=y CONFIG_BT_CTLR_PHY_CODED=y CONFIG_BT_CTLR_PHY_2M=y CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PID=0x000B CONFIG_USB_DEVICE_BLUETOOTH=y CONFIG_USB_DEVICE_BLUETOOTH_VS_H4=n CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n # We dont want any console or CDC ACM that may cause BlueZ to not detect hci_usb CONFIG_SERIAL=n CONFIG_CONSOLE=n CONFIG_UART_CONSOLE=n # Workaround: Unable to allocate command buffer when using K_NO_WAIT since # Host number of completed commands does not follow normal flow control. CONFIG_BT_BUF_CMD_TX_COUNT=10as suggested by the extended_adv/scanner sample from zephyr. The firmware can be built and flashed to the board.
After I connect my board's usb port to the Pi and ran
bluetoothctl list, I can see my DK's address appeared as one of the controllers. However, after selecting it as a default HCI controller and ran
scan on, I got the following output from btmon:
bluetoothd[3118]: @ MGMT Command: Start Discovery (0x0023) plen 1 {0x0001} [hci1] 59.577249 Address type: 0x06 LE Public LE Random < HCI Command: LE Set Random Address (0x08|0x0005) plen 6 #1 [hci1] 59.577283 Address: 2A:93:5F:24:0F:B7 (Non-Resolvable) > HCI Event: Command Complete (0x0e) plen 4 #2 [hci1] 59.579192 LE Set Random Address (0x08|0x0005) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 13 #3 [hci1] 59.579214 Own address type: Random (0x01) Filter policy: Accept all advertisement (0x00) PHYs: 0x05 Entry 0: LE 1M Type: Active (0x01) Interval: 11.250 msec (0x0012) Window: 11.250 msec (0x0012) Entry 1: LE Coded Type: Active (0x01) Interval: 33.750 msec (0x0036) Window: 33.750 msec (0x0036) > HCI Event: Command Complete (0x0e) plen 4 #4 [hci1] 59.582187 LE Set Extended Scan Parameters (0x08|0x0041) ncmd 1 Status: Invalid HCI Command Parameters (0x12) @ MGMT Event: Command Complete (0x0001) plen 4 {0x0001} [hci1] 59.582211 Start Discovery (0x0023) plen 1 Status: Invalid Parameters (0x0d) Address type: 0x06 LE Public LE Random
I think the problem is still around extended advertisement features, and specifically about these parameters. But I have enabled coded phy and I think LE 1M should be default supported anyway. Is it because the scan interval/window combination here? How can I debug further? I am running with bluez5.82.