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

How to read public MAC using the nrfjprog.exe tool?

How to read public MAC using the nrfjprog.exe tool?

Parents
  • If you look at the "help", you will not see the direct command "Give a Mac"

    but you can read the values of the two registers with the factory settings and build the MAC address of the device yourself. It is worth remembering that the two bits of the address (46 and 47) should be one, because the address is random and public.

    I think that implementing it in a script language (e.g. batch) is not a difficult task.

    Best regards, Max

  • Hi

    To add to CheMax's reply, you can read DEVICEADDR[0] and DEVICEADDR[1] with the following command:

    nrfjprog --memrd 0x100000A4 --n 8

    The first register returned will be DEVICEADDR[0], containing bits 31-0 of the BLE address. 

    The second register is DEVICEADDR[1], from which the higher order bits are copied. 

    Keep in mind that to get a proper public MAC address you have to register it yourself with the IEEE. 
    The address provided by DEVICEADDR is a random static address only, and not guaranteed to be unique. 

    Best regards
    Torbjørn

Reply
  • Hi

    To add to CheMax's reply, you can read DEVICEADDR[0] and DEVICEADDR[1] with the following command:

    nrfjprog --memrd 0x100000A4 --n 8

    The first register returned will be DEVICEADDR[0], containing bits 31-0 of the BLE address. 

    The second register is DEVICEADDR[1], from which the higher order bits are copied. 

    Keep in mind that to get a proper public MAC address you have to register it yourself with the IEEE. 
    The address provided by DEVICEADDR is a random static address only, and not guaranteed to be unique. 

    Best regards
    Torbjørn

Children
Related