<?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>What happens to a BLE connection when I update the advertised services?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105755/what-happens-to-a-ble-connection-when-i-update-the-advertised-services</link><description>Hello, 
 I need help to make one service discoverable only in a specific situation. My problem is that I can&amp;#39;t be sure if an already stablished connection would be affected if I try to change the advertised data on-the-fly. 
 For example: 
 
 I have 2</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Nov 2023 10:29:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105755/what-happens-to-a-ble-connection-when-i-update-the-advertised-services" /><item><title>RE: What happens to a BLE connection when I update the advertised services?</title><link>https://devzone.nordicsemi.com/thread/456121?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2023 10:29:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4a704d8-75e9-4fa8-9249-6c1db4fddc83</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no direct&amp;nbsp;dependency&amp;nbsp;between the service UUID (s) that you advertise and what you have in your attribute table.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;They belong to different BLE layers. Advertising packet is handled by GAP and the attribute table (the services) is in GATT.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So if you simply update the advertising packet using&amp;nbsp;ble_advertising_advdata_update() there will be no change in the attribute table or to the connection you already have.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But you will need to add service Y to the GATT attribute able at some point, right ? Then if you add the new service to the GATT table, the peer device in your current connection, may do a service discovery and may find the new service. &lt;br /&gt;In any case the current connection will not break.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>