support for hci_link_key_request_reply

This commit is contained in:
matthias.ringwald 2009-12-12 20:21:18 +00:00
parent 659cd3d196
commit af54460952
2 changed files with 6 additions and 1 deletions

View File

@ -163,6 +163,7 @@ typedef enum {
// HCI Commands - see hci_cmds.c for info on parameters // HCI Commands - see hci_cmds.c for info on parameters
extern hci_cmd_t hci_inquiry; extern hci_cmd_t hci_inquiry;
extern hci_cmd_t hci_inquiry_cancel; 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_link_key_request_negative_reply;
extern hci_cmd_t hci_pin_code_request_reply; extern hci_cmd_t hci_pin_code_request_reply;
extern hci_cmd_t hci_authentication_requested; extern hci_cmd_t hci_authentication_requested;

View File

@ -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[1];
hci_cmd_buffer[pos++] = ptr[0]; hci_cmd_buffer[pos++] = ptr[0];
break; 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 *); ptr = va_arg(argptr, uint8_t *);
memcpy(&hci_cmd_buffer[pos], ptr, 16); memcpy(&hci_cmd_buffer[pos], ptr, 16);
pos += 16; pos += 16;
@ -162,6 +162,10 @@ hci_cmd_t hci_accept_connection_request = {
OPCODE(OGF_LINK_CONTROL, 0x09), "B1" OPCODE(OGF_LINK_CONTROL, 0x09), "B1"
// BD_ADDR, Role: become master, stay slave // 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 = { hci_cmd_t hci_link_key_request_negative_reply = {
OPCODE(OGF_LINK_CONTROL, 0x0c), "B" OPCODE(OGF_LINK_CONTROL, 0x0c), "B"
// BD_ADDR // BD_ADDR