diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-12-23 10:50:46 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2013-12-23 10:50:46 -0800 |
commit | 670de1db48960dc4c497da6964072884b868b16a (patch) | |
tree | eca64b85cff963303ed301ff0cc669e16d607507 /monitor/packet.c | |
parent | 7d310b0142b91d4134365ec3f14e5d815a141fbe (diff) | |
download | bluez-670de1db48960dc4c497da6964072884b868b16a.tar.gz |
monitor: Decode version information from Device ID
Diffstat (limited to 'monitor/packet.c')
-rw-r--r-- | monitor/packet.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/monitor/packet.c b/monitor/packet.c index 80631966d..3614a4d14 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -2445,7 +2445,7 @@ static void print_manufacturer_data(const void *data, uint8_t data_len) static void print_device_id(const void *data, uint8_t data_len) { - uint16_t source; + uint16_t source, version; const char *str; if (data_len < 8) @@ -2473,7 +2473,13 @@ static void print_device_id(const void *data, uint8_t data_len) print_field(" Vendor: 0x%4.4x", bt_get_le16(data + 2)); print_field(" Product: 0x%4.4x", bt_get_le16(data + 4)); - print_field(" Version: 0x%4.4x", bt_get_le16(data + 6)); + + version = bt_get_le16(data + 6); + + print_field(" Version: %u.%u.%u (0x%4.4x)", + (version & 0xff00) >> 8, + (version & 0x00f0) >> 4, + (version & 0x000f), version); } static void print_uuid16_list(const char *label, const void *data, |