<?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>MAC address randomly set to 00:00:00:00:00:00</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18982/mac-address-randomly-set-to-00-00-00-00-00-00</link><description>Hello, 
 I do migration from SDK11 to SDK12 (S132-SD-v2.0.1 to S132-SD-v3.1.0) and my device (nRF52-DK) randomly got a MAC of 00:00:00:00:00:00. 
 Helped by the migration document, I configure random private non resolvable MAC address with: 
 #define</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Jan 2017 09:52:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18982/mac-address-randomly-set-to-00-00-00-00-00-00" /><item><title>RE: MAC address randomly set to 00:00:00:00:00:00</title><link>https://devzone.nordicsemi.com/thread/73367?ContentTypeID=1</link><pubDate>Mon, 16 Jan 2017 09:52:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:879a577b-1550-4a7f-a557-62827b8b965d</guid><dc:creator>apuret</dc:creator><description>&lt;p&gt;Hi Petter,&lt;/p&gt;
&lt;p&gt;A sleep of 20 ms after ble_stack_init() seems to do the job (no problem after 100 tests).
With a sleep of 2 ms, I saw the wrong MAC address one time or two.&lt;/p&gt;
&lt;p&gt;I am still interested with a real correction!
I let you close the topic at your will.&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MAC address randomly set to 00:00:00:00:00:00</title><link>https://devzone.nordicsemi.com/thread/73366?ContentTypeID=1</link><pubDate>Fri, 13 Jan 2017 14:06:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:571e7b6b-b2fa-413a-add3-ab80efb01a7c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Your code is correct, I just tested it here, and I get the same behavior.&lt;/p&gt;
&lt;p&gt;It should &lt;strong&gt;not&lt;/strong&gt; be 0, and is a bug. I will update this answer when it is fixed.&lt;/p&gt;
&lt;p&gt;With the non-resolvable address type the address will change every number of seconds you set private_addr_cycle_s to, so this is expected.&lt;/p&gt;
&lt;p&gt;And after the first private_addr_cycle_s seconds a proper random non-resolvable address is used, instead of 0. Then iOS should be able to connect.&lt;/p&gt;
&lt;p&gt;Now you are setting private_addr_cycle_s to 15 * 60 s = 15 min. If 15 min is too much, the workaround is to decrease it.&lt;/p&gt;
&lt;p&gt;The device address is not used while you are in a connection, so you don&amp;#39;t have to worry about it changing then.&lt;/p&gt;
&lt;p&gt;Edit: It seems like a reset will also remove the issue.&lt;/p&gt;
&lt;p&gt;Edit2: Or put a delay after ble_stack_init(), like nrf_delay_ms(2).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>