<?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 3.0.1 : How to Initialize/deinitialize (BAS) service Dynamically?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121673/ncs-3-0-1-how-to-initialize-deinitialize-bas-service-dynamically</link><description>Hi, 
 Testing Hardware: nrf52832 Module in a Custom board OR nrf52DK possbile -&amp;gt; We would like to change the order of the BLE service as shown in this thread: https://devzone.nordicsemi.com/f/nordic-q-a/115493/change-the-order-of-services-in-nrf-connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 May 2025 12:36:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121673/ncs-3-0-1-how-to-initialize-deinitialize-bas-service-dynamically" /><item><title>RE: NCS 3.0.1 : How to Initialize/deinitialize (BAS) service Dynamically?</title><link>https://devzone.nordicsemi.com/thread/536624?ContentTypeID=1</link><pubDate>Thu, 22 May 2025 12:36:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6eef90f-a8b6-4de9-91e4-640728872543</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;The initialization order doesn&amp;#39;t matter. When a central does a service discovery, it will discover the services in numerical order of their UUID, not the order that they were initialized before you started advertising.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think we have any samples that demonstrates how to do this, dynamically adding and removing services.&amp;nbsp;All our samples uses BT_GATT_SERVICE_DEFINE() to set up their services and characteristics, but according to my colleague, it should be possible to call bt_gatt_service_register(), and possibly bt_gatt_service_unregister() to remove them.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/86342/changing-characteristic-handle-value-nrf52840-based-on-tutorial"&gt;Changing Characteristic Handle Value NRF52840 based on Tutorial&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 3.0.1 : How to Initialize/deinitialize (BAS) service Dynamically?</title><link>https://devzone.nordicsemi.com/thread/536592?ContentTypeID=1</link><pubDate>Thu, 22 May 2025 10:42:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e0a033d-1cf9-42bf-9ef0-48248992f476</guid><dc:creator>Gokulnath</dc:creator><description>&lt;p&gt;Thanks for the reply.&lt;br /&gt;&lt;br /&gt;Unfortunately, our use case is like this. We are unable to touch the other side and only have control over how our device responds.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please let us know the above possibilities regarding the BAS in the dynamic scenario or the change of the initialisation service order.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 3.0.1 : How to Initialize/deinitialize (BAS) service Dynamically?</title><link>https://devzone.nordicsemi.com/thread/536587?ContentTypeID=1</link><pubDate>Thu, 22 May 2025 10:26:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:401ecbc0-706d-4d0d-9c73-dfb0be89c410</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What is the reason you want to deinitialize the BAS service? If a connected device is not interested in it, it can just ignore it. Alternatively, if you only want some specific devices to have access to it, you can limit the access by saying that you need to be paired in order to read it. You can, for example say that it needs to be paired with at least MITM level security, meaning you would need access to a 6 digit code to pair. Then only certain devices can have access to this code (e.g. the owners).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>