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

How to stop GATT client reading characteristic values when on discovering services

I am using Master Control Panel to check some off the shelf BLE product. I noticed that some of them don't provide characteristic value when I press "discover services".

Where is the setting for only showing the characteristic Declaration but "hiding" the characteristic Value?

Parents
  • It could be several things. Maybe the characteristic value can't be read, maybe it requires authentication/encryption to be read, maybe it requires authorization to be read.

    And yes, it has something to do with:

    ble_gap_conn_sec_mode_t read_perm;       /**< Read permissions. */
    uint8_t                 rd_auth    :1;   /**< Read authorization and value will be requested from the application on every read operation. */
    

    in the ble_gatts_attr_md_t you provide sd_ble_gatts_characteristic_add() when you add the characteristic.

Reply
  • It could be several things. Maybe the characteristic value can't be read, maybe it requires authentication/encryption to be read, maybe it requires authorization to be read.

    And yes, it has something to do with:

    ble_gap_conn_sec_mode_t read_perm;       /**< Read permissions. */
    uint8_t                 rd_auth    :1;   /**< Read authorization and value will be requested from the application on every read operation. */
    

    in the ble_gatts_attr_md_t you provide sd_ble_gatts_characteristic_add() when you add the characteristic.

Children
No Data
Related