<?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>BLE address issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68449/ble-address-issue</link><description>Hi team, 
 My customer wants to read the BLE address (random address that is generated by nRF52) to generate a QR code for quick pairing in their application. Do we have any suggestion if they want to the mass read-out the random address? Or any code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Nov 2020 13:05:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68449/ble-address-issue" /><item><title>RE: BLE address issue</title><link>https://devzone.nordicsemi.com/thread/280613?ContentTypeID=1</link><pubDate>Wed, 18 Nov 2020 13:05:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd3c10aa-54d1-4806-8cae-a49930c6e16f</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Leon&lt;/p&gt;
[quote user=""]My customer wants to read the BLE address (random address that is generated by nRF52) to generate a QR code for quick pairing in their application. Do we have any suggestion if they want to the mass read-out the random address? Or any code for reference?[/quote]
&lt;p&gt;When you use a random static BLE address it will be based on the DEVICEADDR[] fields in the FICR, which you can read out from the command line using nrfjprog (assuming you have a debugger connected to the nRF device):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:\Users\too1&amp;gt;nrfjprog --memrd 0x100000A4 --n 8
0x100000A4: C155CC16 DDD62525                     |..U.%%..|&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Some bit manipulations are needed to convert the readout from nrfjprog to the 6-byte BLE address, but this can be automated in a script.&amp;nbsp;&lt;/p&gt;
[quote user=""]Also, if they finally buy their own public address (The IEEE one), how can they write the public address into our chip, believe they do not need to generate/ write the public address one by one, right? Any reference code for mass production write-in?[/quote]
&lt;p&gt;If they decide to buy public addresses I expect they will get a range of public addresses they can use, not a bunch of random addresses.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The UICR field in the flash of the device has a series of CUSTOMER registers where the customer can write their own data as needed. It should be possible to program the public address into some of these registers, and update the Bluetooth firmware to read out these registers and update the BLE address accordingly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order to write to the UICR from the command line you can also use nrfjprog:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// Write 0x12345678 to UICR-&amp;gt;CUSTOMER[0]
nrfjprog --memwr 0x10001080 --val 0x12345678

// Write 0x87654321 to UICR-&amp;gt;CUSTOMER[1]
nrfjprog --memwr 0x10001084 --val 0x87654321
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;To automate this it is possible to call&amp;nbsp;nrfjprog&amp;nbsp;from a script or application running on the PC side.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>