2023-12-21 06:43:54 +00:00
|
|
|
# nRF5340 (Audio) DK Board as USB HCI Dongle Guide
|
|
|
|
|
2024-04-16 10:53:24 +00:00
|
|
|
This will turn the Nordic nRF5340 DK and Audio DK boards into an USB CDC HCI dongle that uses Nordic's SoftDevice Controller.
|
2023-12-21 06:43:54 +00:00
|
|
|
|
|
|
|
## Preconditions
|
2024-04-18 08:44:08 +00:00
|
|
|
- [Install Nordic's nRF Connect SDK, v2.6 or higher](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/installation.html) into ${NCS_ROOT}
|
|
|
|
- Copy the included files and folders to '${NCS_ROOT}/zephyr/samples/bluetooth/hci_uart/'
|
|
|
|
- `child_image/hci_ipc.conf`
|
2024-04-16 10:53:24 +00:00
|
|
|
- `overlay-usb.conf`
|
|
|
|
- `usb.overlay`
|
2023-12-21 06:43:54 +00:00
|
|
|
|
|
|
|
## Build/Flash HCI Bridge on AppCore
|
|
|
|
|
|
|
|
You need to specify the board with the '-b' param in the west call.
|
|
|
|
|
|
|
|
For nRF5340 DK:
|
|
|
|
|
|
|
|
```sh
|
2024-04-18 08:44:08 +00:00
|
|
|
cd ${NCS_ROOT}/zephyr/samples/bluetooth/hci_uart/
|
2023-12-21 06:43:54 +00:00
|
|
|
west build --pristine -b nrf5340dk_nrf5340_cpuapp -- -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG=overlay-usb.conf
|
|
|
|
west flash
|
|
|
|
```
|
|
|
|
|
|
|
|
For nRF5340 Audio DK (ADK)
|
|
|
|
|
|
|
|
```sh
|
2024-04-18 08:44:08 +00:00
|
|
|
cd ${NCS_ROOT}/zephyr/samples/bluetooth/hci_uart/
|
2024-04-26 17:39:54 +00:00
|
|
|
west build --pristine -b nrf5340dk_nrf5340_cpuapp -- -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG=overlay-usb.conf
|
2023-12-21 06:43:54 +00:00
|
|
|
west flash
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage / Find Serial Port
|
|
|
|
|
2024-04-16 10:53:24 +00:00
|
|
|
On macOS, the nRF5340 ADK with the HCI bridge show up as 5 /dev/tty. To find the HCI one, list all /dev/tty.* devices,
|
2023-12-21 06:43:54 +00:00
|
|
|
then press and hold the RESET button and list all devices again. The missing one is the one provided by the HCI bridge.
|
|
|
|
|
2024-04-16 10:53:24 +00:00
|
|
|
On the nRF5340 DK, you can directly plug into the `nRF5340 USB` port and get only a single /dev/tty.
|
|
|
|
|
2023-12-21 06:43:54 +00:00
|
|
|
## HCI log
|
|
|
|
|
|
|
|
```sh
|
|
|
|
btmon -J nrf5340_xxaa_app -w <logfile>
|
|
|
|
```
|