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.

CC2642R: GAPBOND_PAIRING_STATE_COMPLETE is not notified in Secure Connections Pairing (OOB).

Part Number: CC2642R
Other Parts Discussed in Thread: LAUNCHXL-CC26X2R1

Hello.
I have a question about TI CC26X2 SDK.
I am trying to implement Secure Connections Pairing (OOB) between Central and Peripheral using two LAUNCHXL-CC26X2R1.
The OOB pairing sequence appears to be proceeding properly, but I am not getting any notification that the pairing is complete.

Central is using SDK 4.40.04.04 and Peripheral is using SDK 4.30.00.54.

I am not sure if this is related, but it looks like bonding is not working either.


The detailed execution flow I'm assuming is as follows
1) Peripheral starts Advertising.
2) Central scans and requests connection.
3) Central calls L2CAP_ConnectReq().
3) L2CAP CoC is established between Peripheral and Central.
4) Both Peripheral and Central call GAPBondMgr_GenerateEccKeys()
5) When GAPBOND_GENERATE_ECC_DONE is notified, call GAPBondMgr_SCGetLocalOOBParameters() on each to get the local OOB
6) Exchange each other's local OOB via L2CAP CoC
7) Both Peripheral and Central call GAPBondMgr_SCSetRemoteOOBParameters().
8) Central calls GAPBondMgr_Pair().
9) GAPBOND_PAIRING_STATE_STARTED is notified.
10) GAPBOND_PAIRING_STATE_COMPLETE is notified.

We have confirmed that 1) through 9) are executed successfully.
However, 10) is not notified.
Success as well as other error statuses are not notified.

I have collected logs in this situation by sniffer device.
As shown below, we can confirm that the OOB pairing sequence is working correctly and that it is progressing to encryption.

It looks like it is probably also doing LE pings on the encrypted communication channel.
Why is GAPBOND_PAIRING_STATE_COMPLETE not being notified?

  • Hello,

    It looks like the central doesn't send the encryption response. Can you share the code changes made to enable OOB pairing?

  • Thank you for your reply.
    I can't share the detailed code right away.
    I was also concerned that Central did not return a Start Encryption Response.
    However, Central and Peripheral are sending SMP Pairing Random to each other, so I think the verification of OOB data is successful.

  • Hi,

    Thank yo for the detail post. Can you send me the complete snifferlog?

    In the meantime, I will try to reproduce the issue here.

  • Thanks for replying.
    I am attaching the complete sniffer log.
    UUID and other information is confidential.

    The L2CAP CoC sends the first data as "0x0A" and the rest as OOB_Random and OOB_Confirm for a total of 33 bytes.

    Please let me know what you think.
    Let me know if there is any other information you need.

    pairing_log.csv

  • Hi,

    I am looking this now and trying to reproduce it here. This might take a few days, but I will get back to you asap.

    Thank you for your patience in advance.

  • Hi,

    Thank you for your cooperation.
    I will be waiting for you.

  • Hi,

    I tried just doing OOB first without using L2CAP to transmit the data and I was able to see the notification of pairing complete.

    Is it possible for you to try only OOB pairing and not opening L2CAP to exchange the OOB data?

    What I did was to follow software user's guide instruction as I don't have any OOB method available locally.

    dev.ti.com/.../gapbondmngr-cc13x2_26x2.html

    I will now try opening L2CAP to check if I will be able to reproduce what you see.

  • Thank you for your cooperation.

    I will consider trying to run it with the User Guide approach that you presented.
    However, due to the requirements of our product, we consider it mandatory to generate and exchange ra/Ca and rb/Cb with each other.


    We apologize for the inconvenience, but we would appreciate your continued support for the approach using L2CAP.

  • Hi,

    I have tried opening L2CAP channel to exchange the OOB data and I am able to see both central and peripheral returned pairing success under GAPBOND_PAIRING_STATE_COMPLETE.

    My procedure:

    1. Under GAP_LINK_ESTABLISHED_EVENT (GAP messages) for both central and peripheral, I call

       // Register PSM with L2CAP task
        ret = L2CAP_RegisterPsm(&psm);

    2. Then if the return is SUCCESS, I call L2CAP_ConnectReq.

    3. After receiving L2CAP_CHANNEL_ESTABLISHED_EVT from STACK, I call GAPBondMgr_GenerateEccKeys();

    4. At under GAPBOND_GENERATE_ECC_DONE, I send OOB confirm and rand to the peer device

    5. Upon receiving data, I enable OOB and the central will wait for 5 second to call GAPBondMgr_Pair.

    6. Both central and peripheral returns pairing success.

    Is it possible for you to send over your application code through msg? So I can see what went wrong in your code?

  • Thank you for trying.
    It seems to be something that is probably a problem with our implementation.
    Due to personal reasons, it will take me a couple of weeks to get the code ready, but I would appreciate your checking it out.