<?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>Dynamic updating of serial number in device ID</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1514/dynamic-updating-of-serial-number-in-device-id</link><description>Ole,
I am trying to update the serial number value in an already initialized standard Device ID profile.
[i]dis_init.serial_num_str.length = (uint16_t)strlen(newserial);
dis_init.serial_num_str.p_str = (uint8_t *)newserial;
err_code = ble_dis_update</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Feb 2014 16:50:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1514/dynamic-updating-of-serial-number-in-device-id" /><item><title>RE: Dynamic updating of serial number in device ID</title><link>https://devzone.nordicsemi.com/thread/6739?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2014 16:50:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e40b97f6-2eca-46d6-a6af-ecf023b3a1cb</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Sorry, overlooked that part. I&amp;#39;ve edited my answer above to cover that as well. If you found that my reply answered your question, I&amp;#39;d also be happy if you could click the &amp;quot;Accept as answer&amp;quot; button below it, to clear up this question. :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamic updating of serial number in device ID</title><link>https://devzone.nordicsemi.com/thread/6738?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2014 16:46:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0401c933-a39b-4e7b-92b9-ce44301ad759</guid><dc:creator>Chris Gates</dc:creator><description>&lt;p&gt;Ok, so that is the problem then....  as to the second half of my question, is there a good way to reset the 51822 from software?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamic updating of serial number in device ID</title><link>https://devzone.nordicsemi.com/thread/6737?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2014 10:38:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:435325bf-e0d9-4516-ac0e-abbcb983d58f</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;I&amp;#39;m having a little trouble understanding this code snippet. To update an existing characteristic, you should make sure to use sd_ble_gatts_value_set(), which require you to have the handle of the characteristic you want to set. Without having tested, I&amp;#39;d therefore suggest a method something like this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
uint32_t ble_dis_serial_num_update(char * serial_num_string, uint8_t length)
{
    return sd_ble_gatts_value_set(serial_num_handles.value_handle, 0, length, serial_num_string);
}

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also, you should be aware that you can&amp;#39;t add a characteristic to a service if other services have been added in the mean time. Any attribute added will always be added to the last service added, no matter what you set the service_handle to in the sd_ble_gatts_characteristic_add() function. This is a limitation with the current GATT Table implementation in the S110.&lt;/p&gt;
&lt;p&gt;Edit: To also answer the second part, you can use NVIC_SystemReset() or sd_nvic_SystemReset(), depending on whether the softdevice is enabled or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>