<?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>CDC ACM USBD Binary / Raw Data Mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118705/cdc-acm-usbd-binary-raw-data-mode</link><description>Hello, 
 I am using the nRF52833 - DK and running the USB CDC ACM example. I can transmit and receive data with the example. I noticed that when receiving data I am only able to receive ASCII data. If the USB CDC Host sends binary / raw data. it is not</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Feb 2025 16:21:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118705/cdc-acm-usbd-binary-raw-data-mode" /><item><title>RE: CDC ACM USBD Binary / Raw Data Mode</title><link>https://devzone.nordicsemi.com/thread/522025?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 16:21:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b26fc44-63ae-42c5-a141-35c03545ecbd</guid><dc:creator>BAW</dc:creator><description>&lt;p&gt;Thank you for the response. I will take a look.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CDC ACM USBD Binary / Raw Data Mode</title><link>https://devzone.nordicsemi.com/thread/521909?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 12:07:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a80367dc-94dd-43a1-a5ff-d54521963855</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Brent,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Assuming you are using nrf5SDKv17.1.0, The usb driver/library in itself is not doing any conversion from binary/ASCII in itself. But there are some instances in the application where we are logging or sending data in ASCII.&lt;/p&gt;
&lt;p&gt;For example in&amp;nbsp;APP_USBD_CDC_ACM_USER_EVT_RX_DONE event, we have&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_LOG_INFO(&amp;quot;RX: size: %lu char: %c&amp;quot;, size, m_rx_buffer[0]);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This just logs to serial output and does not affect the USB data.&lt;/p&gt;
&lt;p&gt;But we also have&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;size_t size = sprintf(m_tx_buffer, &amp;quot;Hello USB CDC FA demo: %u\r\n&amp;quot;, frame_counter);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Which is actual data transmitted which is actually formulated to ASCII.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to deal with raw data, then you just need to print/log or formulate such things in raw data formats like using&amp;nbsp;NRF_LOG_HEXDUMP_INFO to print. or not using ascii conversions in sprintf&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>