Merge branch 'bugfix/gatts_cannot_set_value_#11754' into 'master'

component/bt:Fixed the bug for #11754:GATT service should provide command to set…

… char/descriptor read value.

See merge request !721
This commit is contained in:
Jiang Jiang Jian 2017-05-02 19:37:45 +08:00
commit 29d620fa10
3 changed files with 5 additions and 2 deletions

View File

@ -347,6 +347,7 @@ esp_err_t esp_ble_gatts_set_attr_value(uint16_t attr_handle, uint16_t length, co
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GATTS;
msg.act = BTC_GATTS_ACT_SET_ATTR_VALUE;
arg.set_attr_val.handle = attr_handle;
arg.set_attr_val.length = length;
arg.set_attr_val.value = (uint8_t *)value;

View File

@ -560,7 +560,8 @@ void btc_gatts_call_handler(btc_msg_t *msg)
break;
}
case BTC_GATTS_ACT_SET_ATTR_VALUE:
BTA_SetAttributeValue(arg->set_attr_val.handle, arg->set_attr_val.length,
arg->set_attr_val.value);
break;
case BTC_GATTS_ACT_OPEN: {
// Ensure device is in inquiry database

View File

@ -124,6 +124,7 @@ typedef union {
//BTC_GATTS_SET_ATTR_VALUE
struct set_attr_val_args {
uint16_t handle;
uint16_t length;
uint8_t *value;
} set_attr_val;