<?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>BLE_NUS_C how to send pkt from client to service with efficient and reliable?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60872/ble_nus_c-how-to-send-pkt-from-client-to-service-with-efficient-and-reliable</link><description>In my situation, I want to use bluetooth to designed a piconet which has 1 master and up to 4 slave . 
 With yours suggestion,Now i make it work,in upload from slave to master(per slave upload rate is 2.2KB/s) 
 
 
 https://devzone.nordicsemi.com/f/nordic</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 May 2020 14:42:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60872/ble_nus_c-how-to-send-pkt-from-client-to-service-with-efficient-and-reliable" /><item><title>RE: BLE_NUS_C how to send pkt from client to service with efficient and reliable?</title><link>https://devzone.nordicsemi.com/thread/249240?ContentTypeID=1</link><pubDate>Mon, 11 May 2020 14:42:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f203dc2-d62f-4c59-bfb2-3106ff493c59</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;The slave/server can only send data on it&amp;#39;s own initiative using notification or indication. See this figure:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-78563bc0343b4035ae085a13686c46df/data_5F00_transfer.png" /&gt;&lt;/p&gt;
&lt;p&gt;You can read more about difference between notification and indication in this post:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/99/notification-indication-difference"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/99/notification-indication-difference&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This page about throughput might also be helpful for you:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsds_s132%2FSDS%2Fs1xx%2Fble_data_throughput%2Fble_data_throughput.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsds_s132%2FSDS%2Fs1xx%2Fble_data_throughput%2Fble_data_throughput.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_NUS_C how to send pkt from client to service with efficient and reliable?</title><link>https://devzone.nordicsemi.com/thread/248653?ContentTypeID=1</link><pubDate>Thu, 07 May 2020 08:56:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81ab1c63-dc1a-44df-868c-749c79b1befa</guid><dc:creator>Taoo</dc:creator><description>&lt;p&gt;I see &amp;quot;nRF5_SDK_16.0.0\ble_peripheral\ble_app_uart&amp;quot; demo project.Demo slave send by call&amp;nbsp;&lt;strong&gt;ble_nus_data_send&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-&amp;gt;&lt;strong&gt;sd_ble_gatts_hvx ,&lt;/strong&gt;param with:&lt;strong&gt;BLE_GATT_HVX_NOTIFICATION&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But there is no choose with write cmd or write request like master(central).How slave ensure reliable upload packet to master? Wheather &lt;span&gt;SoftDevice to&lt;/span&gt;&amp;nbsp;ensure&amp;nbsp;notification is&amp;nbsp;reliable send?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_NUS_C how to send pkt from client to service with efficient and reliable?</title><link>https://devzone.nordicsemi.com/thread/248641?ContentTypeID=1</link><pubDate>Thu, 07 May 2020 08:31:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39781898-176b-422c-8ac6-11144a50231b</guid><dc:creator>Taoo</dc:creator><description>&lt;p&gt;First of all,Thanks for your reply!&lt;/p&gt;
&lt;p&gt;1、I detect the packet loss by sending packet with one byte for sequence.Each packet will increase 1.In the slave,judge wheather sequence is continuous or not.&lt;/p&gt;
&lt;p&gt;2、I understand throughput with write request is lower than write cmd.but how low?less than 500B/s for each slave？&lt;/p&gt;
&lt;p&gt;3、Slave upload seem more reliable, even though throughput with 2KB/s.but slaves&amp;nbsp;were&amp;nbsp;bought from other company,I am not&amp;nbsp;sure it used write request or write cmd.wheather some params I set in master are not proper.Or it is different from master(&lt;strong&gt;central&lt;/strong&gt;) and slave(&lt;strong&gt;peripheral&lt;/strong&gt;),that is the&amp;nbsp;ultimate performance for master send packet to slave.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_NUS_C how to send pkt from client to service with efficient and reliable?</title><link>https://devzone.nordicsemi.com/thread/248369?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 08:37:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4552ff3d-0eea-4ccf-a2e1-a023a81615df</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How do you detect the packet loss ?&lt;/p&gt;
&lt;p&gt;Are you using a custom board, or a nRF52832-DK in your test ?&lt;/p&gt;
&lt;p&gt;As long as the sd_ble_gattc_write() returns NRF_SUCESS, the packet will be delivered to the server.&lt;/p&gt;
&lt;p&gt;When transferring data with a write request from GATT client,&amp;nbsp;&lt;span&gt;then only one packet is sent every other connection event. This is because ATT level acknowledgement must be received for a sent packet before sending another packet.&amp;nbsp;&lt;/span&gt;The procedure is as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Connection event x: Send writeRequest packet&lt;/li&gt;
&lt;li&gt;Connection event x+1: Receive ATT acknowledgement packet&lt;/li&gt;
&lt;li&gt;Connection event x+2: Send writeRequest packet&lt;/li&gt;
&lt;li&gt;Connection event x+3: Receive ATT acknowledgement packet&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;and so on. So with connection interval 7.5ms, then one packet can be sent every 15ms, therefore substantially limiting throughput.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But with Write Command packet you can send multiple packets each connection interval, and you will therefore get much higher&amp;nbsp;throughput with Write Command.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE_NUS_C how to send pkt from client to service with efficient and reliable?</title><link>https://devzone.nordicsemi.com/thread/248317?ContentTypeID=1</link><pubDate>Wed, 06 May 2020 00:44:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:891d901a-4516-4b4c-b94d-3a4a25d93026</guid><dc:creator>Taoo</dc:creator><description>&lt;p&gt;Is there any suggestion?&lt;/p&gt;
&lt;p&gt;Do i describe clearly?&lt;/p&gt;
&lt;p&gt;Hope for yours replies!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>