This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to enable encryption for an particular characteristics data?

Hi. Is it possible to enable the encryption of data which corresponds to the particular characteristics? i tried with BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM, for setting the security level for the particular characteristics, but when i read or write on the characteristics it is showing INSUFFICIENT_AUTHENTICATION. Please suggest us on how to work with the encryption and decryption of an particular characteristics data.

Regards, Balaji

Parents
  • @Balaji: With BLE protocol, you can set different security levels for different characteristics however, if you want to read or write a not open (secured) characteristics, you would need to encrypt the link. This means both unsecured and secured characteristics will be encrypted when in transmission.

    To get the link encrypted you need to do bonding. This is done automatically on iOS and Android when the app trying to read an encrypted characteristic. On Master control panel, you do it manually by pressing bond.

  • i dont understand how it's done automatically on android and iOS. if i'm an android developer, do I need to use a set of Nordic libraries for encryption decryption or you're using an encryption decryption norme which is already existing on android

Reply Children
No Data
Related