This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is re-pairing necessary with MITM protection?

I am working on a peripheral. This peripheral is IO display only. On the other side, the central is keyboard + display. I have a single, custom service with a single characteristic. Said characteristic is readable and writable and requires both encryption and authentication. Pairing seems to work - I can read and write to it successfully.

However, with bonding enabled, once I re-connect and try to read or write to that characteristic, I get an "Insufficient Authentication (Error Code 0x05)" error.

Is this expected? When using MITM protection, does a central always need to re-pair?

Parents
  • Hi,

    Could you provide a sniffer trace ?

    Have you make sure when you re-establish the connection, the LTK is used and the connection is encrypted using the LTK.

    My suspicion is that the LTK was not stored properly (or not exchanged at all if it was only pairing not bonding, initially). So when re-establishing connection, the link is not encrypted , causing Insufficient Authentication.

    You can check in the code if BLE_GAP_EVT_CONN_SEC_UPDATE is triggered or not when the connection is established. But it's the best to have the sniffer trace.

Reply
  • Hi,

    Could you provide a sniffer trace ?

    Have you make sure when you re-establish the connection, the LTK is used and the connection is encrypted using the LTK.

    My suspicion is that the LTK was not stored properly (or not exchanged at all if it was only pairing not bonding, initially). So when re-establishing connection, the link is not encrypted , causing Insufficient Authentication.

    You can check in the code if BLE_GAP_EVT_CONN_SEC_UPDATE is triggered or not when the connection is established. But it's the best to have the sniffer trace.

Children
No Data
Related