Skip to contentSkip to conversation

tools/btpclient: Add GATT support to get Device name

PATCH Superseded Frédéric Danis 1 participant 1 message Feb 11 Bluetooth drivers

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/btpclient: Add GATT support to get Device name

The device name is retrieved during GATT connection, so no need to send a specific request, just need to send the name to PTS when the property is updated.

This allows to pass GAP/IDLE/NAMP/BV-01-C.

---
 src/shared/btp.h  |  18 +++++++
 tools/btpclient.c | 119 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 137 insertions(+)
src/shared/btp.h +18 -0
index ad18cfb3a..cf921e64a 100644
@@ -285,6 +285,24 @@ struct btp_gap_identity_resolved_ev {
 	bdaddr_t identity_address;
 } __packed;
 
+#define BTP_OP_GATT_READ_SUPPORTED_COMMANDS	0x01
+
+#define BTP_OP_GATT_READ_UUID			0x12
+struct btp_gatt_read_uuid_cp {
+	uint8_t address_type;
+	bdaddr_t address;
+	uint16_t start_handle;
+	uint16_t end_handle;
+	uint8_t uuid_len;
+	uint8_t uuid[];
+} __packed;
+
+struct btp_gatt_read_uuid_rp {
+	uint8_t status;
+	uint8_t count;
+	uint8_t data[];
+} __packed;
+
 struct btp;
 
 typedef void (*btp_destroy_func_t)(void *user_data);
tools/btpclient.c +119 -0

161 lines not on this page · raw message

Signature · 1 line
2.43.0