<?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 get Mac address using NRF5340_DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93041/how-to-get-mac-address-using-nrf5340_dk</link><description>I want to get mac address using NRF5340_DK 
 Which function is used to get print mac address using NRF5340_DK. 
 I try to print the current device&amp;#39;s MAC address using NRF5340_DK. So</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Jun 2024 09:12:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93041/how-to-get-mac-address-using-nrf5340_dk" /><item><title>RE: How to get Mac address using NRF5340_DK</title><link>https://devzone.nordicsemi.com/thread/490535?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2024 09:12:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45b59e8b-02d6-410b-a3f6-9b85f77cc383</guid><dc:creator>Martin Evans</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I wanna read and write MAC address no matter it&amp;#39;s public or static one,but must be the same one.&lt;/p&gt;
&lt;p&gt;and I am using NRF52833DK, I know&amp;nbsp;&lt;span&gt;bt_read_static_addr() to get static MAC address via this&amp;nbsp;&lt;/span&gt;this article.&lt;/p&gt;
&lt;p&gt;Now I wanna set this address,do these any API to change it?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Matin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Mac address using NRF5340_DK</title><link>https://devzone.nordicsemi.com/thread/392179?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2022 13:25:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5f0fda2-efe9-4f6f-a0b5-42d5d1e73fbb</guid><dc:creator>abhay_kr</dc:creator><description>&lt;p&gt;hii&lt;/p&gt;
&lt;p&gt;Thanks for reply&lt;/p&gt;
&lt;p&gt;I already include&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#include &amp;lt;zephyr/bluetooth/hci_vs.h&amp;gt;&lt;br /&gt;#include &amp;lt;zephyr/drivers/bluetooth/hci_driver.h&amp;gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Mac address using NRF5340_DK</title><link>https://devzone.nordicsemi.com/thread/391704?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2022 13:46:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02c89f30-a3e0-42c9-ae89-82ee4d96b5ac</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Ah, you are right, that does not work with the random static address. I tested now, and&amp;nbsp;bt_read_static_addr() works. You can use it like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	static char addr_str[BT_ADDR_STR_LEN];
	struct bt_hci_vs_static_addr addr;
	int addr_count;

	addr_count = bt_read_static_addr(&amp;amp;addr, 1);

	if (addr_count &amp;gt; 0)
	{
		bt_addr_to_str(&amp;amp;(addr.bdaddr), addr_str, sizeof(addr_str));
		printk(&amp;quot;BT addr: %s\n&amp;quot;, addr_str);
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note that you need the following includes:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr/bluetooth/hci_vs.h&amp;gt;
#include &amp;lt;zephyr/drivers/bluetooth/hci_driver.h&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And also need&amp;nbsp;&lt;code&gt;CONFIG_BT_HCI_VS_EXT=y&lt;/code&gt; in your prj.conf or similar.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Mac address using NRF5340_DK</title><link>https://devzone.nordicsemi.com/thread/391626?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2022 11:29:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1079c0fc-ac88-4fbc-ac14-3b6c637b46e7</guid><dc:creator>abhay_kr</dc:creator><description>&lt;p&gt;Thanks for reply&lt;/p&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I tried these&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;bt_id_get()&lt;/code&gt;&lt;span&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;code&gt;bt_le_oob_get_local() they should not give correct mac address&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get Mac address using NRF5340_DK</title><link>https://devzone.nordicsemi.com/thread/391607?ContentTypeID=1</link><pubDate>Thu, 20 Oct 2022 10:25:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d296bf25-db04-4284-8eef-b188a4b4d797</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/76344/retrieve-ble-mac-address-in-zephyr-environment/315283"&gt;this post&lt;/a&gt;&amp;nbsp;(note that the FICR approach from the other approach in that thread does not work from the app core on the nRF5340).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>