<?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>Does the BLE stack resend a packet if response is not received?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23003/does-the-ble-stack-resend-a-packet-if-response-is-not-received</link><description>Hi, I was wondering If I need to wait for a response from the server that a command was executed before executing another command or if the BLE stack takes care of this under the hood so to speak. 
 For example, I want to write to a characteristic and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Jun 2017 20:53:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23003/does-the-ble-stack-resend-a-packet-if-response-is-not-received" /><item><title>RE: Does the BLE stack resend a packet if response is not received?</title><link>https://devzone.nordicsemi.com/thread/90498?ContentTypeID=1</link><pubDate>Thu, 22 Jun 2017 20:53:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e1eec43-2862-4123-b47d-48b745d270e5</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;This is more complex as you seems to be living on top of GATT/GAP layers but BLE stack has more layers under the hood ans and some functions are handled there. First of all Link Layer will make sure that each packet will arrive to the peer (otherwise it will be repeated as long as it is either acknowledged or link timeouts and is terminated). Upper layers like L2CAP and (G)ATT will only &amp;quot;stack&amp;quot; PDUs down to LL and that&amp;#39;s what Soft Device is doing for you. So in case that you want to do GATT Write Command (without response) and Read then you can push them to SD GATT API and they will go through. LL will guarantee that sequence will remain. But in case that you want to do certain Request - Response GATT sequence or if Read rely on fact that data pushed by Write were processed by the GATT Server then you probably want to wait for &lt;code&gt;BLE_EVT_TX_COMPLETE&lt;/code&gt; signalling that PDUs left during previous connection event and you are free to push next through SD GATT API.&lt;/p&gt;
&lt;p&gt;Does it make sense?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>