diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-22 13:29:49 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2013-10-22 13:31:24 -0700 |
commit | 51899b5d8fc531bbe8762a9c6a57057e5004ac59 (patch) | |
tree | 46119d6222aa47d648a72245e77a70844a796673 /monitor | |
parent | 94f761e69488b83dbe435a60a987128ddff86ee5 (diff) |
monitor: Add support for num broadcast retransmission command
Diffstat (limited to 'monitor')
-rw-r--r-- | monitor/bt.h | 11 | ||||
-rw-r--r-- | monitor/packet.c | 28 |
2 files changed, 37 insertions, 2 deletions
diff --git a/monitor/bt.h b/monitor/bt.h index c6cb2b138..af2ce9130 100644 --- a/monitor/bt.h +++ b/monitor/bt.h @@ -706,6 +706,17 @@ struct bt_hci_cmd_write_voice_setting { uint16_t setting; } __attribute__ ((packed)); +#define BT_HCI_CMD_READ_NUM_BROADCAST_RETRANS 0x0c29 +struct bt_hci_rsp_read_num_broadcast_retrans { + uint8_t status; + uint8_t num_retrans; +} __attribute__ ((packed)); + +#define BT_HCI_CMD_WRITE_NUM_BROADCAST_RETRANS 0x0c2a +struct bt_hci_cmd_write_num_broadcast_retrans { + uint8_t num_retrans; +} __attribute__ ((packed)); + #define BT_HCI_CMD_READ_HOLD_MODE_ACTIVITY 0x0c2b struct bt_hci_rsp_read_hold_mode_activity { uint8_t status; diff --git a/monitor/packet.c b/monitor/packet.c index ec4c7fdf8..0c2dad463 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -740,6 +740,11 @@ static void print_dev_class(const uint8_t *dev_class) " Unknown service class (0x%2.2x)", mask); } +static void print_num_broadcast_retrans(uint8_t num_retrans) +{ + print_field("Number of broadcast retransmissions: %u", num_retrans); +} + static void print_hold_mode_activity(uint8_t activity) { print_field("Activity: 0x%2.2x", activity); @@ -3656,6 +3661,21 @@ static void write_voice_setting_cmd(const void *data, uint8_t size) print_voice_setting(cmd->setting); } +static void read_num_broadcast_retrans_rsp(const void *data, uint8_t size) +{ + const struct bt_hci_rsp_read_num_broadcast_retrans *rsp = data; + + print_status(rsp->status); + print_num_broadcast_retrans(rsp->num_retrans); +} + +static void write_num_broadcast_retrans_cmd(const void *data, uint8_t size) +{ + const struct bt_hci_cmd_write_num_broadcast_retrans *cmd = data; + + print_num_broadcast_retrans(cmd->num_retrans); +} + static void read_hold_mode_activity_rsp(const void *data, uint8_t size) { const struct bt_hci_rsp_read_hold_mode_activity *rsp = data; @@ -5016,8 +5036,12 @@ static const struct opcode_data opcode_table[] = { status_rsp, 1, true }, { 0x0c27, 76, "Read Automatic Flush Timeout" }, { 0x0c28, 77, "Write Automatic Flush Timeout" }, - { 0x0c29, 78, "Read Num Broadcast Retransmissions" }, - { 0x0c2a, 79, "Write Num Broadcast Retransmissions" }, + { 0x0c29, 78, "Read Num Broadcast Retransmissions", + null_cmd, 0, true, + read_num_broadcast_retrans_rsp, 2, true }, + { 0x0c2a, 79, "Write Num Broadcast Retransmissions", + write_num_broadcast_retrans_cmd, 1, true, + status_rsp, 1, true }, { 0x0c2b, 80, "Read Hold Mode Activity", null_cmd, 0, true, read_hold_mode_activity_rsp, 2, true }, |