Issues Setting Up CDC-ACM (Serial over USB) for OpenThread CLI Shell

I've been working on building and flashing the OpenThread CLI sample in two setups:

  • Setup 1: nRF21540DK
  • Setup 2: nRF52840DK + nRF21540EK

 I'm using NCS v2.6.1. 

While I've managed to successfully build the project occasionally, I frequently encounter several warnings in the Problems tab. I’m a facing issues with Kconfig symbols in the prj.conf file. Since I'll be powering the boards via microUSB cables, I need the flexibility to connect each board individually to my laptop and configure the OpenThread network using the cli. For this, I attempted to set up the shell over the microUSB connector connected to the USB peripheral of the nRF52840 SoC using CDC-ACM (Serial over USB).

I initially tried building the project using these commands (using the pre-defined snippets):

  • Setup 1 (nRF21540DK):

    $ west build -b nrf21540dk_nrf52840 --pristine --build-dir build/nrf21540dk -S usb -S low_power -S logging

  • Setup 2 (nRF52840DK + nRF21540EK):

    $ west build -b nrf52840dk_nrf52840 --pristine --build-dir build/nrf52840dk_nrf21540ek -S usb -S low_power -S logging -- -DSHIELD=nrf21540ek

Issue 1: 

Although the build system sometimes completes successfully, I frequently see warnings that the usb.conf and low_power.conf files are not being applied in the build context.

Issue 2:

Additionally, when I connect my MacBook to the microUSB port on one of the DKs, no new serial port appears on my MacBook. I'm specifically connecting through the microUSB port linked to the USB peripheral of the nRF52840 SoC—not the one connected to the onboard JLink.

After the build process, I see several warnings that suggest some dependencies may be missing. Working with Zephyr RTOS has been challenging, particularly in determining which Kconfig symbols to set in the prj.conf file to enable specific features or networking protocols. It often feels like we're left guessing which of the many available CONFIG_symbols are required for each feature.

Related