<?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>nrf54l15-dk set ble Identity</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120650/nrf54l15-dk-set-ble-identity</link><description>Hi,Team, 
 I am developing ble using nrf54l15-dk. 
 My goal is to get the ble identity address of the device, but I don&amp;#39;t know how to read it. 
 I found &amp;quot; bt_addr_le_create_static(&amp;amp;addr) &amp;quot;, which creates a Bluetooth LE random static address. So I know</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Apr 2025 13:05:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120650/nrf54l15-dk-set-ble-identity" /><item><title>RE: nrf54l15-dk set ble Identity</title><link>https://devzone.nordicsemi.com/thread/531848?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2025 13:05:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c137af7-4bbb-418b-9e94-38da62ffd4fa</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I thought you could use bt_id_get(), but it turns out it shows the wrong address. I guess it only uses this if you create an ID in the first place, so then you can use it. In case you don&amp;#39;t actively create an ID, it is possible to deduce the address based on the device&amp;#39;s FICR registers. There is a FICR register called &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/ficr.html#ariaid-title15"&gt;DEVICEADDR[n]&lt;/a&gt;, n=0..1.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The ordering of these address bytes may be a bit confusing, but the DEVICEADDR[0] contains the least significant bits that makes up the last 4 bytes of the address. The two most significant bytes comes from DEVICEADDR[1]. You can give this function a shot:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void check_address(void)
{
    //void bt_id_get(bt_addr_le_t *addrs, size_t *count);
    bt_addr_le_t *my_addresses = NULL;
    size_t num_addresses;
    bt_id_get(my_addresses, &amp;amp;num_addresses);
    LOG_INF(&amp;quot;num_addresses: %d&amp;quot;, num_addresses);
    for (int i=0; i&amp;lt;num_addresses; i++)
    {
        LOG_INF(&amp;quot;addr #: %02x:%02x:%02x:%02x:%02x:%02x&amp;quot;, my_addresses[i].a.val[0],
                                                         my_addresses[i].a.val[1],
                                                         my_addresses[i].a.val[2],
                                                         my_addresses[i].a.val[3],
                                                         my_addresses[i].a.val[4],
                                                         my_addresses[i].a.val[5]);
    }

    LOG_INF(&amp;quot;ficr address: %02x:%02x:%02x:%02x:%02x:%02x&amp;quot;, (((NRF_FICR-&amp;gt;DEVICEADDR[1] &amp;amp; 0x0000FF00)&amp;gt;&amp;gt;8) | 0b11000000),
                                                           ((NRF_FICR-&amp;gt;DEVICEADDR[1] &amp;amp; 0x000000FF)&amp;gt;&amp;gt;0),
                                                           ((NRF_FICR-&amp;gt;DEVICEADDR[0] &amp;amp; 0xFF000000)&amp;gt;&amp;gt;24),
                                                           ((NRF_FICR-&amp;gt;DEVICEADDR[0] &amp;amp; 0x00FF0000)&amp;gt;&amp;gt;16),
                                                           ((NRF_FICR-&amp;gt;DEVICEADDR[0] &amp;amp; 0x0000FF00)&amp;gt;&amp;gt;8),
                                                           ((NRF_FICR-&amp;gt;DEVICEADDR[0] &amp;amp; 0x000000FF)&amp;gt;&amp;gt;0));

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As you can see, it prints both the addresses fetched from bt_id_get() and the FICR values. I did some bit-manipulation to print it in a more readable way. Note that the first byte in the address, I added &amp;quot; | 0b11000000&amp;quot;, because the two most significant bits in the most significant bytes must be 1 when you are using a random static address (the default address type), according to the Bluetooth specification. The softdevice does this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am not sure exactly why you need the address, but you can see from most of our samples, the actual address is also printed in the log during bootup:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1744722324722v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;But that information is not reachable in your main.c file. But the above function should let you see the address from FICR.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf54l15-dk set ble Identity</title><link>https://devzone.nordicsemi.com/thread/531759?ContentTypeID=1</link><pubDate>Tue, 15 Apr 2025 01:56:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc5ff197-2bc4-4ae5-87c5-2b0219b88723</guid><dc:creator>dede</dc:creator><description>&lt;p&gt;Hi,&lt;span&gt;Edvin,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for your reply.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/120650/nrf54l15-dk-set-ble-identity/531545"]But is what you actually want to do is to figure out what address you have, without generating a new one?[/quote]
&lt;p&gt;Yes. You are right. In the absence of a connection, which API should I use to get the BLE address of the device itself.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf54l15-dk set ble Identity</title><link>https://devzone.nordicsemi.com/thread/531545?ContentTypeID=1</link><pubDate>Fri, 11 Apr 2025 13:45:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4f7653e-6596-4c8d-ab14-1d8db33f1244</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am a bit confused. Do you intentionally don&amp;#39;t want to use the BLE address that is pre-programmed on the device?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But the short answer is no, the devices will not generate the same address. I have not seen the implementation, but I believe this generated address will be based on the pre-programmed address (not recognizable, but it is possible for a bonded device to resolve the original address from the new ones).&lt;/p&gt;
&lt;p&gt;But is what you actually want to do is to figure out what address you have, without generating a new one?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>