<?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>Changing MAC Address in nrf52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19614/changing-mac-address-in-nrf52</link><description>Hello, 
 I am trying to change the MAC address of my device nRF52, by using NRF_FICR-&amp;gt;DEVICEADDR[0], NRF_FICR-&amp;gt;DEVICEADDR[1], I am able to see the device address. 
 But when I try to change it by using below code it doesn&amp;#39;t change, it shows the same</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 10 Feb 2017 14:47:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19614/changing-mac-address-in-nrf52" /><item><title>RE: Changing MAC Address in nrf52</title><link>https://devzone.nordicsemi.com/thread/76336?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 14:47:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d17c38b5-0974-4396-ab01-18f47c817b97</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;If you set the address type to public, you should be able to use any address. Notice that you have to obtain a MAC address range from the IEEE Registration Authority if you want to use public address for your devices.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing MAC Address in nrf52</title><link>https://devzone.nordicsemi.com/thread/76335?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 13:48:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44fb5563-4a22-40cf-856a-dd07ddf0a165</guid><dc:creator>Swapnil</dc:creator><description>&lt;p&gt;Thank you, yes its working now.
Again I have a question, what if I use address type as public address ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing MAC Address in nrf52</title><link>https://devzone.nordicsemi.com/thread/76334?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 13:20:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ffd6b5b-6770-4bbf-9cd9-9cb14ff19f4a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;The error code 12802 (0x3202) corresponds to &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/group___b_l_e___e_r_r_o_r_s___g_a_p.html#ga3eda228736d6c1dcbcf9aba2bd059068"&gt;&lt;code&gt;BLE_ERROR_GAP_INVALID_BLE_ADDR&lt;/code&gt;&lt;/a&gt;. You should make sure the address you enter use the correct format for the address type. You can set the address from FICR like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static ble_gap_addr_t m_central_addr;

m_central_addr.addr_type     = BLE_GAP_ADDR_TYPE_RANDOM_STATIC;
m_central_addr.addr[0] = (uint8_t)NRF_FICR-&amp;gt;DEVICEADDR[0];
m_central_addr.addr[1] = (uint8_t)(NRF_FICR-&amp;gt;DEVICEADDR[0] &amp;gt;&amp;gt; 8);
m_central_addr.addr[2] = (uint8_t)(NRF_FICR-&amp;gt;DEVICEADDR[0] &amp;gt;&amp;gt; 16);
m_central_addr.addr[3] = (uint8_t)(NRF_FICR-&amp;gt;DEVICEADDR[0] &amp;gt;&amp;gt; 24);
m_central_addr.addr[4] = (uint8_t)NRF_FICR-&amp;gt;DEVICEADDR[1];
m_central_addr.addr[5] = (uint8_t)((NRF_FICR-&amp;gt;DEVICEADDR[1] &amp;gt;&amp;gt; 8) | 0xC0); // 2MSB must be set 11

sd_ble_gap_addr_set(&amp;amp;m_central_addr);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing MAC Address in nrf52</title><link>https://devzone.nordicsemi.com/thread/76333?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 13:15:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c7d0daa-891f-44e6-96bc-caa88f434c3b</guid><dc:creator>Swapnil</dc:creator><description>&lt;p&gt;Yes I am using sd_ble_gap_addr_set(), and i am getting return value of error code: 12802&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing MAC Address in nrf52</title><link>https://devzone.nordicsemi.com/thread/76332?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 12:45:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58707048-7435-42d8-83d1-0a6944eb81f3</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Do you also set the address using &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v3.0.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#gaef69dc212534adf4b78d211edce2267b"&gt;&lt;code&gt;sd_ble_gap_addr_set()&lt;/code&gt;&lt;/a&gt; function? What is the return value? You also need to make sure that the two LSB of the address &lt;a href="https://devzone.nordicsemi.com/question/43670/how-to-distinguish-between-random-and-public-gap-addresses/?answer=43674#post-id-43674"&gt;corresponds to the address type&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>