xref: /btstack/chipset/zephyr/nrf5340_dongle/README.md (revision 62daa4413793ac9b1b00945388a2ed4faeb48481)
1# nRF5340 (Audio) DK Board as USB HCI Dongle Guide
2
3This will turn the Nordic nRF5340 DK and Audio DK boards into an USB CDC HCI dongle.
4
5If using the NRF Connect SDK ( sdk-nrf ) it is important to follow the order in this document, as 'west flash'
6will also program the NetCore with zephyr-ll which needs to be replaced afterwards with the Packetcraft Link Layer.
7
8## Preconditions
9Copy the included files to '${ZEPHYR_ROOT}/zephyr/examples/bluetooth/hci_uart/'
10
11## Build/Flash HCI Bridge on AppCore
12
13You need to specify the board with the '-b' param in the west call.
14
15For nRF5340 DK:
16
17```sh
18cd  ${ZEPHYR_ROOT}/zephyr/samples/bluetooth/hci_uart/
19west build --pristine -b nrf5340dk_nrf5340_cpuapp -- -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG=overlay-usb.conf
20west flash
21```
22
23For nRF5340 Audio DK (ADK)
24
25```sh
26cd  ${ZEPHYR_ROOT}/zephyr/samples/bluetooth/hci_uart/
27west build --pristine -b nrf5340_audio_dk_nrf5340_cpuapp -- -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG=overlay-usb.conf
28west flash
29```
30
31## Flash Packetcraft Link Layer on NetCore
32
33```sh
34nrfjprog --program ble5-ctr-rpmsg_3424.hex --chiperase --coprocessor CP_NETWORK -r --verify
35```
36
37the corresponding hex file is in the [nrfConnectSDK](https://github.com/nrfconnect/sdk-nrf/blob/main/lib/bin/bt_ll_acs_nrf53/bin)
38
39## Usage / Find Serial Port
40
41On macOS, the nRF5340 with the HCI bridge show up as 5 /dev/tty. To find the HCI one, list all /dev/tty.* devices,
42then press and hold the RESET button and list all devices again. The missing one is the one provided by the HCI bridge.
43
44## HCI log
45
46```sh
47btmon -J nrf5340_xxaa_app -w <logfile>
48```
49