<?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>Sending multiple data packets continuously on UART service</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17220/sending-multiple-data-packets-continuously-on-uart-service</link><description>Hello, 
 I am testing the ble_peripheral example of ble_app_uart (SDK 12, soft device 130), this has been asked at a lot of places that the MTU is limited to 20.
But then I implemented my own code snippet to send data into fragments.
these are posts</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Oct 2016 07:38:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17220/sending-multiple-data-packets-continuously-on-uart-service" /><item><title>RE: Sending multiple data packets continuously on UART service</title><link>https://devzone.nordicsemi.com/thread/66156?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2016 07:38:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fb6a2a4-a982-466a-910e-97ca58f1d73e</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Yes, that&amp;#39;s correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending multiple data packets continuously on UART service</title><link>https://devzone.nordicsemi.com/thread/66155?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2016 04:31:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c7661ed-d3bb-4ff3-bf4a-8462d7f0b8b7</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;I see by transmission of queued packets you meant every 20 byte packet is queued if the tx line is busy?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending multiple data packets continuously on UART service</title><link>https://devzone.nordicsemi.com/thread/66154?ContentTypeID=1</link><pubDate>Tue, 25 Oct 2016 04:30:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5bc8a2d-bc1f-4791-9790-009fc3d4d8ee</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;I solved the bug, wasn&amp;#39;t using BLE_EVT_xx. Thanks for your test code, it helped&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending multiple data packets continuously on UART service</title><link>https://devzone.nordicsemi.com/thread/66153?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2016 13:33:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a32e19e3-1fc9-4ab3-baa1-864ce7159da1</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;It is not necessary to use interrupt context. I used it to leave BLE_EVT_xx context before sending more packets.&lt;/p&gt;
&lt;p&gt;Where do you see &amp;quot;transmission of queued packets&amp;quot;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending multiple data packets continuously on UART service</title><link>https://devzone.nordicsemi.com/thread/66158?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2016 06:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ddff195-559a-41cd-8e2e-4d19d8004fcd</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;the code You have attached, sends strings based on interrupt it seems, is there any other alternative, or is it that I am not using interrupts, so data is not being loaded in the buffer correctly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending multiple data packets continuously on UART service</title><link>https://devzone.nordicsemi.com/thread/66157?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2016 03:16:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b1a5d38-ccc8-48ab-a6aa-20e5932b32cd</guid><dc:creator>Anjali</dc:creator><description>&lt;p&gt;I get that it is not posiible to send data over 20 bytes, what if I break my string to be transmitted and use separate calls to ble_nus_string_send to send fragments of 20 bytes? And also please expalin what do you mean by &amp;quot;transmission of queued packets&amp;quot;, what are the queued packets here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending multiple data packets continuously on UART service</title><link>https://devzone.nordicsemi.com/thread/66152?ContentTypeID=1</link><pubDate>Fri, 21 Oct 2016 14:06:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5224af61-fa20-4c09-9f0a-0d369d5cab7a</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;It is not possible to send data packets longer than 20 bytes with the nRF51.&lt;/p&gt;
&lt;p&gt;The BLE_EVT_TX_COMPLETE event will occur when the transmission of the queued packets is finished. What does your &amp;quot;transmit&amp;quot; code look like? Do you ever exit the function that is transmitting?&lt;/p&gt;
&lt;p&gt;As you know, the maximum amount of data to transmit in a notification is 20 bytes. If you try to transmit more bytes, sd_ble_gatts_hvx(..) will return an error, and APP_ERROR_CHECK(..) will reset the chip.&lt;/p&gt;
&lt;p&gt;For debugging you can use gdb, or perhaps it is easier to set up SEGGER embedded studio. &lt;a href="https://devzone.nordicsemi.com/blogs/1032/segger-embedded-studio-a-cross-platform-ide-w-no-c/"&gt;This&lt;/a&gt; blog post shows how to do it.&lt;/p&gt;
&lt;p&gt;Instead of transmitting debug info over UART, you can transmit debug info over RTT. See &lt;a href="https://devzone.nordicsemi.com/question/98296/where-can-i-see-nrf_log-output/"&gt;this&lt;/a&gt; devzone post for how to enable debugging over RTT.&lt;/p&gt;
&lt;p&gt;The below example is a modified version of the ble_app_uart (SDK 12.0.0), and it shows how to test the throughput by counting upwards the data to transmit (not receiving data over UART, see data_send(..) ).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7411.ble_5F00_app_5F00_uart_5F00_test_5F00_throughput.zip"&gt;ble_app_uart_test_throughput.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The example should be placed in the following folder: ..\nRF5_SDK_12.0.0_12f24da\examples\ble_peripheral&lt;/p&gt;
&lt;p&gt;Note: the example has not been through extensive testing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>