<?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>nRF52 change device name</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33792/nrf52-change-device-name</link><description>Hello everyone, I would like to change the name of my device with sd_ble_gap_device_name_set (). But the resulted name in the nRF Connect app is always &amp;quot;N/A&amp;quot;. Here&amp;#39;s my code : 
 
 Edit : 
 If I configure the BLE packet by myself, it&amp;#39;s working fine. The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 May 2018 14:52:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33792/nrf52-change-device-name" /><item><title>RE: nRF52 change device name</title><link>https://devzone.nordicsemi.com/thread/130635?ContentTypeID=1</link><pubDate>Wed, 02 May 2018 14:52:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d456e2ec-f7b0-4d7a-96c4-5c420d4eca73</guid><dc:creator>Sylvain</dc:creator><description>&lt;p&gt;Ok, thank you for the answer ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 change device name</title><link>https://devzone.nordicsemi.com/thread/130599?ContentTypeID=1</link><pubDate>Wed, 02 May 2018 13:43:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d84cc42-c88f-4e3c-b6de-4eed0f837746</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;That is because&amp;nbsp;sd_ble_gap_device_name_set() is implemented in the softdevice.&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;p&gt;We don&amp;#39;t supply source code for our SoftDevices, just an API to interface with it as a part of our SDK.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 change device name</title><link>https://devzone.nordicsemi.com/thread/130082?ContentTypeID=1</link><pubDate>Fri, 27 Apr 2018 09:38:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06ef83a6-89eb-47bf-ac01-7054290abc70</guid><dc:creator>Sylvain</dc:creator><description>&lt;p&gt;Thanks for you answer.&lt;br /&gt;&lt;br /&gt;I success to change the name on keeping the advertisement structure.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t understand why you say that&amp;#39;s not possible to find the source code of the sd_ble_gap_device_name_set() function . The code should be somewhere even if it is an assembly code ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 change device name</title><link>https://devzone.nordicsemi.com/thread/130074?ContentTypeID=1</link><pubDate>Fri, 27 Apr 2018 09:05:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f05247ba-b6ca-42cc-8903-c7c412156564</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You will get &amp;quot;N/A&amp;quot; if the name is not included or advertised. To include the name you have to set advdata.name_type to either BLE_ADVDATA_SHORT_NAME or BLE_ADVDATA_FULL_NAME in advertising_init(). and set the name by calling sd_ble_gap_device_name_set(). The&amp;nbsp;sd_ble_gap_device_name_set() function will only set the GAP device name, this function is a softdevice function so you won&amp;#39;t find the code for it.&lt;/p&gt;
&lt;p&gt;I suggest you to have a look at the&amp;nbsp;advertising_init() in any of the ble_peripheral examples in the SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 change device name</title><link>https://devzone.nordicsemi.com/thread/129836?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 16:00:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b0eb292-2c85-4599-af13-2cd3e50cc27d</guid><dc:creator>Sylvain</dc:creator><description>&lt;p&gt;I use the SDK V14.2.0 ...&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I agree I don&amp;#39;t need to setup connection. But I &lt;span class="sac" id="spans0e0"&gt;set up&lt;/span&gt; the advertising and then start the advertising, so it&amp;#39;s working fine.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I think my problem come from the fact that I don&amp;#39;t pass the advertising data structure to the sd_ble_gap_adv_data_set&lt;span class="sac" id="spans0e1"&gt; (&lt;/span&gt;) function.&lt;/p&gt;
&lt;p&gt;I would like to know what the sd_ble_gap_device_name_set&lt;span class="sac" id="spans0e2"&gt; (&lt;/span&gt;) function &lt;span class="sac" id="spans0e3"&gt;does&lt;/span&gt;. Do you know in which C file it is implemented&lt;span class="sac" id="spans0e4"&gt;?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="sac"&gt;Sylvain.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 change device name</title><link>https://devzone.nordicsemi.com/thread/129830?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 15:33:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31447617-f7fd-4ae3-a3d1-a056eb4f678e</guid><dc:creator>Mark</dc:creator><description>&lt;p&gt;Again, not sure which SDK version you are using and I&amp;nbsp;understand there are some slight variations so maybe I am missing something.&amp;nbsp; However, I don&amp;#39;t ever see a call to ble_advertising_init or an alternative.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You don&amp;#39;t have to setup connections, but you have to tell the API what flags to set (commonly using&amp;nbsp; ble_advertising_init) before you start advertising.&amp;nbsp; Otherwise while you set the DEVICE_NAME in the API you never setup the advertising structure and initialized it before you advertised.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The fact that when you set the&amp;nbsp;advertisement flags manually&amp;nbsp;it works, only proves&amp;nbsp;that point.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;comment on&amp;nbsp;connect/disconnect or shutting off bluetooth was just&amp;nbsp;to describe how the&amp;nbsp;local BLE database gets updated on Android and iPhone devices, not specific to your code or your device functionality.&amp;nbsp; Just covering details as I have seen many people waste&amp;nbsp;significant&amp;nbsp;time around names not updating simply because of the device cache.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 change device name</title><link>https://devzone.nordicsemi.com/thread/129819?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 14:47:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdb95d74-39f0-4288-b703-0b760c609e35</guid><dc:creator>Sylvain</dc:creator><description>&lt;p&gt;1) My code is complete. In fact, I receive packets on the nRF Connect app&lt;/p&gt;
&lt;p&gt;2) I don&amp;#39;t understand why you talk about connect and disconnect. I&amp;#39;m in the Observer-Broadcaster scheme. So, no connection is required&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 change device name</title><link>https://devzone.nordicsemi.com/thread/129808?ContentTypeID=1</link><pubDate>Wed, 25 Apr 2018 14:23:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e9a474f-cbc3-490b-b6e7-64d18991c7c2</guid><dc:creator>Mark</dc:creator><description>&lt;p&gt;Two quick points.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First:&amp;nbsp;Your code appears incomplete for advertising. I&amp;#39;d suggest checking out one of the examples from the version SDK you are using.&amp;nbsp; Maybe check: ble_peripheral/ble_app_uart or similar.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Second:&amp;nbsp;&amp;nbsp;When a BLE device is first seen by a device, e.g. Android or iPhone etc, the name is stored in a local database along with the mac id of the device.&amp;nbsp; BLE does not update this name unless you connect and than disconnect&amp;nbsp;from the device, OR you turn off bluetooth and then turn it back on clearing the local DB.&amp;nbsp; Then on the next scan it will update the name.&amp;nbsp; &amp;nbsp;This is of course, assuming it is set properly from the advertising code.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>