Hi all,
how can I retrieve characteristic's value after write operation to this characteristic ?
can I use it as soon as it is modified ?
Thanks !
Hi all,
how can I retrieve characteristic's value after write operation to this characteristic ?
can I use it as soon as it is modified ?
Thanks !
My guess would be that you can use it immediately. Perhaps you can make a new variable; then use a timer that constantly checks the value of your characteristic and each time it changes, sets your new variable to that value.
You shouldn't need a timer to check the value of a characteristic. If the characteristic is write enabled you should get a BLE_GATTS_EVT_WRITE event every time it is written to. You can then check the handle in the event to make sure it matches your characteristic and read the value out of the characteristic.
Hi John,
the value should not be in the attr_char_value.p_value, where attr_char_value is ble_gatts_attr_t ?
I pull the data out of a written characteristic from here: p_evt_write->data[0]