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

write only characteristic?

Hi, how to create a write only characteristic?

I have tried: ble_char_md.char_props.read = 0;

This does not work.

Parents
  • @victor: Next time, please edit your question to add more information instead of posting it as an answer :)

    There are 2 sets of a characteristic attribute: permissions and properties. set char_props.read = 0 only set the property of the characteristic. You should also set the permission : read_perm.lv and read_perm.sm to zero. Please have a look at the macro BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS() in ble_gap.h

Reply
  • @victor: Next time, please edit your question to add more information instead of posting it as an answer :)

    There are 2 sets of a characteristic attribute: permissions and properties. set char_props.read = 0 only set the property of the characteristic. You should also set the permission : read_perm.lv and read_perm.sm to zero. Please have a look at the macro BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS() in ble_gap.h

Children
No Data
Related