<?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>sd_ble_gatts_value_set</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39948/sd_ble_gatts_value_set</link><description>nrf52832. 
 SDK14.2 
 Segger ES V3.34a 
 
 I would like to send a struct to a characteristic value, 
 typedef struct { int8_t test1_array[30]; int8_t test2_array[30]; uint16_test3_array[30]; uint32_t test4_array[30]; }data_t; 
 maybe using... 
 sd_ble_gatts_value_set</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Nov 2018 14:21:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39948/sd_ble_gatts_value_set" /><item><title>RE: sd_ble_gatts_value_set</title><link>https://devzone.nordicsemi.com/thread/155786?ContentTypeID=1</link><pubDate>Fri, 02 Nov 2018 14:21:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9564a6d1-dd86-4855-abba-06a7c63d9418</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;&lt;span&gt;sd_ble_gatts_value_set function() takes in a ble_gatts_value_t pointer which has a pointer p_value to a uint8_t array. You can therefore typecast your struct to an uint8_t array and send it with the sd_ble_gatts_value_set() function. The attribute value offset parameter can be used to specify which parts of the attribute that you want to change. This can be useful if you only want to change a certain part of the characteristic.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Documentation:&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v0.9.0%2Fgroup___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=2_3_1_1_6_2_0_4_4_10&amp;amp;anchor=ga2760c51ea71853bd74e2e7e7117ef52a"&gt;http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v0.9.0%2Fgroup___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=2_3_1_1_6_2_0_4_4_10&amp;amp;anchor=ga2760c51ea71853bd74e2e7e7117ef52a&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jared&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>