<?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 change mac in nRF52?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25884/how-to-change-mac-in-nrf52</link><description>SDK13. S132.
I try to change mac by: 
 void set_addr (void) 

{

static ble_gap_addr_t m_central_addr;

m_central_addr.addr_type = BLE_GAP_ADDR_TYPE_RANDOM_STATIC;
m_central_addr.addr[0] = 0xfd;
m_central_addr.addr[1] = 0x71;
m_central_addr</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 12 Oct 2017 12:52:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25884/how-to-change-mac-in-nrf52" /><item><title>RE: How to change mac in nRF52?</title><link>https://devzone.nordicsemi.com/thread/101943?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2017 12:52:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd2f73b4-a20b-416a-a9ed-5fc3f11f5ea4</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;&lt;code&gt;m_central_addr.addr[5] = 0xfd&lt;/code&gt; is allowed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change mac in nRF52?</title><link>https://devzone.nordicsemi.com/thread/101942?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2017 12:50:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7eca2809-0dd4-4f06-b7b7-67ee8fa75c29</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;For a Random static address(&lt;code&gt;BLE_GAP_ADDR_TYPE_RANDOM_STATIC&lt;/code&gt;) 0x46 is not allowed. See the figure in &lt;a href="https://devzone.nordicsemi.com/question/110308/i-want-to-change-the-ble-address/?answer=110344#post-id-110344"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change mac in nRF52?</title><link>https://devzone.nordicsemi.com/thread/101941?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2017 12:47:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0f6cb64-0e69-409f-a26e-baa327ef4a6d</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Yes! Work. Thanks. But If last byte I need 0x46? How to do it?&lt;/p&gt;
&lt;p&gt;Decided. I write from back. I mean that now m_central_addr.addr[5] = 0xfd.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to change mac in nRF52?</title><link>https://devzone.nordicsemi.com/thread/101940?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2017 12:41:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2aa0d0be-2a8d-4098-b340-c19a55b7fbcc</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;As stated in your code snippet, the &lt;em&gt;2MSB must be set 11&lt;/em&gt;. You are using &lt;code&gt;0x46&lt;/code&gt;, that is in binary &lt;code&gt;01000110&lt;/code&gt;, i.e. the 2MSB is 01. Try to set it to 0xC6 instead.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;m_central_addr.addr[5] = 0xC6; // 2MSB must be set 11
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Call your function &lt;code&gt;set_addr()&lt;/code&gt;, after &lt;code&gt;ble_stack_init()&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>