<?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>How to send  long data to ble_app-uart from android?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15131/how-to-send-long-data-to-ble_app-uart-from-android</link><description>What is the best method for sending long data to ble_app_uart from android? We tried sending data by breaking into 20 bytes chunks and used thread.sleep() between each packet. Is that the correct method of doing it? How to achieve the maximum throughput</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Aug 2016 13:27:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15131/how-to-send-long-data-to-ble_app-uart-from-android" /><item><title>RE: How to send  long data to ble_app-uart from android?</title><link>https://devzone.nordicsemi.com/thread/57762?ContentTypeID=1</link><pubDate>Fri, 05 Aug 2016 13:27:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1e2a0e0-59ef-4b82-9b06-84d36b0128bf</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mukesh,&lt;/p&gt;
&lt;p&gt;Please provide &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF-Sniffer/"&gt;a sniffer trace&lt;/a&gt; so we can figure out what happens over the air.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send  long data to ble_app-uart from android?</title><link>https://devzone.nordicsemi.com/thread/57763?ContentTypeID=1</link><pubDate>Fri, 05 Aug 2016 06:05:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70849229-69e7-4a7f-92ad-b35dec9fba52</guid><dc:creator>mukesh</dc:creator><description>&lt;p&gt;We tried the method that you mentioned in your reply. But we are still facing some problem. The IC is only receiving 3 packets of data (60 bytes). I think it is getting disconnected during the communication. Also we tried with 20 ms delay between 3 packets. With that delay sometimes it is not receiving the data completely. With 50ms delay it is receiving the data completely.  I guess it is the problem related to the min connection interval time. How does the connection interval time is synchronised between the central and peripheral?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send  long data to ble_app-uart from android?</title><link>https://devzone.nordicsemi.com/thread/57761?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2016 11:38:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a8520d1-e3c3-4ddf-8296-fe72106fc087</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mukesh,&lt;/p&gt;
&lt;p&gt;In stead of putting the code to sleep, you can wait for the call back onCharacteristicWrite() to continue to write the next chunk.&lt;/p&gt;
&lt;p&gt;You can have a look at how we do it with the UART profile in the nRFToolbox &lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Toolbox/blob/master/app/src/main/java/no/nordicsemi/android/nrftoolbox/uart/UARTManager.java#L155"&gt;here&lt;/a&gt;.
The callback happens when the packet is queued into the TX buffer on the phone (not when the peripheral actually received the packet).&lt;/p&gt;
&lt;p&gt;However, we experienced some issue with Android device, that when you queue (with wait for callback) too many packets (varied on phones, from 12 to 50) without a break, the phone just hangs, no more call back.&lt;/p&gt;
&lt;p&gt;So you can either have a delay on every 10 packets, or you can implement a confirmation notification scheme that you send a notification from the peripheral every time you receive 10 packets for example. The central will stop after sending 10 packet and wait for the notification before it continues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>