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

Where does the peripheral stores the central's address?

  • Custom Board with MCU NordicSemi nRF51822-QFAA

  • Softdevice S110 7.1

  • IAR for ARM 7.1

  • SDK 7.2 using a merged service (HID keyboard example + NUS example + HRS example)

  • Testing with iPhone 5S, 6 and iPad air (iOS 8.1.3)

    / Nexus 5 and Galaxy Note 3 (Android 4.4.2).

/******************************************************************************************************************/

For example, my test device iPhone 5S 's address is 80:EA:96:FF:FF:FF.

(Is this address called MAC address? When I sniff with Wireshark, the source's address

appears like this.

image description

Anyway...)

Whereas my peripheral's address is EE:37:83:DD:DD:DD.

Previously on my question "HID Keyboard - Problems After Disconneting and Downloading" ,

when I press "Forget the device", the iPhone erases the bonding info, however,

the peripheral still leaves the phones info in the flash memory.

So I want to check each devices address and if I detect a same address, I want to delete that

bonding info block.

/******************************************************************************************************************/

Back to the question,

where can I check the bonded device's address?

image description

I tried to check these variables, but nothing seems to change except the index.

Where is the central's address?

+) Plus, is that address really called MAC address?

Also, is this address becomes stored into the peripheral's flash?

-Regards, Mango922

Parents
  • Hi Mango,

    iOS devices use Resolvable Random Address. Their addresses change every 15 minutes due to privacy concern. The way to recorgnize a previously bonded central is to use the IRK. I guess you can find the value of 16 bytes IRK in the m_peer_table. You can read more about the Resolvable Random Address at section 10.8 Part C Vol 3 in the Bluetooth Core Spec v4.x

Reply
  • Hi Mango,

    iOS devices use Resolvable Random Address. Their addresses change every 15 minutes due to privacy concern. The way to recorgnize a previously bonded central is to use the IRK. I guess you can find the value of 16 bytes IRK in the m_peer_table. You can read more about the Resolvable Random Address at section 10.8 Part C Vol 3 in the Bluetooth Core Spec v4.x

Children
  • Then..., In short

    1 - 1. If I bond with the same device, the IRK is same?

    As far as I know, IRK is one of the security keys of Low Energy. Every time when the device bonds with

    the peripheral, they use the same key?

    1 - 2. Is it possible that different device could have the same irk value?

    2 - 1. Is Resolvable Random Address and Random Device Address are same?

    I'm looking at Bluetooth Core Spec v4.2. At Vol 3 -> Part C -> section 10.8 ,

    the title is Random Device Address.

    2 - 2. (The address, which is shown in Wireshark) This address is Random Device Address?

    2 - 3. Whenever I sniff with Wireshark the Address of my iPhone doesn't change.

    Then this is a Static Random Device Address?

  • 1-1: The IRK may change in a device's lifetime, but it should stay the same as far as the device want to be recognized by previously bonded device. This means the device may change its IRK if it has no bond to keep. IRK is only used to resolve device address, not to encrypt the link.

    1 - 2 IRK can be randomly generated or can be assigned. So there is a chance that 2 devices have same IRK.

    2-1: Resolvable Random Address is subset of Random Device Address, where you also have Static Adresss, Private non-resolvable address

    2-2: It's hard to say if an address is Random Device Address or static Address. You would need to to have a look at the packet header of the Connect Request from the master to see if the TX address is Random or Public.

    2-3 It only change in about 15 minutes. Note, the Access Address won't change in a connection.

  • Thanks. One last question, even though the address changes,

    how could the phone and the peripheral remember their connections or bond infos?

    After bonding, the peripheral saves the info into the flash memory.

    After saving, what do they check when direct advertising connection occurs?

    By checking the IRK? Or do they check something else?

Related