From b54c19e77510be4a6b6923915786febc17f5c135 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Fri, 30 Aug 2013 12:42:13 +0000 Subject: [PATCH] added hci commands for secure simple pairing --- include/btstack/hci_cmds.h | 7 +++++++ src/hci_cmds.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/include/btstack/hci_cmds.h b/include/btstack/hci_cmds.h index 268f2fbf5..251f5b449 100644 --- a/include/btstack/hci_cmds.h +++ b/include/btstack/hci_cmds.h @@ -296,6 +296,8 @@ extern const hci_cmd_t hci_delete_stored_link_key; extern const hci_cmd_t hci_disconnect; extern const hci_cmd_t hci_host_buffer_size; extern const hci_cmd_t hci_inquiry; +extern const hci_cmd_t hci_io_capability_request_reply; +extern const hci_cmd_t hci_io_capability_request_negative_reply; extern const hci_cmd_t hci_inquiry_cancel; extern const hci_cmd_t hci_link_key_request_negative_reply; extern const hci_cmd_t hci_link_key_request_reply; @@ -312,12 +314,17 @@ extern const hci_cmd_t hci_read_num_broadcast_retransmissions; extern const hci_cmd_t hci_reject_connection_request; extern const hci_cmd_t hci_remote_name_request; extern const hci_cmd_t hci_remote_name_request_cancel; +extern const hci_cmd_t hci_remote_oob_data_request_negative_reply; extern const hci_cmd_t hci_reset; extern const hci_cmd_t hci_role_discovery; extern const hci_cmd_t hci_set_event_mask; extern const hci_cmd_t hci_set_connection_encryption; extern const hci_cmd_t hci_sniff_mode; extern const hci_cmd_t hci_switch_role_command; +extern const hci_cmd_t hci_user_confirmation_request_negative_reply; +extern const hci_cmd_t hci_user_confirmation_request_reply; +extern const hci_cmd_t hci_user_passkey_request_negative_reply; +extern const hci_cmd_t hci_user_passkey_request_reply; extern const hci_cmd_t hci_write_authentication_enable; extern const hci_cmd_t hci_write_class_of_device; extern const hci_cmd_t hci_write_extended_inquiry_response; diff --git a/src/hci_cmds.c b/src/hci_cmds.c index 39e559507..fd2539246 100644 --- a/src/hci_cmds.c +++ b/src/hci_cmds.c @@ -248,6 +248,35 @@ const hci_cmd_t hci_remote_name_request_cancel = { OPCODE(OGF_LINK_CONTROL, 0x1A), "B" // BD_ADDR }; +const hci_cmd_t hci_io_capability_request_reply = { +OPCODE(OGF_LINK_CONTROL, 0x2b), "B111" +// BD_ADDR, IO_Capability, OOB_Data_Present, Authentication_ Requirements +}; +const hci_cmd_t hci_user_confirmation_request_reply = { +OPCODE(OGF_LINK_CONTROL, 0x2c), "B" +// BD_ADDR +}; +const hci_cmd_t hci_user_confirmation_request_negative_reply = { +OPCODE(OGF_LINK_CONTROL, 0x2d), "B" +// BD_ADDR +}; +const hci_cmd_t hci_user_passkey_request_reply = { +OPCODE(OGF_LINK_CONTROL, 0x2e), "B4" +// BD_ADDR, Numeric value (passkey) entered by user (decimal 000000 - 999999). +}; +const hci_cmd_t hci_user_passkey_request_negative_reply = { +OPCODE(OGF_LINK_CONTROL, 0x2f), "B" +// BD_ADDR +}; +const hci_cmd_t hci_remote_oob_data_request_negative_reply = { +OPCODE(OGF_LINK_CONTROL, 0x33), "B" +// BD_ADDR +}; +const hci_cmd_t hci_io_capability_request_negative_reply = { +OPCODE(OGF_LINK_CONTROL, 0x34), "B1" +// BD_ADDR, Reason - Part D, Error codes +}; + /** * Link Policy Commands