<?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>Generic Access Profile Device Name change</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28401/generic-access-profile-device-name-change</link><description>One can change value of Device Name characteristics in Generic Access Profile. How can I register the change event? At the moment I would be able to do it by periodically reading sd_ble_gap_device_name_get() and compare read name with old name. If they</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Apr 2019 12:19:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28401/generic-access-profile-device-name-change" /><item><title>RE: Generic Access Profile Device Name change</title><link>https://devzone.nordicsemi.com/thread/183801?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2019 12:19:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c599819-18d4-4591-8ac2-bc56dc11991e</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Did you check for a BLE_GATTS_EVT_WRITE event?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic Access Profile Device Name change</title><link>https://devzone.nordicsemi.com/thread/182905?ContentTypeID=1</link><pubDate>Sun, 21 Apr 2019 16:15:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c81b9e4-99c2-451f-956c-3e939def60fb</guid><dc:creator>kobyfr</dc:creator><description>&lt;p&gt;How to capture the event of device name change? that is still not answered here.&amp;nbsp;&lt;br /&gt;With debugging, I saw that&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;ble_evt_handler&lt;/pre&gt;&amp;nbsp;is called when the device name is written to, but I haven&amp;#39;t figured out how to register a callback for that SD code, for my application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic Access Profile Device Name change</title><link>https://devzone.nordicsemi.com/thread/119958?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2018 13:52:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:950f8b60-37ec-4cd5-adbc-59d9a27e326c</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;I guess this is already covered by the forum. But, yes, the device name will be used automatically if the central writes a new name to the device name characteristic. You should look at the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/fds_example.html?cp=4_0_0_4_6_8"&gt;FDS module&lt;/a&gt; if you need to store a new device name in flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic Access Profile Device Name change</title><link>https://devzone.nordicsemi.com/thread/112074?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2017 16:58:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c921d74e-14dc-465f-9193-6d2702299365</guid><dc:creator>letter57</dc:creator><description>&lt;p&gt;I still have some uncertainty. I don&amp;#39;t know how to do.&lt;/p&gt;
&lt;p&gt;If a central wants to update the name of a peripheral, it has to write to the device name characteristic. When writing to the device name characteristic, the device name will automatically be updated, no need to add extra code for that.&lt;/p&gt;
&lt;p&gt;If i want to store the new device name in my flash , how to do that?&lt;/p&gt;
&lt;p&gt;Could you give me some sample code? I think it will be helpful..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic Access Profile Device Name change</title><link>https://devzone.nordicsemi.com/thread/112073?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2016 10:09:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c939d57d-d7c1-429a-961b-607293d0a870</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;After taking a closer look, the device name is being updated automatically upon a write operation to the peripheral. I apologize for the confusion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic Access Profile Device Name change</title><link>https://devzone.nordicsemi.com/thread/112072?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2016 09:00:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4daf23e-f49a-473d-b3d6-60b063be3a51</guid><dc:creator>gaminn</dc:creator><description>&lt;p&gt;How can one get &amp;quot;device_name_characteristic_handle&amp;quot; from local gatt database?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic Access Profile Device Name change</title><link>https://devzone.nordicsemi.com/thread/112071?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2016 14:53:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:552d5d49-a970-42c2-85a9-8afeaa28a411</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I have updated my answer to answer your question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic Access Profile Device Name change</title><link>https://devzone.nordicsemi.com/thread/112070?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2016 12:16:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:732406ae-2961-4d08-a00c-f65c2b7a7bbe</guid><dc:creator>gaminn</dc:creator><description>&lt;p&gt;Thanks Kristin. Actually, the central connected to my peripheral will remotely change the name via Generic Access Profile. How can I register the event in my peripheral when the central did so? Or do I have to manually poll the name in my peripheral to get the change?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Generic Access Profile Device Name change</title><link>https://devzone.nordicsemi.com/thread/112069?ContentTypeID=1</link><pubDate>Wed, 09 Mar 2016 11:47:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:909bdf08-3725-4408-ab4c-e56a97ad346a</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;You can set the device name using &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s110.api.v8.0.0%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=2_7_0_0_0_2_1_4_14&amp;amp;anchor=gae779f7eed346027dc4cbaf438352e5db"&gt;sd_ble_gap_device_name_set(..)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In order to update the advertising data, you do only need to call &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s110.api.v8.0.0%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=2_7_0_0_0_2_1_4_2&amp;amp;anchor=gaddbb12e078d536ef2e93b41d77ff6243"&gt;sd_ble_gap_adv_data_set(..)&lt;/a&gt;. Its documentation says the following: &amp;quot;&lt;em&gt;Set, clear or update advertising and scan response data.&lt;/em&gt;
&amp;quot;&lt;/p&gt;
&lt;p&gt;I would think the easiest way to update the new device name to the advertising data is to call sd_ble_gap_adv_data_set(..) when sd_ble_gap_device_name_set(..) returns NRF_SUCCESS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 07.04.16&lt;/strong&gt; If a central wants to update the name of a peripheral, it has to write to the device name characteristic. When writing to the device name characteristic, the device name will automatically be updated, no need to add extra code for that. However, what you need to verify is the security level required for updating the device name. The permissions are set with the p_write_perm parameter when calling &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s130.api.v2.0.0%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=2_6_2_1_0_2_1_2_14&amp;amp;anchor=gae779f7eed346027dc4cbaf438352e5db"&gt;sd_ble_gap_device_name_set(..)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that the new device name is not automatically written to flash, it means that upon a reset, the device will have the original device name. If you want to store and re-store the updated device name upon a reset, you will have to do that manually.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>