How to read public MAC using the nrfjprog.exe tool?
How to read public MAC using the nrfjprog.exe tool?
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
Thanks for the addition.
As far as I understand, if I have my own address, I cannot write it to this area of memory. If this is the case, then why is the address that you provide does not have high bits set?
I really don't understand the reason for this decision.
Thank you,
Hi CheMax
You can set the BLE address to whatever you like using the sd_ble_gap_address_set(..) function, there is no need to change the DEVICEADDR registers.
In other words you have full flexibility in the app to control the address assignment.
Best regards
Torbjørn
Thank you, for myself, I learned and understood everything.
I hope the author of this issue will also find a solution for himself.
Thank you, for myself, I learned and understood everything.
I hope the author of this issue will also find a solution for himself.