<?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>Change MAC address during advertising in nrf52810</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43639/change-mac-address-during-advertising-in-nrf52810</link><description>Hi, 
 
 I want to change MAC address during advertising in nrf52810. 
 nrf52810 receives MAC address via uart from other MCU and set this MAC address. (type is BLE_GAP_ADDR_TYPE_PUBLIC or BLE_GAP_ADDR_TYPE_RANDOM_STATIC) 
 Sometimes other MCU transmits</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Feb 2019 00:16:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43639/change-mac-address-during-advertising-in-nrf52810" /><item><title>RE: Change MAC address during advertising in nrf52810</title><link>https://devzone.nordicsemi.com/thread/170994?ContentTypeID=1</link><pubDate>Thu, 14 Feb 2019 00:16:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62079647-d299-40a1-8c87-d10aa7864cd5</guid><dc:creator>TAE</dc:creator><description>&lt;p&gt;Thanks. it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change MAC address during advertising in nrf52810</title><link>https://devzone.nordicsemi.com/thread/170898?ContentTypeID=1</link><pubDate>Wed, 13 Feb 2019 13:33:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a383cea7-8db6-485b-b9f9-83310c31f671</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s no longer possible to change the address directly while you are advertising. Looking at the documentation for&amp;nbsp;&lt;span&gt;sd_ble_gap_addr_set(), at &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s112.api.v6.1.0/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html?cp=3_4_0_2_2_1_2_1#gaef69dc212534adf4b78d211edce2267b"&gt;this link&lt;/a&gt;, we see that you will get the error code &amp;quot;NRF_ERROR_INVALID_STATE&amp;quot;, because &amp;quot;The identity address cannot be changed while advertising.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If you want to manually change the address using &lt;span&gt;sd_ble_gap_addr_set()&lt;/span&gt;, then first stop the advertising, change the address, and then start the advertising again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>