SDK1.1 20732S Peer Device Address

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Is there a BLE stack function in SDK1.1 to get the peer's public device address (resolved if resolvable)?  emconninfo_getPeerAddr() works for peers that use a public address, but does not resolve peers that use a resolvable private address (Apple).

If not, is there some unique immutable device identifier that is exchanged during link-up/pair/bond that can be accessed from the application?

0 Likes
1 Solution

LTK is generated once during the bonding, saved in the NVRAM and used during consecutive connection it encrypt the link.  The same applies to IRK which is used to perform address resolution.  Please note that peripheral application really does not need to know about the address resolution.   When client connects it can just verify that device is bonded and/or start pairing if it is not the case.  Following code snippet is from the hello_sensor in 2.0 SDK

// as we require security for every connection, we will not send any indications until

// encryption is done.

if (bleprofile_p_cfg->encr_required != 0)

{  

    if (emconninfo_deviceBonded())

    {

        ble_trace0("device bonded");

    }

    else

    {

         ble_trace0("device not bonded");

         blesmp_pinfo->pairingParam.AuthReq  |= LESMP_AUTH_FLAG_BONDING;

         blesmp_sendSecurityRequest();

    }

}

View solution in original post

2 Replies
Anonymous
Not applicable

When is the peer LTK (Long Term Key) generated?  Exchanged?  Changed?

0 Likes

LTK is generated once during the bonding, saved in the NVRAM and used during consecutive connection it encrypt the link.  The same applies to IRK which is used to perform address resolution.  Please note that peripheral application really does not need to know about the address resolution.   When client connects it can just verify that device is bonded and/or start pairing if it is not the case.  Following code snippet is from the hello_sensor in 2.0 SDK

// as we require security for every connection, we will not send any indications until

// encryption is done.

if (bleprofile_p_cfg->encr_required != 0)

{  

    if (emconninfo_deviceBonded())

    {

        ble_trace0("device bonded");

    }

    else

    {

         ble_trace0("device not bonded");

         blesmp_pinfo->pairingParam.AuthReq  |= LESMP_AUTH_FLAG_BONDING;

         blesmp_sendSecurityRequest();

    }

}