<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Using Zigbee with USB CDC ACM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93838/using-zigbee-with-usb-cdc-acm</link><description>I developed a small test app by adding logging and a blinking LED to the Console over CDC ACM UART Sample. The LED blinks, and I can see the logs by connecting to the USB CDC ACM. However, if I try enabling Zigbee support in the app, the USB CDC ACM no</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Nov 2022 20:19:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93838/using-zigbee-with-usb-cdc-acm" /><item><title>RE: Using Zigbee with USB CDC ACM</title><link>https://devzone.nordicsemi.com/thread/398204?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 20:19:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a3f8fd3-9ed6-4c85-ace5-a8b9520d0717</guid><dc:creator>mhavu</dc:creator><description>&lt;p&gt;Thanks. The problem seemed to be a missing &lt;em&gt;pm_static.yml&lt;/em&gt; file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Zigbee with USB CDC ACM</title><link>https://devzone.nordicsemi.com/thread/396761?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2022 20:36:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66c9ad3d-4351-4ac4-9939-7264c5b3794d</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I use your nrf52840dongle_nrf52840.overlay and create&amp;nbsp;nrf52840dongle_nrf52840.conf under&amp;nbsp;\boards with the following content:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#
# Copyright (c) 2022 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Enable nRF ECB driver
CONFIG_CRYPTO=y
CONFIG_CRYPTO_NRF_ECB=y
CONFIG_CRYPTO_INIT_PRIORITY=80

# Networking
CONFIG_MPSL=y


# Enable USB CDC ACM
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_DRIVER=y
CONFIG_USB_DEVICE_PRODUCT=&amp;quot;Zephyr USB console sample&amp;quot;
CONFIG_USB_DEVICE_MANUFACTURER=&amp;quot;Nordic Semiconductor ASA&amp;quot;
CONFIG_USB_DEVICE_VID=0x1915
CONFIG_USB_DEVICE_PID=0x0100

CONFIG_UART_LINE_CTRL=y
CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y

# Since the default LOG_MODE_MINIMAL is synchronous, it will mess with the USB
# driver/subsys. Use the deferred mode instead.
CONFIG_LOG_MODE_DEFERRED=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;modify main.c as&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;--- &amp;quot;a/C:\\ncs\\v2.1.2\\nrf\\samples\\zigbee\\light_switch\\src\\main.c&amp;quot;
+++ &amp;quot;b/C:\\ncs\\v2.1.2\\Devzone\\light_switch_298447\\src\\main.c&amp;quot;
@@ -14,6 +14,13 @@
 #include &amp;lt;dk_buttons_and_leds.h&amp;gt;
 #include &amp;lt;ram_pwrdn.h&amp;gt;

+#include &amp;lt;zephyr/sys/printk.h&amp;gt;
+#include &amp;lt;zephyr/usb/usb_device.h&amp;gt;
+#include &amp;lt;zephyr/drivers/uart.h&amp;gt;
+
+BUILD_ASSERT(DT_NODE_HAS_COMPAT(DT_CHOSEN(zephyr_console), zephyr_cdc_acm_uart),
+            &amp;quot;Console device is not ACM CDC UART device&amp;quot;);
+
 #include &amp;lt;zboss_api.h&amp;gt;
 #include &amp;lt;zboss_api_addons.h&amp;gt;
 #include &amp;lt;zigbee/zigbee_app_utils.h&amp;gt;
@@ -22,6 +29,7 @@
 #include &amp;quot;zb_mem_config_custom.h&amp;quot;
 #include &amp;quot;zb_dimmer_switch.h&amp;quot;

+
 #if CONFIG_ZIGBEE_FOTA
 #include &amp;lt;zigbee/zigbee_fota.h&amp;gt;
 #include &amp;lt;zephyr/sys/reboot.h&amp;gt;
@@ -724,6 +732,26 @@ static struct nus_entry commands[] = {

 void main(void)
 {
+
+       //---------------
+       const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_console));
+       uint32_t dtr = 0;
+
+       if (usb_enable(NULL)) {
+               return;
+       }
+
+       /* Poll if the DTR flag was set */
+       while (!dtr) {
+               uart_line_ctrl_get(dev, UART_LINE_CTRL_DTR, &amp;amp;dtr);
+               /* Give CPU resources to low priority threads. */
+               k_sleep(K_MSEC(100));
+       }
+
+       printk(&amp;quot;hello world\n&amp;quot;);
+
+//----------------------------
+
        LOG_INF(&amp;quot;Starting ZBOSS Light Switch example&amp;quot;);

        /* Initialize. */
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Get log as&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/5657.pastedimage1669062891336v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Here is the project&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/light_5F00_switch.7z"&gt;devzone.nordicsemi.com/.../light_5F00_switch.7z&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Zigbee with USB CDC ACM</title><link>https://devzone.nordicsemi.com/thread/396502?ContentTypeID=1</link><pubDate>Sat, 19 Nov 2022 20:55:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32513cc2-0776-44c8-9921-e98f3d919777</guid><dc:creator>mhavu</dc:creator><description>&lt;p&gt;I managed to get the&amp;nbsp;above code working by&amp;nbsp;adding&amp;nbsp;CONFIG_NCS_SAMPLES_DEFAULTS (and&amp;nbsp;CONFIG_LOG_MODE_DEFERRED required by it) and&amp;nbsp;CONFIG_USB_DEVICE_DRIVER. I didn&amp;#39;t manage to get the&amp;nbsp;&lt;span&gt;USB CDC ACM UART&lt;/span&gt;&amp;nbsp;working in the&lt;span&gt;&amp;nbsp;Zigbee light switch sample with this prj.conf, though. Once I add a &amp;nbsp;zigbee_enable() call into main, the&amp;nbsp;USB CDC ACM UART does not show up anymore.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Zigbee with USB CDC ACM</title><link>https://devzone.nordicsemi.com/thread/395646?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2022 20:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31bf0fcb-2cab-40ac-972f-910346e49224</guid><dc:creator>mhavu</dc:creator><description>&lt;p&gt;Thanks! That looks like a good starting point.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Zigbee with USB CDC ACM</title><link>https://devzone.nordicsemi.com/thread/395643?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2022 20:15:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81ffd701-889f-4e87-8ada-202abecd8b5e</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;You could take a look at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/87347/printk-on-usb-port-nrf-dongle"&gt;this case&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Zigbee with USB CDC ACM</title><link>https://devzone.nordicsemi.com/thread/395641?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2022 20:12:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43c3dd42-f1e3-40c0-a5da-0ae5d9c982fa</guid><dc:creator>mhavu</dc:creator><description>&lt;p&gt;I started&amp;nbsp;from the Zigbee light switch sample. My problem is not with enabling&amp;nbsp;Zigbee, but with getting the&amp;nbsp;USB CDC ACM UART to work with Zigbee. In the attached code, I tried to strip the code to the bare&amp;nbsp;minimum. I may have inadvertently removed some&amp;nbsp;necessary Zigbee bits in the process, but even with a more complete Zigbee program, if I add a&amp;nbsp;&lt;span&gt;USB CDC ACM UART, the app stops working.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Zigbee with USB CDC ACM</title><link>https://devzone.nordicsemi.com/thread/395640?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2022 19:57:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc696d35-ba5e-4633-a87c-9df556d9680a</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would suggest you start the test from the Zigbee&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/zigbee/light_bulb/README.html"&gt;Light bulb&lt;/a&gt;&amp;nbsp;sample and see it how to enable Zigbee function. My colleague also provided the example&amp;nbsp;&lt;a title="light_bulb_dongle" href="https://github.com/martelmy/NCS_examples/tree/main/zigbee/light_bulb_dongle"&gt;light_bulb_dongle&lt;/a&gt;&amp;nbsp;for the dongle, but that is for v1.9.1.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>