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

Time to understand read/write, read_perm/write_perm, rd_auth/wr_auth

Even I am writing BLE applications, but I don't totally understand these items:

In Characteristic Properties of GATT Characteristic metadata We have read, write, notify, indicate, etc ... I "think" I understand most of them.

In Characteristic Value Attribute We have attribute meta data with read_perm/write_perm and rd_auth/wr_auth.

When do we need to use read_perm/write_perm and rd_auth/wr_auth, and what is the difference between "perm" and "auth"?

Thanks

Parents
  • Adding my own finding here:

    If I set the read_perm to BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM, when master send read request to slave, slave will respond with Insufficient Authentication

    If I set rd_auth to 1. the master won't get "insufficient authentication" err code from slave, but won't get the reading either.

    So either auth or perm will stop master reading the characteristic value, but if set read_perm to be encrypted, master will get an error message "insufficient authentication"

Reply
  • Adding my own finding here:

    If I set the read_perm to BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM, when master send read request to slave, slave will respond with Insufficient Authentication

    If I set rd_auth to 1. the master won't get "insufficient authentication" err code from slave, but won't get the reading either.

    So either auth or perm will stop master reading the characteristic value, but if set read_perm to be encrypted, master will get an error message "insufficient authentication"

Children
No Data
Related