<?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>Dynamically add, insert and remove BLE services at run time using s140</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44660/dynamically-add-insert-and-remove-ble-services-at-run-time-using-s140</link><description>Hi there, 
 
 I was just wondering whether the s140 supports adding, inserting and removing BLE service and characteristics at run time. if yes, what should I pay attention to when doing so? 
 
 Thanks in advance!</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 31 Jul 2023 09:25:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44660/dynamically-add-insert-and-remove-ble-services-at-run-time-using-s140" /><item><title>RE: Dynamically add, insert and remove BLE services at run time using s140</title><link>https://devzone.nordicsemi.com/thread/438939?ContentTypeID=1</link><pubDate>Mon, 31 Jul 2023 09:25:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98e44184-8c30-4c1b-8743-a0ce925b88dd</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;There is no simple example for this, no, but essentially you can just look at how the services are configured in the standard examples. Whether you add a service before you start a connection or after the basic principle is the same.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically add, insert and remove BLE services at run time using s140</title><link>https://devzone.nordicsemi.com/thread/437214?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2023 11:08:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3899b1ee-fbfd-4be3-8765-cb32d0ce3a33</guid><dc:creator>Ayu7</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/ovrebekk"&gt;ovrebekk&lt;/a&gt;, do you have any example to add services or some reference?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically add, insert and remove BLE services at run time using s140</title><link>https://devzone.nordicsemi.com/thread/179454?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 11:07:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11ab38bb-5245-43a9-8754-bb7d7924cb41</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;You welcome &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically add, insert and remove BLE services at run time using s140</title><link>https://devzone.nordicsemi.com/thread/179422?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 09:06:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f75203e8-a3f0-46bf-81bf-a73b8333f0cc</guid><dc:creator>guohui</dc:creator><description>&lt;p&gt;Gotcha! Thank you so much!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically add, insert and remove BLE services at run time using s140</title><link>https://devzone.nordicsemi.com/thread/176487?ContentTypeID=1</link><pubDate>Fri, 15 Mar 2019 15:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72b67ed6-3fb9-41df-9b16-3c66bf531cf0</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The thread developers confirmed my suspicion.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you disable the SoftDevice without first disabling the thread stack then the stack will crash.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You should be able to disable the thread stack first, then disable the SoftDevice, change the services, and then re-enable everything, but this will be a quite slow process.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you can accept to drop out of the thread-network for several minutes it might be an acceptable solution.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically add, insert and remove BLE services at run time using s140</title><link>https://devzone.nordicsemi.com/thread/176099?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2019 08:44:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ff216f8-899a-480f-abf5-fcce9cf1fdd8</guid><dc:creator>guohui</dc:creator><description>&lt;p&gt;Thank you so much for your patient support!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;guohui&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically add, insert and remove BLE services at run time using s140</title><link>https://devzone.nordicsemi.com/thread/175930?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 13:09:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6aa73961-28b8-40d4-ba7a-a697ec9e61b1</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am pretty sure you would have to disable openthread before disabling the SoftDevice, as the openthread stack depends on the timeslot API of the SoftDevice to schedule the thread activities alongside BLE.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have asked the thread developers for a confirmation on this, and will get back to you when I hear from them.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically add, insert and remove BLE services at run time using s140</title><link>https://devzone.nordicsemi.com/thread/175804?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 02:24:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74e6c0a5-1ddd-4ce0-a812-133c63cd001a</guid><dc:creator>guohui</dc:creator><description>&lt;p&gt;Thank you for the clear answer!&lt;/p&gt;
&lt;p&gt;If I was going to disable and re-enable the SoftDevice, is there any defective effect to the openthread functionality?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Dynamically add, insert and remove BLE services at run time using s140</title><link>https://devzone.nordicsemi.com/thread/175366?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2019 14:05:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64f0bb6c-d1d3-4da2-b193-fc6e43b41c84</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;If you use the &amp;#39;service changed&amp;#39; characteristic in the GATT service you can add services dynamically, and alert the connected BLE device that the services have changed, but removing services dynamically is not supported.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The only way to remove a service dynamically is to disable the SoftDevice completely, re-enable it, and configure it without the service you want to remove.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This will obviously require any running Bluetooth connections to be taken down, and re-established once you have rebooted and reconfigured the SoftDevice.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>