hci: add commands for dealing with OOB data for classic pairing

This commit is contained in:
Matthias Ringwald 2016-11-16 11:02:21 +01:00
parent 2308e10812
commit 237daac54a
2 changed files with 28 additions and 2 deletions

View File

@ -62,7 +62,7 @@
* D: 8 byte data block * D: 8 byte data block
* E: Extended Inquiry Result * E: Extended Inquiry Result
* N: Name up to 248 chars, \0 terminated * N: Name up to 248 chars, \0 terminated
* P: 16 byte Pairing code * P: 16 byte data block. Pairing code, Simple Pairing Hash and Randomizer
* A: 31 bytes advertising data * A: 31 bytes advertising data
* S: Service Record (Data Element Sequence) * S: Service Record (Data Element Sequence)
* Q: 32 byte data block, e.g. for X and Y coordinates of P-256 public key * Q: 32 byte data block, e.g. for X and Y coordinates of P-256 public key
@ -386,6 +386,15 @@ const hci_cmd_t hci_user_passkey_request_negative_reply = {
OPCODE(OGF_LINK_CONTROL, 0x2f), "B" OPCODE(OGF_LINK_CONTROL, 0x2f), "B"
}; };
/**
* @param bd_addr
* @param c Simple Pairing Hash C
* @param r Simple Pairing Randomizer R
*/
const hci_cmd_t hci_remote_oob_data_request_reply = {
OPCODE(OGF_LINK_CONTROL, 0x30), "BPP"
};
/** /**
* @param bd_addr * @param bd_addr
*/ */
@ -677,6 +686,12 @@ const hci_cmd_t hci_write_simple_pairing_mode = {
OPCODE(OGF_CONTROLLER_BASEBAND, 0x56), "1" OPCODE(OGF_CONTROLLER_BASEBAND, 0x56), "1"
}; };
/**
*/
const hci_cmd_t hci_read_local_oob_data = {
OPCODE(OGF_CONTROLLER_BASEBAND, 0x57), ""
// return status, C, R
};
/** /**
* @param mode (0 = off, 1 = on) * @param mode (0 = off, 1 = on)
@ -701,6 +716,14 @@ OPCODE(OGF_CONTROLLER_BASEBAND, 0x6d), "11"
// return: status // return: status
}; };
/**
*/
const hci_cmd_t hci_read_local_extended_ob_data = {
OPCODE(OGF_CONTROLLER_BASEBAND, 0x7d), ""
// return status, C_192, R_192, R_256, C_256
};
/** /**
* Testing Commands * Testing Commands
*/ */

View File

@ -112,16 +112,19 @@ extern const hci_cmd_t hci_read_buffer_size;
extern const hci_cmd_t hci_read_le_host_supported; extern const hci_cmd_t hci_read_le_host_supported;
extern const hci_cmd_t hci_read_link_policy_settings; extern const hci_cmd_t hci_read_link_policy_settings;
extern const hci_cmd_t hci_read_link_supervision_timeout; extern const hci_cmd_t hci_read_link_supervision_timeout;
extern const hci_cmd_t hci_read_local_extended_oob_data;
extern const hci_cmd_t hci_read_local_name; extern const hci_cmd_t hci_read_local_name;
extern const hci_cmd_t hci_read_local_version_information; extern const hci_cmd_t hci_read_local_oob_data;
extern const hci_cmd_t hci_read_local_supported_commands; 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_supported_features;
extern const hci_cmd_t hci_read_local_version_information;
extern const hci_cmd_t hci_read_num_broadcast_retransmissions; extern const hci_cmd_t hci_read_num_broadcast_retransmissions;
extern const hci_cmd_t hci_read_remote_supported_features_command; extern const hci_cmd_t hci_read_remote_supported_features_command;
extern const hci_cmd_t hci_read_rssi; extern const hci_cmd_t hci_read_rssi;
extern const hci_cmd_t hci_reject_connection_request; 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;
extern const hci_cmd_t hci_remote_name_request_cancel; extern const hci_cmd_t hci_remote_name_request_cancel;
extern const hci_cmd_t hci_remote_oob_data_request_reply;
extern const hci_cmd_t hci_remote_oob_data_request_negative_reply; 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_reset;
extern const hci_cmd_t hci_role_discovery; extern const hci_cmd_t hci_role_discovery;