<?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>Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52646/is-a-gatt-server-application-notified-of-a-client-read</link><description>I looked at the following question 
 nrRF2 GATT attribute read callback 
 and it does not quite answer what I want to know. 
 What I need to know is do I get signaled by the nrRF2* BLE hardware when a client attempts to read a characteristic such that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Sep 2019 11:18:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52646/is-a-gatt-server-application-notified-of-a-client-read" /><item><title>RE: Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/thread/212536?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 11:18:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a900667-20fb-422b-b877-6704fbd60976</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Music to my ears! The dongles should be arriving any day now .. we will see!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/thread/212534?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 11:15:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1111b70e-2a37-45eb-8bc2-a849e468f7f1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I think you have all you need. I don&amp;#39;t see any problem to implement what you described.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/thread/212522?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 10:55:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c60d9ede-21f6-46d0-ab72-a324e3948f4c</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;@Hung Bui&amp;nbsp; am well aware of the serialization part and have looked at the pc-ble-driver and docs. I NEED the serialization part and NEED to run the application on the PC. I have had an ongoing discussion in this forum regarding that issue and configuring the nRF52 dongle for serialization. I have worked with a similar serialization library&amp;nbsp;for the Renesas RL78 dongle but the RL78 BLE implementation has too many shortcomings (not being signaled reads is one of them) for our needs.&lt;/p&gt;
&lt;p&gt;In the end&amp;nbsp;&lt;strong&gt;&lt;em&gt;all I want to be able to do is to intercept a client read and be able to set the value that the client gets in the response at the time of the read&lt;/em&gt;&lt;/strong&gt;. If the only way to do that is to configure the characteristic with &amp;#39;read with authorization&amp;#39; then that is fine. The client will only see that the characteristic is readable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/thread/212515?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 10:12:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cef48de2-ea51-49db-b672-052e0d79bd09</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Brian: To be able to use the dongle as the connectivity IC for the PC, you would need to run serialization on the dongle. And it requires you to implement an application on PC. We supply you with the pc-ble-driver &lt;a href="https://github.com/NordicSemiconductor/pc-ble-driver"&gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note that this is rather advance and require you to have some experience with our SDK and stack. I wouldn&amp;#39;t suggest to jump directly on development with serialization application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;@Andy: i would assume here Brian is not asking about authorization when bonding and pairing, but more about authorization when a characteristic being read/write, which is not related.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/thread/212513?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 10:05:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81145480-e72d-49c8-b846-93a083e226ca</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;Andy, thanks for that. I did some extensive googling and looking through the BT spec 5.0 (didn&amp;#39;t find much there) but did find that authorization is application-specific; in other words the only thing the client knows about the characteristic is that it is readable. That is good. Here is a good link on that which states it in clear text:&amp;nbsp;&lt;a href="http://dev.ti.com/tirex/content/simplelink_cc2640r2_sdk_1_40_00_45/docs/blestack/ble_user_guide/html/ble-stack-3.x/gatt.html"&gt;http://dev.ti.com/tirex/content/simplelink_cc2640r2_sdk_1_40_00_45/docs/blestack/ble_user_guide/html/ble-stack-3.x/gatt.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I do NOT want to use the read with authorization option to authorize&lt;em&gt; but to catch the client read and set the value they are going to get in the response at the time of the read&lt;/em&gt;. It would be a twisted way to do that but it seems many BLE chip developers don&amp;#39;t understand that a peripheral may have some readable characteristic that changes frequently but the client may only need to access it&amp;#39;s value infrequently. Who wants to frequently update the characteristic data base (perhaps 100s of times per second) when the client may never need to read it or only needs to read it once and a while?&lt;/p&gt;
&lt;p&gt;For example, I had an activity monitor following the IEEE 11073 20601 cardio specialization using a relative time clock. Relative time clocks are easy to implement as they are only a sequence of ticks. One of the characteristics in this activity monitor service was the current relative time in milliseconds. All the measurements taken reported a time stamp using this relative time clock. The client, however, needs to turn this relative time into a wall clock time. It does so by reading the current relative time characteristic and looking at its current wall clock time. Then it can convert all relative time stamps in the measurements&amp;nbsp;(in the future and the past) to wall clock time. But the client only needs to read the current time &lt;em&gt;once per connection&lt;/em&gt;. When that read happens is not known. So if I can catch the read, I can set the characteristic to the current time. If one CANT catch the read, one has to update the characteristic value in the database 1000 times a second. Are you kidding??!!! But if the read with authorization allows me to pull this off, I am good!&lt;/p&gt;
&lt;p&gt;Even the Android BLE server API allows catching ordinary reads.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/thread/212492?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 09:17:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3931f81-575e-4150-80c4-aa93c464e3b2</guid><dc:creator>Andy</dc:creator><description>&lt;p&gt;That is a usual misconception. Authorization and authentication are different concepts. Authorized reads and writes just allow the application to do whatever before the data is read or written. Authentication has to do with security. These terms are not used interchangeably.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/thread/212476?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 08:47:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3489542d-826d-4ccd-82f2-659e857a4d84</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;I am starting with the nRF52 dongle. The development kit is for running applications (eventually) on the nRF52 module. I only want to use the module for the BLE &amp;#39;radio&amp;#39;. The application needs to sit on the PC as it will demand far more resources than could sit on the module (including the ability to communicate with remote servers).&lt;/p&gt;
&lt;p&gt;I am assuming, then, that when I configure the characteristic with &amp;#39;read with authorization&amp;#39; that the client sees this as a characteristic with ordinary &amp;#39;read permission&amp;#39; with no other conditions and will NOT have to engage in any extra procedures than just connecting to read the characteristic.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have to say this is confusing since in the Bluetooth standard I&amp;nbsp;see a read with authorization and that IS security.A client has to be authorized before being able to read - MITM.&lt;/p&gt;
&lt;p&gt;This is critical. I want to be sure that if I make a DIS whose characteristics a client can read with NO encryption or any other extra security procedures that my server application can be signaled when that client reads one of the characteristics.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/thread/212458?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 07:55:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6693a4a-5ff3-4f09-b3f0-96f806d838df</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Yes what you described is possible on any characteristic, but only if you configure the characteristic with read with authorization (rd_auth = 1 in the attribute metadata or is_defered_read = 1 if you configure the characteristic via ble_srv_common.c ) .&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure which dongle you are talking about, but for development we suggest you to get started with nRF52 Development Kit.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/thread/212358?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 16:13:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ee85b0e-7f61-4be3-ad6b-283d196c8875</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;So just to be absolutely clear:&lt;/p&gt;
&lt;p&gt;If I create a service that has a characteristic with permission read and a default value;&lt;/p&gt;
&lt;p&gt;When the client reads it I WILL get an event and I can &lt;em&gt;at the time of the event&lt;/em&gt;&amp;nbsp;change that default value (or do something) such that the client gets the new value in the read response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If I can do that for any characteristic that has read permission then I am happy. I hope so as I have already ordered some trial dongles!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/thread/212310?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 13:43:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e46f49e3-b420-4183-968b-ceb1dcb6b686</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Brian,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Your understanding (in your reply) is correct. I would suggest to look at the message sequence chart when you are unsure about something. The read with authorization is described &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.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_3_1_2_4_3_13"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A characteristic with read authorization property set to 0 will not get an event when there is a read. Only those characteristic with the read authorization set to 1 will get an event. And you need to reply before the softdevice can send the read response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The Bluetooth spec doesn&amp;#39;t define how exactly the read authorization should be, but it does mention&amp;nbsp;a bit about it at section 3.4.4.3 Part F Vol 3 Bluetooth Core spec v5.1 :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If the attribute value cannot be read due to permissions then an Error&amp;nbsp;Response shall be sent with the error code Read Not Permitted.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;The connection security authorization is something different (with error code:&amp;nbsp;Insufficient Authorization.)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Btw, what is nRF2 or nRF2* ? I guess you meant nRF52 ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is a GATT server application notified of a client read?</title><link>https://devzone.nordicsemi.com/thread/212263?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 11:37:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb7b5370-f450-4009-b671-0b2c89aa0ce1</guid><dc:creator>brianreinhold</dc:creator><description>&lt;p&gt;I was looking at some other API documentation of SoftDevice (can&amp;#39;t find it now). From the wording there I got the impression that the word &amp;#39;authorize&amp;#39; in the event name had nothing to do with the security settings meaning of the word. It looked like it simply meant the characteristic had read permissions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thus I have much more confidence that my peripheral application will be notified when the client tries to read ANY characteristic that has read permissions regardless of its security settings. The application can then set the characteristic value that the client will receive in the read response. Please vindicate that this is true!&lt;/p&gt;
&lt;p&gt;A re-read of the SoftDevice API elsewhere sounds like this event is just for the peripheral to set the permissions of the characteristic.&lt;/p&gt;
&lt;p&gt;Now it strongly looks like my peripheral application will NOT be signaled of a client read.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>