Device (MAC) addresses supplied by Rigado have an IEEE company identifier of 94:54:93 as the first three bytes. The last three bytes are a unique assignment for each device produced by Rigado. For the BMD-200, BMD-300, BMD-301, BMD-340 and BMD-350, this address is stored in the user registers (UICR) beginning at 0x10001080. See App Note - MAC Address Provisioning for additional details.
When using the Nordic SDK, the default configuration is to use the "random static" device address stored in the Factory registers (FICR). In order to use the Rigado public device address, only a few lines need added to an example. This example using the BLE Heart Rate Service example from the Nordic nRF5 SDK.
gap_params_init() function and add lines noted in bold below:
/**@brief Function for the GAP initialization.
* @details This function will set up all the necessary GAP (Generic Access Profile) parameters of
* the device. It also sets the permissions and appearance.
static void gap_params_init(void)
/* *** Start of added code *** */
/* *** Use the Rigado IEEE Public device (MAC) address *** */
//Set the Address type to Public
addr.addr_type = BLE_GAP_ADDR_TYPE_PUBLIC;
//copy the Rigado MAC address from the UICR
memcpy(addr.addr, (uint8_t*)0x10001080UL, BLE_GAP_ADDR_LEN);
//Tell the SoftDevice to use the Rigado MAC
err_code = sd_ble_gap_addr_set(&addr);
/* *** End of added code *** */
err_code = sd_ble_gap_device_name_set(&sec_mode, (const uint8_t *) DEVICE_NAME, strlen(DEVICE_NAME));
memset(&gap_conn_params, 0, sizeof(gap_conn_params));
gap_conn_params.min_conn_interval = MIN_CONN_INTERVAL;
gap_conn_params.max_conn_interval = MAX_CONN_INTERVAL;
gap_conn_params.slave_latency = SLAVE_LATENCY;
gap_conn_params.conn_sup_timeout = CONN_SUP_TIMEOUT;
err_code = sd_ble_gap_ppcp_set(&gap_conn_params);
Once the new code is added, compile the application and make note of the HEX file output location.
NOTE: A full chip erase over J-Link or recovery with nrfjprog will erase the MAC address. The MAC address is printed on the module, both in the 2D barcode and human readable. See the BMD-300 Series datasheet for MAC address details and this article for restoring the address: https://rigado.zendesk.com/hc/en-us/articles/360022857194-Creating-and-using-a-MAC-Address-binary-file