Using SMP Server & MCUMgr for Serial DFU with USB CDC_ACM as the backend

Greetings,

I am currently working on our new product using nRF52840 and have succesfully inluded SMP Server in our application for the purpose of performing DFU using Serial and BLE OTA with great success (using this guide).

Now I would like to use the USB CDC_ACM as the physical layer/backend for the serial DFU so that instead of connecting via the UART RX/TX pins I can connect via the MCU USB port.

I have followed the documentation of SMP Server (selected the USB CDC_ACM tab and copied the contents of the overlay-cdc.conf & the usb.overlay files  to my projects prj.conf and cutom-board.dts) and the application builds with no errors but when flashed connecting a USB cable between our custom board and the PC it is not recognised as a device in Windows Device Manager.

Is there something I am missing regarding configuration options or the device tree.

Below I have provided code snippets of the .conf and .dts files of our application and the lines I added according to the Zephyr documentation of the SMP Server linked above (all other configuration options for the use of SMP Server are included in my files but I have not included them here because they are .

prj.conf

# Enable USB subsystem
CONFIG_USB_DEVICE_STACK=y
CONFIG_SERIAL=y
CONFIG_UART_LINE_CTRL=y
# USB backend is serial device
CONFIG_MCUMGR_SMP_UART=y

custom-board.dts

/ {
	chosen {
		zephyr,uart-mcumgr = &cdc_acm_uart0;
	};
};

zephyr_udc0: &usbd {
	compatible = "nordic,nrf-usbd";
	status = "okay";
};

&zephyr_udc0 {
	cdc_acm_uart0: cdc_acm_uart0 {
		compatible = "zephyr,cdc-acm-uart";
	};
};

Thank you very much for your time and I look forward to hearing from you.

Best regards,

Stavros Filippas

Related