<?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 the device name dynamically</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59433/how-to-change-the-device-name-dynamically</link><description>Hi , i want to change the device name by connecting the device using nrf_toolbox , have a look at my code , you will get what i am trying to do . By the way i am using nRF52832 , sdk 15,2 , i have modified the ble_app_uart example . please have a look</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Mar 2020 13:24:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59433/how-to-change-the-device-name-dynamically" /><item><title>RE: how to change the device name dynamically</title><link>https://devzone.nordicsemi.com/thread/241847?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2020 13:24:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0934107-ad30-44c6-8aa5-d15c6690b0e2</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;let me try and get back to you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change the device name dynamically</title><link>https://devzone.nordicsemi.com/thread/241548?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2020 10:09:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df9f2e6a-ad12-4e10-b624-e6ce985c9ba8</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;You can do it like this &lt;em&gt;after&lt;/em&gt; you have called sd_ble_gap_device_name_set():&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Stop advertising (this can be avoided, but doing so complicated things a bit in SDK 15.x)&lt;/li&gt;
&lt;li&gt;Generate and configure new advertising data using ble_advdata_encode()&lt;/li&gt;
&lt;li&gt;Configure the SoftDevice to use the new advertising data by calling ble_advertising_advdata_update().&lt;/li&gt;
&lt;li&gt;Start advertising again.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change the device name dynamically</title><link>https://devzone.nordicsemi.com/thread/241440?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2020 16:52:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:416bd989-4339-4f9a-9d8f-958e8a25ea47</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;How to do that?? How to update the advertise data again?&amp;nbsp; ...&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change the device name dynamically</title><link>https://devzone.nordicsemi.com/thread/241359?ContentTypeID=1</link><pubDate>Tue, 24 Mar 2020 12:25:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68140cc4-d67a-4a0f-8f64-36015a0831d5</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Your code will always advertise the name in&amp;nbsp;DEVICE_NAME. This is because you have already generated the advertising packet by the time you call&amp;nbsp;sd_ble_gap_device_name_set() again with&amp;nbsp;DEVICE_NAME_2. You need to generate the advertising data again after calling&amp;nbsp;sd_ble_gap_device_name_set() for that to be reflected in the advertising data. Since you use the advertising module, you should call&amp;nbsp;ble_advertising_advdata_update() (which in turn calls&amp;nbsp;ble_advdata_encode()).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>