<?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>USBD CDC ACM can&amp;#39;t get one byte</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44369/usbd-cdc-acm-can-t-get-one-byte</link><description>I use the example usbd_ble_uart with SDK_15.3.0. I need to send any byte received from the terminal via BLE. Do not wait until the buffer is full or the end of line character arrives. Here is a test example: 
 case APP_USBD_CDC_ACM_USER_EVT_RX_DONE: </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Mar 2019 15:29:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44369/usbd-cdc-acm-can-t-get-one-byte" /><item><title>RE: USBD CDC ACM can't get one byte</title><link>https://devzone.nordicsemi.com/thread/176786?ContentTypeID=1</link><pubDate>Mon, 18 Mar 2019 15:29:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e09c1d8-042c-4712-b5ce-61c087195495</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t&amp;nbsp;&lt;span&gt;&amp;nbsp;wait until the buffer is full or the end of line character arrives, you will get 1 BLE packet for each byte you send. It won&amp;#39;t be very&amp;nbsp;efficient, but it&amp;#39;s possible to do. Starting from the default example in the SDK 15.3, I believe the only change you need to do is this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Diff:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;--- C:/SDK/nRF5_SDK_15.3.0_59ac345/nRF5_SDK_15.3.0_59ac345/examples/peripheral/usbd_ble_uart/main.c	ma mar 18 16:20:45 2019
+++ C:/SDK/nRF5_SDK_15.3.0_59ac345/nRF5_SDK_15.3.0_59ac345/examples/peripheral/usbd_ble_uart/main_modified.c	ma mar 18 16:08:59 2019
@@ -699,3 +699,3 @@ static void cdc_acm_user_ev_handler(app_usbd_class
-                if ((m_cdc_data_array[index - 1] == &amp;#39;\n&amp;#39;) ||
-                    (m_cdc_data_array[index - 1] == &amp;#39;\r&amp;#39;) ||
-                    (index &amp;gt;= (m_ble_nus_max_data_len)))
+                if (   (m_cdc_data_array[index - 1] == &amp;#39;\n&amp;#39;) ||
+                       (m_cdc_data_array[index - 1] == &amp;#39;\r&amp;#39;) ||
+                       (index &amp;gt;= (m_ble_nus_max_data_len))   ||    true      )
@@ -703 +703 @@ static void cdc_acm_user_ev_handler(app_usbd_class
-                    if (index &amp;gt; 1)
+                    if (index &amp;gt;= 1)
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USBD CDC ACM can't get one byte</title><link>https://devzone.nordicsemi.com/thread/174070?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 16:01:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:973a2d80-cd93-4e9e-b7d4-f11ed64deca9</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;How to properly post source code:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6165._5F00_Insert-Code-_2D00_-Nordic.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>