<?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>NCS BLE Device information service set characteristics contents at run time.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99017/ncs-ble-device-information-service-set-characteristics-contents-at-run-time</link><description>Hi There, 
 Currently using the DIS service in my application, however I am facing a couple of issues at the moment. 
 
 1. How to set the serial number characteristic at run time instead of being populated from the configuration file, As in my case the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Apr 2023 12:32:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99017/ncs-ble-device-information-service-set-characteristics-contents-at-run-time" /><item><title>RE: NCS BLE Device information service set characteristics contents at run time.</title><link>https://devzone.nordicsemi.com/thread/422043?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2023 12:32:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0c92315-e3e4-414d-9f8b-9790ae4af69a</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]1. How to set the serial number characteristic at run time instead of being populated from the configuration file, As in my case the serial number will be sent to the device during production.&amp;nbsp;[/quote]
&lt;p&gt;You can set it runtime using&amp;nbsp;settings_runtime_set(). This is actually what&amp;nbsp;is called when&amp;nbsp;CONFIG_BT_DIS_SERIAL_NUMBER_STR is set as well, but in this case make sure that&amp;nbsp;CONFIG_BT_DIS_SERIAL_NUMBER_STR is not set, and call&amp;nbsp;settings_runtime_set() yourself runtime with&amp;nbsp;&amp;quot;bt/dis/serial&amp;quot; as the first parameter.&lt;/p&gt;
[quote user=""]2. How to exclude the model characteristics from the service ?&amp;nbsp;[/quote]
&lt;p&gt;There is no support for excluding the model from the DIS service in Zephyr, so if you want to do that you will have to change the implementation in&amp;nbsp;zephyr/subsys/bluetooth/services/dis.c.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>