<?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>how to change DIS char value after ble service initialized</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32643/how-to-change-dis-char-value-after-ble-service-initialized</link><description>Hi, 
 
 I want to change value of serial number after dis init, I want to use sd_ble_gatts_value_set to set the new value, but I dnot know what is the right connection handle for BLE_UUID_SERIAL_NUMBER_STRING_CHAR, how to find it or there is another why</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Apr 2019 13:49:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32643/how-to-change-dis-char-value-after-ble-service-initialized" /><item><title>RE: how to change DIS char value after ble service initialized</title><link>https://devzone.nordicsemi.com/thread/181646?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 13:49:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82582c1d-8b87-4bfb-8cc0-6d20e7c3e2c7</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I would recommend that you post a new question where you describe in detail what you are trying to do, what you have done, and what is not working.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change DIS char value after ble service initialized</title><link>https://devzone.nordicsemi.com/thread/181375?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 15:33:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:263728a3-dc2c-4bea-9bfd-5744781f45af</guid><dc:creator>stanley_atc</dc:creator><description>&lt;p&gt;Hello Jorgen,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; I tried to change the DIS&amp;#39;s char. as you mentioned. And referred the example as the following web link (&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41257/dis-update-serial-number"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/41257/dis-update-serial-number&lt;/a&gt;).&amp;nbsp; Unfortunately, it doesn&amp;#39;t work at all. Have anything I missed at the process what I implemented. I post the implement what I tried for your reference. Could you take a time to see for me?&lt;/p&gt;
&lt;p&gt;uint32_t ble_dis_update(char * serial_num)&lt;br /&gt;//uint32_t ble_dis_update(uint8_t length, uint8_t * buff)&lt;br /&gt;{&lt;br /&gt; ble_gatts_value_t gatts_value;&lt;br /&gt; uint32_t err_code = NRF_SUCCESS;&lt;br /&gt; ble_srv_utf8_str_t serial_num_str;&lt;/p&gt;
&lt;p&gt;ble_srv_ascii_to_utf8(&amp;amp;serial_num_str, serial_num);&lt;/p&gt;
&lt;p&gt;memset(&amp;amp;gatts_value, 0, sizeof(gatts_value));&lt;/p&gt;
&lt;p&gt;gatts_value.len = serial_num_str.length; //sizeof(uint8_t);&lt;br /&gt; gatts_value.offset = 0;&lt;br /&gt; gatts_value.p_value = serial_num_str.p_str; &lt;br /&gt; &lt;br /&gt; // Update database.&lt;br /&gt; err_code = sd_ble_gatts_value_set(service_handle, fw_rev_handles.value_handle, &amp;amp;gatts_value);&lt;/p&gt;
&lt;p&gt;return err_code;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;ble_dis_update(&amp;quot;1.1.0&amp;quot;);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change DIS char value after ble service initialized</title><link>https://devzone.nordicsemi.com/thread/126684?ContentTypeID=1</link><pubDate>Tue, 03 Apr 2018 15:22:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7e73c4a-90f5-48f0-b46e-1a81effad5ac</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I understand what you are asking, I was just telling you where the handle is stored. You will have to modify the service implementation to expose the handle to the application. Note&amp;nbsp;the comment in the service header file about&amp;nbsp;changing the service implementation:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; * @note Attention!
 *  To maintain compliance with Nordic Semiconductor ASA Bluetooth profile
 *  qualification listings, this section of source code must not be modified.
 */&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change DIS char value after ble service initialized</title><link>https://devzone.nordicsemi.com/thread/125875?ContentTypeID=1</link><pubDate>Sun, 25 Mar 2018 15:26:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ab80edc-6733-42f1-b137-f05a048761ea</guid><dc:creator>Brian Qin</dc:creator><description>&lt;p&gt;Hi, Jorgen:&lt;/p&gt;
&lt;p&gt;actually I want to use&amp;nbsp;sd_ble_gatts_value_set to update the value after&amp;nbsp;&lt;span style="background-color:transparent;color:#11171a;float:none;font-family:monospace,serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;sd_ble_gatts_characteristic_add&lt;/span&gt;, which I did the same with sdk11, the&amp;nbsp;&lt;span style="background-color:transparent;color:#000000;float:none;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;sd_ble_gatts_value_set&lt;/span&gt; need an input of&amp;nbsp;uint16_t conn_handle, the&amp;nbsp;serial_num_handles is different.&lt;/p&gt;
&lt;p&gt;Brian Qin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change DIS char value after ble service initialized</title><link>https://devzone.nordicsemi.com/thread/125558?ContentTypeID=1</link><pubDate>Thu, 22 Mar 2018 13:36:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3fc01b5-6593-4ac7-b6e9-49b6ec7534a8</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;The handles for the characteristics are stored in structs inside &lt;em&gt;ble_dis.c&lt;/em&gt;. Serial number handles are stored in:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ble_gatts_char_handles_t serial_num_handles;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;A reference to this struct is passed to&amp;nbsp;&lt;code&gt;char_add&lt;/code&gt; in&amp;nbsp;&lt;code&gt;ble_dis_init&lt;/code&gt;, which again pass this to&amp;nbsp;&lt;code&gt;sd_ble_gatts_characteristic_add&amp;nbsp;&lt;/code&gt;where it is filled with the assigned handle.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change DIS char value after ble service initialized</title><link>https://devzone.nordicsemi.com/thread/125499?ContentTypeID=1</link><pubDate>Thu, 22 Mar 2018 10:39:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ba330d1-ab8b-439b-ba86-85a5833dd409</guid><dc:creator>Brian Qin</dc:creator><description>&lt;p&gt;btw, I use sdk 14.2&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>