summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-20 00:21:18 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-20 00:21:18 +0200
commit3d579217297b23df62123eba7807a66b0b93cd1c (patch)
treecc71cdf31a142a7a2d03b9804acaa6cd16210acc /test
parent9b0acaa2621f6a5db077644d2a5a816017eae4b5 (diff)
Add support for getting connection info
Diffstat (limited to 'test')
-rw-r--r--test/btiotest.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/btiotest.c b/test/btiotest.c
index ede8a452..906d3853 100644
--- a/test/btiotest.c
+++ b/test/btiotest.c
@@ -99,13 +99,18 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data)
struct io_data *data = user_data;
GIOCondition cond;
char addr[18];
+ uint16_t handle;
+ uint8_t cls[3];
if (err) {
printf("Connecting failed: %s\n", err->message);
return;
}
- if (!bt_io_get(io, data->type, &err, BT_IO_OPT_DEST, addr,
+ if (!bt_io_get(io, data->type, &err,
+ BT_IO_OPT_DEST, addr,
+ BT_IO_OPT_HANDLE, &handle,
+ BT_IO_OPT_CLASS, cls,
BT_IO_OPT_INVALID)) {
printf("Unable to get destination address: %s\n",
err->message);
@@ -113,7 +118,8 @@ static void connect_cb(GIOChannel *io, GError *err, gpointer user_data)
strcpy(addr, "(unknown)");
}
- printf("Successfully connected to %s\n", addr);
+ printf("Successfully connected to %s. handle=%u, class=%02x%02x%02x\n",
+ addr, handle, cls[0], cls[1], cls[2]);
if (data->type == BT_IO_L2CAP || data->type == BT_IO_SCO) {
uint16_t omtu, imtu;