<?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>Is there a way to update the mac address after enabling Bluetooth?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79563/is-there-a-way-to-update-the-mac-address-after-enabling-bluetooth</link><description>Hello, 
 I know that the bt_ctlr_set_public_addr() interface needs to be called before enabling Bluetooth, and this bt_id_create() . 
 But I read the description of bt_id_create() and it seems that it can be called after Bluetooth is enabled? If this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Sep 2021 11:04:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79563/is-there-a-way-to-update-the-mac-address-after-enabling-bluetooth" /><item><title>RE: Is there a way to update the mac address after enabling Bluetooth?</title><link>https://devzone.nordicsemi.com/thread/329797?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2021 11:04:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea028183-e457-47cb-ac48-8c4ca3ac4567</guid><dc:creator>Sigurd</dc:creator><description>[quote user="Gray_"]Can I generate a mac address defined by myself?[/quote]
&lt;p&gt;&amp;nbsp;Yes. Snippet:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static bt_addr_le_t addr = {
	.type = BT_ADDR_LE_RANDOM,
	/* fixed MAC addres */
	.a = {
		.val = {0x01,0x02,0x03,0x04,0x05,0xc6},
	},
};

...
...

int err;
err =  bt_id_create(&amp;amp;addr,NULL);

&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to update the mac address after enabling Bluetooth?</title><link>https://devzone.nordicsemi.com/thread/329369?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 09:41:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5abe2b3-a637-45bf-a129-7d88b52466dc</guid><dc:creator>Palmer Huang</dc:creator><description>&lt;p&gt;Hi, Sigurd&lt;/p&gt;
&lt;p&gt;This seems to be generating a completely random mac address. Can I generate a mac address defined by myself?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there a way to update the mac address after enabling Bluetooth?</title><link>https://devzone.nordicsemi.com/thread/329277?ContentTypeID=1</link><pubDate>Mon, 13 Sep 2021 16:11:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:167095a9-8b82-403c-b022-bfc31daba69a</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Just call&amp;nbsp;bt_id_create(NULL, NULL);&lt;/p&gt;
&lt;p&gt;You can see how its used e.g. here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.6.99-ncs1-snapshot1/samples/bluetooth/peripheral_identity/src/peripheral_identity.c#L44"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.6.99-ncs1-snapshot1/samples/bluetooth/peripheral_identity/src/peripheral_identity.c#L44&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>