mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-29 12:32:54 +00:00
auto-pts: send response for BTP_GATT_OP_CFG_NOTIFY and BTP_GATT_OP_CFG_INDICATE
This commit is contained in:
parent
bb6eca40f0
commit
6984013401
@ -1482,18 +1482,19 @@ static void btp_gatt_handler(uint8_t opcode, uint8_t controller_index, uint16_t
|
||||
uint8_t data[2];
|
||||
little_endian_store_16(data, 0, enable ? GATT_CLIENT_CHARACTERISTICS_CONFIGURATION_NOTIFICATION : 0);
|
||||
gatt_client_write_value_of_characteristic(&gatt_client_packet_handler, remote_handle, ccc_handle, sizeof(data), data);
|
||||
btp_send(BTP_SERVICE_ID_GATT, opcode, controller_index, 0, NULL);
|
||||
}
|
||||
break;
|
||||
case BTP_GATT_OP_CFG_INDICATE:
|
||||
MESSAGE("BTP_GATT_OP_CFG_INDICATE");
|
||||
response_len = 0;
|
||||
response_service_id = BTP_SERVICE_ID_GATT;
|
||||
response_op = opcode;
|
||||
if (controller_index == 0){
|
||||
uint8_t enable = data[7];
|
||||
uint16_t ccc_handle = little_endian_read_16(data, 8);
|
||||
uint8_t data[2];
|
||||
little_endian_store_16(data, 0, enable ? GATT_CLIENT_CHARACTERISTICS_CONFIGURATION_INDICATION : 0);
|
||||
gatt_client_write_value_of_characteristic(&gatt_client_packet_handler, remote_handle, ccc_handle, sizeof(data), data);
|
||||
btp_send(BTP_SERVICE_ID_GATT, opcode, controller_index, 0, NULL);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user