<?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>event form read request</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42613/event-form-read-request</link><description>Hi, 
 
 I&amp;#39;m using SDK 15.2 with Nrf52832, 
 I&amp;#39;ve implemented a custom service with read, write and notification services. 
 I would appreciate if you could send me an example of how to get an event of a read request, I understand that its part of the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Oct 2020 08:46:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42613/event-form-read-request" /><item><title>RE: event form read request</title><link>https://devzone.nordicsemi.com/thread/276377?ContentTypeID=1</link><pubDate>Thu, 22 Oct 2020 08:46:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db8559c0-e589-41e5-80cc-96ed6a37c5c7</guid><dc:creator>Shimon_nohayo</dc:creator><description>&lt;p&gt;Great, happy I could assist.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: event form read request</title><link>https://devzone.nordicsemi.com/thread/276311?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2020 21:31:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a631e8cb-07b8-4fe1-aee8-8db2c7634847</guid><dc:creator>ref</dc:creator><description>&lt;p&gt;Hi Shimon,&lt;/p&gt;
&lt;p&gt;Sorry for multiple posts. I just found what the problem was. I make a mistake when I copied Vidar&amp;#39;s example. I copied the whole example and it worked.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks again for your help.&lt;/p&gt;
&lt;p&gt;Sincerely,&lt;/p&gt;
&lt;p&gt;Reza&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: event form read request</title><link>https://devzone.nordicsemi.com/thread/276307?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2020 20:35:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2f5037b-1312-42d8-bcc2-8286e4d57284</guid><dc:creator>ref</dc:creator><description>&lt;p&gt;Hi Shimon,&lt;/p&gt;
&lt;p&gt;Thanks for you reply. I used the following to set the security open:&lt;/p&gt;
&lt;p&gt;add_char_params.char_props.read = 1; &lt;br /&gt;add_char_params.char_props.notify = 1;&lt;br /&gt; add_char_params.is_defered_read = 1;&lt;/p&gt;
&lt;p&gt;add_char_params.cccd_write_access = SEC_OPEN;&lt;br /&gt; add_char_params.read_access = SEC_OPEN;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Basically, I followed Vidar&amp;#39;s example code (above). The example seems very simple but I get the error below:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Error when calling &amp;#39;reduceApp&amp;#39;: Cannot read property &amp;#39;toUppedCase&amp;#39; of null&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I appreciate any comment.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Reza&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: event form read request</title><link>https://devzone.nordicsemi.com/thread/275490?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 07:14:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc44677f-f766-4e5b-95a3-31b1c5f7291a</guid><dc:creator>Shimon_nohayo</dc:creator><description>&lt;p&gt;Hi Reza,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sorry for the late response&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In the service init did you add:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;// Initialize CUS Service init structure to zero.&lt;br /&gt; cus_init.evt_handler = on_cus_evt;&lt;br /&gt; &lt;br /&gt; BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cus_init.custom_value_char_attr_md.cccd_write_perm);&lt;br /&gt; BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cus_init.custom_value_char_attr_md.read_perm);&lt;br /&gt; BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;cus_init.custom_value_char_attr_md.write_perm);&lt;br /&gt; &lt;br /&gt; err_code = ble_cus_init(&amp;amp;m_cus, &amp;amp;cus_init);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: event form read request</title><link>https://devzone.nordicsemi.com/thread/275197?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 18:51:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:115d5bc0-8bd7-4c25-8fc0-d29b077d1aec</guid><dc:creator>ref</dc:creator><description>&lt;p&gt;Sorry Vidar , I messed the name.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: event form read request</title><link>https://devzone.nordicsemi.com/thread/275195?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 18:41:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16c850ba-3d06-4b09-9989-c9cf61d0a0ee</guid><dc:creator>ref</dc:creator><description>&lt;p&gt;Hi Shimon,&lt;/p&gt;
&lt;p&gt;I have a similar problem of getting an event for a read request. Searching for answer I ran into this post. I followed your recommendation above and modified my code based on the example you provided. Unfortunately, I didn&amp;#39;t work out for me. As soon as I&amp;nbsp;add this line:&amp;nbsp; &amp;nbsp;&lt;strong&gt;add_char_params.is_defered_read&amp;nbsp; &amp;nbsp;= 1;&amp;nbsp; &lt;/strong&gt;the NRF_connect freezes for a few seconds and then gives me &amp;quot;Gatt timeout error&amp;quot;. If I remove this line, everything works well, except I won&amp;#39;t get any event for my read requests.&amp;nbsp; I was wondering if you have any comments.&lt;/p&gt;
&lt;p&gt;I really appreciate any help.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Reza&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: event form read request</title><link>https://devzone.nordicsemi.com/thread/175508?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2019 06:44:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14bfc4f3-7040-4f98-89e7-f704fda67886</guid><dc:creator>ipshiv</dc:creator><description>&lt;p&gt;Good day! Do you have an example for read event on gatt client side?&lt;/p&gt;
&lt;p&gt;I used S130 and this code worked fine:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;                    ble_uuid_t m_uuid;
    				m_uuid.type = BLE_UUID_TYPE_VENDOR_BEGIN;
    				m_uuid.uuid = LGS_UUID_TYPE_CHAR;

    				ble_gattc_handle_range_t handle_range;
    				handle_range.start_handle = 0x0001;
    				handle_range.end_handle = 0xFFFF;

    				NRF_LOG_INFO(&amp;quot;Reading....\n&amp;quot;);
    				ret_code_t err_code = sd_ble_gattc_char_value_by_uuid_read(m_ble_lgs_c.conn_handle,
    						&amp;amp;m_uuid, &amp;amp;handle_range);
    				APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and in ble_evt_handler&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;case BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP: {

		
		uint8_t * ble_data_ptr =
				p_ble_evt-&amp;gt;evt.gattc_evt.params.char_val_by_uuid_read_rsp.handle_value-&amp;gt;p_value;
		printf(&amp;quot;0x%x\t&amp;quot;, *ble_data_ptr);
		printf(&amp;quot;0x%x\r\n&amp;quot;, *(ble_data_ptr + 1));

	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I migrate to S132 this part crashes with fatal error&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: event form read request</title><link>https://devzone.nordicsemi.com/thread/166491?ContentTypeID=1</link><pubDate>Fri, 18 Jan 2019 13:38:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bd20ad4-0607-4894-a4ef-82a62f8f649b</guid><dc:creator>Shimon_nohayo</dc:creator><description>&lt;p&gt;Thanks - very helpful&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: event form read request</title><link>https://devzone.nordicsemi.com/thread/166472?ContentTypeID=1</link><pubDate>Fri, 18 Jan 2019 13:00:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90b9bbfe-6125-452b-b44a-37a0f8c8d3db</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Shimon,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Normal read requests are handled without application interaction. If you want to receive an event you need to enable authorization like you indicated (&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.0/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=2_3_1_1_0_2_4_3_13"&gt;MSC&lt;/a&gt;). Below is a diff showing the changes needed to enable this in the ble_app_blinky_example.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-dafef8a06f57494ca5e8710dc54536e4/auth_5F00_read.diff"&gt;devzone.nordicsemi.com/.../auth_5F00_read.diff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If anything is unclear, let me know.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>