Hello Please tell me about sd_ble_gatts_value_get (). Please tell me about sd_ble_gatts_value_set (). For these two cases, it is not used in the SDK, but is it old? Please tell me about these alternatives. thanks
Hello Please tell me about sd_ble_gatts_value_get (). Please tell me about sd_ble_gatts_value_set (). For these two cases, it is not used in the SDK, but is it old? Please tell me about these alternatives. thanks
What do you want to know?
sd_ble_gatts_value_get() gets the value of a given attribute.
sd_ble_gatts_value_set() sets the value of a given attribute.
What do you want to know?
sd_ble_gatts_value_get() gets the value of a given attribute.
sd_ble_gatts_value_set() sets the value of a given attribute.
Both of them do not work as I think. I use it in two places, but one can read only 0 by getting and the other can get, but the handle value is rewritten to 0. Is it OK to use the following methods? Err_code = sd_ble_gatts_value_get (BLE_CONN_HANDLE_INVALID, p_three_axis -> setting_char_handles.value_handle, 0, & len, value_buff);
I dont' understand, sd_ble_gatts_value_get(uint16_t conn_handle, uint16_t handle, ble_gatts_value_t *p_value) has three arguments?
I'm sorry. It was the following mistake.
err_code = sd_ble_gatts_value_get(BLE_CONN_HANDLE_INVALID, p_three_axis->setting_char_handles.value_handle, &gatts_buf );
And it solved. I forgot to initialize the buffer.
gatts_buf.len = len; gatts_buf.offset = 0; gatts_buf.p_value = (uint8_t *)value_buff;
We apologize for the inconvenience.