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

Does nRF52840 on Thingy 91 has unique MAC-address?

Hi,

Does nRF52840 on Thingy 91 and nRF9160 DK has a unique MAC-address? Or is it a randomized MAC-address with a high probability of being unique in the user's environment?

BR / Björn

Parents
  • Hi,

    It's randomly generated during production, it's not guaranteed to be unique, but the probability of having two devices with the same address is very low. Answer from one of my colleagues in response to a similar question:

    "It [Random static address] follows from the spec (Bluetooth Specification Version 4.2 [Vol 6, Part B], Section 1.3.2.1) that the random static address is a 48-bit address, where the 2 most significant bits are fixed (set to '11'). The rest of the address cannot be either all 0's or all 1's, so the total number of possible random static addresses are a = 2^(48-2)-2 = 70368744177662. That means that it is very unlikely that you will ever experience devices with the same address.

    So if you have only two devices, the probability that the two devices have different addresses is a-1/a = 99.9999999999986 %.

    More generally, as you can safely assume that the number of devices (n) will be much lower than the number of addresses (a), you can use the following approximation for the birthday problem in order to find the probability of a collision when there are n devices:

    p(n,a) = 1 - e^((-n^2)/(2a)).

    For example, using 1000 devices (it is highly unlikely that there will be more than this number within BLE range), the probability of at least one address collision is approximately 1-e^(-(n^2)/(2*a)) = 7.10542735760100e-009, which is still a very low number.

    The conclusion should be that the random static address is unique for all practical purposes."

Reply
  • Hi,

    It's randomly generated during production, it's not guaranteed to be unique, but the probability of having two devices with the same address is very low. Answer from one of my colleagues in response to a similar question:

    "It [Random static address] follows from the spec (Bluetooth Specification Version 4.2 [Vol 6, Part B], Section 1.3.2.1) that the random static address is a 48-bit address, where the 2 most significant bits are fixed (set to '11'). The rest of the address cannot be either all 0's or all 1's, so the total number of possible random static addresses are a = 2^(48-2)-2 = 70368744177662. That means that it is very unlikely that you will ever experience devices with the same address.

    So if you have only two devices, the probability that the two devices have different addresses is a-1/a = 99.9999999999986 %.

    More generally, as you can safely assume that the number of devices (n) will be much lower than the number of addresses (a), you can use the following approximation for the birthday problem in order to find the probability of a collision when there are n devices:

    p(n,a) = 1 - e^((-n^2)/(2a)).

    For example, using 1000 devices (it is highly unlikely that there will be more than this number within BLE range), the probability of at least one address collision is approximately 1-e^(-(n^2)/(2*a)) = 7.10542735760100e-009, which is still a very low number.

    The conclusion should be that the random static address is unique for all practical purposes."

Children
No Data
Related