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

Identifying specific user from the whitelis

Hello all,

I am working on a device (nrf51 and s110) which is going to communicate with multiple centrals (smart phones). The device uses a whitelist to connect to only "known" devices. However, one of these devices has to be identified as an administrator and provided with additional futures.

Under the assumption that the administrator central will be the first one that will connect to the peripheral, it is safe to say that that the administrator can be identified based on its position into the whielist.

In order to do that, on a

BLE_GAP_EVT_CONNECTED event I am checking the index (== 0) in the

p_ble_evt->evt.gap_evt.params.connected.irk_match structure.

Unfortunately this approach works fine as long as the centrals are using private resolvable addresses. If the device that first gets connected to the peripheral has a static address (the dongle for instance), this assumption is not valid anymore. The peripheral is supposed to work only with centrals with private resolvable addresses, but I can's simply relay on this fact. The question is how can I identify a specific central regardless of the used address type?

Any input on the problem would be highly appreciated.

Parents
  • Hi GT,

    I think the simplest way is to store to flash either the IRK (if central uses private resolvable address) or the static address (if central uses static address) to flash. And you can check if the device connected is the admin device or not at the BLE_GAP_EVT_CONNECTED event. Beside the irk_match, you can also find the peer_addr of the central.

    Other solution is to check if it's the first device to bond in the bond database, but it's more complicated and require the device to re-bond before you can have the master's ediv to look for the master and then check if it's the first master device or not.

  • So far it looks like the approach for using the IRK as a reference will work. After minor modifications on the device manager I can get the IRK for a particular central from it. However, now I am having troubles storing it, but this is another topic... I will post the progress here.

Reply Children
No Data
Related