<?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>Problem sending more than 1 data packet to nrf52840 via the virtual serial port using USB.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78962/problem-sending-more-than-1-data-packet-to-nrf52840-via-the-virtual-serial-port-using-usb</link><description>I&amp;#39;m developing using a PCA10059 board and SDK17.0.2 a dongle to communicate from the computer to the sensor, using the dongle as an intermediary for this communication. For this I am trying to send and receive packets through the virtual serial port,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Sep 2021 18:41:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78962/problem-sending-more-than-1-data-packet-to-nrf52840-via-the-virtual-serial-port-using-usb" /><item><title>RE: Problem sending more than 1 data packet to nrf52840 via the virtual serial port using USB.</title><link>https://devzone.nordicsemi.com/thread/327676?ContentTypeID=1</link><pubDate>Wed, 01 Sep 2021 18:41:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28c5366d-b172-4b89-866b-f0ee950f70b0</guid><dc:creator>Brunelli</dc:creator><description>&lt;pre class="tw-data-text tw-text-large XcVN5d tw-ta" id="tw-target-text" dir="ltr"&gt;Thanks for the help, I managed to solve the problem now.&lt;br /&gt;I was using the read function this way without setting the size i was getting the message:&lt;/pre&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; ret_code_t ret = app_usbd_cdc_acm_read(&amp;amp;m_app_cdc_acm,
                                        &amp;amp;m_rx_buffer[1],
                                        sizeof(m_rx_buffer));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;When i changed for a fixed size solved my problem:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ret_code_t ret = app_usbd_cdc_acm_read(&amp;amp;m_app_cdc_acm,
                                       &amp;amp;m_rx_buffer[1],
                                       8);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem sending more than 1 data packet to nrf52840 via the virtual serial port using USB.</title><link>https://devzone.nordicsemi.com/thread/327422?ContentTypeID=1</link><pubDate>Tue, 31 Aug 2021 12:34:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9508382c-ed3e-45f3-b741-327f4b4504ab</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi Rodrigo,&lt;/p&gt;
&lt;p&gt;I am sorry for the late reply. For your use case I think you should try running this project one colleague of mine have made: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/53649/need-a-simple-terminal-program-to-communicate-with-ble-uart-service/217898#217898"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/53649/need-a-simple-terminal-program-to-communicate-with-ble-uart-service/217898#217898&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Since I suppose you would want to use the nRF52840 dongle as a central device while the sensor will be your BLE peripheral.&lt;/p&gt;
&lt;p&gt;See how incoming data from the CDC port is processed in the cdc_acm_user_ev_handler().&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>