When I scan BLE device at nRF UARTv2.0 App in Android4.4, it is appar device name(Ex:Nordic_UART) and 6 byte device address(MAC address?). I want to include mac address in device name. How to get 6 byte mac address at nrf51822?
When I scan BLE device at nRF UARTv2.0 App in Android4.4, it is appar device name(Ex:Nordic_UART) and 6 byte device address(MAC address?). I want to include mac address in device name. How to get 6 byte mac address at nrf51822?
By default, the BLE address is derived from the NRF_FICR->DEVICEADDR[] and is of 48 bits length (6 bytes). This registers are randomly generated in our production, and they are unique for each device (2^46 different combinations, due to MSbits set to '11').
You can read out the address using the API call, "sd_ble_gap_address_get(..);" or reading the FICR->DEVICEADDR[x] registers.
Example: My device advertises with "0xE724 08C78790"
DEVICEADDR[0] = 0x08C78790 DEVICEADDR[1] = 0xYYYYA724
The reason why "A7" becomes "E7" is because the specification says that the 2 MSBit of the address must be set '11' (if you're very interested, see Bluetooth Core v4.0, Vol 3, Part C, chapter 10.8.1.)
BR Håkon
What is the smallest part of MAC address that can be used as a unique ID of a certain device?
I know that first 3 bytes are vendor-specific (Nordic) so another 3 bytes are unique across Nordic products. But are they totally random, or is there any pattern that can allow us to use only 2 bytes for a specific product (nRF51822)?
- - - -
Disclaimer: I know this is an old thread, but frequently shows up in Google and that's why I decided to include my question here.
What is the smallest part of MAC address that can be used as a unique ID of a certain device?
I know that first 3 bytes are vendor-specific (Nordic) so another 3 bytes are unique across Nordic products. But are they totally random, or is there any pattern that can allow us to use only 2 bytes for a specific product (nRF51822)?
- - - -
Disclaimer: I know this is an old thread, but frequently shows up in Google and that's why I decided to include my question here.