<?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>i Am using NRF52832 BLE.i want MAC Address of my device in my code.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111249/i-am-using-nrf52832-ble-i-want-mac-address-of-my-device-in-my-code</link><description>i am using NRF52832 and I&amp;#39;m using nRF5_SDK_17.1.0 i am using BLE_APP_UART code from this SDK. now i want to get my MAC id of BLE so how can i get that in code ? please help me in this matter.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 May 2024 13:32:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111249/i-am-using-nrf52832-ble-i-want-mac-address-of-my-device-in-my-code" /><item><title>RE: i Am using NRF52832 BLE.i want MAC Address of my device in my code.</title><link>https://devzone.nordicsemi.com/thread/484710?ContentTypeID=1</link><pubDate>Thu, 16 May 2024 13:32:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09639438-0a54-41a8-bfa5-60089b9dd5ce</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can read and log the address like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    ret_code_t     err_code;
    ble_gap_addr_t device_addr;
    err_code = sd_ble_gap_addr_get(&amp;amp;device_addr);
    VERIFY_SUCCESS(err_code);
    NRF_LOG_INFO(&amp;quot;BT addr: %x:%x:%x:%x:%x:%x\r\n&amp;quot;, device_addr.addr[5], device_addr.addr[4],
                 device_addr.addr[3], device_addr.addr[2], device_addr.addr[1], device_addr.addr[0]);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>