<?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>UUID change on the fly</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/41913/uuid-change-on-the-fly</link><description>Hi, 
 I have a 128bit UUID on the ad block which I need to change on the fly to another 128bit UUID. 
 I tried different solutions and searched for a good example, however I have not found one that would be a clear example how to do it. I am not very</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Dec 2018 17:55:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/41913/uuid-change-on-the-fly" /><item><title>RE: UUID change on the fly</title><link>https://devzone.nordicsemi.com/thread/163012?ContentTypeID=1</link><pubDate>Wed, 26 Dec 2018 17:55:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f4ed0fe-7f39-44cf-a0de-9eee8b81057d</guid><dc:creator>iQd</dc:creator><description>&lt;p&gt;I solved the problem by making the following:&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp; Have multiple UUIDs in their own arrays.&lt;br /&gt;&lt;br /&gt;2.&amp;nbsp; In advertising_init, I have an IF conditional for choosing the UUID I want to use in different situations.&lt;br /&gt;&lt;br /&gt;3.&amp;nbsp; When I need to change the UUID, I set a variable which controls the UUID selection in advertising_init.&lt;br /&gt;&lt;br /&gt;4.&amp;nbsp; Then I check if a connection is active.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If so, end the connection and wait for the event telling this has happened.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;In this event code I trigger a flag variable which makes the next step.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If no connection is active, I do the next step directly.&lt;br /&gt;&lt;br /&gt;5.&amp;nbsp; Stop advertising, run advertising_init again, new UUID is selected, start advertising.&lt;/p&gt;
&lt;p&gt;This way the new UUID comes active almost instantly and I achieve what I was looking for.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UUID change on the fly</title><link>https://devzone.nordicsemi.com/thread/162982?ContentTypeID=1</link><pubDate>Tue, 25 Dec 2018 09:11:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb84feaf-3f1d-4f8b-a658-8d2b277765f0</guid><dc:creator>iQd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the info.&lt;/p&gt;
&lt;p&gt;I checked through the whole project, however I do not see there any method for changing which 128bit UUID is being advertised at a time.&lt;/p&gt;
&lt;p&gt;The project has different services which have different UUIDs.&lt;/p&gt;
&lt;p&gt;I have different UUIDs too, of which only one at a time I need to advertise, and depending on state, I have to change the UUID and then advertise a different UUID.&lt;/p&gt;
&lt;p&gt;How to do this without resetting the device, is what I am looking for.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UUID change on the fly</title><link>https://devzone.nordicsemi.com/thread/162972?ContentTypeID=1</link><pubDate>Tue, 25 Dec 2018 05:04:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cd0e081-e5b9-431b-a79c-93afff39b240</guid><dc:creator>rraa</dc:creator><description>&lt;p&gt;you should check ble_lbs.h&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;#define LBS_UUID_SERVICE 0x1523&lt;br /&gt;#define LBS_UUID_BUTTON_CHAR 0x1524&lt;br /&gt;#define LBS_UUID_LED_CHAR 0x1525&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>