Hello,
There is a characteristic with properties:
memset(&char_md, 0, sizeof(char_md));
...
attr_md.vloc = BLE_GATTS_VLOC_USER;
...
char_md.char_props.write = 0;
char_md.char_props.read = 1;
attr_char_value.init_len = 16
attr_char_value.max_len = 16
attr_char_value.p_value = device_data;
When reading with gatttool, 16 bytes are read. But, after writing (char-write-rec) to this char., the length becames to be a number of bytes that was written, e.g., after writing 1 byte, 1 byte of data will be read then (instead of 16 that must always be).
Questions:
- Why props.write=0 doesn't prevent writing and length corruption on the stack level?
- How to prevent length corruption when data is stored on the user location?