Hi everyone,
I wanted to know if it's possible to change the length of a characteristic's value after it has been put in the attribute table. Reading some other answers in this zone, I found it was possible to change a characteristic's value after its creation (I already did it using sd_ble_gatts_value_set(...)
).
To give you more context, I have a characteristic with these values (in a server device):
attr_char_value.max_len = 8;
attr_char_value.init_len = 8;
uint8_t value[8] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
attr_char_value.p_value = value;
Then, with a client device, I perform a Write Command, which generates a write event that allows me to use sd_ble_gatts_value_set(...)
, which changes the value of my characteristic. So, instead of changing the value, I would like to change the length from 8 to 1 byte, so that, after that first Write Command I can only write or read 1 smooth byte of information, is that possible?
Best regards!