<?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>Designing BLE Characteristic Layout</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25300/designing-ble-characteristic-layout</link><description>Hi All, 
 I&amp;#39;m currently designing my implementation of BLE Services/Characteristics and wanted a quick review to make sure I&amp;#39;m on the right path based on my implementation. For example, here are my product requirements: (Note that this isn&amp;#39;t exactly</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Sep 2017 12:32:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25300/designing-ble-characteristic-layout" /><item><title>RE: Designing BLE Characteristic Layout</title><link>https://devzone.nordicsemi.com/thread/99692?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2017 12:32:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d78f61e7-3d95-4ba3-b44f-8a44666d62b3</guid><dc:creator>Beakerton</dc:creator><description>&lt;p&gt;Thanks, endnode and Emil!&lt;/p&gt;
&lt;p&gt;Emil -- Reading your link, it seems like the race condition is specifically trying to write at the same time that data is coming in.  If I were to use a single characteristic for both reading and writing as endnode suggested, I would try to prevent that by having designated &amp;quot;ACK&amp;quot; and &amp;quot;End of Transfer&amp;quot; messages when multi-message transfers are used between the device and the host (essentially creating my own flow control).&lt;/p&gt;
&lt;p&gt;As long as the host software followed the flow control implementation, it looks like I wouldn&amp;#39;t see the race condition you indicate.  For my project, having a bit of overhead time / messages aren&amp;#39;t a big deal.  The sync via BLE will only happen 1 per day and if it&amp;#39;s a few seconds longer than it needs to be, it won&amp;#39;t matter.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Designing BLE Characteristic Layout</title><link>https://devzone.nordicsemi.com/thread/99691?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2017 18:39:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba6978b0-f155-4702-8a3c-74a4e19af6d2</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Well. Yes, you are trying to use BLE (G)ATT in the right way and it looks good. Just note that if you really care about the throughput and delays caused by connecting procedures you might consider to implement simple one GATT Service + Characteristic &amp;quot;tube&amp;quot; and do all that data flow and commands/response protocol on higher layer. It can still be as elegant (defining some OP codes for selecting which event data you want and then receiving them in another structure) but of course it adds few bytes of overhead. But because typical GATT client cannot work with multiple handles and methods in one connection event it might not have any real impact on throughput and you will save 50-1000ms during connection (faster GATT Service discovery = each Service or Characteristic can take up to 300ms if your phone stack is &amp;quot;dumb&amp;quot; enough).&lt;/p&gt;
&lt;p&gt;To the reliability of lower layers and ack mechanism you can read some thoughts &lt;a href="https://devzone.nordicsemi.com/question/169179/link-layer-ack-vs-write_req/"&gt;here&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/question/168835/uart-receive-before-handling/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>