mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-20 00:40:04 +00:00
auto-pts: support BTP_GATT_OP_GET_ATTRIBUTES with UUID len = 0
This commit is contained in:
parent
568156403e
commit
59f775cfa7
@ -1510,7 +1510,7 @@ uint16_t btp_att_get_attributes_by_uuid16(uint16_t start_handle, uint16_t end_ha
|
||||
if (it.handle == 0) break;
|
||||
if (it.handle < start_handle) continue;
|
||||
if (it.handle > end_handle) break;
|
||||
if (att_iterator_match_uuid16(&it, uuid16)){
|
||||
if ((uuid16 == 0) || att_iterator_match_uuid16(&it, uuid16)){
|
||||
little_endian_store_16(response_buffer, pos, it.handle);
|
||||
pos += 2;
|
||||
response_buffer[pos++] = btp_permissions_for_flags(it.flags);
|
||||
|
@ -1065,6 +1065,10 @@ static void btp_gatt_handler(uint8_t opcode, uint8_t controller_index, uint16_t
|
||||
uint16_t end_handle = little_endian_read_16(data, 2);
|
||||
uuid_len = data[4];
|
||||
switch (uuid_len){
|
||||
case 0:
|
||||
response_len = btp_att_get_attributes_by_uuid16(start_handle, end_handle, 0, response_buffer, sizeof(response_buffer));
|
||||
btp_send(BTP_SERVICE_ID_GATT, opcode, controller_index, response_len, response_buffer);
|
||||
break;
|
||||
case 2:
|
||||
uuid16 = little_endian_read_16(data, 5);
|
||||
response_len = btp_att_get_attributes_by_uuid16(start_handle, end_handle, uuid16, response_buffer, sizeof(response_buffer));
|
||||
|
Loading…
x
Reference in New Issue
Block a user