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

  • 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.

Reply
  • 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.

Children
No Data
Related