<?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>Change device name</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109808/change-device-name</link><description>Hello Nordic Engineer, 
 I know that I can modify #define DEVICE_NAME &amp;quot;device001&amp;quot; in sdk_config.h , but it takes a lot of time to compile and flash the program every time. It seems like there should be another way to quickly solve this. 
 【1】Is it possible</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Feb 2026 12:48:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109808/change-device-name" /><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/560120?ContentTypeID=1</link><pubDate>Mon, 02 Feb 2026 12:48:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea093333-857b-43db-a602-111ec38d6add</guid><dc:creator>wasifali</dc:creator><description>&lt;p&gt;Thank you for giving solution in detail.&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ffffff;font-size:75%;"&gt;&lt;a style="color:#ffffff;" href="https://feed-kroger.xyz/"&gt;kroger feed&lt;br /&gt;&lt;/a&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;a style="background-color:#ffffff;color:#ffffff;" href="https://myhtspace.work/"&gt;myhtsapce&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/553069?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2025 19:34:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5da25e5a-ed6b-4d7e-8331-c6fc9700791e</guid><dc:creator>jimmyandrz</dc:creator><description>&lt;p data-start="42" data-end="259"&gt;&lt;strong data-start="46" data-end="53"&gt;Yes&lt;/strong&gt;, you can change the device name via the &lt;strong data-start="94" data-end="113"&gt;nRF Connect app&lt;/strong&gt;, but only if your firmware allows it. You&amp;rsquo;d need to add code to handle a GATT characteristic for the device name and store it (e.g., in flash).&lt;/p&gt;
&lt;p data-start="261" data-end="457"&gt;&lt;strong data-start="265" data-end="272"&gt;Yes&lt;/strong&gt;, possible with &lt;strong data-start="288" data-end="311"&gt;J-Link command line&lt;/strong&gt; using &lt;code data-start="318" data-end="336"&gt;nrfjprog --memwr&lt;/code&gt; or similar, but you&amp;rsquo;d have to know the memory address where the name is stored not super convenient unless scripted.&lt;/p&gt;
&lt;p data-start="459" data-end="623" data-is-last-node="" data-is-only-node=""&gt;Easiest quick fix: add a &lt;strong data-start="488" data-end="511"&gt;UART or BLE command&lt;/strong&gt; in your firmware to change the name at runtime and save it to flash, so you don&amp;rsquo;t need to recompile every time.&lt;br /&gt;&lt;br /&gt;Hope! it would be helpful.&lt;br /&gt;&lt;br /&gt;&lt;span style="background-color:#ffffff;color:#ffffff;"&gt;&lt;a style="background-color:#ffffff;color:#ffffff;" href="https://myinfo-kroger.xyz/"&gt;myinfo kroger login&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/477121?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 13:04:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dd17230-53e7-4559-a551-51ee956ea1cc</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello&amp;nbsp;Ylvisaker ,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Is&amp;nbsp;sequential, t&lt;span&gt;he numbers are only used for production, actual connection relies on UUID filtering.&lt;/span&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/109808/change-device-name/477115"]Please do not hesitate to open another ticket if you should have any issues or questions to the flash storage usage or samples.[/quote]
&lt;p&gt;OK, Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/477115?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 12:57:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfd61608-66f8-4d6b-a55a-9cb8794071a3</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="tony55723"]The device number is assigned according to the quantity ordered by the customer. For example, if 100 units are ordered today, the numbers will be from 1 to 100. If 200 units are ordered tomorrow, the numbers will be from 101 to 300.[/quote]
&lt;p&gt;Thank you for clarifying. Does the numbers need to be sequential and in order? If not then you could perhaps instead base them on a permutation of the device ID in the FICR register instead.&lt;br /&gt;If they do need to be sequential, how will a device know which number it is?&lt;/p&gt;
[quote user="tony55723"]Thank you very much. In the infocenter you provided, I found examples\peripheral\flash_fstorage. Later, I will try to implement the write flash function.[/quote]
&lt;p&gt;Great, I am happy to hear that you found it helpful! Please do not hesitate to open another ticket if you should have any issues or questions to the flash storage usage or samples.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/476935?ContentTypeID=1</link><pubDate>Wed, 03 Apr 2024 14:20:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fbc67386-cc88-4c48-90b5-7282ddd2abd0</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello&amp;nbsp;Ylvisaker ,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The device number is assigned according to the quantity ordered by the customer. For example, if 100 units are ordered today, the numbers will be from 1 to 100. If 200 units are ordered tomorrow, the numbers will be from 101 to 300.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you very much. In the infocenter you provided, I found examples\peripheral\flash_fstorage. Later, I will try to implement the write flash function.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/476914?ContentTypeID=1</link><pubDate>Wed, 03 Apr 2024 13:43:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:672d492d-e62d-436c-b7e7-8bc2266d0ae7</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="tony55723"]&lt;p&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;* DEVICE_NAMES[] = {&lt;span&gt;&amp;quot;Device0001&amp;quot;&lt;/span&gt;, &lt;span&gt;&amp;quot;Device0002&amp;quot;&lt;/span&gt;, ....... ,&lt;span&gt;&amp;quot;Device9999&amp;quot;&lt;/span&gt;};&lt;/p&gt;
&lt;p&gt;nRF52811 Flash is so small&lt;/p&gt;[/quote]
&lt;p&gt;I would not recommend this approach if your list of potential names are as long as this, all but one of these entries actually will be useful to the device. In this case I would go with the approach using a single variable stored in flash, which you may later re-write if needed.&lt;br /&gt;&lt;br /&gt;It is not quite clear to me how the number of the device name will be generated or determined, could you elaborate on this?&lt;/p&gt;
[quote user="tony55723"]But I have a question, the BLE data reception (NUS), or buttons, and what I consider UART (PCB copper wires), these all belong to external signals, so I still need to store data (Flash), right?[/quote]
&lt;p&gt;Yes, all of these options would still need to store in flash in order to persist through a reset.&lt;/p&gt;
[quote user="tony55723"]The next time the device boots up, it will first read from the Flash. For example, if it reads 0x0a, it will advertise as &amp;#39;Device&amp;#39; + &amp;#39;0x0a&amp;#39;, which is &amp;#39;Device0010&amp;#39;, right?[/quote]
&lt;p&gt;If you are using a variable for your name which you have stored in flash then this variable will be read upon startup and input as the device name to the GAP function, yes. Please &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/fstorage_example.html"&gt;see one of the three FLASH storage examples here&lt;/a&gt;&amp;nbsp;as a reference for how you may store your variable in flash.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/476821?ContentTypeID=1</link><pubDate>Wed, 03 Apr 2024 10:24:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ba5e97b-82e2-4d3f-9361-10f6a66214c1</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello&amp;nbsp;Ylvisaker ,&lt;/span&gt;&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/109808/change-device-name/476800"]you could have a list[/quote]
&lt;p&gt;&lt;span class="hljs-type"&gt;const&lt;/span&gt; &lt;span class="hljs-type"&gt;char&lt;/span&gt;* DEVICE_NAMES[] = {&lt;span class="hljs-string"&gt;&amp;quot;Device0001&amp;quot;&lt;/span&gt;, &lt;span class="hljs-string"&gt;&amp;quot;Device0002&amp;quot;&lt;/span&gt;, ....... ,&lt;span class="hljs-string"&gt;&amp;quot;Device9999&amp;quot;&lt;/span&gt;};&lt;/p&gt;
&lt;p&gt;nRF52811 Flash is so small&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I may not design it this way, but it should be achievable using the &amp;#39;Device+xxx&amp;#39; approach.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;But I have a question, the BLE data reception (NUS), or buttons, and what I consider UART (PCB copper wires), these all belong to external signals, so I still need to store data (Flash), right?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;The next time the device boots up, it will first read from the Flash. For example, if it reads 0x0a, it will advertise as &amp;#39;Device&amp;#39; + &amp;#39;0x0a&amp;#39;, which is &amp;#39;Device0010&amp;#39;, right?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/476800?ContentTypeID=1</link><pubDate>Wed, 03 Apr 2024 09:29:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f472b3bd-a5ce-47af-a429-43ab497e2868</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="tony55723"]But I hope that after changing the name, the advertising will use the new name the next time the power is restarted. Do I have to modify the DEVICE_NAME every time I want to change the name and wait for the 1-minute build time?[/quote]
&lt;p&gt;If you use a variable instead of the compile-time DEVICE_NAME define then the device will start its advertising with whatever name you have provided in that variable, and so you will not have to recompile each time you want to change name, no.&lt;br /&gt;&lt;br /&gt;How you populate that variable name will be up to you - you could have a list of names stored in your FLASH (persistent memory), or you can receive the new name from a BLE connection, or you can push a button to make it go to a predetermined name.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/476562?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 12:18:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ad7f6f0-07b4-4a81-9060-20b85fd193ec</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello&amp;nbsp;Ylvisaker ,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But I hope that after changing the name, the advertising will use the new name the next time the power is restarted. Do I have to modify the DEVICE_NAME every time I want to change the name and wait for the 1-minute build time?&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f62d.svg" title="Sob"&gt;&amp;#x1f62d;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/476550?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 11:58:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75a3b916-a018-4f12-86dc-c26e5b5f14e9</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="tony55723"]If I use variables, will the name revert back to its original one the next time I power cycle?[/quote]
&lt;p&gt;Yes, unless you store this name in FLASH it will revert back to the initial name upon resetting.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/476542?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 11:39:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4dd30a32-88b4-45ac-bb15-3e04d8e5d2e4</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello&amp;nbsp;Ylvisaker ,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I use variables, will the name revert back to its original one the next time I power cycle?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/476538?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 11:34:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:588073cc-c01d-4a30-9ec9-07dadcbf34a6</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="tony55723"]Thank you for your reply.[/quote]
&lt;p&gt;No problem at all, I am happy to help!&lt;/p&gt;
[quote user="tony55723"]I still don&amp;#39;t quite understand how to initialize advertising separately. My previous approach was to modify the DEVICE_NAME, then build, wait for more than 1 minute until the hex file was generated, and then download it to the chip. However, the build time is too long.[/quote]
&lt;p&gt;Yes, please see the gap_params_init function in the example. Here you can change away from using the DEVICE_NAME define to instead use a variable you can change throughout the lifetime if your application.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/476530?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 11:18:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e28d0302-d529-48a9-94b6-a45a3228d599</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;Ylvisaker ,&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
[quote userid="87869" url="~/f/nordic-q-a/109808/change-device-name/476510"]You can re-init the advertising[/quote]
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/7343.q2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I still don&amp;#39;t quite understand how to initialize advertising separately. My previous approach was to modify the DEVICE_NAME, then build, wait for more than 1 minute until the hex file was generated, and then download it to the chip. However, the build time is too long.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Whether it&amp;#39;s central or peripheral, it&amp;#39;s ble_app_multirole_lesc.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I used this example to establish a mesh network with 1-to-1-to-1 connections, extending continuously. Therefore, all devices include both central and peripheral roles.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change device name</title><link>https://devzone.nordicsemi.com/thread/476510?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2024 10:23:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b26af5f4-e588-40a8-9e1c-9f6675dfc890</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]&lt;span&gt;I know that I can modify &lt;/span&gt;&lt;span style="color:rgba(128, 0, 128, 1);"&gt;&lt;code&gt;#define DEVICE_NAME &amp;quot;device001&amp;quot;&lt;/code&gt;&lt;/span&gt;&lt;span&gt; in &lt;span style="color:rgba(128, 0, 128, 1);"&gt;sdk_config.h&lt;/span&gt;, but it takes a lot of time to compile and flash the program every time. It seems like there should be another way to quickly solve this.&lt;/span&gt;[/quote]
&lt;p&gt;You can re-init the advertising and provide a new name as the device name parameter instead of DEVICE_NAME. Please see the section of main.c where DEVICE_NAME is used as the parameter to configure the name of the device in the GAP initialization.&lt;br /&gt;&lt;br /&gt;This approach will also let you do so at runtime, so if you first receive the new name over BLE you can then re-init and start advertising with this new name.&lt;br /&gt;Just out of curiosity, which use-case are you targeting where you would need to change the advertising name after you have already established connection with the central device?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>