<?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 BLE services at runtime in NCS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114582/changing-ble-services-at-runtime-in-ncs</link><description>Hello , 
 
 Is it possible to possible change/disable the BLE services at runtime in zephyr ? 
 For eg. we have services A,B and C in normal operation and we want disable A,B and C during runtime.At the same time activate service D. 
 Is it possible to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Sep 2024 12:28:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114582/changing-ble-services-at-runtime-in-ncs" /><item><title>RE: Changing BLE services at runtime in NCS</title><link>https://devzone.nordicsemi.com/thread/501931?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 12:28:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dfdfc12-2201-48a3-8b98-acd6e02071e2</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;That&amp;#39;s right. It means you shouldn&amp;#39;t need a reboot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing BLE services at runtime in NCS</title><link>https://devzone.nordicsemi.com/thread/501919?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 12:12:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13ad95f4-67e6-4b98-ba9b-dcca85f89117</guid><dc:creator>Adarsh</dc:creator><description>&lt;p&gt;Does that mean we dont need a reboot ? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing BLE services at runtime in NCS</title><link>https://devzone.nordicsemi.com/thread/501917?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 12:09:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9baa21b-f7ee-41de-80d0-dcd22855c43e</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Adarsh,&lt;/p&gt;
&lt;p&gt;Note that it also allows being called after settings_load(), just not between ble_init() and settings_load().&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing BLE services at runtime in NCS</title><link>https://devzone.nordicsemi.com/thread/501904?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 11:51:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f7e7d81-7db5-48c7-adc8-5ffe94baf9af</guid><dc:creator>Adarsh</dc:creator><description>&lt;p&gt;Hallo Hieu,&lt;/p&gt;
&lt;p&gt;In the Zepyhr API, its mentioned that the register/unregister of services should happen before ble_init(). Does that mean ,we need a reboot for changing the services dynamically ?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Adarsh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing BLE services at runtime in NCS</title><link>https://devzone.nordicsemi.com/thread/501902?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 11:41:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c31d51df-be4b-4283-ad60-07bebac4fac5</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Adarsh,&lt;/p&gt;
&lt;p&gt;Yes, you can use the API you found to dynamically change the BLE&amp;nbsp;GATT table. You will also need to enable&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/kconfig/index.html#CONFIG_BT_GATT_DYNAMIC_DB"&gt;CONFIG_BT_GATT_DYNAMIC_DB&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For the peer device to be aware of a change without rediscovering the services, you will also need to support the&amp;nbsp;Service Changed Characteristic (&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/kconfig/index.html#CONFIG_BT_GATT_SERVICE_CHANGED"&gt;CONFIG_BT_GATT_SERVICE_CHANGED&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Please&amp;nbsp;examine carefully what the normal behavior for the built-in service is when dynamic GATT is enabled. I think most of them will register&amp;nbsp;themselves by default.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>