<?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>Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109916/switch-between-public-address-and-static-random-address</link><description>Power-on reset will require pairing again. 
 I found this happening by doing bt_id_reset(). 
 Is there a problem with the way the BD address is initialized? 
 How to initialize BD address: 
 Build Option:</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Apr 2024 08:17:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109916/switch-between-public-address-and-static-random-address" /><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/479352?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 08:17:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38c75421-0e38-4249-96fc-9547da3fd24c</guid><dc:creator>yaho4624</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Thank you for continuing to investigate.&lt;/p&gt;
&lt;p&gt;CONFIG_BT_PRIVACY is disabled.&lt;br /&gt;I will get back to you once I have enabled and tested CONFIG_BT_PRIVACY.&lt;/p&gt;
&lt;p&gt;The reason we did not enable CONFIG_BT_PRIVACY is that we do not believe this case is an RPA.&lt;br /&gt;&lt;a href="https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_PRIVACY"&gt;https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_PRIVACY&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I will also check on the &amp;quot;Matter-&amp;gt; BLE bridge&amp;quot;. Thanks for sharing the info.&lt;/p&gt;
&lt;p&gt;We look forward to further reports.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;yaho4624&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/479191?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 11:35:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:294999bc-2300-41ee-a925-fbfb304a1fcf</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;Okay, I have contacted some colleagues internally to also review this, as I&amp;#39;m struggling to find out what exactly is going wrong here. First off, have you enabled CONFIG_BT_PRIVACY to let the device support Random Private Addresses. You can also check out this commit that was made for something similar for a Matter-&amp;gt; BLE bridge here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/commit/f84125d62d76fe3dba9b5ae019eb1e66956f6160"&gt;https://github.com/nrfconnect/sdk-nrf/commit/f84125d62d76fe3dba9b5ae019eb1e66956f6160&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am also waiting for a reply from a few others that might have some useful info on this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/478892?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 08:20:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0d714a6-3845-4cc2-8583-f26ebaa97636</guid><dc:creator>yaho4624</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;BLE client apps such as nRFConnect on Android OS-based smartphones can check BD addresses.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;Regards,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;yaho4624&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/478875?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 07:25:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:735838c4-86ba-4730-847b-89bfd770003a</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t have any ready sample code on changing addresses during run time I&amp;#39;m afraid, how do you see in your application that you&amp;#39;re using the public address for pairing/bonding. Since the bt_id_reset() is deleting the pairing keys when calling it with the&amp;nbsp;BD_ADDRESS_INDEX_RANDOM in your case it seems like the connection is made using the random address.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/478443?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2024 06:52:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7971141e-534d-4e53-8873-6e98993db719</guid><dc:creator>yaho4624</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Thanks for explaining the BD address.&lt;/p&gt;
&lt;p&gt;I do not know the detailed reason for this, as it has been requested by others.&lt;/p&gt;
&lt;p&gt;Is it possible to switch BD addresses as follows?&amp;nbsp;I would appreciate sample code and information if possible.&lt;br /&gt;&lt;span&gt;・Public Address：Addresses corresponding to hardware written in OTP, etc.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;・Static Random Address：Address that changes with each boot to prevent the device from being tracked.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;yaho4624&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/478434?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2024 06:33:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63a70785-455c-4ea1-8d5f-886d46c91777</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;That&amp;#39;s not quite it I&amp;#39;m afraid.&lt;/p&gt;
&lt;p&gt;Public address: A public address is a fixed address that is programmed into the device at the manufacturer. This is globally unique and can not be erased.&lt;/p&gt;
&lt;p&gt;Random addresses: Much more common, does not require registration with IEEE and can be manually configured by the user. It&amp;#39;s either programmed within the device or created during run time. A random&amp;nbsp;&lt;strong&gt;static&lt;/strong&gt; address can be allocated and then fixed throughout the lifetime of the device. It can be altered at boot-up but doesn&amp;#39;t have to be.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;More details &lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-2-bluetooth-le-advertising/topic/bluetooth-address/"&gt;here&lt;/a&gt;. Do you need to mask/change the address to not be tracked for some specific reason? Using a resolvable or non-resolvable random private address is more used as it changes periodically&lt;/p&gt;
&lt;p&gt;Best reagrds,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/478191?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2024 07:07:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00ce0c14-604b-44f8-b9ea-9e65b427ad6f</guid><dc:creator>yaho4624</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I recognize the following about BLE BD addresses.&lt;br /&gt;・Public Address：Addresses corresponding to hardware written in OTP, etc.&lt;br /&gt;・Static Random Address：Address that changes with each boot to prevent the device from being tracked.&lt;/p&gt;
&lt;p&gt;Is this perception wrong?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;yaho4624&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/478185?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2024 06:44:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0eecc89a-ac81-4dc4-ac51-6b5f67f08cb9</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Is there a reason you want to change the static random address between boot-ups? The&amp;nbsp;&lt;span&gt;random address is actually the one that is pre-programmed from the factory. This is why it remains the same even though you erase your device and re-program it. It is expected that the random address stays the same between boot-ups.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/477915?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 23:57:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01c8eee5-094c-4520-bea8-6479f58c46e4</guid><dc:creator>yaho4624</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I believe I need to use bt_id_reset() to update the static random address stored in NVM at startup.&lt;/p&gt;
&lt;p&gt;Which API should I use to update static random address?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;yaho4624&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/477720?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 07:49:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:392b6c1b-e141-483d-ac1f-297e060ad108</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Since bt_id_reset()&amp;nbsp;&lt;strong&gt;removes any connections and pairing keys&lt;/strong&gt; and it seems like the connection and bonding is done with the random static address. I don&amp;#39;t really see why you call this function at all in your application if you want to keep the pairing information throughout a power-on reset. I&amp;#39;d recommend not calling it during your initialization.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/477430?ContentTypeID=1</link><pubDate>Sun, 07 Apr 2024 23:59:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3979482e-6f76-47b6-8cad-f5080b50fba9</guid><dc:creator>yaho4624</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;No reason.&amp;nbsp;I am new to using Zepher and just used an API that I could use from the API documentation.&amp;nbsp;As per my first question, could you please tell me the best practice for initializing Public and Static Random addresses?&lt;/p&gt;
&lt;p&gt;As far as I can tell from the API documentation, bt_id_reset() takes a static random address index as an argument, so the expected behavior is that only static random address information will disappear from NVM. Conversely, we expect that the public address information will not disappear.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;yaho4624&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/477339?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2024 13:39:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8d3c8cb-6253-4c22-bd6e-f4b5ea2f7fff</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Is there a reason you&amp;#39;re using &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/gap.html#c.bt_id_reset"&gt;bt_id_reset&lt;/a&gt;()? This function resets or reclaims the identity of a Bluetooth LE ID. From the documentation: &lt;em&gt;&amp;quot;When given an existing identity this function will disconnect any connections created using it, remove any pairing keys or other data associated with it, and then create a new identity in the same slot, based on the&amp;nbsp;addr&amp;nbsp;and&amp;nbsp;irk&amp;nbsp;parameters.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/477177?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 15:03:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f8b76a3-660a-4686-891e-f32216ea96dd</guid><dc:creator>yaho4624</dc:creator><description>&lt;p&gt;Hi Simonr.&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;We will check on Lesson 5 later. Thank you for sharing the link.&lt;/p&gt;
&lt;p&gt;I have paired and bonded with Public address only, do I have to pair again?&lt;/p&gt;
&lt;p&gt;Specifically, the procedure is as follows.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Power-on&lt;/li&gt;
&lt;li&gt;Public address is created by bt_enable()&lt;/li&gt;
&lt;li&gt;Static Random address is created by bt_id_create()&lt;/li&gt;
&lt;li&gt;Start advertising with Public address&lt;/li&gt;
&lt;li&gt;Pairing and bonding at Public address&lt;/li&gt;
&lt;li&gt;Disconnect&lt;/li&gt;
&lt;li&gt;Power-on reset&lt;/li&gt;
&lt;li&gt;Public address is created by bt_enable()&lt;/li&gt;
&lt;li&gt;Static Random address is created by bt_id_reset()&lt;/li&gt;
&lt;li&gt;Start advertising with Public address&lt;/li&gt;
&lt;li&gt;It needs to be paired again.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Without bt_id_reset(), it was not necessary to pair again after power-on reset.&lt;/p&gt;
&lt;p&gt;When pairing again, we also confirm that the security error &amp;quot;BT_SECURITY_ERR_PIN_OR_KEY_MISSING&amp;quot; occurs.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;yaho4624&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/477084?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 11:36:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:815b20fc-3056-4caa-a2d6-a2f0c9f260cf</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yes, this is expected, as Bluetooth pairing is only done for a specific connection, and so if the devices disconnect and I.E. the advertising address on one device changes, they will no longer be paired. However if you do bonding, as well after pairing, the devices will exchange a LTK (long term key) so that they can reconnect to one another and keep the encrypted connection without having to re-pair upon every connection. Please check out the &lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-5-bluetooth-le-security-fundamentals/topic/pairing-process/"&gt;DevAcademy on Bluetooth Low Energy available here&lt;/a&gt;. Lesson 5 covers Security in BLE and the pairing process specifically.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Switch between Public address and Static Random address.</title><link>https://devzone.nordicsemi.com/thread/476994?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2024 03:00:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1af9e19f-5952-462f-8a03-c301724f2639</guid><dc:creator>yaho4624</dc:creator><description>&lt;p&gt;When pairing again, we also confirm that the security error &amp;quot;BT_SECURITY_ERR_PIN_OR_KEY_MISSING&amp;quot; occurs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>