<?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>Retrieve characteristic value</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30301/retrieve-characteristic-value</link><description>Hi, I&amp;#39;m trying to controll the port of my nRF52832 by writing to a characteristic value. So far everything works fine but I&amp;#39;m unable to get the value of my characteristic. I tried using the 
 sd_ble_gatts_value_get() function but didn&amp;#39;t manage to get</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Feb 2018 14:44:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30301/retrieve-characteristic-value" /><item><title>RE: Retrieve characteristic value</title><link>https://devzone.nordicsemi.com/thread/120131?ContentTypeID=1</link><pubDate>Wed, 07 Feb 2018 14:44:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4956c19-6140-4ed7-8cd6-47eaadca9c45</guid><dc:creator>Andr&amp;#233;</dc:creator><description>&lt;p&gt;I figured it out. Using this code it finally worked:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;uint8_t testStore;&lt;br /&gt; ble_gatts_value_t testStruct;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; testStruct.p_value = &amp;amp;testStore;&lt;br /&gt; testStruct.len = 4;&lt;br /&gt; testStruct.offset = 0;&lt;br /&gt;&lt;br /&gt; sd_ble_gatts_value_get(BLE_CONN_HANDLE_INVALID, 0x000E, &amp;amp;testStruct);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; sd_ble_gatts_value_set(BLE_CONN_HANDLE_INVALID, 0x0011, &amp;amp;testStruct);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The problem was that I didn&amp;#39;t initialize the values in the testStruct correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>