<?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 serial number at runtime</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109350/setting-dis-serial-number-at-runtime</link><description>How can I set serial number visible in DIS service programaticaly? I know I can set CONFIG_BT_DIS_SERIAL_NUMBER_STR, but putting serial number in project&amp;#39;s source code makes no sense. Serial number should be unique for each device. So I&amp;#39;d like to read</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Mar 2024 14:53:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109350/setting-dis-serial-number-at-runtime" /><item><title>RE: Setting DIS serial number at runtime</title><link>https://devzone.nordicsemi.com/thread/474931?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2024 14:53:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8894c9a-04fb-4c10-ba6f-0c04ce039f61</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Grzegorz,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, you need to enable the NVS backend if you have a Bluetooth application with support for bonding enabled. The Bluetooth host uses the settings module to store bonding information in persistent memory.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting DIS serial number at runtime</title><link>https://devzone.nordicsemi.com/thread/474918?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2024 13:57:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b40beaee-b46b-4605-90d2-a6daafb438ee</guid><dc:creator>grzegorz</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes, API would be better. But if runtime settings don&amp;#39;t touch Flash then it&amp;#39;s not that bad.&lt;/p&gt;
&lt;p&gt;Regarding the sample. It sets CONFIG_SETTINGS_NONE=y. Is it required by runtime settings? I guess runtime settings are always in RAM? Additionally I think CONFIG_SETTINGS_NVS=y is needed anyway because without it I get errors from bt module:&lt;/p&gt;
&lt;p&gt;00&amp;gt; [00561318] &amp;lt;err&amp;gt; bt_gatt: Failed to save Database Hash (err -2)&lt;br /&gt;00&amp;gt; [00561356] &amp;lt;err&amp;gt; bt_settings: Failed to save ID (err -2)&lt;br /&gt;00&amp;gt; [00561370] &amp;lt;err&amp;gt; bt_settings: Failed to save IRK (err -2)&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Grzegorz&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting DIS serial number at runtime</title><link>https://devzone.nordicsemi.com/thread/474656?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2024 14:18:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93a1924c-da1f-4ab6-9a83-d52406a15ab0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Correct. I guess the rationale for using the settings module in the first place is that it enables DIS data to be kept in flash for those that need it.&amp;nbsp;Personally, I think it would have been better to provide APIs to modify these values.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting DIS serial number at runtime</title><link>https://devzone.nordicsemi.com/thread/474649?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2024 13:56:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c61831e9-e52c-468f-94b7-116e1b4f5777</guid><dc:creator>grzegorz</dc:creator><description>&lt;p&gt;When I read Zephyr documentation I was sure Settings must use some backend (FILE, FCB, NFS). So backend is optional and just RAM is used in this sample?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting DIS serial number at runtime</title><link>https://devzone.nordicsemi.com/thread/474643?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2024 13:46:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6fa87c4-d16a-4b79-b758-cee024d0cf9a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Grzegorz,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the sample, the settings module is only used to apply the settings. It doesn&amp;#39;t actually use any flash backend.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting DIS serial number at runtime</title><link>https://devzone.nordicsemi.com/thread/474639?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2024 13:41:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b6b683b-4375-48a2-96d7-7947c3273687</guid><dc:creator>grzegorz</dc:creator><description>&lt;p&gt;Hello &lt;a href="https://devzone.nordicsemi.com/members/vibe"&gt;Vidar Berg&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I hoped settings module won&amp;#39;t be necessary. It&amp;#39;s not very flexible because if I want to use it for serial number then I must use it for HW/SW versions as well. And using settings module means copying from Flash to Flash (version) or ROM to Flash (unique chip number as serial number) which is not optimal.&lt;/p&gt;
&lt;p&gt;Anyway settings module solves the problem, thanks for help.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Grzegorz&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting DIS serial number at runtime</title><link>https://devzone.nordicsemi.com/thread/474202?ContentTypeID=1</link><pubDate>Mon, 18 Mar 2024 07:31:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9984d58d-c69c-4d1f-ba57-c4aad2617226</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can load the serial number at runtime using the settings module as demonstrated by the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/bluetooth/peripheral_dis/README.html"&gt;Bluetooth: Peripheral DIS&lt;/a&gt;&amp;nbsp;sample in the Zephyr repo.&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>