<?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>Bluetooth characteristics usage</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3315/bluetooth-characteristics-usage</link><description>hi guys,
i&amp;#39;ve a general question about bluetooth (general usage of characteristics), and i hope somebody could give me a hint how to use them properly. 
 So, i want to communicate with my ble-device. E.g. i want to receive a value corresponding to a</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 31 Jul 2014 10:43:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3315/bluetooth-characteristics-usage" /><item><title>RE: Bluetooth characteristics usage</title><link>https://devzone.nordicsemi.com/thread/12088?ContentTypeID=1</link><pubDate>Thu, 31 Jul 2014 10:43:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4dc653c-9cee-49da-9b45-463b2a4df817</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;You could do that, and then replace 4) and 5) in my suggestion with a notification with the value corresponding to the key being sent in a notification (or indication if you don&amp;#39;t care about throughput and want the client to acknowledge) to the client. You could also combine both key and value in one single characteristic, since the ops are sequential, but I think it would be cleaner using 2 separate ones so that you can establish a max size and do different checks for each based on characteristic handle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth characteristics usage</title><link>https://devzone.nordicsemi.com/thread/12087?ContentTypeID=1</link><pubDate>Thu, 31 Jul 2014 10:36:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b18160d1-f3ea-417a-b9b5-f61cec431530</guid><dc:creator>leo</dc:creator><description>&lt;p&gt;Hi Carles, thanks! i was hoping you answer my question (saw your post about your new book) :) So you would use a second characteristic to communicate with the device, and not update and send a notification with the &amp;quot;char_get_value&amp;quot; characteristic? (To make it clear. You would separate the communication in 2 characteristics, 1 characteristic the smartphone can write, and 1 characteristic the smartphone can read?) Thanks a lot.. i think i will order the book now :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bluetooth characteristics usage</title><link>https://devzone.nordicsemi.com/thread/12086?ContentTypeID=1</link><pubDate>Thu, 31 Jul 2014 10:18:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29ba99d1-e90a-499b-a463-1f04b5548ea2</guid><dc:creator>Carles</dc:creator><description>&lt;p&gt;Hi Leo,&lt;/p&gt;
&lt;p&gt;There are many ways of accomplishing what you need using BLE, but it is not quite clear to me exactly which one would be best suited for you.&lt;/p&gt;
&lt;p&gt;If your BLE device holds the data and the peer (smartphone for example) wants to use a key-value type storage, then you could simply:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Use the BLE device as a GATT server, the smartphone as a GATT client&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Write Request from the smartphone to the BLE device to a characteristic you have set up. The Write Request contains the key.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The BLE device places the value in a second characteristic you have set up and acks by sending a Write Response&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Read Request from the smartphone to the BLE device to the second characteristic you have set up.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Read Response with the value is sent by the BLE device&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All &lt;em&gt;write&lt;/em&gt; actions on the server are notified by means of a BLE_GATTS_EVT_WRITE event. If you want to be notified of read events too, you need to set rd_auth = 1 when populating your characteristic.&lt;/p&gt;
&lt;p&gt;If you want to learn more about BLE basics, &lt;a href="https://devzone.nordicsemi.com/question/14157/are-you-looking-for-a-book-on-ble-a-new-one-was-just-published/"&gt;this book&lt;/a&gt; may be of help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>