Characteristic without database backup

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
meriororen
Offline
Last seen:3年8蒙特hs ago
加入:2015-08-12 13:45
Characteristic without database backup

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:
MT_dialog
Offline
Last seen:1 month 3 weeks ago
工作人员
加入:2015-06-08 11:34
Hi merioronen,

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