Hi Dialog Support!
I would like to use the DA14580 to modify a characteristic. Specifically, I'd like to write a characteristic with my iPhone app, and then modify that characteristic for the modified result to be ready to read from my iPhone. The problem I'm running into is where I am able to find that characteristic data to be modified.
Device:
嗨ao,
I suppose that you mean how you can read the value of the data in your database on demand from your application, you can use either the indication when your characteristic is being written in order to check the value that will be placed in the database in that specific characteristic (check the ble_app_peripheral project the user_custs1_ctrl_wr_ind_handler in the user_custs1_impl.c file) or you can use the attmdb_att_get_value() function in order to read the value of the database by using the handle of your characteristic's value.
Thanks MT_dialog
Hi, MT_dialog,
Yes, I do mean to read the value of the data in the database and after reading the data, I would like to modify the data so that when I read it again later, it will be different. e.g. writing 00 into the characteristic, and then later reading it as 01. Whether this happens before it is placed in the database or in a separate function does not matter at this moment, as long as I am able to access it from the application at any time.
嗨ao,
With the functionattmdb_att_get_value()mentioned above you will be able to read the database's characteristic and with the attmdb_att_set_value() you will be able to set it.
Thanks MT_dialog