<?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>Getting data from BLE_GATTS_AUTHORIZE_TYPE_WRITE event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24114/getting-data-from-ble_gatts_authorize_type_write-event</link><description>I am trying to use read/write authorisation on a characteristic in order to get/set a connection specific value of a characteristic 
 I am am having issues getting the new characteristic value from the BLE_GATTS_AUTHORIZE_TYPE_WRITE event 
 I write</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Aug 2017 03:38:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24114/getting-data-from-ble_gatts_authorize_type_write-event" /><item><title>RE: Getting data from BLE_GATTS_AUTHORIZE_TYPE_WRITE event</title><link>https://devzone.nordicsemi.com/thread/94948?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 03:38:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e0eb6f9-07bf-477c-9d7d-ea941dcfe8aa</guid><dc:creator>goldwake</dc:creator><description>&lt;p&gt;&lt;code&gt;p_ble_evt-&amp;gt;evt.gatts_evt.params.authorize_request.request.write.data&lt;/code&gt; is a variable length array.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ble_gatts_evt_rw_authorize_request_t req = p_ble_evt-&amp;gt;evt.gatts_evt.params.authorize_request;&lt;/code&gt; is only going to assign sizeof(ble_gatts_evt_rw_authorize_request_t) bytes but since data is defined as only 1 byte long, this isn&amp;#39;t going to copy everything.&lt;/p&gt;
&lt;p&gt;had I used
&lt;code&gt;ble_gatts_evt_rw_authorize_request_t * req = &amp;amp;p_ble_evt-&amp;gt;evt.gatts_evt.params.authorize_request;&lt;/code&gt; instead, everything would have worked as I had a pointer to req.request.write.data, not an incomplete copy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>