This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to obtain the full MAC address in nrfjprog

用dos命令执行命令: nrfjprog --memrd 0x100000a4 --n 8 得到结果:0x100000A4: E40908DD 4466D3DD |......fD|

而正确的MAC地址应该是:D3DDE40908DD

问题来了:要如何修改这个命令能一次性只得到“D3DDE40908DD”

Google translated

With dos command Run : nrfjprog --memrd 0x100000a4 --n 8
get results : 0x100000A4: E40908DD 4466D3DD | ...... fD |

The correct MAC address should be : D3DDE40908DD

The question is : how to modify this command to be able to get a one-time only "D3DDE40908DD"

  • you have a very good explanation given here

    If you want to get device address, then you should maybe write a script (in python or something else) to strip down unnecessary things in the output or use the nrfjprog dll to write your own commands. Sorry to say but it does not seem that using nrfjprog itself it is not directly possible to get clean 6 byte MAC address

  • I want to use the DOS command line for MAC address。

    @echo off for /f "delims=" %%i in ('nrfjprog --memrd 0x100000a4 --n 8') do (echo %%i) >> d:\mac.txt pause

    Use notepad save as "getmac.bat" and run the bat file. but,a lot of MAC address is wrong

    see img :link text

  • If you want something you can use out of the box, have a look at the Adafruit_Adalink project on Github. This is a cross-platform project written in Python. It can be used with the J-Link Tools (Jlink probe) or OpenOCD (ST-Llink probe).

    You can use this command:

    adalink nrf51822 --programmer jlink --info
    

    And you will get the something like:

    Hardware ID : QFACA10 (32KB)
    SD Version  : S110 8.0.0
    Device Addr : C1:99:FC:D9:8A:D1
    Device ID   : ****************
    

    Note: nrf52 is not supported at this time

  • Did you resolve this problem?