Hi!
I'm interested in trying out hci_usb sample of nRF Connect SDK with Nordic's Link Layer.
With following changes to application configuration I'm able to compile the hci_usb sample:
diff --git a/samples/bluetooth/hci_usb/prj.conf b/samples/bluetooth/hci_usb/prj.conf index 1c19e32540..2ccd19c2a4 100644 --- a/samples/bluetooth/hci_usb/prj.conf +++ b/samples/bluetooth/hci_usb/prj.conf @@ -9,3 +9,6 @@ CONFIG_BT_HCI_RAW=y CONFIG_USB=y CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_BLUETOOTH=y + +CONFIG_BT_LL_NRFXLIB=y +CONFIG_BT_MAX_CONN=10
When trying to use nRF52840 DK as a Bluetooth LE dongle in Linux there seems to be some problems in initialization. See the btmon trace below.
Bluetooth monitor ver 5.48 = Note: Linux version 4.15.0-88-generic (x86_64) 0.206549 = Note: Bluetooth subsystem version 2.22 0.206551 = New Index: A4:83:E7:99:93:DA (Primary,USB,hci0) [hci0] 0.206551 = Open Index: A4:83:E7:99:93:DA [hci0] 0.206552 = Index Info: A4:83:E7:99:93:DA (not assigned) [hci0] 0.206552 @ MGMT Open: bluetoothd (privileged) version 1.14 {0x0001} 0.206553 @ MGMT Open: btmon (privileged) version 1.14 {0x0002} 0.206968 = New Index: 00:00:00:00:00:00 (Primary,USB,hci1) [hci1] 4.000698 = Open Index: 00:00:00:00:00:00 [hci1] 4.000725 < HCI Command: Reset (0x03|0x0003) plen 0 #1 [hci1] 4.000744 > HCI Event: Command Complete (0x0e) plen 4 #2 [hci1] 4.003216 Reset (0x03|0x0003) ncmd 1 Status: Success (0x00) < HCI Command: Read Local Supported Features (0x04|0x0003) plen 0 #3 [hci1] 4.003236 > HCI Event: Command Complete (0x0e) plen 12 #4 [hci1] 4.005261 Read Local Supported Features (0x04|0x0003) ncmd 1 Status: Success (0x00) Features: 0x00 0x00 0x00 0x00 0x60 0x00 0x00 0x00 BR/EDR Not Supported LE Supported (Controller) < HCI Command: Read Local Version Information (0x04|0x0001) plen 0 #5 [hci1] 4.005279 > HCI Event: Command Complete (0x0e) plen 12 #6 [hci1] 4.007871 Read Local Version Information (0x04|0x0001) ncmd 1 Status: Success (0x00) HCI version: Reserved (0x0a) - Revision 65534 (0xfffe) LMP version: Reserved (0x0a) - Subversion 65534 (0xfffe) Manufacturer: Nordic Semiconductor ASA (89) < HCI Command: Read BD ADDR (0x04|0x0009) plen 0 #7 [hci1] 4.007897 > HCI Event: Command Complete (0x0e) plen 10 #8 [hci1] 4.010387 Read BD ADDR (0x04|0x0009) ncmd 1 Status: Success (0x00) Address: 00:00:00:00:00:00 (OUI 00-00-00) < HCI Command: LE Read Buffer Size (0x08|0x0002) plen 0 #9 [hci1] 4.010431 > HCI Event: Command Complete (0x0e) plen 7 #10 [hci1] 4.012994 LE Read Buffer Size (0x08|0x0002) ncmd 1 Status: Success (0x00) Data packet length: 27 Num data packets: 3 < HCI Command: LE Read Local Supported Features (0x08|0x0003) plen 0 #11 [hci1] 4.013014 > HCI Event: Command Complete (0x0e) plen 12 #12 [hci1] 4.015221 LE Read Local Supported Features (0x08|0x0003) ncmd 1 Status: Success (0x00) Features: 0xf5 0x59 0x00 0x00 0x00 0x00 0x00 0x00 LE Encryption Extended Reject Indication LE Ping LE Data Packet Length Extension LL Privacy Extended Scanner Filter Policies LE 2M PHY LE Coded PHY LE Extended Advertising Channel Selection Algorithm #2 < HCI Command: LE Read Supported States (0x08|0x001c) plen 0 #13 [hci1] 4.015256 > HCI Event: Command Complete (0x0e) plen 8 #14 [hci1] 4.018175 LE Read Supported States (0x08|0x001c) ncmd 1 invalid packet size 01 8b 92 00 00 ..... = Close Index: 00:00:00:00:00:00
I'm using commit 169ed14ee2371073e63d922733345dbcad2a5218 of fw-nrfconnect-nrf.
Steps to reproduce:
1. cd ncs/zephyr/samples/bluetooth/hci_usb
2. apply the diff above to prj.conf
3. west build -b nrf52840_pca10056 && west flash
4. start btmon
5. reset the board and check the btmon log.