This document describes how to use the factory programmed MAC address on the BMD-200 and BMD-300 Series modules.
Each BMD-200 and BMD-300 Series module has a unique Rigado registered MAC address that is programmed at the factory when the initial test image is programmed. The source of the MAC address is the physical label on the module that is scanned during this step.
The label contains a 2D barcode representing the last 6 hexadecimal digits of the MAC address. Below the 2D barcode are 8 digits for the BMD-200 and 6 digits for the BMD-300 Series.
The first two of these digits represent the firmware version pre-loaded at the factory. The last 6 hexadecimal digits are the last 6 digits in the MAC address.
BMD-300, BMD-301 BMD-350
Every Rigado MAC address starts with "94:54:93". Making the MAC address "94:54:93:XX:YY:ZZ", where "XX:YY:ZZ" are the "XXYYZZ" below and represented by the barcode.
The 6-byte BLE Radio MAC address is stored in the nRF51822 UICR at NRF_UICR_BASE+0x80 LSB first.
NRF_UICR + 0x80 (0x10001080): MAC_Addr  (0xZZ)
NRF_UICR + 0x81 (0x10001081): MAC_Addr  (0xYY)
NRF_UICR + 0x82 (0x10001082): MAC_Addr  (0xXX)
NRF_UICR + 0x83 (0x10001083): MAC_Addr  (0x93)
NRF_UICR + 0x84 (0x10001084): MAC_Addr  (0x54)
NRF_UICR + 0x85 (0x10001085): MAC_Addr  (0x94)
Using the MAC address
To have the radio use this stored MAC address you need to read it from the UICR and pass the address to sd_ble_gap_address_set(). If you do not call sd_ble_gap_address_set(), the radio will use a random public MAC address. Please refer to Nordic’s SoftDevice documentation and SDK regarding the use of the sd_ble_gap_address_set() function.
Reprogramming the MAC address
There are three ways to restore the MAC address:
- Use the factory firmware utilities in our "programmers" GitHub repository. You will need to enter the six digits from the module label.
- restores the factory firmware
- restores the factory firmware
- can avoid re-enabling read-back protection
For preserving the RigDFU bootloader , S132 SoftDevice and UICR registers while loading your application firmware, the application firmware HEX file must be converted for use with our update tools. A UART or OTA update can then be performed.
In order to preserve the MAC address, it should be read from the UICR by the programmer and saved. After or during programming the new application, the MAC address should be reprogrammed into the UICR or whatever other location desired by the end application.
With the nRF52, the programmer cannot be used to read the UICR with read-back protection enabled. The MAC address may be read from the 2D barcode, or by using DTM mode which is available from BMDware. Prior to programming new firmware, BMDware needs to be started once with the DTM_RX pin high and connected to a UART. UART parameters are 19200,N,8,1. Send two bytes: 0xAA56. The response is the six bytes of the MAC address.
 Rigado enables the read-back protection to prevent unauthorized access to not only the MAC address, but also the encryption key that is used with RigDFU in order to perform encrypted OTA and UART updates. Future module releases will be shipped without read-back protection, allowing read-back and preservation of the MAC address when loading your application firmware. The read-back protection will only be enabled once an encryption key is programmed. This will happen after the current development cycle for our BMDware firmware, likely Q2 2017.
 The BMD-200 and BMD-300 Series come from the factory pre-programmed with a Nordic Semiconductor SoftDevice, RigDFU bootloader, and BMDware application firmware. RigDFU allows BMDware to be overwritten, but the bootloader must be used to do so. If using the bootloader is not desired, then the whole device must be erased and reprogrammed. This process will also erase the MAC address. The user application must tell the SoftDevice to use the MAC address, otherwise the fixed random MAC address will be used. The SoftDevice must be reprogrammed after a full erase. If read back protection is used, the MAC address must be programmed before it is enabled.