mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 19:20:54 +00:00
auto-pts: more debug output for att_db
This commit is contained in:
parent
e7733bf21d
commit
42d64f2df9
@ -226,6 +226,7 @@ void att_dump_attributes(void){
|
|||||||
att_iterator_t it;
|
att_iterator_t it;
|
||||||
att_iterator_init(&it);
|
att_iterator_init(&it);
|
||||||
uint8_t uuid128[16];
|
uint8_t uuid128[16];
|
||||||
|
log_info("att_dump_attributes, table %p", att_db);
|
||||||
while (att_iterator_has_next(&it)){
|
while (att_iterator_has_next(&it)){
|
||||||
att_iterator_fetch_next(&it);
|
att_iterator_fetch_next(&it);
|
||||||
if (it.handle == 0u) {
|
if (it.handle == 0u) {
|
||||||
|
@ -948,6 +948,7 @@ static void btp_gatt_handler(uint8_t opcode, uint8_t controller_index, uint16_t
|
|||||||
if (add_char_pending && opcode != BTP_GATT_OP_SET_VALUE){
|
if (add_char_pending && opcode != BTP_GATT_OP_SET_VALUE){
|
||||||
add_char_pending = false;
|
add_char_pending = false;
|
||||||
btp_gatt_add_characteristic(uuid_len, uuid16, uuid128, characteristic_properties, characteristic_permissions, 0, NULL);
|
btp_gatt_add_characteristic(uuid_len, uuid16, uuid128, characteristic_properties, characteristic_permissions, 0, NULL);
|
||||||
|
att_dump_attributes();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (opcode){
|
switch (opcode){
|
||||||
@ -985,6 +986,7 @@ static void btp_gatt_handler(uint8_t opcode, uint8_t controller_index, uint16_t
|
|||||||
btp_send_error(BTP_SERVICE_ID_GATT, 0x03);
|
btp_send_error(BTP_SERVICE_ID_GATT, 0x03);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
att_dump_attributes();
|
||||||
// @note: returning service_id == 0
|
// @note: returning service_id == 0
|
||||||
uint8_t service_id_buffer[2] = { 0 };
|
uint8_t service_id_buffer[2] = { 0 };
|
||||||
btp_send(BTP_SERVICE_ID_GATT, opcode, controller_index, 2, service_id_buffer);
|
btp_send(BTP_SERVICE_ID_GATT, opcode, controller_index, 2, service_id_buffer);
|
||||||
@ -1023,6 +1025,7 @@ static void btp_gatt_handler(uint8_t opcode, uint8_t controller_index, uint16_t
|
|||||||
// @note: ignoring characteristic_id, assume latest added characteristic
|
// @note: ignoring characteristic_id, assume latest added characteristic
|
||||||
uint16_t value_len = little_endian_read_16(data, 2);
|
uint16_t value_len = little_endian_read_16(data, 2);
|
||||||
btp_gatt_add_characteristic(uuid_len, uuid16, uuid128, characteristic_properties, characteristic_permissions, value_len, &data[4]);
|
btp_gatt_add_characteristic(uuid_len, uuid16, uuid128, characteristic_properties, characteristic_permissions, value_len, &data[4]);
|
||||||
|
att_dump_attributes();
|
||||||
btp_send(BTP_SERVICE_ID_GATT, opcode, controller_index, 0, NULL);
|
btp_send(BTP_SERVICE_ID_GATT, opcode, controller_index, 0, NULL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1049,6 +1052,7 @@ static void btp_gatt_handler(uint8_t opcode, uint8_t controller_index, uint16_t
|
|||||||
btp_send_error(BTP_SERVICE_ID_GATT, 0x03);
|
btp_send_error(BTP_SERVICE_ID_GATT, 0x03);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
att_dump_attributes();
|
||||||
// @note: returning descriptor_id == 0
|
// @note: returning descriptor_id == 0
|
||||||
uint8_t descriptor_id[2] = { 0 };
|
uint8_t descriptor_id[2] = { 0 };
|
||||||
btp_send(BTP_SERVICE_ID_GATT, opcode, controller_index, 2, descriptor_id);
|
btp_send(BTP_SERVICE_ID_GATT, opcode, controller_index, 2, descriptor_id);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user