<?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>Setting DIS info dynamically in Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123371/setting-dis-info-dynamically-in-zephyr</link><description>SDK v3.0.2 Toolchain 3.01 
 Is it possible to set the DIS name, (and possibly others) dynamically at runtime? I need to provide some level of configuration to my end users. 
 I&amp;#39;ve done this before at boot time using ble_dis_init() under SDK17 but under</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 02 Aug 2025 06:57:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123371/setting-dis-info-dynamically-in-zephyr" /><item><title>RE: Setting DIS info dynamically in Zephyr</title><link>https://devzone.nordicsemi.com/thread/544380?ContentTypeID=1</link><pubDate>Sat, 02 Aug 2025 06:57:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f582bb75-805b-4742-a11a-3c18c10cb89f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Screenshots were taken from the peripheral_uart sample, but I was testing the peripheral_dis sample from the Zephyr repo.&lt;/p&gt;
[quote user="Nick_RA"]My app currently uses NVS to save a structure which contains a mix of integer &amp;amp; string values, about 16 values plus maybe 40 bytes in strings (including the custom DIS name). I suppose I should be able to move that to ZMS assuming it&amp;#39;s compatible with nRF52832 which I also need to support.[/quote]
&lt;p&gt;The sample is not configured to support any NV storage by default.&lt;/p&gt;
&lt;p&gt;ZMS is optimized for RRAM/MMRAM and NVS for FLASH. If you have a project for both nRF52 and nRF54L. you can create a Kconfig file in your project root that selectes the appropriate filesystem based on the NV memory the chip has. Same as we do in some of ourr SDK samplse. For example, in&amp;nbsp; the peripheral_uart sample here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/bluetooth/peripheral_uart/Kconfig#L39-L43"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/samples/bluetooth/peripheral_uart/Kconfig#L39-L43&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting DIS info dynamically in Zephyr</title><link>https://devzone.nordicsemi.com/thread/544335?ContentTypeID=1</link><pubDate>Fri, 01 Aug 2025 13:07:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f45c9f0-b49d-4a93-b13a-19fe1fd0b398</guid><dc:creator>Nick_RA</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/123371/setting-dis-info-dynamically-in-zephyr/544324"]I was not able to reproduce this here with SDK v3.0.2. [/quote]
&lt;p&gt;You&amp;#39;re using a different app; I&amp;#39;m testing using the peripheral_DIS example. Using 3.0.2 on a 54L15DK.&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/123371/setting-dis-info-dynamically-in-zephyr/544324"]nRF54L requires the ZMS backend while all others use NVS.[/quote]
&lt;p&gt;My app currently uses NVS to save a structure which contains a mix of integer &amp;amp; string values, about 16 values plus maybe 40 bytes in strings (including the custom DIS name). I suppose I should be able to move that to ZMS assuming it&amp;#39;s compatible with nRF52832 which I also need to support.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Anyway back to the DIS example, it doesn&amp;#39;t build now:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:/ncs/v3.0.2/zephyr/subsys/settings/src/settings_zms.c:708: undefined reference to `flash_area_get_sectors&amp;#39;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;which I guess is just a missing include file?&lt;/p&gt;
&lt;p&gt;[Edit: Builds OK now, was missing config&amp;nbsp;&amp;nbsp;&lt;span&gt;CONFIG_FLASH&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;y&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_FLASH_MAP&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;y]&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting DIS info dynamically in Zephyr</title><link>https://devzone.nordicsemi.com/thread/544324?ContentTypeID=1</link><pubDate>Fri, 01 Aug 2025 12:28:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5766e1b-97a0-4c9e-a75b-1e6c3cf8c0b0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;No problem. I&amp;#39;m not sure why the&amp;nbsp;the DIS sample tries to save the database hash to settings, I was not able to reproduce this here with SDK v3.0.2. However, this may be required in your actual app, and the reason it fails is that Settings is likely not enabled with a NV storage backend (&lt;span&gt;CONFIG_SETTINGS_NONE&lt;/span&gt;&lt;span&gt;=y).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please check if the generated .config file includes the correct configuration. nRF54L requires the ZMS backend while all others use NVS.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1754051239317v4.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1754051291915v5.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting DIS info dynamically in Zephyr</title><link>https://devzone.nordicsemi.com/thread/544322?ContentTypeID=1</link><pubDate>Fri, 01 Aug 2025 12:11:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05ee17d3-d075-4afb-9264-e0bf863e342a</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;Sorry I know I closed this ticket, but..&lt;/p&gt;
&lt;p&gt;With logging enabled I notice I get an error &amp;quot;&amp;lt;err&amp;gt; bt_gatt: Failed to save Database Hash (err -2)&amp;quot;. Running the Zephyr peripheral_dis example I get the same.&lt;/p&gt;
&lt;p&gt;It doesn&amp;#39;t appear to have affected operation. What are the consequences of the error?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v3.0.2-89ba1294ac9b ***
*** Using Zephyr OS v4.0.99-f791c49f492c ***
[00:00:00.000,382] &amp;lt;inf&amp;gt; bt_sdc_hci_driver: SoftDevice Controller build revision:
                                            89 9a 50 8a 95 01 9c 58  fc 39 d2 c1 10 04 ee 02 |..P....X .9......
                                            64 ce 25 be                                      |d.%.
[00:00:00.001,366] &amp;lt;inf&amp;gt; bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.001,379] &amp;lt;inf&amp;gt; bt_hci_core: HW Variant: nRF54Lx (0x0005)
[00:00:00.001,392] &amp;lt;inf&amp;gt; bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 137.20634 Build 2617349514
[00:00:00.001,512] &amp;lt;inf&amp;gt; bt_hci_core: No ID address. App must call settings_load()
[00:00:00.001,733] &amp;lt;inf&amp;gt; bt_hci_core: Identity: E7:B8:43:94:B6:B4 (random)
[00:00:00.001,748] &amp;lt;inf&amp;gt; bt_hci_core: HCI: version 6.0 (0x0e) revision 0x30f3, manufacturer 0x0059
[00:00:00.001,761] &amp;lt;inf&amp;gt; bt_hci_core: LMP: version 6.0 (0x0e) subver 0x30f3
[00:00:00.002,523] &amp;lt;err&amp;gt; bt_gatt: Failed to save Database Hash (err -2)
Bluetooth initialized
Advertising successfully started&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting DIS info dynamically in Zephyr</title><link>https://devzone.nordicsemi.com/thread/544296?ContentTypeID=1</link><pubDate>Fri, 01 Aug 2025 10:05:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46ca63f4-18f3-4104-b61c-76edecd481ab</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;That looks pretty much exactly what I need, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting DIS info dynamically in Zephyr</title><link>https://devzone.nordicsemi.com/thread/544146?ContentTypeID=1</link><pubDate>Wed, 30 Jul 2025 18:46:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de0d94cf-7da8-47ba-8d2e-ed78572082c5</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes, it&amp;#39;s possible to set the device name attribute value, etc at runtime. Please have a look at this thread:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/109350/setting-dis-serial-number-at-runtime"&gt;Setting DIS serial number at runtime&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>