<?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>Changing the advertised device name at runtime and making the device name characteristic read-only</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86741/changing-the-advertised-device-name-at-runtime-and-making-the-device-name-characteristic-read-only</link><description>Hi, 
 I&amp;#39;ve started working with the nRF52-DK for developing a new product based on the nRF52832. I&amp;#39;ll be using custom services so I took as a starting point the projects provided with this ( https://www.youtube.com/watch?v=hY_tDext6zA ) webinar. I&amp;#39;m using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Feb 2025 17:56:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86741/changing-the-advertised-device-name-at-runtime-and-making-the-device-name-characteristic-read-only" /><item><title>RE: Changing the advertised device name at runtime and making the device name characteristic read-only</title><link>https://devzone.nordicsemi.com/thread/523103?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2025 17:56:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6db3172b-356f-49ab-af35-c655f4275c59</guid><dc:creator>ellamoss</dc:creator><description>&lt;p&gt;This happened to me too - &amp;quot;GATT_CONN_TERMINATE_LOCAL_HOST&amp;quot; from the mobile app when I tried writing to the GAP Device Name characteristic.&lt;/p&gt;
&lt;p&gt;I needed to set these Kconfig flags in my prj.conf:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_DEVICE_NAME_GATT_WRITABLE_ENCRYPT=n
CONFIG_DEVICE_NAME_GATT_WRITABLE_AUTHEN=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;That solved the disconnect issue, the project didn&amp;#39;t use authentication or encryption so I had to explicitly turn it off for the device name characteristic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing the advertised device name at runtime and making the device name characteristic read-only</title><link>https://devzone.nordicsemi.com/thread/362578?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 11:58:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9fa00e2-923e-4f5d-b2a0-2982bc9d0317</guid><dc:creator>Sigurd</dc:creator><description>[quote user=""]When written to, the device just disconnects.[/quote]
&lt;p&gt;You should check the disconnect reason. It should be printed in the log on the mobile app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing the advertised device name at runtime and making the device name characteristic read-only</title><link>https://devzone.nordicsemi.com/thread/362565?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 11:19:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8751bc5-8675-49b1-beda-6a4315d34716</guid><dc:creator>V.Lorz</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your support.&lt;/p&gt;
&lt;p&gt;The device did not reset. I inserted code in &lt;strong&gt;main()&lt;/strong&gt; for turning on the LEDs for 1 second and it does not occur. No further printings in the log neither.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing the advertised device name at runtime and making the device name characteristic read-only</title><link>https://devzone.nordicsemi.com/thread/362555?ContentTypeID=1</link><pubDate>Fri, 08 Apr 2022 10:52:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2aad026-7c4d-4a77-b219-8f9d53a65442</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""] Is it required to stop advertising, modify the advertising data passed to bt_le_adv_start() and start advertising again?[/quote]
&lt;p&gt;Yes, correct.&lt;/p&gt;
[quote user=""]Second, the Device Name characteristic allows read and write accesses. When written to, the device just disconnects. After reconnecting it has been reverted again to its previous value. Is this behaviour correct?[/quote]
&lt;p&gt;That sounds strange. Did the device reset? You should check if there is any errors printed in the log.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]And last, how do I configure the profile/characteristic/etc for making the &lt;strong&gt;Device Name&lt;/strong&gt; characteristic read only?[/quote]
&lt;p&gt;Set CONFIG_BT_DEVICE_NAME_GATT_WRITABLE=n&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>