Refer to the document How to Write WICED Smart Applications
You'll find that in order to make make a writable characteristic you must use (for a 16 bit uuid):
CHARACTERISTIC_UUID16_WRITABLE (handle, handle_value, uuid, properties, permission, value_len)This would be in place of a regular characteristic:CHARACTERISTIC_UUID16 (handle, handle_value, uuid, properties, permission, value_len)that you simply added writable permissions toJacob
I do have CHARACTERISTIC_UUID16_WRITABLE instead of CHARACTERISTIC_UUID16, and it still wont take the value...
I think you need to format your characteristic to look something like this:
CHARACTERISTIC_UUID128_WRITABLE (HDLC_FIRST_CUSTOM_SERVICE_CHAR1, HDLC_FIRST_CUSTOM_SERVICE_CHAR1_VALUE, __UUID_FIRST_CUSTOM_SERVICE_CHAR1, LEGATTDB_CHAR_PROP_READ | LEGATTDB_CHAR_PROP_WRITE, LEGATTDB_PERM_READABLE | LEGATTDB_PERM_WRITE_REQ, 1), '0',
IDK, I had those permissions before, but after looking at some sample code I ended up using these props/permissions:
LEGATTDB_CHAR_PROP_READ | LEGATTDB_CHAR_PROP_WRITE
LEGATTDB_PERM_VARIABLE_LENGTH | LEGATTDB_PERM_READABLE | LEGATTDB_PERM_WRITE_CMD | LEGATTDB_PERM_WRITE_REQ | LEGATTDB_PERM_RELIABLE_WRITE
And it started writing correctly. I think I was missing the Variable Length permission and that was causing it not to work.