xref: /btstack/chipset/zephyr/nrf5340_dongle/README.md (revision 4da9eab982db614e33cc14c37d0c28d337f6cbd1)
1421ee5a8SDirk Helbig# nRF5340 (Audio) DK Board as USB HCI Dongle Guide
2421ee5a8SDirk Helbig
307cf6ebdSMatthias RingwaldThis will turn the Nordic nRF5340 DK and Audio DK boards into an USB CDC HCI dongle that uses Nordic's SoftDevice Controller.
4421ee5a8SDirk Helbig
5421ee5a8SDirk Helbig## Preconditions
6*4da9eab9SMatthias Ringwald- [Install Nordic's nRF Connect SDK, v2.8 or higher](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation.html) into ${NCS_ROOT}
74899c98fSMatthias Ringwald- Copy the included files and folders to '${NCS_ROOT}/zephyr/samples/bluetooth/hci_uart/'
8*4da9eab9SMatthias Ringwald    - `sysbuild`
9*4da9eab9SMatthias Ringwald    - `Kconfig.sysbuild`
1007cf6ebdSMatthias Ringwald    - `overlay-usb.conf`
1107cf6ebdSMatthias Ringwald    - `usb.overlay`
12421ee5a8SDirk Helbig
13421ee5a8SDirk Helbig## Build/Flash HCI Bridge on AppCore
14421ee5a8SDirk Helbig
15421ee5a8SDirk HelbigYou need to specify the board with the '-b' param in the west call.
16421ee5a8SDirk Helbig
17421ee5a8SDirk HelbigFor nRF5340 DK:
18421ee5a8SDirk Helbig
19421ee5a8SDirk Helbig```sh
204899c98fSMatthias Ringwaldcd  ${NCS_ROOT}/zephyr/samples/bluetooth/hci_uart/
21*4da9eab9SMatthias Ringwaldwest build --pristine -b nrf5340dk/nrf5340/cpuapp -- -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG=overlay-usb.conf
22421ee5a8SDirk Helbigwest flash
23421ee5a8SDirk Helbig```
24421ee5a8SDirk Helbig
25421ee5a8SDirk HelbigFor nRF5340 Audio DK (ADK)
26421ee5a8SDirk Helbig
27421ee5a8SDirk Helbig```sh
284899c98fSMatthias Ringwaldcd  ${NCS_ROOT}/zephyr/samples/bluetooth/hci_uart/
29*4da9eab9SMatthias Ringwaldwest build --pristine -b nrf5340dk/nrf5340/cpuapp -- -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG=overlay-usb.conf
30421ee5a8SDirk Helbigwest flash
31421ee5a8SDirk Helbig```
32421ee5a8SDirk Helbig
33421ee5a8SDirk Helbig## Usage / Find Serial Port
34421ee5a8SDirk Helbig
3507cf6ebdSMatthias RingwaldOn macOS, the nRF5340 ADK with the HCI bridge show up as 5 /dev/tty. To find the HCI one, list all /dev/tty.* devices,
36421ee5a8SDirk Helbigthen press and hold the RESET button and list all devices again. The missing one is the one provided by the HCI bridge.
37421ee5a8SDirk Helbig
3807cf6ebdSMatthias RingwaldOn the nRF5340 DK, you can directly plug into the `nRF5340 USB` port and get only a single /dev/tty.
3907cf6ebdSMatthias Ringwald
40421ee5a8SDirk Helbig## HCI log
41421ee5a8SDirk Helbig
42421ee5a8SDirk Helbig```sh
43421ee5a8SDirk Helbigbtmon -J nrf5340_xxaa_app -w <logfile>
44421ee5a8SDirk Helbig```
45