From ebcec9d303c49e6d6f0b0ef8f3a9efe7abbb14d2 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 12 Oct 2023 12:21:32 +0200 Subject: [PATCH] hci_cmd: add more status parameter commands --- src/hci_cmd.c | 31 ++++++++++++++++++++++++++++++- src/hci_cmd.h | 8 ++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/hci_cmd.c b/src/hci_cmd.c index 94c7d209e..a0ea9c7ba 100644 --- a/src/hci_cmd.c +++ b/src/hci_cmd.c @@ -1226,9 +1226,30 @@ const hci_cmd_t hci_read_bd_addr = { }; /** - * Status Paramters + * Status Paramteers */ +/** + * @param handle + */ +const hci_cmd_t hci_read_failed_contact_counter = { + HCI_OPCODE_HCI_READ_FAILED_CONTACT_COUNTER, "H" +}; + +/** + * @param handle + */ +const hci_cmd_t hci_reset_failed_contact_counter = { + HCI_OPCODE_HCI_RESET_FAILED_CONTACT_COUNTER, "H" +}; + +/** + * @param handle + */ +const hci_cmd_t hci_read_link_quality = { + HCI_OPCODE_HCI_READ_LINK_QUALITY, "H" +}; + /** * @param handle */ @@ -1236,6 +1257,14 @@ const hci_cmd_t hci_read_rssi = { HCI_OPCODE_HCI_READ_RSSI, "H" }; +/** + * @param handle + * @param which_clock + */ +const hci_cmd_t hci_read_clock = { + HCI_OPCODE_HCI_READ_CLOCK, "H1" +}; + /** * @param handle */ diff --git a/src/hci_cmd.h b/src/hci_cmd.h index 97e4cfc84..33f7851a1 100644 --- a/src/hci_cmd.h +++ b/src/hci_cmd.h @@ -208,7 +208,11 @@ typedef enum { HCI_OPCODE_HCI_READ_BD_ADDR = HCI_OPCODE (OGF_INFORMATIONAL_PARAMETERS, 0x09), // Status Parameters + HCI_OPCODE_HCI_READ_FAILED_CONTACT_COUNTER = HCI_OPCODE (OGF_STATUS_PARAMETERS, 0x01), + HCI_OPCODE_HCI_RESET_FAILED_CONTACT_COUNTER = HCI_OPCODE (OGF_STATUS_PARAMETERS, 0x02), + HCI_OPCODE_HCI_READ_LINK_QUALITY = HCI_OPCODE (OGF_STATUS_PARAMETERS, 0x03), HCI_OPCODE_HCI_READ_RSSI = HCI_OPCODE (OGF_STATUS_PARAMETERS, 0x05), + HCI_OPCODE_HCI_READ_CLOCK = HCI_OPCODE (OGF_STATUS_PARAMETERS, 0x07), HCI_OPCODE_HCI_READ_ENCRYPTION_KEY_SIZE = HCI_OPCODE (OGF_STATUS_PARAMETERS, 0x08), // LE Controller @@ -413,6 +417,9 @@ extern const hci_cmd_t hci_read_local_name; extern const hci_cmd_t hci_read_local_oob_data; extern const hci_cmd_t hci_read_inquiry_response_transmit_power_level; extern const hci_cmd_t hci_write_inquiry_transmit_power_level; +extern const hci_cmd_t hci_read_clock; +extern const hci_cmd_t hci_read_failed_contact_counter; +extern const hci_cmd_t hci_read_link_quality; extern const hci_cmd_t hci_read_local_supported_commands; extern const hci_cmd_t hci_read_local_supported_features; extern const hci_cmd_t hci_read_local_version_information; @@ -433,6 +440,7 @@ extern const hci_cmd_t hci_remote_oob_data_request_negative_reply; extern const hci_cmd_t hci_remote_oob_data_request_reply; extern const hci_cmd_t hci_remote_oob_extended_data_request_reply; extern const hci_cmd_t hci_reset; +extern const hci_cmd_t hci_reset_failed_contact_counter; extern const hci_cmd_t hci_role_discovery; extern const hci_cmd_t hci_set_connection_encryption; extern const hci_cmd_t hci_set_controller_to_host_flow_control;