Hi,
Is it possible to have a characteristic, say for example, written (ATT_CHAR_PROP_WR) characteristic which has value length of 0 in the database?
If I get a write a GATT_WRITE_CMD_IND with param->length and param->value, is this stored in the database, or is it stored somewhere else? I noticed that
in profile's task handler (e.g. custom server), gatt_write_cmd_ind will call attmdb_att_set_value to update the value on the database.. I am assuming that
the param->value from GATT_WRITE_CMD_IND message is actually stored somewhere else.
What I want to do is to save the DB_HEAP storage for another characteristics in the future. For some characteristics, I don't need to store the value.
Is this possible?
Thanks
Device:
Hi merioronen,
I am not sure i understand the question regarding having a zero value length characteristic in the database, and i dont see a reason for that, you would like some characteristics to just trigger an event instead of actually writting in the database and allocate space? Nevertheless if you do something like this your program will compile but you wont be able to write to the characteristic or get any indication to the application as far as i could test. The messages that you get to your application are stored in the MSG_HEAP but this doesn't mean that a message will be allocated and sent if you attempt to write on a zero length characteristic, there are checks that verify that the value with the proper length is indeed written in the proper offset before sending the indication message to the higher layers. So as far as i am aware, this is not possible.
Thanks MT_dialog