<?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>Indication of Read request at application level</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48089/indication-of-read-request-at-application-level</link><description>Hello, 
 
 I am using nRF52832, SDK_15.3.0, S132 SoftDevice and Segger for flashing the image. I am using ‘ble_app_blinky’. 
 
 I was going to “Batter Service”. Battery level is a read &amp;amp; notify option. In this example, a timer handler is triggered periodically</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Jun 2019 16:23:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48089/indication-of-read-request-at-application-level" /><item><title>RE: Indication of Read request at application level</title><link>https://devzone.nordicsemi.com/thread/192769?ContentTypeID=1</link><pubDate>Thu, 13 Jun 2019 16:23:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3958d22e-dbb5-4f13-8119-fdd482e7cc27</guid><dc:creator>beemavishnu</dc:creator><description>&lt;p&gt;Thank you for your inputs&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Indication of Read request at application level</title><link>https://devzone.nordicsemi.com/thread/192768?ContentTypeID=1</link><pubDate>Thu, 13 Jun 2019 16:21:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e083010-9125-4492-9ed3-533fb3b89c37</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;1) No you don&amp;#39;t need&amp;nbsp;to enable&amp;nbsp;&lt;span&gt;security in order to use&amp;nbsp;authorization.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2)&amp;nbsp;If you are using the function&amp;nbsp;&lt;em&gt;characteristic_add()&lt;/em&gt; to add the&amp;nbsp;characteristic, then you need to set this to 1, since this is then used to set the value of&amp;nbsp;attr_md.rd_auth. But if this is for the&amp;nbsp;characteristic user descriptor, then it&amp;#39;s optional to use.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Indication of Read request at application level</title><link>https://devzone.nordicsemi.com/thread/191781?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2019 07:58:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4be43ad6-e1fc-4d64-97aa-419a2b7f25a1</guid><dc:creator>beemavishnu</dc:creator><description>&lt;p&gt;Andy thank you for your inputs and different approach.&lt;/p&gt;
&lt;p&gt;Sigurd thank you for your inputs.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just I gave battery as example. But in our case, on read request I need to read Sensor at that instance, timestamp the value and send to Client. So time stamp will be at the instance when read request is received by server.&lt;/p&gt;
&lt;p&gt;Already Client is developed and we don&amp;rsquo;t want to change (Because of this I said not to implement write command).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;With respect to &amp;ldquo;GATTS Read Request without Authorization&amp;rdquo;, periodically server will read sensor data, timestamp the data and update &amp;lsquo;Characteristic value&amp;rsquo; by calling sd_ble_gatts_value_set(). So when there is a read request from Client, shared structure at Server is read and transmitted. So the data read is last but not latest.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To get better understanding, my further queries are:&lt;/p&gt;
&lt;p&gt;1) As of now I did not enable any security (read_access = SEC_OPEN). With &amp;ldquo;GATTS Read Request with Authorization&amp;rdquo;, do I need to enable any security.&lt;/p&gt;
&lt;p&gt;2) To enable &amp;lsquo;rd_auth&amp;rsquo; I need to set &amp;lsquo;is_defered_read&amp;rsquo; to 1. But as per comments &amp;ldquo;Indicate if deferred read operations are supported&amp;rdquo;, please give more inputs on this variable.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards&lt;/p&gt;
&lt;p&gt;Vishnu Beema&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Indication of Read request at application level</title><link>https://devzone.nordicsemi.com/thread/190737?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2019 11:04:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6f42e84-dd83-4d59-8fbc-94a1fc7799c9</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Here is the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/group___b_l_e___g_a_t_t_s___r_e_a_d___r_e_q___a_u_t_h___m_s_c.html?cp=3_4_1_1_2_4_3_13"&gt;MSC for&amp;nbsp;Read Request with Authorization&lt;/a&gt;. When you get the event&amp;nbsp;BLE_GATTS_EVT_TW_AUTHORIZE_REQUEST, read the voltage, and use the new value when you call&amp;nbsp;sd_ble_gatts_rw_authorize_reply(). You need to set the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.1/structble__gatts__attr__md__t.html?cp=3_4_1_1_2_4_4_1_0#a0d2f2743a556d382513a43607a08c057"&gt;rd_auth bit&lt;/a&gt;&lt;span&gt;&amp;nbsp;for the battery level&amp;nbsp;characteristic to 1 to enable&amp;nbsp;read request with authorization.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Indication of Read request at application level</title><link>https://devzone.nordicsemi.com/thread/190557?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 14:08:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e576e59-600a-4d6e-8d50-549690e75dff</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;You can also implement authorized reads, but I don&amp;#39;t know what kind of operations you need to do in order to get&amp;nbsp;the battery level (i.e. ADC, I2C, etc), and you would probably have to implement some weird handlers to achieve that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Indication of Read request at application level</title><link>https://devzone.nordicsemi.com/thread/190555?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 14:07:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:863c8873-7d37-4796-a40b-bc24c456cfca</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;It&amp;#39;s not a limitation, it&amp;#39;s a product of your requirements.&lt;/p&gt;
&lt;p&gt;The way I have it set up in my project is that every time the battery gauge IC detects a change in battery level, the IC pulls a pin down and that triggers a battery level notification. I don&amp;#39;t know what kind of setup you have, but this is quite a good approach IMO.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Indication of Read request at application level</title><link>https://devzone.nordicsemi.com/thread/190544?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 13:49:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eef0eaeb-cd80-474e-b838-f90e56c01ba3</guid><dc:creator>beemavishnu</dc:creator><description>&lt;p&gt;Is there any better approach or is this limitation in BLE specifications. I don&amp;#39;t want to implement write command at client. I enabled &amp;quot;READ&amp;quot; option at server and if that read request is known by the application, then server can send the data by reading the latest battery level.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Indication of Read request at application level</title><link>https://devzone.nordicsemi.com/thread/190501?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2019 12:14:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0756b329-2af4-4c7e-91dc-7a826fc2dc33</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;The most straight-forward&amp;nbsp;way I think would be to have the client write to a specific &amp;quot;command&amp;quot; characteristic, telling the server that it wants the current&amp;nbsp;battery level. The server can then read the value and send it with a notification when it&amp;#39;s ready.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>