From 2b62aff17344d0786a1b21738d36524b4db54943 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 22 Dec 2013 07:51:49 -0800 Subject: [PATCH] monitor: Add support for decoding inquiry response notification --- monitor/bt.h | 6 ++++++ monitor/packet.c | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/monitor/bt.h b/monitor/bt.h index 849ed86f4..c9625e848 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -2025,6 +2025,12 @@ struct bt_hci_evt_slave_broadcast_channel_map_change { uint8_t map[10]; } __attribute__ ((packed)); +#define BT_HCI_EVT_INQUIRY_RESPONSE_NOTIFY 0x56 +struct bt_hci_evt_inquiry_response_notify { + uint8_t lap[3]; + int8_t rssi; +} __attribute__ ((packed)); + #define BT_HCI_EVT_AUTH_PAYLOAD_TIMEOUT_EXPIRED 0x57 struct bt_hci_evt_auth_payload_timeout_expired { uint16_t handle; diff --git a/monitor/packet.c b/monitor/packet.c index 6ec7d9be5..80631966d 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -6670,6 +6670,14 @@ static void slave_broadcast_channel_map_change_evt(const void *data, uint8_t siz print_channel_map(evt->map); } +static void inquiry_response_notify_evt(const void *data, uint8_t size) +{ + const struct bt_hci_evt_inquiry_response_notify *evt = data; + + print_iac(evt->lap); + print_rssi(evt->rssi); +} + static void auth_payload_timeout_expired_evt(const void *data, uint8_t size) { const struct bt_hci_evt_auth_payload_timeout_expired *evt = data; @@ -7003,7 +7011,8 @@ static const struct event_data event_table[] = { slave_page_response_timeout_evt, 0, true }, { 0x55, "Connectionless Slave Broadcast Channel Map Change", slave_broadcast_channel_map_change_evt, 10, true }, - { 0x56, "Inquiry Response Notification" }, + { 0x56, "Inquiry Response Notification", + inquiry_response_notify_evt, 4, true }, { 0x57, "Authenticated Payload Timeout Expired", auth_payload_timeout_expired_evt, 2, true }, { 0xfe, "Testing" }, -- 2.47.3