<?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>how to read MAC ID of nrf52832 using python and adalink</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85838/how-to-read-mac-id-of-nrf52832-using-python-and-adalink</link><description>hello, 
 i had read mac id of nrf52832 using python and adalink. Now my window is updated from window 10 to window 11 
 so i have to reinstalled all setup while reinstalling python 27 is installed but problem in installation of Adafruit_Adalink project</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Mar 2022 08:49:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85838/how-to-read-mac-id-of-nrf52832-using-python-and-adalink" /><item><title>RE: how to read MAC ID of nrf52832 using python and adalink</title><link>https://devzone.nordicsemi.com/thread/358790?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2022 08:49:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7001c14b-f166-4da1-93df-3a99fc044c9b</guid><dc:creator>msliv</dc:creator><description>&lt;p&gt;Much appreciated!&lt;/p&gt;
&lt;p&gt;If anyone works with Python feel free to use following code to format MAC printed in console to &amp;quot;aa:bb:cc:dd:ee:ff&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#getShellStream is built based on subprocess lib
data = getShellStream(&amp;#39;nrfjprog -f nrf52 --memrd 0x100000A4 --n 8&amp;#39;)
# Arrange messy raw data from memory
addr = (data.split(&amp;#39; &amp;#39;)[2] + data.split(&amp;#39; &amp;#39;)[1])[4:]
# Create list of bytes and append 0x to each one
hexList = [f&amp;#39;0x{addr[i: i+2].lower()}&amp;#39; for i in range(0, len(addr), 2)]
# First byte of address is bitwise or&amp;#39;ed by (0b1100 0000)
# Bluetooth Core v4.0, Vol 3, Part C, chapter 10.8.1.
hexList[0] = str(hex(int(hexList[0], 16) | 192))
mac = &amp;quot;&amp;quot;
for byte in hexList:
    # Add &amp;#39;:&amp;#39; and remove &amp;#39;0x&amp;#39;
    mac += f&amp;#39;{byte[2:]}:&amp;#39;
# Remove last &amp;#39;:&amp;#39;
return mac[:(len(mac) - 1)]&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read MAC ID of nrf52832 using python and adalink</title><link>https://devzone.nordicsemi.com/thread/358723?ContentTypeID=1</link><pubDate>Thu, 17 Mar 2022 15:46:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6b660fd-599a-4b3a-97da-22dcf930144c</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;As described in the post I linked:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;The reason why &amp;quot;A7&amp;quot; becomes &amp;quot;E7&amp;quot; is because the specification says that the 2 MSBit of the address must be set &amp;#39;11&amp;#39; (if you&amp;#39;re very interested, see Bluetooth Core v4.0, Vol 3, Part C, chapter 10.8.1.)&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In your readout, the second last byte &amp;quot;0xBA&amp;quot; (&lt;span&gt;0b&lt;strong&gt;10&lt;/strong&gt;111010&lt;/span&gt;) will become 0x&lt;span&gt;FA&lt;/span&gt;&amp;nbsp;(0b&lt;strong&gt;11&lt;/strong&gt;111010).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read MAC ID of nrf52832 using python and adalink</title><link>https://devzone.nordicsemi.com/thread/358716?ContentTypeID=1</link><pubDate>Thu, 17 Mar 2022 15:18:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f858d2f-6201-4a03-a7ec-c8d90488170d</guid><dc:creator>msliv</dc:creator><description>&lt;p&gt;I have used this command with PCA10040 programmer targeting external (connected) NRF52832, please look what I have found:&lt;/p&gt;
&lt;p&gt;Raspberry Pi has found my device which was discoverable at the moment with MAC addr: &lt;pre class="ui-code" data-mode="text"&gt;FA:98:48:56:7B:82&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;After issueing:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog -f nrf52 --memrd 0x100000A4 -n 8&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Nrfjprog returned:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;0x100000A4: 48567B82 908EBA98&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you take a closer look there is a pattern in which bytes are found... except for the first byte, the &amp;#39;FA&amp;#39; cannot be found anywhere. None bytes near this address contain &amp;#39;FA&amp;#39;.&lt;/p&gt;
&lt;p&gt;I am also interested in fetching MAC addr using JLink.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read MAC ID of nrf52832 using python and adalink</title><link>https://devzone.nordicsemi.com/thread/358584?ContentTypeID=1</link><pubDate>Thu, 17 Mar 2022 09:57:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4260825d-d246-40a9-8215-34ce14471cfe</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;If by MAC ID you mean the numbers in the FICR-&amp;gt;DEVICEADDR registers, you can read those using the following command:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --memrd 0x100000A4 --n 8&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The softdevice will use these registers for setting the default address, but this may be changed by the application. See &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/2112/how-to-get-6-byte-mac-address-at-nrf51822/9000#9000"&gt;this post&lt;/a&gt; for more details. Other protocols may use the registers differently, or not use them at all.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read MAC ID of nrf52832 using python and adalink</title><link>https://devzone.nordicsemi.com/thread/358521?ContentTypeID=1</link><pubDate>Thu, 17 Mar 2022 03:49:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc189c5a-5f5b-4c3a-9886-d37723ccd49d</guid><dc:creator>nikita_k</dc:creator><description>&lt;p&gt;hello,&lt;/p&gt;
&lt;p&gt;thanks for answer. Can you share documentation about how to use these tool to read MAC ID&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read MAC ID of nrf52832 using python and adalink</title><link>https://devzone.nordicsemi.com/thread/358212?ContentTypeID=1</link><pubDate>Tue, 15 Mar 2022 12:52:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1441c58-9dac-4462-9547-93a451932fc4</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/adafruit/Adafruit_Adalink"&gt;Adafruit_Adalink&amp;nbsp;project&lt;/a&gt;&amp;nbsp;is not developed or supported by Nordic. You need to reach out to the developers of the project to get help with any issues you may have.&lt;/p&gt;
&lt;p&gt;If you are using J-Link, you can use nrfjprog from &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nrf-command-line-tools/download"&gt;nRF Command Line Tools&lt;/a&gt; to read the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ficr.html?cp=4_2_0_12_0_13#register.DEVICEADDR-0"&gt;DEVICEADDR[n]&lt;/a&gt;&amp;nbsp;registers.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to read MAC ID of nrf52832 using python and adalink</title><link>https://devzone.nordicsemi.com/thread/358100?ContentTypeID=1</link><pubDate>Tue, 15 Mar 2022 06:41:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bb27a4d-8231-4bef-93d2-11c860d1af3e</guid><dc:creator>nikita_k</dc:creator><description>&lt;p&gt;i have done the following process for installation&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;install&amp;nbsp; Python 2.7.13.&lt;/li&gt;
&lt;li&gt;add their path to environment variable&lt;/li&gt;
&lt;li&gt;run python command to check proper installation&lt;/li&gt;
&lt;li&gt;download&amp;nbsp;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/adafruit/Adafruit_Adalink"&gt;Adafruit_Adalink&amp;nbsp;project&lt;/a&gt;&amp;nbsp;file&lt;/li&gt;
&lt;li&gt;unzip in python 27 folder&lt;/li&gt;
&lt;li&gt;then run python setup.py install command&amp;nbsp;&lt;/li&gt;
&lt;li&gt;obtained response is&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/0841.issue2.png" /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>