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

user description read-only

Is it possible to have a gatt characteristic user description being read only?

I'm currently using this configuration, but the "nrf master control" android app allows me to send a new value (showing the "up" arrow).

ble_gatts_attr_md_t user_desc_md = {
.read_perm  = { .sm = 1, .lv = 1 },
.write_perm = { .sm = 0, .lv = 0 },
.vloc       = BLE_GATTS_VLOC_STACK,
};

ble_gatts_char_md_t char_md = {
.char_props              = { .read = 1, .notify = 1 },
.char_ext_props          = 0,
.p_char_user_desc        = "La tete a toto",
.char_user_desc_max_size = 14,
.char_user_desc_size     = 14,
.p_char_pf               = &char_pf,
.p_user_desc_md          = &user_desc_md,
.p_cccd_md               = &cccd_md,
.p_sccd_md               = NULL,
};
Parents
  • FormerMember
    0 FormerMember

    With the permission that you have set, the descriptor should be read only. When I test it here with the parameters that you use, the "arrow up" is there as well. However, if you write a new value, press "send", and then check the log (swipe to the right), the write operation was not successful: Error 3 (0x3): GATT WRITE NOT PERMITTED

Reply
  • FormerMember
    0 FormerMember

    With the permission that you have set, the descriptor should be read only. When I test it here with the parameters that you use, the "arrow up" is there as well. However, if you write a new value, press "send", and then check the log (swipe to the right), the write operation was not successful: Error 3 (0x3): GATT WRITE NOT PERMITTED

Children
No Data
Related