Diff between 67369325d2248c127d734950403aa11a3b4156d2 and f79ca7b823162c2834903cab84b965176339f658

Changed Files

File Additions Deletions Status
tools/btmgmt.c +5 -1 modified

Full Patch

diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index f49f571..cd91916 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
@@ -1312,7 +1312,7 @@ static void pair_rsp(uint8_t status, uint16_t len, const void *param,
 		goto done;
 	}
 
-	printf("Paired with %s\n", addr);
+	printf("Paired with %s (%s)\n", addr, typestr(rp->addr.type));
 
 done:
 	mainloop_quit();
@@ -1335,6 +1335,7 @@ static void cmd_pair(struct mgmt *mgmt, uint16_t index, int argc, char **argv)
 	struct mgmt_cp_pair_device cp;
 	uint8_t cap = 0x01;
 	uint8_t type = BDADDR_BREDR;
+	char addr[18];
 	int opt;
 
 	while ((opt = getopt_long(argc, argv, "+c:t:h", pair_options,
@@ -1370,6 +1371,9 @@ static void cmd_pair(struct mgmt *mgmt, uint16_t index, int argc, char **argv)
 	cp.addr.type = type;
 	cp.io_cap = cap;
 
+	ba2str(&cp.addr.bdaddr, addr);
+	printf("Pairing with %s (%s)\n", addr, typestr(cp.addr.type));
+
 	if (mgmt_send(mgmt, MGMT_OP_PAIR_DEVICE, index, sizeof(cp), &cp,
 						pair_rsp, NULL, NULL) == 0) {
 		fprintf(stderr, "Unable to send pair_device cmd\n");