From af544609525a7899285b392ed0a976e2279cb20a Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Sat, 12 Dec 2009 20:21:18 +0000 Subject: [PATCH] support for hci_link_key_request_reply --- include/btstack/hci_cmds.h | 1 + src/hci_cmds.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/btstack/hci_cmds.h b/include/btstack/hci_cmds.h index 0877cc348..ed7457ccd 100644 --- a/include/btstack/hci_cmds.h +++ b/include/btstack/hci_cmds.h @@ -163,6 +163,7 @@ typedef enum { // HCI Commands - see hci_cmds.c for info on parameters extern hci_cmd_t hci_inquiry; extern hci_cmd_t hci_inquiry_cancel; +extern hci_cmd_t hci_link_key_request_reply; extern hci_cmd_t hci_link_key_request_negative_reply; extern hci_cmd_t hci_pin_code_request_reply; extern hci_cmd_t hci_authentication_requested; diff --git a/src/hci_cmds.c b/src/hci_cmds.c index d66e57e3d..03c876e56 100644 --- a/src/hci_cmds.c +++ b/src/hci_cmds.c @@ -98,7 +98,7 @@ uint16_t hci_create_cmd_internal(uint8_t *hci_cmd_buffer, hci_cmd_t *cmd, va_lis hci_cmd_buffer[pos++] = ptr[1]; hci_cmd_buffer[pos++] = ptr[0]; break; - case 'P': // c string passed as pascal string with leading 1-byte len + case 'P': // 16 byte PIN code or link key ptr = va_arg(argptr, uint8_t *); memcpy(&hci_cmd_buffer[pos], ptr, 16); pos += 16; @@ -162,6 +162,10 @@ hci_cmd_t hci_accept_connection_request = { OPCODE(OGF_LINK_CONTROL, 0x09), "B1" // BD_ADDR, Role: become master, stay slave }; +hci_cmd_t hci_link_key_request_reply = { +OPCODE(OGF_LINK_CONTROL, 0x0b), "BP" +// BD_ADDR, LINK_KEY +}; hci_cmd_t hci_link_key_request_negative_reply = { OPCODE(OGF_LINK_CONTROL, 0x0c), "B" // BD_ADDR