<?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>Reading a characteristic does not generate a BLE event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63284/reading-a-characteristic-does-not-generate-a-ble-event</link><description>Hi, 
 
 I think I have properly configured my application to authorize reads on characteristic, yet I do not see an event generated. I get write events, but I don&amp;#39;t get read events. Can anyone see what I&amp;#39;m doing wrong, or not doing at all? Here are some</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 Jul 2020 15:53:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63284/reading-a-characteristic-does-not-generate-a-ble-event" /><item><title>RE: Reading a characteristic does not generate a BLE event</title><link>https://devzone.nordicsemi.com/thread/258389?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 15:53:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdd12a20-b173-4a1b-bdf2-3a2bea330c66</guid><dc:creator>only1chi</dc:creator><description>&lt;p&gt;I figured it out. I understand now what you&amp;#39;re saying.&amp;nbsp;&lt;br /&gt;I&amp;nbsp;was using&amp;nbsp; sd_ble_gatts_value_set() function to handle the event when I should have been using&amp;nbsp;sd_ble_gatts_rw_authorize_reply()&lt;br /&gt;&lt;br /&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a characteristic does not generate a BLE event</title><link>https://devzone.nordicsemi.com/thread/258386?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 15:22:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d320d525-da70-4b39-9fd8-5bba125158b2</guid><dc:creator>only1chi</dc:creator><description>&lt;p&gt;Hi Hung,&lt;br /&gt;&lt;br /&gt;Thanks for your answer. I had done the exact same thing before, but I haven&amp;#39;t seen the event.&lt;br /&gt;Where in the application would I see the event? Which of the handlers?&lt;br /&gt;&lt;br /&gt;Also in the file vpe_ble.c, there is an event handler which looks for&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I never see that event get triggered.&lt;br /&gt;&lt;br /&gt;Could you point me to the event handler you&amp;#39;re referring to?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a characteristic does not generate a BLE event</title><link>https://devzone.nordicsemi.com/thread/258377?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 14:56:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e161cd2-f8b3-40ed-892d-a78ba12937cf</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;It seems a little bit different from the initial code you quoted in the original question. In the project in the .zip you sent you used the ble_srv library to initialize the characteristic.&amp;nbsp;&lt;br /&gt;I noticed that you used :&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;strong&gt;&lt;em&gt;add_char_params.p_user_descr-&amp;gt;is_defered_read&amp;nbsp; &amp;nbsp;= 1; &lt;/em&gt;&lt;/strong&gt;This is the property for the user descriptor, not the characteristic value itself. You should use :&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;add_char_params.is_defered_read=1;&lt;/pre&gt;&amp;nbsp;instead.&lt;br /&gt;&lt;br /&gt;After changing that, i can see the read event in the log:&amp;nbsp;&amp;nbsp;&lt;em&gt;ble_vpe: Read Event. conn_handle: 0&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It doesn&amp;#39;t seem you have handle the reply/confirmation for the read. You would need to implement&amp;nbsp;sd_ble_gatts_rw_authorize_reply() in&amp;nbsp;on_read()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a characteristic does not generate a BLE event</title><link>https://devzone.nordicsemi.com/thread/258352?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 13:50:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d640b109-7da9-4c78-8d0c-409d4aa3650f</guid><dc:creator>only1chi</dc:creator><description>&lt;p&gt;Hi Hung,&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve attached my project.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/sts_2D00_vector_2D00_pump_2D00_emulator.zip"&gt;devzone.nordicsemi.com/.../sts_2D00_vector_2D00_pump_2D00_emulator.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a characteristic does not generate a BLE event</title><link>https://devzone.nordicsemi.com/thread/258255?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2020 08:57:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a0cd0c7-2d29-473e-a050-05fad89d0386</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Only1chi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you send your full project so we can test here ? Or if you can create a minimum project that I can run on nRF52 DK here it would be great.&amp;nbsp;&lt;br /&gt;When you don&amp;#39;t get a read event, what do you see on the phone&amp;#39;s side ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a characteristic does not generate a BLE event</title><link>https://devzone.nordicsemi.com/thread/258186?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 17:30:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b407039-ee25-4630-bfbe-5122f022f4ba</guid><dc:creator>only1chi</dc:creator><description>&lt;p&gt;I also checked it out with nrf Connect, and all the characteristics show up properly. But I still don&amp;#39;t get a READ event.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1593711005848v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a characteristic does not generate a BLE event</title><link>https://devzone.nordicsemi.com/thread/258185?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 17:22:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc4e971f-3a6c-4ba9-8963-4e59ee2a79e0</guid><dc:creator>only1chi</dc:creator><description>&lt;p&gt;Currently I get all the write events, however, setting&lt;br /&gt;attr_md.rd_auth = 1&lt;br /&gt;&lt;br /&gt;causes it to stop generating WRITE events, in addition to not generating a READ event.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a characteristic does not generate a BLE event</title><link>https://devzone.nordicsemi.com/thread/258183?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 16:56:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a7f9ee9-cc18-406a-86b8-bb8aa643a541</guid><dc:creator>only1chi</dc:creator><description>&lt;p&gt;Hi Hug,&lt;br /&gt;&lt;br /&gt;I&amp;#39;m using SDK v17.&amp;nbsp;&lt;br /&gt;The events do not appear on peer&amp;#39;s side.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading a characteristic does not generate a BLE event</title><link>https://devzone.nordicsemi.com/thread/258135?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2020 13:54:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b06fbd2-4505-4f5b-a092-768f7051f7c1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Only1chi,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Could you let me know which SDK version you are using and with which Softdevice ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I did a quick test here with the NUS service in SDK v14.2 and it worked fine for me.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you don&amp;#39;t see the read event, can you actually get the characteristic&amp;#39;s value on the peer&amp;#39;s side ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-cafca255fe3c4cbd9f01ae364145dcc6/ble_5F00_nus.c"&gt;devzone.nordicsemi.com/.../ble_5F00_nus.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>