<?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>How to set a custom BLE mac address on nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123148/how-to-set-a-custom-ble-mac-address-on-nrf52840</link><description>I&amp;#39;m trying to set a public custom BLE mac address to my device but the flag CONFIG_BT_HCI_SET_PUBLIC_ADDR is not enabled. If i try to set it to true on prj.conf file the code doesn&amp;#39;t compile anymore. im using nrf connect v.3.0.0.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Jul 2025 11:54:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123148/how-to-set-a-custom-ble-mac-address-on-nrf52840" /><item><title>RE: How to set a custom BLE mac address on nrf52840</title><link>https://devzone.nordicsemi.com/thread/543162?ContentTypeID=1</link><pubDate>Tue, 22 Jul 2025 11:54:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbbe17c1-e573-41f6-ad96-3e1672754ee0</guid><dc:creator>XhemaliSheshori</dc:creator><description>&lt;p&gt;Using bt_ctrl_set_public_addr() before the bt_enable() is working!&lt;br /&gt;It wasn&amp;#39;t necessary to disable and re-enable bluetooth!&lt;br /&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set a custom BLE mac address on nrf52840</title><link>https://devzone.nordicsemi.com/thread/543156?ContentTypeID=1</link><pubDate>Tue, 22 Jul 2025 11:18:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e34a483-1f89-4a68-a4d6-3df48bb05fd1</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can see here: &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/kconfig/index.html#CONFIG_BT_HCI_SET_PUBLIC_ADDR"&gt;https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/kconfig/index.html#CONFIG_BT_HCI_SET_PUBLIC_ADDR&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;that this config is not directly user assignable. Please read the above documentation for more details.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think you would need to enable it, rather, you would just need to call &lt;a href="https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_bt_ctrl.html#ga541cabe76fd3cb019aae2fe01d45cbfc"&gt;bt_ctrl_set_public_addr()&lt;/a&gt;&amp;nbsp;before the bt_enable() in order to set the public address.&lt;/p&gt;
&lt;p&gt;If the address change is not reflected, then,&lt;/p&gt;
&lt;p&gt;Could you try to disable Bluetooth after setting the public address and re-enabling then?&lt;/p&gt;
&lt;p&gt;-Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>