This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/CC2640R2F: After pairing, how can I build up an encrypted connection?

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640

Tool/software: TI-RTOS

Hello.

I have a device using random resolvable addresses. I want to connect to it using CC2640.

I do the pairing, I receive LTK and IRK.

How can I do a connection using directly LTK and IRK? Do I have to use

GAPCentralRole_EstablishLink(DEFAULT_LINK_HIGH_DUTY_CYCLE, DEFAULT_LINK_WHITE_LIST, addrType, peerAddr)?

Because the address is random, I don't know peerAddr.

Is there another special command for doing that directly using IRK and the bluetooth Identity?

Cheers Michael

  • Hi Michael,

    When you scan using whitelist you will in any case only see the devices you are bonded with.

    You didn't mention which SDK you are using, but with the 2.40 SDK and ble stack 3.x, you will get scan results (gapDeviceInfoEvent) where the addrType should be ADDRTYPE_PUBLIC_ID if it was automatically resolved.

    You should also be able to give EstablishLink the identity address (the resolved address) with the PUBLIC_ID address type and let the stack find the correct peripheral for you.

    If you are using an older SDK you can call GAPBondMgr_ResolveAddr to get the public address of a bonded device from the random address, check if it's someone you know, and then call connect with the random address.

    Best regards,
    Aslak
  • Hi Aslak.
    Thanks, it works, there was a small mistake from my side.
    Cheers
    Michael