CC2642R: The characteristic cannot be read when using the GATT_PERMIT_AUTHEN_READ definition.

Part Number: CC2642R
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi,

I am using the simple_peripheral project. After the phone connects, when I attempt to read the data of characteristic 5, the phone prompts a pairing request (the default project uses Passkey Entry). After entering the pairing code “123456”, once paired successfully, I can read the content of characteristic 5. However, after changing the pairing mode to “Just Works”, I first unpair from the phone, and then after reconnecting and attempting to read characteristic 5, a pairing request still appears. After clicking to confirm and pairing successfully, I am unable to read the content of characteristic 5.

After making the following configuration changes, I am unable to read the content of characteristic 5.

sdk:simplelink_cc13xx_cc26xx_sdk_7_41_00_17

  • Hi,

    Thank you for reaching out.

    As bonding is enabled, it is pretty likely the device and the phone are bonded after the first pairing process. When attempting the second pairing process, the phone may then be confused - the phone does not expect the device to have a new firmware. Before going any further in the debugging process, I would then recommended to ensure the phone forgets the device. This can be done by going in the parameters of the phone.

    Please run a new test after "forgetting" the device from the phone, and let us know your results.

    Best regards,

  • Please run a new test after "forgetting" the device from the phone, and let us know your results.

    Hi,I've already performed this action and I'm still having problems.

  • Hi,

    To ensure the issue is not due to any remaining pairing information. Can you try the following?

    1. Perform first connection and pairing

    2. Disconnect

    3. Mass erase CC2642R device

    4. Forget bond on smart phone and restart phone

    5. Change project's pairing mode

    Afterwards, reattempt to pair. I would like to see if we see the same behavior or if theres a difference.

    Best Regards,

    Jan

  • Hi,

    Followed the steps above and still can't read the data.

  • Hi,

    Got it. Thank you for confirming. Do you have access to a Bluetooth LE sniffer (such as an Ellisys or a Frontline)? If so, then can you take a packet capture showing the initial pairing and then another capture showing the follow up connection?

    Best Regards,

    Jan

  • Hi,

    Please see attachment

    Untitled7.rar

  • Hi,

    Thank you. At a glance, the log looks okay. Did you attempt to perform a read at the end of the log? If not, then could you take another log where you attempt to read the characteristic?

    Best Regards,

    Jan

  • Hi,

    I have paired successfully and then disconnected and reconnected once to read it again.

    What do you mean when you say the logging looks fine?
    I see that the encryption has been successful, but reading the characteristic value of 0xFFF5 still returns Insufficient Authentication.

  • Hi,

    My apologies, I did not see the final ATT read. Can you try disabling bonding as well in sysconfig for the second configuration? Could you also try using GATT_PERMIT_ENCRYPT_READ?

    Best Regards,

    Jan

  • Hi,

    1, disable bonding, still can't read the feature value.
    2、If you use GATT_PERMIT_ENCRYPT_READ attribute, you can read the feature value.

    My product actually has two characteristics, one characteristic permission is "Read only, Authenticated encryption required" and the other is "Write only, Authenticated encryption required". How should I configure the code for CC2642?

  • Hi,

    Understood. I believe to use the authenticated encryption you need to maintain the original pairing/bonding settings. If i am not mistaken, removing MITM and IO capabilities prevents authentication encryption characteristic from being used.

    Best Regards,

    Jan