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.

CC2640R2F: If only peripheral erases bond information, client is unable to connect to it

Part Number: CC2640R2F

Hello Team,

Our project has the following properties

SDK

simplelink_cc2640r2_sdk_5_30_00_03

IDE

IAR8.32.2

Reference Project

MultiRole

1. We are using multi role on both the client(A) and peripheral(B) side.
2. We are using bonding with just works pairing mode, 1 SNV page used.
3. On the Peripheral side(B), our bonding parameters are set as follows:
    pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
    mitm = FALSE;
    ioCap = GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT;
    bonding = TRUE;
    replaceBonds = TRUE;

4. On the Client side(A), our bonding parameters are set as follows:
    pairMode = GAPBOND_PAIRING_MODE_INITIATE;
    mitm = FALSE;
    ioCap = GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT;
    bonding = TRUE;
    replaceBonds = TRUE;

5. We have encrypted the write property to simpleProfilechar1UUID as GATT_PERMIT_ENCRYPT_WRITE.

After starting both the client(A) and peripheral(B), if I scan from A and connect B, I get the following expected callbacks/events:

GAP_LINK_ESTABLISHED_EVENT
GAPBOND_PAIRING_STATE_STARTED
ATT_MTU_UPDATED_EVENT
BLE_DISC_STATE_CHAR
GAPBOND_PAIRING_STATE_COMPLETE
GAPBOND_PAIRING_STATE_BOND_SAVED

Now keeping A as is, if I re-flash the same software on B (hence erasing the bond information, I guess) and try to scan and connect B to A, I get the following events:

GAP_LINK_ESTABLISHED_EVENT
ATT_MTU_UPDATED_EVENT
GAP_LINK_TERMINATED_EVENT

Hence I am never able to create a new connection unless I power cycle A, in this case it will pair and save a new bond.
Is there any other event or callback we receive in order to track this behavior where the client is notified about the peripheral not having the bond information?

Regards,
Niranjan

  • Hey Niranjan,

    Thanks for posting on e2e. I've assigned this thread to my colleague who will help with this request.

  • Hi Niranjan,

    To clarify, when you power cycle A, are you also reflashing? It seems not, but i would like to confirm to ensure I am understanding the behavior correctly. Is A able to detect B disconnecting? Do you have access to a BLE sniffer log of the behavior? This may be helpful as well. i will try to reproduce this behavior on my side as well.

    Does the behavior always occur?

    Best Regards,

    Jan

  • Hello Jan,

    1. By power cycle of A, I meant a clean board reset and not re-flashing it.
    2. Yes, A gets the GAP_LINK_TERMINATED_EVENT callback as well.
    3. Give me some time, I'll try to send the sniffer logs as early as possible.

    Yes, this behavior was reproduced every time I tested it.

    Regards,

    Niranjan

  • Hi Niranjan,

    Got it. I look forward to seeing the sniffer log. I believe it will give us some valuable insight. I will update you once I have had a chance to do some more testing on my side. Please let me know when you have the sniffer log available and I will look into it as soon as possible.

    Best Regards,

    Jan

  • Hello Jan,

    Please find the snippets of the logs right after connection is established and before termination, also attached the sniffer filePeripheralErasesBond_ClientTriesToConnect.psd



    Regards,
    Niranjan

  • Hi Niranjan,

    This is very helpful. I will take a closer look and share my thoughts with you as soon as possible. Expect a response by Monday.

    Best Regards,

    Jan

  • Hi Niranjan,

    Looking into the specification, the error codes returned by Terminate_Ind and Reject_Ind can be seen below:

    I was able to reproduce the behavior on my side. However, during my tests, the central device was not able to connect again even after reset. I think this is expected as the central device would have a bond record with the peripheral device, but the peripheral device would not (due to the mass erase).

    Are you able to share the multi_role project with your modifications to try to see if I missed something on my side?

    Best Regards,

    Jan