Spracherkennung für: .pdl vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
little_endian_packets
custom_field Address : 48 "hci/"
enum Enable : 8 {
DISABLED = 0x00,
ENABLED = 0x01,
}
// HCI ACL Packets
enum PacketBoundaryFlag : 2 {
FIRST_NON_AUTOMATICALLY_FLUSHABLE = 0,
CONTINUING_FRAGMENT = 1,
FIRST_AUTOMATICALLY_FLUSHABLE = 2,
}
enum BroadcastFlag : 2 {
POINT_TO_POINT = 0,
ACTIVE_PERIPHERAL_BROADCAST = 1,
}
packet Acl {
handle : 12,
packet_boundary_flag : PacketBoundaryFlag,
broadcast_flag : BroadcastFlag,
_size_(_payload_) : 16,
_payload_,
}
// HCI SCO Packets
enum PacketStatusFlag : 2 {
CORRECTLY_RECEIVED = 0,
POSSIBLY_INCOMPLETE = 1,
NO_DATA_RECEIVED = 2,
PARTIALLY_LOST = 3,
}
packet Sco {
handle : 12,
packet_status_flag : PacketStatusFlag,
_reserved_ : 2, // BroadcastFlag
_size_(data) : 8,
data : 8[],
}
// HCI Command Packets
enum OpCode : 16 {
NONE = 0x0000,
// LINK_CONTROL
INQUIRY = 0x0401,
INQUIRY_CANCEL = 0x0402,
PERIODIC_INQUIRY_MODE = 0x0403,
EXIT_PERIODIC_INQUIRY_MODE = 0x0404,
CREATE_CONNECTION = 0x0405,
DISCONNECT = 0x0406,
ADD_SCO_CONNECTION = 0x0407,
CREATE_CONNECTION_CANCEL = 0x0408,
ACCEPT_CONNECTION_REQUEST = 0x0409,
REJECT_CONNECTION_REQUEST = 0x040A,
LINK_KEY_REQUEST_REPLY = 0x040B,
LINK_KEY_REQUEST_NEGATIVE_REPLY = 0x040C,
PIN_CODE_REQUEST_REPLY = 0x040D,
PIN_CODE_REQUEST_NEGATIVE_REPLY = 0x040E,
CHANGE_CONNECTION_PACKET_TYPE = 0x040F,
AUTHENTICATION_REQUESTED = 0x0411,
SET_CONNECTION_ENCRYPTION = 0x0413,
CHANGE_CONNECTION_LINK_KEY = 0x0415,
CENTRAL_LINK_KEY = 0x0417,
REMOTE_NAME_REQUEST = 0x0419,
REMOTE_NAME_REQUEST_CANCEL = 0x041A,
READ_REMOTE_SUPPORTED_FEATURES = 0x041B,
READ_REMOTE_EXTENDED_FEATURES = 0x041C,
READ_REMOTE_VERSION_INFORMATION = 0x041D,
READ_CLOCK_OFFSET = 0x041F,
READ_LMP_HANDLE = 0x0420,
SETUP_SYNCHRONOUS_CONNECTION = 0x0428,
ACCEPT_SYNCHRONOUS_CONNECTION = 0x0429,
REJECT_SYNCHRONOUS_CONNECTION = 0x042A,
IO_CAPABILITY_REQUEST_REPLY = 0x042B,
USER_CONFIRMATION_REQUEST_REPLY = 0x042C,
USER_CONFIRMATION_REQUEST_NEGATIVE_REPLY = 0x042D,
USER_PASSKEY_REQUEST_REPLY = 0x042E,
USER_PASSKEY_REQUEST_NEGATIVE_REPLY = 0x042F,
REMOTE_OOB_DATA_REQUEST_REPLY = 0x0430,
REMOTE_OOB_DATA_REQUEST_NEGATIVE_REPLY = 0x0433,
IO_CAPABILITY_REQUEST_NEGATIVE_REPLY = 0x0434,
ENHANCED_SETUP_SYNCHRONOUS_CONNECTION = 0x043D,
ENHANCED_ACCEPT_SYNCHRONOUS_CONNECTION = 0x043E,
TRUNCATED_PAGE = 0x043F,
TRUNCATED_PAGE_CANCEL = 0x0440,
SET_CONNECTIONLESS_PERIPHERAL_BROADCAST = 0x0441,
SET_CONNECTIONLESS_PERIPHERAL_BROADCAST_RECEIVE = 0x0442,
START_SYNCHRONIZATION_TRAIN = 0x0443,
RECEIVE_SYNCHRONIZATION_TRAIN = 0x0444,
REMOTE_OOB_EXTENDED_DATA_REQUEST_REPLY = 0x0445,
// LINK_POLICY
HOLD_MODE = 0x0801,
SNIFF_MODE = 0x0803,
EXIT_SNIFF_MODE = 0x0804,
QOS_SETUP = 0x0807,
ROLE_DISCOVERY = 0x0809,
SWITCH_ROLE = 0x080B,
READ_LINK_POLICY_SETTINGS = 0x080C,
WRITE_LINK_POLICY_SETTINGS = 0x080D,
READ_DEFAULT_LINK_POLICY_SETTINGS = 0x080E,
WRITE_DEFAULT_LINK_POLICY_SETTINGS = 0x080F,
FLOW_SPECIFICATION = 0x0810,
SNIFF_SUBRATING = 0x0811,
// CONTROLLER_AND_BASEBAND
SET_EVENT_MASK = 0x0C01,
RESET = 0x0C03,
SET_EVENT_FILTER = 0x0C05,
FLUSH = 0x0C08,
READ_PIN_TYPE = 0x0C09,
WRITE_PIN_TYPE = 0x0C0A,
READ_STORED_LINK_KEY = 0x0C0D,
WRITE_STORED_LINK_KEY = 0x0C11,
DELETE_STORED_LINK_KEY = 0x0C12,
WRITE_LOCAL_NAME = 0x0C13,
READ_LOCAL_NAME = 0x0C14,
READ_CONNECTION_ACCEPT_TIMEOUT = 0x0C15,
WRITE_CONNECTION_ACCEPT_TIMEOUT = 0x0C16,
READ_PAGE_TIMEOUT = 0x0C17,
WRITE_PAGE_TIMEOUT = 0x0C18,
READ_SCAN_ENABLE = 0x0C19,
WRITE_SCAN_ENABLE = 0x0C1A,
READ_PAGE_SCAN_ACTIVITY = 0x0C1B,
WRITE_PAGE_SCAN_ACTIVITY = 0x0C1C,
READ_INQUIRY_SCAN_ACTIVITY = 0x0C1D,
WRITE_INQUIRY_SCAN_ACTIVITY = 0x0C1E,
READ_AUTHENTICATION_ENABLE = 0x0C1F,
WRITE_AUTHENTICATION_ENABLE = 0x0C20,
READ_CLASS_OF_DEVICE = 0x0C23,
WRITE_CLASS_OF_DEVICE = 0x0C24,
READ_VOICE_SETTING = 0x0C25,
WRITE_VOICE_SETTING = 0x0C26,
READ_AUTOMATIC_FLUSH_TIMEOUT = 0x0C27,
WRITE_AUTOMATIC_FLUSH_TIMEOUT = 0x0C28,
READ_NUM_BROADCAST_RETRANSMITS = 0x0C29,
WRITE_NUM_BROADCAST_RETRANSMITS = 0x0C2A,
READ_HOLD_MODE_ACTIVITY = 0x0C2B,
WRITE_HOLD_MODE_ACTIVITY = 0x0C2C,
READ_TRANSMIT_POWER_LEVEL = 0x0C2D,
READ_SYNCHRONOUS_FLOW_CONTROL_ENABLE = 0x0C2E,
WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE = 0x0C2F,
SET_CONTROLLER_TO_HOST_FLOW_CONTROL = 0x0C31,
HOST_BUFFER_SIZE = 0x0C33,
HOST_NUMBER_OF_COMPLETED_PACKETS = 0x0C35,
READ_LINK_SUPERVISION_TIMEOUT = 0x0C36,
WRITE_LINK_SUPERVISION_TIMEOUT = 0x0C37,
READ_NUMBER_OF_SUPPORTED_IAC = 0x0C38,
READ_CURRENT_IAC_LAP = 0x0C39,
WRITE_CURRENT_IAC_LAP = 0x0C3A,
SET_AFH_HOST_CHANNEL_CLASSIFICATION = 0x0C3F,
READ_INQUIRY_SCAN_TYPE = 0x0C42,
WRITE_INQUIRY_SCAN_TYPE = 0x0C43,
READ_INQUIRY_MODE = 0x0C44,
WRITE_INQUIRY_MODE = 0x0C45,
READ_PAGE_SCAN_TYPE = 0x0C46,
WRITE_PAGE_SCAN_TYPE = 0x0C47,
READ_AFH_CHANNEL_ASSESSMENT_MODE = 0x0C48,
WRITE_AFH_CHANNEL_ASSESSMENT_MODE = 0x0C49,
READ_EXTENDED_INQUIRY_RESPONSE = 0x0C51,
WRITE_EXTENDED_INQUIRY_RESPONSE = 0x0C52,
REFRESH_ENCRYPTION_KEY = 0x0C53,
READ_SIMPLE_PAIRING_MODE = 0x0C55,
WRITE_SIMPLE_PAIRING_MODE = 0x0C56,
READ_LOCAL_OOB_DATA = 0x0C57,
READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL = 0x0C58,
WRITE_INQUIRY_TRANSMIT_POWER_LEVEL = 0x0C59,
READ_DEFAULT_ERRONEOUS_DATA_REPORTING = 0x0C5A,
WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING = 0x0C5B,
ENHANCED_FLUSH = 0x0C5F,
SEND_KEYPRESS_NOTIFICATION = 0x0C60,
SET_EVENT_MASK_PAGE_2 = 0x0C63,
READ_FLOW_CONTROL_MODE = 0x0C66,
WRITE_FLOW_CONTROL_MODE = 0x0C67,
READ_ENHANCED_TRANSMIT_POWER_LEVEL = 0x0C68,
READ_LE_HOST_SUPPORT = 0x0C6C,
WRITE_LE_HOST_SUPPORT = 0x0C6D,
SET_MWS_CHANNEL_PARAMETERS = 0x0C6E,
SET_EXTERNAL_FRAME_CONFIGURATION = 0x0C6F,
SET_MWS_SIGNALING = 0x0C70,
SET_MWS_TRANSPORT_LAYER = 0x0C71,
SET_MWS_SCAN_FREQUENCY_TABLE = 0x0C72,
SET_MWS_PATTERN_CONFIGURATION = 0x0C73,
SET_RESERVED_LT_ADDR = 0x0C74,
DELETE_RESERVED_LT_ADDR = 0x0C75,
SET_CONNECTIONLESS_PERIPHERAL_BROADCAST_DATA = 0x0C76,
READ_SYNCHRONIZATION_TRAIN_PARAMETERS = 0x0C77,
WRITE_SYNCHRONIZATION_TRAIN_PARAMETERS = 0x0C78,
READ_SECURE_CONNECTIONS_HOST_SUPPORT = 0x0C79,
WRITE_SECURE_CONNECTIONS_HOST_SUPPORT = 0x0C7A,
READ_AUTHENTICATED_PAYLOAD_TIMEOUT = 0x0C7B,
WRITE_AUTHENTICATED_PAYLOAD_TIMEOUT = 0x0C7C,
READ_LOCAL_OOB_EXTENDED_DATA = 0x0C7D,
READ_EXTENDED_PAGE_TIMEOUT = 0x0C7E,
WRITE_EXTENDED_PAGE_TIMEOUT = 0x0C7F,
READ_EXTENDED_INQUIRY_LENGTH = 0x0C80,
WRITE_EXTENDED_INQUIRY_LENGTH = 0x0C81,
SET_ECOSYSTEM_BASE_INTERVAL = 0x0C82,
CONFIGURE_DATA_PATH = 0x0C83,
SET_MIN_ENCRYPTION_KEY_SIZE = 0x0C84,
// INFORMATIONAL_PARAMETERS
READ_LOCAL_VERSION_INFORMATION = 0x1001,
READ_LOCAL_SUPPORTED_COMMANDS = 0x1002,
READ_LOCAL_SUPPORTED_FEATURES = 0x1003,
READ_LOCAL_EXTENDED_FEATURES = 0x1004,
READ_BUFFER_SIZE = 0x1005,
READ_BD_ADDR = 0x1009,
READ_DATA_BLOCK_SIZE = 0x100A,
READ_LOCAL_SUPPORTED_CODECS_V1 = 0x100B,
READ_LOCAL_SIMPLE_PAIRING_OPTIONS = 0x100C,
READ_LOCAL_SUPPORTED_CODECS_V2 = 0x100D,
READ_LOCAL_SUPPORTED_CODEC_CAPABILITIES = 0x100E,
READ_LOCAL_SUPPORTED_CONTROLLER_DELAY = 0x100F,
// STATUS_PARAMETERS
READ_FAILED_CONTACT_COUNTER = 0x1401,
RESET_FAILED_CONTACT_COUNTER = 0x1402,
READ_LINK_QUALITY = 0x1403,
READ_RSSI = 0x1405,
READ_AFH_CHANNEL_MAP = 0x1406,
READ_CLOCK = 0x1407,
READ_ENCRYPTION_KEY_SIZE = 0x1408,
GET_MWS_TRANSPORT_LAYER_CONFIGURATION = 0x140C,
SET_TRIGGERED_CLOCK_CAPTURE = 0x140D,
// TESTING
READ_LOOPBACK_MODE = 0x1801,
WRITE_LOOPBACK_MODE = 0x1802,
ENABLE_IMPLEMENTATION_UNDER_TEST_MODE = 0x1803,
WRITE_SIMPLE_PAIRING_DEBUG_MODE = 0x1804,
WRITE_SECURE_CONNECTIONS_TEST_MODE = 0x180A,
// LE_CONTROLLER
LE_SET_EVENT_MASK = 0x2001,
LE_READ_BUFFER_SIZE_V1 = 0x2002,
LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0 = 0x2003,
LE_SET_RANDOM_ADDRESS = 0x2005,
LE_SET_ADVERTISING_PARAMETERS = 0x2006,
LE_READ_ADVERTISING_PHYSICAL_CHANNEL_TX_POWER = 0x2007,
LE_SET_ADVERTISING_DATA = 0x2008,
LE_SET_SCAN_RESPONSE_DATA = 0x2009,
LE_SET_ADVERTISING_ENABLE = 0x200A,
LE_SET_SCAN_PARAMETERS = 0x200B,
LE_SET_SCAN_ENABLE = 0x200C,
LE_CREATE_CONNECTION = 0x200D,
LE_CREATE_CONNECTION_CANCEL = 0x200E,
LE_READ_FILTER_ACCEPT_LIST_SIZE = 0x200F,
LE_CLEAR_FILTER_ACCEPT_LIST = 0x2010,
LE_ADD_DEVICE_TO_FILTER_ACCEPT_LIST = 0x2011,
LE_REMOVE_DEVICE_FROM_FILTER_ACCEPT_LIST = 0x2012,
LE_CONNECTION_UPDATE = 0x2013,
LE_SET_HOST_CHANNEL_CLASSIFICATION = 0x2014,
LE_READ_CHANNEL_MAP = 0x2015,
LE_READ_REMOTE_FEATURES_PAGE_0 = 0x2016,
LE_ENCRYPT = 0x2017,
LE_RAND = 0x2018,
LE_START_ENCRYPTION = 0x2019,
LE_LONG_TERM_KEY_REQUEST_REPLY = 0x201A,
LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY = 0x201B,
LE_READ_SUPPORTED_STATES = 0x201C,
LE_RECEIVER_TEST_V1 = 0x201D,
LE_TRANSMITTER_TEST_V1 = 0x201E,
LE_TEST_END = 0x201F,
LE_REMOTE_CONNECTION_PARAMETER_REQUEST_REPLY = 0x2020,
LE_REMOTE_CONNECTION_PARAMETER_REQUEST_NEGATIVE_REPLY = 0x2021,
LE_SET_DATA_LENGTH = 0x2022,
LE_READ_SUGGESTED_DEFAULT_DATA_LENGTH = 0x2023,
LE_WRITE_SUGGESTED_DEFAULT_DATA_LENGTH = 0x2024,
LE_READ_LOCAL_P_256_PUBLIC_KEY = 0x2025,
LE_GENERATE_DHKEY_V1 = 0x2026,
LE_ADD_DEVICE_TO_RESOLVING_LIST = 0x2027,
LE_REMOVE_DEVICE_FROM_RESOLVING_LIST = 0x2028,
LE_CLEAR_RESOLVING_LIST = 0x2029,
LE_READ_RESOLVING_LIST_SIZE = 0x202A,
LE_READ_PEER_RESOLVABLE_ADDRESS = 0x202B,
LE_READ_LOCAL_RESOLVABLE_ADDRESS = 0x202C,
LE_SET_ADDRESS_RESOLUTION_ENABLE = 0x202D,
LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT = 0x202E,
LE_READ_MAXIMUM_DATA_LENGTH = 0x202F,
LE_READ_PHY = 0x2030,
LE_SET_DEFAULT_PHY = 0x2031,
LE_SET_PHY = 0x2032,
LE_RECEIVER_TEST_V2 = 0x2033,
LE_TRANSMITTER_TEST_V2 = 0x2034,
LE_SET_ADVERTISING_SET_RANDOM_ADDRESS = 0x2035,
LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1 = 0x2036,
LE_SET_EXTENDED_ADVERTISING_DATA = 0x2037,
LE_SET_EXTENDED_SCAN_RESPONSE_DATA = 0x2038,
LE_SET_EXTENDED_ADVERTISING_ENABLE = 0x2039,
LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH = 0x203A,
LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS = 0x203B,
LE_REMOVE_ADVERTISING_SET = 0x203C,
LE_CLEAR_ADVERTISING_SETS = 0x203D,
LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1 = 0x203E,
LE_SET_PERIODIC_ADVERTISING_DATA = 0x203F,
LE_SET_PERIODIC_ADVERTISING_ENABLE = 0x2040,
LE_SET_EXTENDED_SCAN_PARAMETERS = 0x2041,
LE_SET_EXTENDED_SCAN_ENABLE = 0x2042,
LE_EXTENDED_CREATE_CONNECTION_V1 = 0x2043,
LE_PERIODIC_ADVERTISING_CREATE_SYNC = 0x2044,
LE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL = 0x2045,
LE_PERIODIC_ADVERTISING_TERMINATE_SYNC = 0x2046,
LE_ADD_DEVICE_TO_PERIODIC_ADVERTISER_LIST = 0x2047,
LE_REMOVE_DEVICE_FROM_PERIODIC_ADVERTISER_LIST = 0x2048,
LE_CLEAR_PERIODIC_ADVERTISER_LIST = 0x2049,
LE_READ_PERIODIC_ADVERTISER_LIST_SIZE = 0x204A,
LE_READ_TRANSMIT_POWER = 0x204B,
LE_READ_RF_PATH_COMPENSATION_POWER = 0x204C,
LE_WRITE_RF_PATH_COMPENSATION_POWER = 0x204D,
LE_SET_PRIVACY_MODE = 0x204E,
LE_RECEIVER_TEST_V3 = 0x204F,
LE_TRANSMITTER_TEST_V3 = 0x2050,
LE_SET_CONNECTIONLESS_CTE_TRANSMIT_PARAMETERS = 0x2051,
LE_SET_CONNECTIONLESS_CTE_TRANSMIT_ENABLE = 0x2052,
LE_SET_CONNECTIONLESS_IQ_SAMPLING_ENABLE = 0x2053,
LE_SET_CONNECTION_CTE_RECEIVE_PARAMETERS = 0x2054,
LE_SET_CONNECTION_CTE_TRANSMIT_PARAMETERS = 0x2055,
LE_CONNECTION_CTE_REQUEST_ENABLE = 0x2056,
LE_CONNECTION_CTE_RESPONSE_ENABLE = 0x2057,
LE_READ_ANTENNA_INFORMATION = 0x2058,
LE_SET_PERIODIC_ADVERTISING_RECEIVE_ENABLE = 0x2059,
LE_PERIODIC_ADVERTISING_SYNC_TRANSFER = 0x205A,
LE_PERIODIC_ADVERTISING_SET_INFO_TRANSFER = 0x205B,
LE_SET_PERIODIC_ADVERTISING_SYNC_TRANSFER_PARAMETERS = 0x205C,
LE_SET_DEFAULT_PERIODIC_ADVERTISING_SYNC_TRANSFER_PARAMETERS = 0x205D,
LE_GENERATE_DHKEY_V2 = 0x205E,
LE_MODIFY_SLEEP_CLOCK_ACCURACY = 0x205F,
LE_READ_BUFFER_SIZE_V2 = 0x2060,
LE_READ_ISO_TX_SYNC = 0x2061,
LE_SET_CIG_PARAMETERS = 0x2062,
LE_SET_CIG_PARAMETERS_TEST = 0x2063,
LE_CREATE_CIS = 0x2064,
LE_REMOVE_CIG = 0x2065,
LE_ACCEPT_CIS_REQUEST = 0x2066,
LE_REJECT_CIS_REQUEST = 0x2067,
LE_CREATE_BIG = 0x2068,
LE_CREATE_BIG_TEST = 0x2069,
LE_TERMINATE_BIG = 0x206A,
LE_BIG_CREATE_SYNC = 0x206B,
LE_BIG_TERMINATE_SYNC = 0x206C,
LE_REQUEST_PEER_SCA = 0x206D,
LE_SETUP_ISO_DATA_PATH = 0x206E,
LE_REMOVE_ISO_DATA_PATH = 0x206F,
LE_ISO_TRANSMIT_TEST = 0x2070,
LE_ISO_RECEIVE_TEST = 0x2071,
LE_ISO_READ_TEST_COUNTERS = 0x2072,
LE_ISO_TEST_END = 0x2073,
LE_SET_HOST_FEATURE_V1 = 0x2074,
LE_READ_ISO_LINK_QUALITY = 0x2075,
LE_ENHANCED_READ_TRANSMIT_POWER_LEVEL = 0x2076,
LE_READ_REMOTE_TRANSMIT_POWER_LEVEL = 0x2077,
LE_SET_PATH_LOSS_REPORTING_PARAMETERS = 0x2078,
LE_SET_PATH_LOSS_REPORTING_ENABLE = 0x2079,
LE_SET_TRANSMIT_POWER_REPORTING_ENABLE = 0x207A,
LE_TRANSMITTER_TEST_V4 = 0x207B,
LE_SET_DATA_RELATED_ADDRESS_CHANGES = 0x207C,
LE_SET_DEFAULT_SUBRATE = 0x207D,
LE_SUBRATE_REQUEST = 0x207E,
LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V2 = 0x207F,
LE_SET_DECISION_DATA = 0x2080,
LE_SET_DECISION_INSTRUCTIONS = 0x2081,
LE_SET_PERIODIC_ADVERTISING_SUBEVENT_DATA = 0x2082,
LE_SET_PERIODIC_ADVERTISING_RESPONSE_DATA = 0x2083,
LE_SET_PERIODIC_SYNC_SUBEVENT = 0x2084,
LE_EXTENDED_CREATE_CONNECTION_V2 = 0x2085,
LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V2 = 0x2086,
LE_READ_ALL_LOCAL_SUPPORTED_FEATURES = 0x2087,
LE_READ_ALL_REMOTE_FEATURES = 0x2088,
LE_CS_READ_LOCAL_SUPPORTED_CAPABILITIES = 0x2089,
LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES = 0x208A,
LE_CS_WRITE_CACHED_REMOTE_SUPPORTED_CAPABILITIES = 0x208B,
LE_CS_SECURITY_ENABLE = 0x208C,
LE_CS_SET_DEFAULT_SETTINGS = 0x208D,
LE_CS_READ_REMOTE_FAE_TABLE = 0x208E,
LE_CS_WRITE_CACHED_REMOTE_FAE_TABLE = 0x208F,
LE_CS_CREATE_CONFIG = 0x2090,
LE_CS_REMOVE_CONFIG = 0x2091,
LE_CS_SET_CHANNEL_CLASSIFICATION = 0x2092,
LE_CS_SET_PROCEDURE_PARAMETERS = 0x2093,
LE_CS_PROCEDURE_ENABLE = 0x2094,
LE_CS_TEST = 0x2095,
LE_CS_TEST_END = 0x2096,
LE_SET_HOST_FEATURE_V2 = 0x2097,
LE_ADD_DEVICE_TO_MONITORED_ADVERTISERS_LIST = 0x2098,
LE_REMOVE_DEVICE_FROM_MONITORED_ADVERTISERS_LIST = 0x2099,
LE_CLEAR_MONITORED_ADVERTISERS_LIST = 0x209A,
LE_READ_MONITORED_ADVERTISERS_LIST_SIZE = 0x209B,
LE_ENABLE_MONITORING_ADVERTISERS = 0x209C,
LE_FRAME_SPACE_UPDATE = 0x209D,
// VENDOR_SPECIFIC
// Reserved opcode for sending CSR test commands.
// The test commands are used by the PTS tool to control
// the local controller capabilities.
CSR_OPCODE = 0xFC00,
// Reserved opcode for sending RootCanal test commands.
// The test commands may be used to trigger specific events in the
// controller for test purposes.
ROOTCANAL_OPCODE = 0xFC01,
// MSFT_OPCODE_xxxx below is needed for the tests.
MSFT_OPCODE_INTEL = 0xFC1E,
INTEL_DDC_CONFIG_READ = 0xFC8C,
INTEL_DDC_CONFIG_WRITE = 0xFC8B,
LE_GET_VENDOR_CAPABILITIES = 0xFD53,
LE_BATCH_SCAN = 0xFD56,
LE_APCF = 0xFD57,
LE_GET_CONTROLLER_ACTIVITY_ENERGY_INFO = 0xFD59,
LE_EX_SET_SCAN_PARAMETERS = 0xFD5A,
GET_CONTROLLER_DEBUG_INFO = 0xFD5B,
// MSFT_OPCODE_xxxx below are needed for the tests.
MSFT_OPCODE_MEDIATEK = 0xFD30,
MSFT_OPCODE_QUALCOMM = 0xFD70,
UNKNOWN_OPCODE = ..,
}
// For mapping Local Supported Commands command
// Value = Octet * 10 + bit
enum OpCodeIndex : 16 {
INQUIRY = 0,
INQUIRY_CANCEL = 1,
PERIODIC_INQUIRY_MODE = 2,
EXIT_PERIODIC_INQUIRY_MODE = 3,
CREATE_CONNECTION = 4,
DISCONNECT = 5,
ADD_SCO_CONNECTION = 6,
CREATE_CONNECTION_CANCEL = 7,
ACCEPT_CONNECTION_REQUEST = 10,
REJECT_CONNECTION_REQUEST = 11,
LINK_KEY_REQUEST_REPLY = 12,
LINK_KEY_REQUEST_NEGATIVE_REPLY = 13,
PIN_CODE_REQUEST_REPLY = 14,
PIN_CODE_REQUEST_NEGATIVE_REPLY = 15,
CHANGE_CONNECTION_PACKET_TYPE = 16,
AUTHENTICATION_REQUESTED = 17,
SET_CONNECTION_ENCRYPTION = 20,
CHANGE_CONNECTION_LINK_KEY = 21,
CENTRAL_LINK_KEY = 22,
REMOTE_NAME_REQUEST = 23,
REMOTE_NAME_REQUEST_CANCEL = 24,
READ_REMOTE_SUPPORTED_FEATURES = 25,
READ_REMOTE_EXTENDED_FEATURES = 26,
READ_REMOTE_VERSION_INFORMATION = 27,
READ_CLOCK_OFFSET = 30,
READ_LMP_HANDLE = 31,
HOLD_MODE = 41,
SNIFF_MODE = 42,
EXIT_SNIFF_MODE = 43,
QOS_SETUP = 46,
ROLE_DISCOVERY = 47,
SWITCH_ROLE = 50,
READ_LINK_POLICY_SETTINGS = 51,
WRITE_LINK_POLICY_SETTINGS = 52,
READ_DEFAULT_LINK_POLICY_SETTINGS = 53,
WRITE_DEFAULT_LINK_POLICY_SETTINGS = 54,
FLOW_SPECIFICATION = 55,
SET_EVENT_MASK = 56,
RESET = 57,
SET_EVENT_FILTER = 60,
FLUSH = 61,
READ_PIN_TYPE = 62,
WRITE_PIN_TYPE = 63,
READ_STORED_LINK_KEY = 65,
WRITE_STORED_LINK_KEY = 66,
DELETE_STORED_LINK_KEY = 67,
WRITE_LOCAL_NAME = 70,
READ_LOCAL_NAME = 71,
READ_CONNECTION_ACCEPT_TIMEOUT = 72,
WRITE_CONNECTION_ACCEPT_TIMEOUT = 73,
READ_PAGE_TIMEOUT = 74,
WRITE_PAGE_TIMEOUT = 75,
READ_SCAN_ENABLE = 76,
WRITE_SCAN_ENABLE = 77,
READ_PAGE_SCAN_ACTIVITY = 80,
WRITE_PAGE_SCAN_ACTIVITY = 81,
READ_INQUIRY_SCAN_ACTIVITY = 82,
WRITE_INQUIRY_SCAN_ACTIVITY = 83,
READ_AUTHENTICATION_ENABLE = 84,
WRITE_AUTHENTICATION_ENABLE = 85,
READ_CLASS_OF_DEVICE = 90,
WRITE_CLASS_OF_DEVICE = 91,
READ_VOICE_SETTING = 92,
WRITE_VOICE_SETTING = 93,
READ_AUTOMATIC_FLUSH_TIMEOUT = 94,
WRITE_AUTOMATIC_FLUSH_TIMEOUT = 95,
READ_NUM_BROADCAST_RETRANSMITS = 96,
WRITE_NUM_BROADCAST_RETRANSMITS = 97,
READ_HOLD_MODE_ACTIVITY = 100,
WRITE_HOLD_MODE_ACTIVITY = 101,
READ_TRANSMIT_POWER_LEVEL = 102,
READ_SYNCHRONOUS_FLOW_CONTROL_ENABLE = 103,
WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE = 104,
SET_CONTROLLER_TO_HOST_FLOW_CONTROL = 105,
HOST_BUFFER_SIZE = 106,
HOST_NUMBER_OF_COMPLETED_PACKETS = 107,
READ_LINK_SUPERVISION_TIMEOUT = 110,
WRITE_LINK_SUPERVISION_TIMEOUT = 111,
READ_NUMBER_OF_SUPPORTED_IAC = 112,
READ_CURRENT_IAC_LAP = 113,
WRITE_CURRENT_IAC_LAP = 114,
SET_AFH_HOST_CHANNEL_CLASSIFICATION = 121,
LE_CS_READ_REMOTE_FAE_TABLE = 122,
LE_CS_WRITE_CACHED_REMOTE_FAE_TABLE = 123,
READ_INQUIRY_SCAN_TYPE = 124,
WRITE_INQUIRY_SCAN_TYPE = 125,
READ_INQUIRY_MODE = 126,
WRITE_INQUIRY_MODE = 127,
READ_PAGE_SCAN_TYPE = 130,
WRITE_PAGE_SCAN_TYPE = 131,
READ_AFH_CHANNEL_ASSESSMENT_MODE = 132,
WRITE_AFH_CHANNEL_ASSESSMENT_MODE = 133,
READ_LOCAL_VERSION_INFORMATION = 143,
READ_LOCAL_SUPPORTED_FEATURES = 145,
READ_LOCAL_EXTENDED_FEATURES = 146,
READ_BUFFER_SIZE = 147,
READ_BD_ADDR = 151,
READ_FAILED_CONTACT_COUNTER = 152,
RESET_FAILED_CONTACT_COUNTER = 153,
READ_LINK_QUALITY = 154,
READ_RSSI = 155,
READ_AFH_CHANNEL_MAP = 156,
READ_CLOCK = 157,
READ_LOOPBACK_MODE = 160,
WRITE_LOOPBACK_MODE = 161,
ENABLE_IMPLEMENTATION_UNDER_TEST_MODE = 162,
SETUP_SYNCHRONOUS_CONNECTION = 163,
ACCEPT_SYNCHRONOUS_CONNECTION = 164,
REJECT_SYNCHRONOUS_CONNECTION = 165,
LE_CS_CREATE_CONFIG = 166,
LE_CS_REMOVE_CONFIG = 167,
READ_EXTENDED_INQUIRY_RESPONSE = 170,
WRITE_EXTENDED_INQUIRY_RESPONSE = 171,
REFRESH_ENCRYPTION_KEY = 172,
SNIFF_SUBRATING = 174,
READ_SIMPLE_PAIRING_MODE = 175,
WRITE_SIMPLE_PAIRING_MODE = 176,
READ_LOCAL_OOB_DATA = 177,
READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL = 180,
WRITE_INQUIRY_TRANSMIT_POWER_LEVEL = 181,
READ_DEFAULT_ERRONEOUS_DATA_REPORTING = 182,
WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING = 183,
IO_CAPABILITY_REQUEST_REPLY = 187,
USER_CONFIRMATION_REQUEST_REPLY = 190,
USER_CONFIRMATION_REQUEST_NEGATIVE_REPLY = 191,
USER_PASSKEY_REQUEST_REPLY = 192,
USER_PASSKEY_REQUEST_NEGATIVE_REPLY = 193,
REMOTE_OOB_DATA_REQUEST_REPLY = 194,
WRITE_SIMPLE_PAIRING_DEBUG_MODE = 195,
ENHANCED_FLUSH = 196,
REMOTE_OOB_DATA_REQUEST_NEGATIVE_REPLY = 197,
SEND_KEYPRESS_NOTIFICATION = 202,
IO_CAPABILITY_REQUEST_NEGATIVE_REPLY = 203,
READ_ENCRYPTION_KEY_SIZE = 204,
LE_CS_READ_LOCAL_SUPPORTED_CAPABILITIES = 205,
LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES = 206,
LE_CS_WRITE_CACHED_REMOTE_SUPPORTED_CAPABILITIES = 207,
SET_EVENT_MASK_PAGE_2 = 222,
READ_FLOW_CONTROL_MODE = 230,
WRITE_FLOW_CONTROL_MODE = 231,
READ_DATA_BLOCK_SIZE = 232,
LE_CS_TEST = 233,
LE_CS_TEST_END = 234,
READ_ENHANCED_TRANSMIT_POWER_LEVEL = 240,
LE_CS_SECURITY_ENABLE = 241,
READ_LE_HOST_SUPPORT = 245,
WRITE_LE_HOST_SUPPORT = 246,
LE_CS_SET_DEFAULT_SETTINGS = 247,
LE_SET_EVENT_MASK = 250,
LE_READ_BUFFER_SIZE_V1 = 251,
LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0 = 252,
LE_SET_RANDOM_ADDRESS = 254,
LE_SET_ADVERTISING_PARAMETERS = 255,
LE_READ_ADVERTISING_PHYSICAL_CHANNEL_TX_POWER = 256,
LE_SET_ADVERTISING_DATA = 257,
LE_SET_SCAN_RESPONSE_DATA = 260,
LE_SET_ADVERTISING_ENABLE = 261,
LE_SET_SCAN_PARAMETERS = 262,
LE_SET_SCAN_ENABLE = 263,
LE_CREATE_CONNECTION = 264,
LE_CREATE_CONNECTION_CANCEL = 265,
LE_READ_FILTER_ACCEPT_LIST_SIZE = 266,
LE_CLEAR_FILTER_ACCEPT_LIST = 267,
LE_ADD_DEVICE_TO_FILTER_ACCEPT_LIST = 270,
LE_REMOVE_DEVICE_FROM_FILTER_ACCEPT_LIST = 271,
LE_CONNECTION_UPDATE = 272,
LE_SET_HOST_CHANNEL_CLASSIFICATION = 273,
LE_READ_CHANNEL_MAP = 274,
LE_READ_REMOTE_FEATURES_PAGE_0 = 275,
LE_ENCRYPT = 276,
LE_RAND = 277,
LE_START_ENCRYPTION = 280,
LE_LONG_TERM_KEY_REQUEST_REPLY = 281,
LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY = 282,
LE_READ_SUPPORTED_STATES = 283,
LE_RECEIVER_TEST_V1 = 284,
LE_TRANSMITTER_TEST_V1 = 285,
LE_TEST_END = 286,
LE_ENABLE_MONITORING_ADVERTISERS = 287,
LE_CS_SET_CHANNEL_CLASSIFICATION = 290,
LE_CS_SET_PROCEDURE_PARAMETERS = 291,
LE_CS_PROCEDURE_ENABLE = 292,
ENHANCED_SETUP_SYNCHRONOUS_CONNECTION = 293,
ENHANCED_ACCEPT_SYNCHRONOUS_CONNECTION = 294,
READ_LOCAL_SUPPORTED_CODECS_V1 = 295,
SET_MWS_CHANNEL_PARAMETERS = 296,
SET_EXTERNAL_FRAME_CONFIGURATION = 297,
SET_MWS_SIGNALING = 300,
SET_MWS_TRANSPORT_LAYER = 301,
SET_MWS_SCAN_FREQUENCY_TABLE = 302,
GET_MWS_TRANSPORT_LAYER_CONFIGURATION = 303,
SET_MWS_PATTERN_CONFIGURATION = 304,
SET_TRIGGERED_CLOCK_CAPTURE = 305,
TRUNCATED_PAGE = 306,
TRUNCATED_PAGE_CANCEL = 307,
SET_CONNECTIONLESS_PERIPHERAL_BROADCAST = 310,
SET_CONNECTIONLESS_PERIPHERAL_BROADCAST_RECEIVE = 311,
START_SYNCHRONIZATION_TRAIN = 312,
RECEIVE_SYNCHRONIZATION_TRAIN = 313,
SET_RESERVED_LT_ADDR = 314,
DELETE_RESERVED_LT_ADDR = 315,
SET_CONNECTIONLESS_PERIPHERAL_BROADCAST_DATA = 316,
READ_SYNCHRONIZATION_TRAIN_PARAMETERS = 317,
WRITE_SYNCHRONIZATION_TRAIN_PARAMETERS = 320,
REMOTE_OOB_EXTENDED_DATA_REQUEST_REPLY = 321,
READ_SECURE_CONNECTIONS_HOST_SUPPORT = 322,
WRITE_SECURE_CONNECTIONS_HOST_SUPPORT = 323,
READ_AUTHENTICATED_PAYLOAD_TIMEOUT = 324,
WRITE_AUTHENTICATED_PAYLOAD_TIMEOUT = 325,
READ_LOCAL_OOB_EXTENDED_DATA = 326,
WRITE_SECURE_CONNECTIONS_TEST_MODE = 327,
READ_EXTENDED_PAGE_TIMEOUT = 330,
WRITE_EXTENDED_PAGE_TIMEOUT = 331,
READ_EXTENDED_INQUIRY_LENGTH = 332,
WRITE_EXTENDED_INQUIRY_LENGTH = 333,
LE_REMOTE_CONNECTION_PARAMETER_REQUEST_REPLY = 334,
LE_REMOTE_CONNECTION_PARAMETER_REQUEST_NEGATIVE_REPLY = 335,
LE_SET_DATA_LENGTH = 336,
LE_READ_SUGGESTED_DEFAULT_DATA_LENGTH = 337,
LE_WRITE_SUGGESTED_DEFAULT_DATA_LENGTH = 340,
LE_READ_LOCAL_P_256_PUBLIC_KEY = 341,
LE_GENERATE_DHKEY_V1 = 342,
LE_ADD_DEVICE_TO_RESOLVING_LIST = 343,
LE_REMOVE_DEVICE_FROM_RESOLVING_LIST = 344,
LE_CLEAR_RESOLVING_LIST = 345,
LE_READ_RESOLVING_LIST_SIZE = 346,
LE_READ_PEER_RESOLVABLE_ADDRESS = 347,
LE_READ_LOCAL_RESOLVABLE_ADDRESS = 350,
LE_SET_ADDRESS_RESOLUTION_ENABLE = 351,
LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT = 352,
LE_READ_MAXIMUM_DATA_LENGTH = 353,
LE_READ_PHY = 354,
LE_SET_DEFAULT_PHY = 355,
LE_SET_PHY = 356,
LE_RECEIVER_TEST_V2 = 357,
LE_TRANSMITTER_TEST_V2 = 360,
LE_SET_ADVERTISING_SET_RANDOM_ADDRESS = 361,
LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V1 = 362,
LE_SET_EXTENDED_ADVERTISING_DATA = 363,
LE_SET_EXTENDED_SCAN_RESPONSE_DATA = 364,
LE_SET_EXTENDED_ADVERTISING_ENABLE = 365,
LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH = 366,
LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS = 367,
LE_REMOVE_ADVERTISING_SET = 370,
LE_CLEAR_ADVERTISING_SETS = 371,
LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V1 = 372,
LE_SET_PERIODIC_ADVERTISING_DATA = 373,
LE_SET_PERIODIC_ADVERTISING_ENABLE = 374,
LE_SET_EXTENDED_SCAN_PARAMETERS = 375,
LE_SET_EXTENDED_SCAN_ENABLE = 376,
LE_EXTENDED_CREATE_CONNECTION_V1 = 377,
LE_PERIODIC_ADVERTISING_CREATE_SYNC = 380,
LE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL = 381,
LE_PERIODIC_ADVERTISING_TERMINATE_SYNC = 382,
LE_ADD_DEVICE_TO_PERIODIC_ADVERTISER_LIST = 383,
LE_REMOVE_DEVICE_FROM_PERIODIC_ADVERTISER_LIST = 384,
LE_CLEAR_PERIODIC_ADVERTISER_LIST = 385,
LE_READ_PERIODIC_ADVERTISER_LIST_SIZE = 386,
LE_READ_TRANSMIT_POWER = 387,
LE_READ_RF_PATH_COMPENSATION_POWER = 390,
LE_WRITE_RF_PATH_COMPENSATION_POWER = 391,
LE_SET_PRIVACY_MODE = 392,
LE_RECEIVER_TEST_V3 = 393,
LE_TRANSMITTER_TEST_V3 = 394,
LE_SET_CONNECTIONLESS_CTE_TRANSMIT_PARAMETERS = 395,
LE_SET_CONNECTIONLESS_CTE_TRANSMIT_ENABLE = 396,
LE_SET_CONNECTIONLESS_IQ_SAMPLING_ENABLE = 397,
LE_SET_CONNECTION_CTE_RECEIVE_PARAMETERS = 400,
LE_SET_CONNECTION_CTE_TRANSMIT_PARAMETERS = 401,
LE_CONNECTION_CTE_REQUEST_ENABLE = 402,
LE_CONNECTION_CTE_RESPONSE_ENABLE = 403,
LE_READ_ANTENNA_INFORMATION = 404,
LE_SET_PERIODIC_ADVERTISING_RECEIVE_ENABLE = 405,
LE_PERIODIC_ADVERTISING_SYNC_TRANSFER = 406,
LE_PERIODIC_ADVERTISING_SET_INFO_TRANSFER = 407,
LE_SET_PERIODIC_ADVERTISING_SYNC_TRANSFER_PARAMETERS = 410,
LE_SET_DEFAULT_PERIODIC_ADVERTISING_SYNC_TRANSFER_PARAMETERS = 411,
LE_GENERATE_DHKEY_V2 = 412,
READ_LOCAL_SIMPLE_PAIRING_OPTIONS = 413,
LE_MODIFY_SLEEP_CLOCK_ACCURACY = 414,
LE_READ_BUFFER_SIZE_V2 = 415,
LE_READ_ISO_TX_SYNC = 416,
LE_SET_CIG_PARAMETERS = 417,
LE_SET_CIG_PARAMETERS_TEST = 420,
LE_CREATE_CIS = 421,
LE_REMOVE_CIG = 422,
LE_ACCEPT_CIS_REQUEST = 423,
LE_REJECT_CIS_REQUEST = 424,
LE_CREATE_BIG = 425,
LE_CREATE_BIG_TEST = 426,
LE_TERMINATE_BIG = 427,
LE_BIG_CREATE_SYNC = 430,
LE_BIG_TERMINATE_SYNC = 431,
LE_REQUEST_PEER_SCA = 432,
LE_SETUP_ISO_DATA_PATH = 433,
LE_REMOVE_ISO_DATA_PATH = 434,
LE_ISO_TRANSMIT_TEST = 435,
LE_ISO_RECEIVE_TEST = 436,
LE_ISO_READ_TEST_COUNTERS = 437,
LE_ISO_TEST_END = 440,
LE_SET_HOST_FEATURE_V1 = 441,
LE_READ_ISO_LINK_QUALITY = 442,
LE_ENHANCED_READ_TRANSMIT_POWER_LEVEL = 443,
LE_READ_REMOTE_TRANSMIT_POWER_LEVEL = 444,
LE_SET_PATH_LOSS_REPORTING_PARAMETERS = 445,
LE_SET_PATH_LOSS_REPORTING_ENABLE = 446,
LE_SET_TRANSMIT_POWER_REPORTING_ENABLE = 447,
LE_TRANSMITTER_TEST_V4 = 450,
SET_ECOSYSTEM_BASE_INTERVAL = 451,
READ_LOCAL_SUPPORTED_CODECS_V2 = 452,
READ_LOCAL_SUPPORTED_CODEC_CAPABILITIES = 453,
READ_LOCAL_SUPPORTED_CONTROLLER_DELAY = 454,
CONFIGURE_DATA_PATH = 455,
LE_SET_DATA_RELATED_ADDRESS_CHANGES = 456,
SET_MIN_ENCRYPTION_KEY_SIZE = 457,
LE_SET_DEFAULT_SUBRATE = 460,
LE_SUBRATE_REQUEST = 461,
LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V2 = 462,
LE_SET_DECISION_DATA = 463,
LE_SET_DECISION_INSTRUCTIONS = 464,
LE_SET_PERIODIC_ADVERTISING_SUBEVENT_DATA = 465,
LE_SET_PERIODIC_ADVERTISING_RESPONSE_DATA = 466,
LE_SET_PERIODIC_SYNC_SUBEVENT = 467,
LE_EXTENDED_CREATE_CONNECTION_V2 = 470,
LE_SET_PERIODIC_ADVERTISING_PARAMETERS_V2 = 471,
LE_READ_ALL_LOCAL_SUPPORTED_FEATURES = 472,
LE_READ_ALL_REMOTE_FEATURES = 473,
LE_SET_HOST_FEATURE_V2 = 474,
LE_ADD_DEVICE_TO_MONITORED_ADVERTISERS_LIST = 475,
LE_REMOVE_DEVICE_FROM_MONITORED_ADVERTISERS_LIST = 476,
LE_CLEAR_MONITORED_ADVERTISERS_LIST = 477,
LE_READ_MONITORED_ADVERTISERS_LIST_SIZE = 480,
LE_FRAME_SPACE_UPDATE = 481,
}
packet Command {
op_code : OpCode,
_size_(_payload_) : 8,
_payload_,
}
// HCI Event Packets
enum EventCode : 8 {
INQUIRY_COMPLETE = 0x01,
INQUIRY_RESULT = 0x02,
CONNECTION_COMPLETE = 0x03,
CONNECTION_REQUEST = 0x04,
DISCONNECTION_COMPLETE = 0x05,
AUTHENTICATION_COMPLETE = 0x06,
REMOTE_NAME_REQUEST_COMPLETE = 0x07,
ENCRYPTION_CHANGE = 0x08,
CHANGE_CONNECTION_LINK_KEY_COMPLETE = 0x09,
CENTRAL_LINK_KEY_COMPLETE = 0x0A,
READ_REMOTE_SUPPORTED_FEATURES_COMPLETE = 0x0B,
READ_REMOTE_VERSION_INFORMATION_COMPLETE = 0x0C,
QOS_SETUP_COMPLETE = 0x0D,
COMMAND_COMPLETE = 0x0E,
COMMAND_STATUS = 0x0F,
HARDWARE_ERROR = 0x10,
FLUSH_OCCURRED = 0x11,
ROLE_CHANGE = 0x12,
NUMBER_OF_COMPLETED_PACKETS = 0x13,
MODE_CHANGE = 0x14,
RETURN_LINK_KEYS = 0x15,
PIN_CODE_REQUEST = 0x16,
LINK_KEY_REQUEST = 0x17,
LINK_KEY_NOTIFICATION = 0x18,
LOOPBACK_COMMAND = 0x19,
DATA_BUFFER_OVERFLOW = 0x1A,
MAX_SLOTS_CHANGE = 0x1B,
READ_CLOCK_OFFSET_COMPLETE = 0x1C,
CONNECTION_PACKET_TYPE_CHANGED = 0x1D,
QOS_VIOLATION = 0x1E,
PAGE_SCAN_REPETITION_MODE_CHANGE = 0x20,
FLOW_SPECIFICATION_COMPLETE = 0x21,
INQUIRY_RESULT_WITH_RSSI = 0x22,
READ_REMOTE_EXTENDED_FEATURES_COMPLETE = 0x23,
SYNCHRONOUS_CONNECTION_COMPLETE = 0x2C,
SYNCHRONOUS_CONNECTION_CHANGED = 0x2D,
SNIFF_SUBRATING = 0x2E,
EXTENDED_INQUIRY_RESULT = 0x2F,
ENCRYPTION_KEY_REFRESH_COMPLETE = 0x30,
IO_CAPABILITY_REQUEST = 0x31,
IO_CAPABILITY_RESPONSE = 0x32,
USER_CONFIRMATION_REQUEST = 0x33,
USER_PASSKEY_REQUEST = 0x34,
REMOTE_OOB_DATA_REQUEST = 0x35,
SIMPLE_PAIRING_COMPLETE = 0x36,
LINK_SUPERVISION_TIMEOUT_CHANGED = 0x38,
ENHANCED_FLUSH_COMPLETE = 0x39,
USER_PASSKEY_NOTIFICATION = 0x3B,
KEYPRESS_NOTIFICATION = 0x3C,
REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION = 0x3D,
LE_META_EVENT = 0x3e,
NUMBER_OF_COMPLETED_DATA_BLOCKS = 0x48,
AUTHENTICATED_PAYLOAD_TIMEOUT_EXPIRED = 0x57,
ENCRYPTION_CHANGE_V2 = 0x59,
VENDOR_SPECIFIC = 0xFF,
}
// LE events
enum SubeventCode : 8 {
LE_CONNECTION_COMPLETE = 0x01,
LE_ADVERTISING_REPORT = 0x02,
LE_CONNECTION_UPDATE_COMPLETE = 0x03,
LE_READ_REMOTE_FEATURES_PAGE_0_COMPLETE = 0x04,
LE_LONG_TERM_KEY_REQUEST = 0x05,
LE_REMOTE_CONNECTION_PARAMETER_REQUEST = 0x06,
LE_DATA_LENGTH_CHANGE = 0x07,
LE_READ_LOCAL_P256_PUBLIC_KEY_COMPLETE = 0x08,
LE_GENERATE_DHKEY_COMPLETE = 0x09,
LE_ENHANCED_CONNECTION_COMPLETE_V1 = 0x0a,
LE_DIRECTED_ADVERTISING_REPORT = 0x0b,
LE_PHY_UPDATE_COMPLETE = 0x0c,
LE_EXTENDED_ADVERTISING_REPORT = 0x0D,
LE_PERIODIC_ADVERTISING_SYNC_ESTABLISHED_V1 = 0x0E,
LE_PERIODIC_ADVERTISING_REPORT_V1 = 0x0F,
LE_PERIODIC_ADVERTISING_SYNC_LOST = 0x10,
LE_SCAN_TIMEOUT = 0x11,
LE_ADVERTISING_SET_TERMINATED = 0x12,
LE_SCAN_REQUEST_RECEIVED = 0x13,
LE_CHANNEL_SELECTION_ALGORITHM = 0x14,
LE_CONNECTIONLESS_IQ_REPORT = 0x15,
LE_CONNECTION_IQ_REPORT = 0x16,
LE_CTE_REQUEST_FAILED = 0x17,
LE_PERIODIC_ADVERTISING_SYNC_TRANSFER_RECEIVED_V1 = 0x18,
LE_CIS_ESTABLISHED_V1 = 0x19,
LE_CIS_REQUEST = 0x1A,
LE_CREATE_BIG_COMPLETE = 0x1B,
LE_TERMINATE_BIG_COMPLETE = 0x1C,
LE_BIG_SYNC_ESTABLISHED = 0x1D,
LE_BIG_SYNC_LOST = 0x1E,
LE_REQUEST_PEER_SCA_COMPLETE = 0x1F,
LE_PATH_LOSS_THRESHOLD = 0x20,
LE_TRANSMIT_POWER_REPORTING = 0x21,
LE_BIG_INFO_ADVERTISING_REPORT = 0x22,
LE_SUBRATE_CHANGE = 0x23,
LE_PERIODIC_ADVERTISING_SYNC_ESTABLISHED_V2 = 0x24,
LE_PERIODIC_ADVERTISING_REPORT_V2 = 0x25,
LE_PERIODIC_ADVERTISING_SYNC_TRANSFER_RECEIVED_V2 = 0x26,
LE_PERIODIC_ADVERTISING_SUBEVENT_DATA_REQUEST = 0x27,
LE_PERIODIC_ADVERTISING_RESPONSE_REPORT = 0x28,
LE_ENHANCED_CONNECTION_COMPLETE_V2 = 0x29,
LE_CIS_ESTABLISHED_V2 = 0x2A,
LE_READ_ALL_REMOTE_FEATURES_COMPLETE = 0x2B,
LE_CS_READ_REMOTE_SUPPORTED_CAPABILITIES_COMPLETE = 0x2C,
LE_CS_READ_REMOTE_FAE_TABLE_COMPLETE = 0x2D,
LE_CS_SECURITY_ENABLE_COMPLETE = 0x2E,
LE_CS_CONFIG_COMPLETE = 0x2F,
LE_CS_PROCEDURE_ENABLE_COMPLETE = 0x30,
LE_CS_SUBEVENT_RESULT = 0x31,
LE_CS_SUBEVENT_RESULT_CONTINUE = 0x32,
LE_CS_TEST_END_COMPLETE = 0x33,
LE_MONITORED_ADVERTISERS_REPORT = 0x34,
LE_FRAME_SPACE_UPDATE_COMPLETE = 0x35,
}
// Vendor specific events
enum VseSubeventCode : 8 {
STORAGE_THRESHOLD_BREACH = 0x54,
LE_MULTI_ADVERTISING_STATE_CHANGE = 0x55,
LE_ADVERTISEMENT_TRACKING = 0x56,
CONTROLLER_DEBUG_INFO = 0x57,
BLUETOOTH_QUALITY_REPORT = 0x58,
OTHER = ..
}
packet Event {
event_code : EventCode,
_size_(_payload_) : 8,
_payload_,
}
packet LeMetaEvent : Event (event_code = LE_META_EVENT) {
subevent_code : SubeventCode,
_body_,
}
// Common definitions for commands and events
enum FeatureFlag : 1 {
UNSUPPORTED = 0,
SUPPORTED = 1,
}
enum ErrorCode: 8 {
STATUS_UNKNOWN = 0xFF,
SUCCESS = 0x00,
UNKNOWN_HCI_COMMAND = 0x01,
UNKNOWN_CONNECTION = 0x02,
HARDWARE_FAILURE = 0x03,
PAGE_TIMEOUT = 0x04,
AUTHENTICATION_FAILURE = 0x05,
PIN_OR_KEY_MISSING = 0x06,
MEMORY_CAPACITY_EXCEEDED = 0x07,
CONNECTION_TIMEOUT = 0x08,
CONNECTION_LIMIT_EXCEEDED = 0x09,
SYNCHRONOUS_CONNECTION_LIMIT_EXCEEDED = 0x0A,
CONNECTION_ALREADY_EXISTS = 0x0B,
COMMAND_DISALLOWED = 0x0C,
CONNECTION_REJECTED_LIMITED_RESOURCES = 0x0D,
CONNECTION_REJECTED_SECURITY_REASONS = 0x0E,
CONNECTION_REJECTED_UNACCEPTABLE_BD_ADDR = 0x0F,
CONNECTION_ACCEPT_TIMEOUT = 0x10,
UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE = 0x11,
INVALID_HCI_COMMAND_PARAMETERS = 0x12,
REMOTE_USER_TERMINATED_CONNECTION = 0x13,
REMOTE_DEVICE_TERMINATED_CONNECTION_LOW_RESOURCES = 0x14,
REMOTE_DEVICE_TERMINATED_CONNECTION_POWER_OFF = 0x15,
CONNECTION_TERMINATED_BY_LOCAL_HOST = 0x16,
REPEATED_ATTEMPTS = 0x17,
PAIRING_NOT_ALLOWED = 0x18,
UNKNOWN_LMP_PDU = 0x19,
UNSUPPORTED_REMOTE_OR_LMP_FEATURE = 0x1A,
SCO_OFFSET_REJECTED = 0x1B,
SCO_INTERVAL_REJECTED = 0x1C,
SCO_AIR_MODE_REJECTED = 0x1D,
INVALID_LMP_OR_LL_PARAMETERS = 0x1E,
UNSPECIFIED_ERROR = 0x1F,
UNSUPPORTED_LMP_OR_LL_PARAMETER = 0x20,
ROLE_CHANGE_NOT_ALLOWED = 0x21,
TRANSACTION_RESPONSE_TIMEOUT = 0x22,
LINK_LAYER_COLLISION = 0x23,
ENCRYPTION_MODE_NOT_ACCEPTABLE = 0x25,
INSUFFICIENT_SECURITY = 0x2F,
ROLE_SWITCH_FAILED = 0x35,
HOST_BUSY = 0x38,
CONTROLLER_BUSY = 0x3A,
ADVERTISING_TIMEOUT = 0x3C,
CONNECTION_FAILED_ESTABLISHMENT = 0x3E,
UNKNOWN_ADVERTISING_IDENTIFIER = 0x42,
LIMIT_REACHED = 0x43,
OPERATION_CANCELLED_BY_HOST = 0x44,
PACKET_TOO_LONG = 0x45,
INSUFFICIENT_CHANNELS = 0x48,
}
// Events that are defined with their respective commands
packet CommandComplete : Event (event_code = COMMAND_COMPLETE) {
num_hci_command_packets : 8,
command_op_code : OpCode,
_payload_,
}
packet CommandStatus : Event (event_code = COMMAND_STATUS) {
status : ErrorCode, // SUCCESS means PENDING
num_hci_command_packets : 8,
command_op_code : OpCode,
_payload_,
}
packet VendorSpecificEvent : Event (event_code = VENDOR_SPECIFIC) {
subevent_code : VseSubeventCode,
_payload_,
}
// Credits
packet NoCommandComplete : CommandComplete (command_op_code = NONE) {
}
struct Lap { // Lower Address Part
lap : 6,
_reserved_ : 2,
_fixed_ = 0x9e8b : 16,
}
// LINK_CONTROL
packet Inquiry : Command (op_code = INQUIRY) {
lap : Lap,
inquiry_length : 8, // 0x1 - 0x30 (times 1.28s)
num_responses : 8, // 0x00 unlimited
}
test Inquiry {
"\x01\x04\x05\x33\x8b\x9e\xaa\xbb",
}
packet InquiryStatus : CommandStatus (command_op_code = INQUIRY) {
}
test InquiryStatus {
"\x0f\x04\x00\x01\x01\x04",
}
packet InquiryCancel : Command (op_code = INQUIRY_CANCEL) {
}
test InquiryCancel {
"\x02\x04\x00",
}
packet InquiryCancelComplete : CommandComplete (command_op_code = INQUIRY_CANCEL) {
status : ErrorCode,
}
test InquiryCancelComplete {
"\x0e\x04\x01\x02\x04\x00",
}
packet PeriodicInquiryMode : Command (op_code = PERIODIC_INQUIRY_MODE) {
max_period_length : 16, // Range 0x0003 to 0xffff (times 1.28s)
min_period_length : 16, // Range 0x0002 to 0xfffe (times 1.28s)
lap : Lap,
inquiry_length : 8, // 0x1 - 0x30 (times 1.28s)
num_responses : 8, // 0x00 unlimited
}
test PeriodicInquiryMode {
"\x03\x04\x09\x12\x34\x56\x78\x11\x8b\x9e\x9a\xbc",
}
packet PeriodicInquiryModeComplete : CommandComplete (command_op_code = PERIODIC_INQUIRY_MODE) {
status : ErrorCode,
}
test PeriodicInquiryModeComplete {
"\x0e\x04\x01\x03\x04\x00",
}
packet ExitPeriodicInquiryMode : Command (op_code = EXIT_PERIODIC_INQUIRY_MODE) {
}
test ExitPeriodicInquiryMode {
"\x04\x04\x00",
}
packet ExitPeriodicInquiryModeComplete : CommandComplete (command_op_code = EXIT_PERIODIC_INQUIRY_MODE) {
status : ErrorCode,
}
test ExitPeriodicInquiryModeComplete {
"\x0e\x04\x01\x04\x04\x00",
}
enum PageScanRepetitionMode : 8 {
R0 = 0x00,
R1 = 0x01,
R2 = 0x02,
}
enum ClockOffsetValid : 1 {
INVALID = 0,
VALID = 1,
}
enum CreateConnectionRoleSwitch : 8 {
REMAIN_CENTRAL = 0x00,
ALLOW_ROLE_SWITCH = 0x01,
}
packet CreateConnection : Command (op_code = CREATE_CONNECTION) {
bd_addr : Address,
packet_type : 16,
page_scan_repetition_mode : PageScanRepetitionMode,
_reserved_ : 8,
clock_offset : 15,
clock_offset_valid : ClockOffsetValid,
allow_role_switch : CreateConnectionRoleSwitch,
}
packet CreateConnectionStatus : CommandStatus (command_op_code = CREATE_CONNECTION) {
}
enum DisconnectReason : 8 {
AUTHENTICATION_FAILURE = 0x05,
REMOTE_USER_TERMINATED_CONNECTION = 0x13,
REMOTE_DEVICE_TERMINATED_CONNECTION_LOW_RESOURCES = 0x14,
REMOTE_DEVICE_TERMINATED_CONNECTION_POWER_OFF = 0x15,
UNSUPPORTED_REMOTE_FEATURE = 0x1A,
PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED = 0x29,
UNACCEPTABLE_CONNECTION_PARAMETERS = 0x3B,
UNKNOWN_REASON = ..,
}
packet Disconnect : Command (op_code = DISCONNECT) {
connection_handle : 12,
_reserved_ : 4,
reason : DisconnectReason,
}
packet DisconnectStatus : CommandStatus (command_op_code = DISCONNECT) {
}
packet AddScoConnection : Command (op_code = ADD_SCO_CONNECTION) {
connection_handle : 12,
_reserved_ : 4,
packet_type : 16,
}
packet AddScoConnectionStatus : CommandStatus (command_op_code = ADD_SCO_CONNECTION) {
}
packet CreateConnectionCancel : Command (op_code = CREATE_CONNECTION_CANCEL) {
bd_addr : Address,
}
packet CreateConnectionCancelComplete : CommandComplete (command_op_code = CREATE_CONNECTION_CANCEL) {
status : ErrorCode,
bd_addr : Address,
}
enum AcceptConnectionRequestRole : 8 {
BECOME_CENTRAL = 0x00,
REMAIN_PERIPHERAL = 0x01,
}
packet AcceptConnectionRequest : Command (op_code = ACCEPT_CONNECTION_REQUEST) {
bd_addr : Address,
role : AcceptConnectionRequestRole,
}
packet AcceptConnectionRequestStatus : CommandStatus (command_op_code = ACCEPT_CONNECTION_REQUEST) {
}
enum RejectConnectionReason : 8 {
LIMITED_RESOURCES = 0x0D,
SECURITY_REASONS = 0x0E,
UNACCEPTABLE_BD_ADDR = 0x0F,
}
packet RejectConnectionRequest : Command (op_code = REJECT_CONNECTION_REQUEST) {
bd_addr : Address,
reason : RejectConnectionReason,
}
packet RejectConnectionRequestStatus : CommandStatus (command_op_code = REJECT_CONNECTION_REQUEST) {
}
packet LinkKeyRequestReply : Command (op_code = LINK_KEY_REQUEST_REPLY) {
bd_addr : Address,
link_key : 8[16],
}
packet LinkKeyRequestReplyComplete : CommandComplete (command_op_code = LINK_KEY_REQUEST_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
packet LinkKeyRequestNegativeReply : Command (op_code = LINK_KEY_REQUEST_NEGATIVE_REPLY) {
bd_addr : Address,
}
packet LinkKeyRequestNegativeReplyComplete : CommandComplete (command_op_code = LINK_KEY_REQUEST_NEGATIVE_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
packet PinCodeRequestReply : Command (op_code = PIN_CODE_REQUEST_REPLY) {
bd_addr : Address,
pin_code_length : 5, // 0x01 - 0x10
_reserved_ : 3,
pin_code : 8[16], // string parameter, first octet first
}
packet PinCodeRequestReplyComplete : CommandComplete (command_op_code = PIN_CODE_REQUEST_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
packet PinCodeRequestNegativeReply : Command (op_code = PIN_CODE_REQUEST_NEGATIVE_REPLY) {
bd_addr : Address,
}
packet PinCodeRequestNegativeReplyComplete : CommandComplete (command_op_code = PIN_CODE_REQUEST_NEGATIVE_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
packet ChangeConnectionPacketType : Command (op_code = CHANGE_CONNECTION_PACKET_TYPE) {
connection_handle : 12,
_reserved_ : 4,
packet_type : 16,
}
packet ChangeConnectionPacketTypeStatus : CommandStatus (command_op_code = CHANGE_CONNECTION_PACKET_TYPE) {
}
packet AuthenticationRequested : Command (op_code = AUTHENTICATION_REQUESTED) {
connection_handle : 12,
_reserved_ : 4,
}
packet AuthenticationRequestedStatus : CommandStatus (command_op_code = AUTHENTICATION_REQUESTED) {
}
packet SetConnectionEncryption : Command (op_code = SET_CONNECTION_ENCRYPTION) {
connection_handle : 12,
_reserved_ : 4,
encryption_enable : Enable,
}
packet SetConnectionEncryptionStatus : CommandStatus (command_op_code = SET_CONNECTION_ENCRYPTION) {
}
packet ChangeConnectionLinkKey : Command (op_code = CHANGE_CONNECTION_LINK_KEY) {
connection_handle : 12,
_reserved_ : 4,
}
packet ChangeConnectionLinkKeyStatus : CommandStatus (command_op_code = CHANGE_CONNECTION_LINK_KEY) {
}
enum KeyFlag : 8 {
SEMI_PERMANENT = 0x00,
TEMPORARY = 0x01,
}
packet CentralLinkKey : Command (op_code = CENTRAL_LINK_KEY) {
key_flag : KeyFlag,
}
packet CentralLinkKeyStatus : CommandStatus (command_op_code = CENTRAL_LINK_KEY) {
}
packet RemoteNameRequest : Command (op_code = REMOTE_NAME_REQUEST) {
bd_addr : Address,
page_scan_repetition_mode : PageScanRepetitionMode,
_reserved_ : 8,
clock_offset : 15,
clock_offset_valid : ClockOffsetValid,
}
packet RemoteNameRequestStatus : CommandStatus (command_op_code = REMOTE_NAME_REQUEST) {
}
packet RemoteNameRequestCancel : Command (op_code = REMOTE_NAME_REQUEST_CANCEL) {
bd_addr : Address,
}
packet RemoteNameRequestCancelComplete : CommandComplete (command_op_code = REMOTE_NAME_REQUEST_CANCEL) {
status : ErrorCode,
bd_addr : Address,
}
packet ReadRemoteSupportedFeatures : Command (op_code = READ_REMOTE_SUPPORTED_FEATURES) {
connection_handle : 12,
_reserved_ : 4,
}
packet ReadRemoteSupportedFeaturesStatus : CommandStatus (command_op_code = READ_REMOTE_SUPPORTED_FEATURES) {
}
packet ReadRemoteExtendedFeatures : Command (op_code = READ_REMOTE_EXTENDED_FEATURES) {
connection_handle : 12,
_reserved_ : 4,
page_number : 8,
}
packet ReadRemoteExtendedFeaturesStatus : CommandStatus (command_op_code = READ_REMOTE_EXTENDED_FEATURES) {
}
packet ReadRemoteVersionInformation : Command (op_code = READ_REMOTE_VERSION_INFORMATION) {
connection_handle : 12,
_reserved_ : 4,
}
packet ReadRemoteVersionInformationStatus : CommandStatus (command_op_code = READ_REMOTE_VERSION_INFORMATION) {
}
packet ReadClockOffset : Command (op_code = READ_CLOCK_OFFSET) {
connection_handle : 12,
_reserved_ : 4,
}
packet ReadClockOffsetStatus : CommandStatus (command_op_code = READ_CLOCK_OFFSET) {
}
packet ReadLmpHandle : Command (op_code = READ_LMP_HANDLE) {
connection_handle : 12,
_reserved_ : 4,
}
packet ReadLmpHandleComplete : CommandComplete (command_op_code = READ_LMP_HANDLE) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
lmp_handle : 8,
_reserved_ : 32,
}
enum SynchronousPacketTypeBits : 16 {
HV1_ALLOWED = 0x0001,
HV2_ALLOWED = 0x0002,
HV3_ALLOWED = 0x0004,
EV3_ALLOWED = 0x0008,
EV4_ALLOWED = 0x0010,
EV5_ALLOWED = 0x0020,
NO_2_EV3_ALLOWED = 0x0040,
NO_3_EV3_ALLOWED = 0x0080,
NO_2_EV5_ALLOWED = 0x0100,
NO_3_EV5_ALLOWED = 0x0200,
}
enum RetransmissionEffort : 8 {
NO_RETRANSMISSION = 0x00,
OPTIMIZED_FOR_POWER = 0x01,
OPTIMIZED_FOR_LINK_QUALITY = 0x02,
DO_NOT_CARE = 0xFF,
}
packet SetupSynchronousConnection : Command (op_code = SETUP_SYNCHRONOUS_CONNECTION) {
connection_handle : 12,
_reserved_ : 4,
transmit_bandwidth : 32,
receive_bandwidth : 32,
max_latency : 16, // 0-3 reserved, 0xFFFF = don't care
voice_setting : 10,
_reserved_ : 6,
retransmission_effort : RetransmissionEffort,
packet_type : 16, // See SynchronousPacketTypeBits
}
packet SetupSynchronousConnectionStatus : CommandStatus (command_op_code = SETUP_SYNCHRONOUS_CONNECTION) {
}
packet AcceptSynchronousConnection : Command (op_code = ACCEPT_SYNCHRONOUS_CONNECTION) {
bd_addr : Address,
transmit_bandwidth : 32,
receive_bandwidth : 32,
max_latency : 16, // 0-3 reserved, 0xFFFF = don't care
voice_setting : 10,
_reserved_ : 6,
retransmission_effort : RetransmissionEffort,
packet_type : 16, // See SynchronousPacketTypeBits
}
packet AcceptSynchronousConnectionStatus : CommandStatus (command_op_code = ACCEPT_SYNCHRONOUS_CONNECTION) {
}
packet RejectSynchronousConnection : Command (op_code = REJECT_SYNCHRONOUS_CONNECTION) {
bd_addr : Address,
reason : RejectConnectionReason,
}
packet RejectSynchronousConnectionStatus : CommandStatus (command_op_code = REJECT_SYNCHRONOUS_CONNECTION) {
}
enum IoCapability : 8 {
DISPLAY_ONLY = 0x00,
DISPLAY_YES_NO = 0x01,
KEYBOARD_ONLY = 0x02,
NO_INPUT_NO_OUTPUT = 0x03,
}
enum OobDataPresent : 8 {
NOT_PRESENT = 0x00,
P_192_PRESENT = 0x01,
P_256_PRESENT = 0x02,
P_192_AND_256_PRESENT = 0x03,
}
enum AuthenticationRequirements : 8 {
NO_BONDING = 0x00,
NO_BONDING_MITM_PROTECTION = 0x01,
DEDICATED_BONDING = 0x02,
DEDICATED_BONDING_MITM_PROTECTION = 0x03,
GENERAL_BONDING = 0x04,
GENERAL_BONDING_MITM_PROTECTION = 0x05,
}
packet IoCapabilityRequestReply : Command (op_code = IO_CAPABILITY_REQUEST_REPLY) {
bd_addr : Address,
io_capability : IoCapability,
oob_present : OobDataPresent,
authentication_requirements : AuthenticationRequirements,
}
packet IoCapabilityRequestReplyComplete : CommandComplete (command_op_code = IO_CAPABILITY_REQUEST_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
packet UserConfirmationRequestReply : Command (op_code = USER_CONFIRMATION_REQUEST_REPLY) {
bd_addr : Address,
}
packet UserConfirmationRequestReplyComplete : CommandComplete (command_op_code = USER_CONFIRMATION_REQUEST_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
packet UserConfirmationRequestNegativeReply : Command (op_code = USER_CONFIRMATION_REQUEST_NEGATIVE_REPLY) {
bd_addr : Address,
}
packet UserConfirmationRequestNegativeReplyComplete : CommandComplete (command_op_code = USER_CONFIRMATION_REQUEST_NEGATIVE_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
packet UserPasskeyRequestReply : Command (op_code = USER_PASSKEY_REQUEST_REPLY) {
bd_addr : Address,
numeric_value : 32, // 000000-999999 decimal or 0x0-0xF423F
}
packet UserPasskeyRequestReplyComplete : CommandComplete (command_op_code = USER_PASSKEY_REQUEST_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
packet UserPasskeyRequestNegativeReply : Command (op_code = USER_PASSKEY_REQUEST_NEGATIVE_REPLY) {
bd_addr : Address,
}
packet UserPasskeyRequestNegativeReplyComplete : CommandComplete (command_op_code = USER_PASSKEY_REQUEST_NEGATIVE_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
packet RemoteOobDataRequestReply : Command (op_code = REMOTE_OOB_DATA_REQUEST_REPLY) {
bd_addr : Address,
c : 8[16],
r : 8[16],
}
packet RemoteOobDataRequestReplyComplete : CommandComplete (command_op_code = REMOTE_OOB_DATA_REQUEST_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
packet RemoteOobDataRequestNegativeReply : Command (op_code = REMOTE_OOB_DATA_REQUEST_NEGATIVE_REPLY) {
bd_addr : Address,
}
packet RemoteOobDataRequestNegativeReplyComplete : CommandComplete (command_op_code = REMOTE_OOB_DATA_REQUEST_NEGATIVE_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
packet IoCapabilityRequestNegativeReply : Command (op_code = IO_CAPABILITY_REQUEST_NEGATIVE_REPLY) {
bd_addr : Address,
reason : ErrorCode,
}
packet IoCapabilityRequestNegativeReplyComplete : CommandComplete (command_op_code = IO_CAPABILITY_REQUEST_NEGATIVE_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
enum ScoCodingFormatValues : 8 {
ULAW_LONG = 0x00,
ALAW_LONG = 0x01,
CVSD = 0x02,
TRANSPARENT = 0x03,
LINEAR_PCM = 0x04,
MSBC = 0x05,
LC3 = 0x06,
VENDOR_SPECIFIC = 0xFF,
}
struct ScoCodingFormat {
coding_format : ScoCodingFormatValues,
company_id : 16,
vendor_specific_codec_id : 16,
}
enum ScoPcmDataFormat : 8 {
NOT_USED = 0x00,
ONES_COMPLEMENT = 0x01,
TWOS_COMPLEMENT = 0x02,
SIGN_MAGNITUDE = 0x03,
UNSIGNED = 0x04,
}
enum ScoDataPath : 8 {
HCI = 0x00,
// 0x01 to 0xFE are Logical_Channel_Number.
// The meaning of the logical channels will be vendor specific.
// In GD and legacy Android Bluetooth stack, we use channel 0x01 for hardware
// offloaded SCO encoding
GD_PCM = 0x01,
AUDIO_TEST_MODE = 0xFF,
}
packet EnhancedSetupSynchronousConnection : Command (op_code = ENHANCED_SETUP_SYNCHRONOUS_CONNECTION) {
connection_handle: 12,
_reserved_ : 4,
// Next two items
// [0x00000000, 0xFFFFFFFE] Bandwidth in octets per second.
// [0xFFFFFFFF]: Don't care
transmit_bandwidth : 32,
receive_bandwidth : 32,
transmit_coding_format : ScoCodingFormat,
receive_coding_format : ScoCodingFormat,
// Next two items
// [0x0001, 0xFFFF]: the actual size of the over-the-air encoded frame in
// octets.
transmit_codec_frame_size : 16,
receive_codec_frame_size : 16,
// Next two items
// Host to Controller nominal data rate in octets per second.
input_bandwidth : 32,
output_bandwidth : 32,
input_coding_format : ScoCodingFormat,
output_coding_format : ScoCodingFormat,
// Next two items
// Size, in bits, of the sample or framed data
input_coded_data_size : 16,
output_coded_data_size : 16,
input_pcm_data_format : ScoPcmDataFormat,
output_pcm_data_format : ScoPcmDataFormat,
// Next two items
// The number of bit positions within an audio sample that the MSB of the
// sample is away from starting at the MSB of the data.
input_pcm_sample_payload_msb_position : 8,
output_pcm_sample_payload_msb_position : 8,
input_data_path : ScoDataPath,
output_data_path : ScoDataPath,
// Next two items
// [1, 255] The number of bits in each unit of data received from the Host
// over the audio data transport.
// [0] Not applicable (implied by the choice of audio data transport)
input_transport_unit_size : 8,
output_transport_unit_size : 8,
// [0x0004, 0xFFFE]: in milliseconds
// Upper limit represent the sum of the synchronous interval and the size
// of the eSCO window, where the eSCO window is reserved slots plus the
// retransmission window
// [0xFFFF]: don't care
max_latency: 16,
packet_type : 16, // See SynchronousPacketTypeBits
retransmission_effort : RetransmissionEffort,
}
test EnhancedSetupSynchronousConnection {
"\x3d\x04\x3b\x02\x00\x40\x1f\x00\x00\x40\x1f\x00\x00\x05\x00\x00\x00\x00\x05\x00\x00\x00\x00\x3c\x00\x3c\x00\x00\x7d\x00\x00\x00\x7d\x00\x00\x04\x00\x00\x00\x00\x04\x00\x00\x00\x00\x10\x00\x10\x00\x02\x02\x00\x00\x01\x01\x00\x00\x0d\x00\x88\x03\x02",
}
packet EnhancedSetupSynchronousConnectionStatus : CommandStatus (command_op_code = ENHANCED_SETUP_SYNCHRONOUS_CONNECTION) {
}
packet EnhancedAcceptSynchronousConnection : Command (op_code = ENHANCED_ACCEPT_SYNCHRONOUS_CONNECTION) {
bd_addr : Address,
// Next two items
// [0x00000000, 0xFFFFFFFE] Bandwidth in octets per second.
// [0xFFFFFFFF]: Don't care
transmit_bandwidth : 32,
receive_bandwidth : 32,
transmit_coding_format : ScoCodingFormat,
receive_coding_format : ScoCodingFormat,
// Next two items
// [0x0001, 0xFFFF]: the actual size of the over-the-air encoded frame in
// octets.
transmit_codec_frame_size : 16,
receive_codec_frame_size : 16,
// Next two items
// Host to Controller nominal data rate in octets per second.
input_bandwidth : 32,
output_bandwidth : 32,
input_coding_format : ScoCodingFormat,
output_coding_format : ScoCodingFormat,
// Next two items
// Size, in bits, of the sample or framed data
input_coded_data_size : 16,
output_coded_data_size : 16,
input_pcm_data_format : ScoPcmDataFormat,
output_pcm_data_format : ScoPcmDataFormat,
// Next two items
// The number of bit positions within an audio sample that the MSB of the
// sample is away from starting at the MSB of the data.
input_pcm_sample_payload_msb_position : 8,
output_pcm_sample_payload_msb_position : 8,
input_data_path : ScoDataPath,
output_data_path : ScoDataPath,
// Next two items
// [1, 255] The number of bits in each unit of data received from the Host
// over the audio data transport.
// [0] Not applicable (implied by the choice of audio data transport)
input_transport_unit_size : 8,
output_transport_unit_size : 8,
// [0x0004, 0xFFFE]: in milliseconds
// Upper limit represent the sum of the synchronous interval and the size
// of the eSCO window, where the eSCO window is reserved slots plus the
// retransmission window
// [0xFFFF]: don't care
max_latency : 16,
packet_type : 16, // See SynchronousPacketTypeBits
retransmission_effort : RetransmissionEffort,
}
packet EnhancedAcceptSynchronousConnectionStatus : CommandStatus (command_op_code = ENHANCED_ACCEPT_SYNCHRONOUS_CONNECTION) {
}
packet RemoteOobExtendedDataRequestReply : Command (op_code = REMOTE_OOB_EXTENDED_DATA_REQUEST_REPLY) {
bd_addr : Address,
c_192 : 8[16],
r_192 : 8[16],
c_256 : 8[16],
r_256 : 8[16],
}
packet RemoteOobExtendedDataRequestReplyComplete : CommandComplete (command_op_code = REMOTE_OOB_EXTENDED_DATA_REQUEST_REPLY) {
status : ErrorCode,
bd_addr : Address,
}
// LINK_POLICY
packet HoldMode : Command (op_code = HOLD_MODE) {
connection_handle : 12,
_reserved_ : 4,
hold_mode_max_interval: 16, // 0x0002-0xFFFE (1.25ms-40.9s)
hold_mode_min_interval: 16, // 0x0002-0xFFFE (1.25ms-40.9s)
}
packet HoldModeStatus : CommandStatus (command_op_code = HOLD_MODE) {
}
packet SniffMode : Command (op_code = SNIFF_MODE) {
connection_handle : 12,
_reserved_ : 4,
sniff_max_interval: 16, // 0x0002-0xFFFE (1.25ms-40.9s)
sniff_min_interval: 16, // 0x0002-0xFFFE (1.25ms-40.9s)
sniff_attempt: 16, // 0x0001-0x7FFF (1.25ms-40.9s)
sniff_timeout: 16, // 0x0000-0x7FFF (0ms-40.9s)
}
packet SniffModeStatus : CommandStatus (command_op_code = SNIFF_MODE) {
}
packet ExitSniffMode : Command (op_code = EXIT_SNIFF_MODE) {
connection_handle : 12,
_reserved_ : 4,
}
packet ExitSniffModeStatus : CommandStatus (command_op_code = EXIT_SNIFF_MODE) {
}
enum ServiceType : 8 {
NO_TRAFFIC = 0x00,
BEST_EFFORT = 0x01,
GUARANTEED = 0x02,
}
packet QosSetup : Command (op_code = QOS_SETUP) {
connection_handle : 12,
_reserved_ : 4,
_reserved_ : 8,
service_type : ServiceType,
token_rate : 32, // Octets/s
peak_bandwidth : 32, // Octets/s
latency : 32, // Octets/s
delay_variation : 32, // microseconds
}
packet QosSetupStatus : CommandStatus (command_op_code = QOS_SETUP) {
}
packet RoleDiscovery : Command (op_code = ROLE_DISCOVERY) {
connection_handle : 12,
_reserved_ : 4,
}
enum Role : 8 {
CENTRAL = 0x00,
PERIPHERAL = 0x01,
}
packet RoleDiscoveryComplete : CommandComplete (command_op_code = ROLE_DISCOVERY) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
current_role : Role,
}
packet SwitchRole : Command (op_code = SWITCH_ROLE) {
bd_addr : Address,
role : Role,
}
packet SwitchRoleStatus : CommandStatus (command_op_code = SWITCH_ROLE) {
}
packet ReadLinkPolicySettings : Command (op_code = READ_LINK_POLICY_SETTINGS) {
connection_handle : 12,
_reserved_ : 4,
}
enum LinkPolicy : 16 {
ENABLE_ROLE_SWITCH = 0x01,
ENABLE_HOLD_MODE = 0x02,
ENABLE_SNIFF_MODE = 0x04,
ENABLE_PARK_MODE = 0x08, // deprecated after 5.0
}
packet ReadLinkPolicySettingsComplete : CommandComplete (command_op_code = READ_LINK_POLICY_SETTINGS) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
link_policy_settings : 16,
}
packet WriteLinkPolicySettings : Command (op_code = WRITE_LINK_POLICY_SETTINGS) {
connection_handle : 12,
_reserved_ : 4,
link_policy_settings : 16,
}
packet WriteLinkPolicySettingsComplete : CommandComplete (command_op_code = WRITE_LINK_POLICY_SETTINGS) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
}
packet ReadDefaultLinkPolicySettings : Command (op_code = READ_DEFAULT_LINK_POLICY_SETTINGS) {
}
packet ReadDefaultLinkPolicySettingsComplete : CommandComplete (command_op_code = READ_DEFAULT_LINK_POLICY_SETTINGS) {
status : ErrorCode,
default_link_policy_settings : 16,
}
packet WriteDefaultLinkPolicySettings : Command (op_code = WRITE_DEFAULT_LINK_POLICY_SETTINGS) {
default_link_policy_settings : 16,
}
packet WriteDefaultLinkPolicySettingsComplete : CommandComplete (command_op_code = WRITE_DEFAULT_LINK_POLICY_SETTINGS) {
status : ErrorCode,
}
enum FlowDirection : 8 {
OUTGOING_FLOW = 0x00,
INCOMING_FLOW = 0x01,
}
packet FlowSpecification : Command (op_code = FLOW_SPECIFICATION) {
connection_handle : 12,
_reserved_ : 4,
_reserved_ : 8,
flow_direction : FlowDirection,
service_type : ServiceType,
token_rate : 32, // Octets/s
token_bucket_size : 32,
peak_bandwidth : 32, // Octets/s
access_latency : 32, // Octets/s
}
packet FlowSpecificationStatus : CommandStatus (command_op_code = FLOW_SPECIFICATION) {
}
packet SniffSubrating : Command (op_code = SNIFF_SUBRATING) {
connection_handle : 12,
_reserved_ : 4,
max_latency : 16, // 0x0002-0xFFFE (1.25ms-40.9s)
min_remote_timeout : 16, // 0x0000-0xFFFE (0-40.9s)
min_local_timeout: 16, // 0x0000-0xFFFE (0-40.9s)
}
packet SniffSubratingComplete : CommandComplete (command_op_code = SNIFF_SUBRATING) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
}
// CONTROLLER_AND_BASEBAND
packet SetEventMask : Command (op_code = SET_EVENT_MASK) {
event_mask : 64,
}
packet SetEventMaskComplete : CommandComplete (command_op_code = SET_EVENT_MASK) {
status : ErrorCode,
}
packet Reset : Command (op_code = RESET) {
}
test Reset {
"\x03\x0c\x00",
}
packet ResetComplete : CommandComplete (command_op_code = RESET) {
status : ErrorCode,
}
test ResetComplete {
"\x0e\x04\x01\x03\x0c\x00",
"\x0e\x04\x01\x03\x0c\x01", // unknown command
}
enum FilterType : 8 {
CLEAR_ALL_FILTERS = 0x00,
INQUIRY_RESULT = 0x01,
CONNECTION_SETUP = 0x02,
}
packet SetEventFilter : Command (op_code = SET_EVENT_FILTER) {
filter_type : FilterType,
_body_,
}
packet SetEventFilterComplete : CommandComplete (command_op_code = SET_EVENT_FILTER) {
status : ErrorCode,
}
packet SetEventFilterClearAll : SetEventFilter (filter_type = CLEAR_ALL_FILTERS) {
}
enum FilterConditionType : 8 {
ALL_DEVICES = 0x00,
CLASS_OF_DEVICE = 0x01,
ADDRESS = 0x02,
}
packet SetEventFilterInquiryResult : SetEventFilter (filter_type = INQUIRY_RESULT) {
filter_condition_type : FilterConditionType,
_body_,
}
packet SetEventFilterInquiryResultAllDevices : SetEventFilterInquiryResult (filter_condition_type = ALL_DEVICES) {
}
packet SetEventFilterInquiryResultClassOfDevice : SetEventFilterInquiryResult (filter_condition_type = CLASS_OF_DEVICE) {
class_of_device : 24,
class_of_device_mask : 24,
}
packet SetEventFilterInquiryResultAddress : SetEventFilterInquiryResult (filter_condition_type = ADDRESS) {
address : Address,
}
packet SetEventFilterConnectionSetup : SetEventFilter (filter_type = CONNECTION_SETUP) {
filter_condition_type : FilterConditionType,
_body_,
}
enum AutoAcceptFlag : 8 {
AUTO_ACCEPT_OFF = 0x01,
AUTO_ACCEPT_ON_ROLE_SWITCH_DISABLED = 0x02,
AUTO_ACCEPT_ON_ROLE_SWITCH_ENABLED = 0x03,
}
packet SetEventFilterConnectionSetupAllDevices : SetEventFilterConnectionSetup (filter_condition_type = ALL_DEVICES) {
auto_accept_flag : AutoAcceptFlag,
}
packet SetEventFilterConnectionSetupClassOfDevice : SetEventFilterConnectionSetup (filter_condition_type = CLASS_OF_DEVICE) {
class_of_device : 24,
class_of_device_mask : 24,
auto_accept_flag : AutoAcceptFlag,
}
packet SetEventFilterConnectionSetupAddress : SetEventFilterConnectionSetup (filter_condition_type = ADDRESS) {
address : Address,
auto_accept_flag : AutoAcceptFlag,
}
packet Flush : Command (op_code = FLUSH) {
connection_handle : 12,
_reserved_ : 4,
}
packet FlushComplete : CommandComplete (command_op_code = FLUSH) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
}
enum PinType : 8 {
VARIABLE = 0,
FIXED = 1,
}
packet ReadPinType : Command (op_code = READ_PIN_TYPE) {
}
packet ReadPinTypeComplete : CommandComplete (command_op_code = READ_PIN_TYPE) {
status : ErrorCode,
pin_type : PinType,
}
packet WritePinType : Command (op_code = WRITE_PIN_TYPE) {
pin_type : PinType,
}
packet WritePinTypeComplete : CommandComplete (command_op_code = WRITE_PIN_TYPE) {
status : ErrorCode,
}
enum ReadStoredLinkKeyReadAllFlag : 8 {
SPECIFIED_BD_ADDR = 0x00,
ALL = 0x01,
}
packet ReadStoredLinkKey : Command (op_code = READ_STORED_LINK_KEY) {
bd_addr : Address,
read_all_flag : ReadStoredLinkKeyReadAllFlag,
}
packet ReadStoredLinkKeyComplete : CommandComplete (command_op_code = READ_STORED_LINK_KEY) {
status : ErrorCode,
max_num_keys : 16,
num_keys_read : 16,
}
struct KeyAndAddress {
address : Address,
link_key : 8[16],
}
packet WriteStoredLinkKey : Command (op_code = WRITE_STORED_LINK_KEY) {
_count_(keys_to_write) : 8, // 0x01-0x0B
keys_to_write : KeyAndAddress[],
}
packet WriteStoredLinkKeyComplete : CommandComplete (command_op_code = WRITE_STORED_LINK_KEY) {
status : ErrorCode,
num_keys_written : 8,
}
enum DeleteStoredLinkKeyDeleteAllFlag : 8 {
SPECIFIED_BD_ADDR = 0x00,
ALL = 0x01,
}
packet DeleteStoredLinkKey : Command (op_code = DELETE_STORED_LINK_KEY) {
bd_addr : Address,
delete_all_flag : DeleteStoredLinkKeyDeleteAllFlag,
}
packet DeleteStoredLinkKeyComplete : CommandComplete (command_op_code = DELETE_STORED_LINK_KEY) {
status : ErrorCode,
num_keys_deleted : 16,
}
packet WriteLocalName : Command (op_code = WRITE_LOCAL_NAME) {
local_name : 8[248], // Null-terminated UTF-8 encoded name
}
packet WriteLocalNameComplete : CommandComplete (command_op_code = WRITE_LOCAL_NAME) {
status : ErrorCode,
}
packet ReadLocalName : Command (op_code = READ_LOCAL_NAME) {
}
packet ReadLocalNameComplete : CommandComplete (command_op_code = READ_LOCAL_NAME) {
status : ErrorCode,
local_name : 8[248], // Null-terminated UTF-8 encoded name
}
packet ReadConnectionAcceptTimeout : Command (op_code = READ_CONNECTION_ACCEPT_TIMEOUT) {
}
packet ReadConnectionAcceptTimeoutComplete : CommandComplete (command_op_code = READ_CONNECTION_ACCEPT_TIMEOUT) {
status : ErrorCode,
conn_accept_timeout : 16, // 0x0001 to 0xB540 (N * 0.625 ms) 0.625 ms to 29 s
}
packet WriteConnectionAcceptTimeout : Command (op_code = WRITE_CONNECTION_ACCEPT_TIMEOUT) {
conn_accept_timeout : 16, // 0x0001 to 0xB540 (N * 0.625 ms) 0.625 ms to 29 s, Default 0x1FA0, 5.06s
}
packet WriteConnectionAcceptTimeoutComplete : CommandComplete (command_op_code = WRITE_CONNECTION_ACCEPT_TIMEOUT) {
status : ErrorCode,
}
packet ReadPageTimeout : Command (op_code = READ_PAGE_TIMEOUT) {
}
test ReadPageTimeout {
"\x17\x0c\x00",
}
packet ReadPageTimeoutComplete : CommandComplete (command_op_code = READ_PAGE_TIMEOUT) {
status : ErrorCode,
page_timeout : 16,
}
test ReadPageTimeoutComplete {
"\x0e\x06\x01\x17\x0c\x00\x11\x22",
}
packet WritePageTimeout : Command (op_code = WRITE_PAGE_TIMEOUT) {
page_timeout : 16,
}
test WritePageTimeout {
"\x18\x0c\x02\x00\x20",
}
packet WritePageTimeoutComplete : CommandComplete (command_op_code = WRITE_PAGE_TIMEOUT) {
status : ErrorCode,
}
test WritePageTimeoutComplete {
"\x0e\x04\x01\x18\x0c\x00",
}
enum ScanEnable : 8 {
NO_SCANS = 0x00,
INQUIRY_SCAN_ONLY = 0x01,
PAGE_SCAN_ONLY = 0x02,
INQUIRY_AND_PAGE_SCAN = 0x03,
}
packet ReadScanEnable : Command (op_code = READ_SCAN_ENABLE) {
}
packet ReadScanEnableComplete : CommandComplete (command_op_code = READ_SCAN_ENABLE) {
status : ErrorCode,
scan_enable : ScanEnable,
}
packet WriteScanEnable : Command (op_code = WRITE_SCAN_ENABLE) {
scan_enable : ScanEnable,
}
packet WriteScanEnableComplete : CommandComplete (command_op_code = WRITE_SCAN_ENABLE) {
status : ErrorCode,
}
packet ReadPageScanActivity : Command (op_code = READ_PAGE_SCAN_ACTIVITY) {
}
packet ReadPageScanActivityComplete : CommandComplete (command_op_code = READ_PAGE_SCAN_ACTIVITY) {
status : ErrorCode,
page_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms
page_scan_window : 16, // 0x0011 to PageScanInterval
}
packet WritePageScanActivity : Command (op_code = WRITE_PAGE_SCAN_ACTIVITY) {
page_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms
page_scan_window : 16, // 0x0011 to PageScanInterval
}
packet WritePageScanActivityComplete : CommandComplete (command_op_code = WRITE_PAGE_SCAN_ACTIVITY) {
status : ErrorCode,
}
packet ReadInquiryScanActivity : Command (op_code = READ_INQUIRY_SCAN_ACTIVITY) {
}
test ReadInquiryScanActivity {
"\x1d\x0c\x00",
}
packet ReadInquiryScanActivityComplete : CommandComplete (command_op_code = READ_INQUIRY_SCAN_ACTIVITY) {
status : ErrorCode,
inquiry_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms
inquiry_scan_window : 16, // Range: 0x0011 to 0x1000
}
test ReadInquiryScanActivityComplete {
"\x0e\x08\x01\x1d\x0c\x00\xaa\xbb\xcc\xdd",
}
packet WriteInquiryScanActivity : Command (op_code = WRITE_INQUIRY_SCAN_ACTIVITY) {
inquiry_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms
inquiry_scan_window : 16, // Range: 0x0011 to 0x1000
}
test WriteInquiryScanActivity {
"\x1e\x0c\x04\x00\x08\x12\x00",
}
packet WriteInquiryScanActivityComplete : CommandComplete (command_op_code = WRITE_INQUIRY_SCAN_ACTIVITY) {
status : ErrorCode,
}
test WriteInquiryScanActivityComplete {
"\x0e\x04\x01\x1e\x0c\x00",
}
enum AuthenticationEnable : 8 {
NOT_REQUIRED = 0x00,
REQUIRED = 0x01,
}
packet ReadAuthenticationEnable : Command (op_code = READ_AUTHENTICATION_ENABLE) {
}
packet ReadAuthenticationEnableComplete : CommandComplete (command_op_code = READ_AUTHENTICATION_ENABLE) {
status : ErrorCode,
authentication_enable : AuthenticationEnable,
}
packet WriteAuthenticationEnable : Command (op_code = WRITE_AUTHENTICATION_ENABLE) {
authentication_enable : AuthenticationEnable,
}
packet WriteAuthenticationEnableComplete : CommandComplete (command_op_code = WRITE_AUTHENTICATION_ENABLE) {
status : ErrorCode,
}
packet ReadClassOfDevice : Command (op_code = READ_CLASS_OF_DEVICE) {
}
packet ReadClassOfDeviceComplete : CommandComplete (command_op_code = READ_CLASS_OF_DEVICE) {
status : ErrorCode,
class_of_device : 24,
}
packet WriteClassOfDevice : Command (op_code = WRITE_CLASS_OF_DEVICE) {
class_of_device : 24,
}
packet WriteClassOfDeviceComplete : CommandComplete (command_op_code = WRITE_CLASS_OF_DEVICE) {
status : ErrorCode,
}
packet ReadVoiceSetting : Command (op_code = READ_VOICE_SETTING) {
}
packet ReadVoiceSettingComplete : CommandComplete (command_op_code = READ_VOICE_SETTING) {
status : ErrorCode,
voice_setting : 10,
_reserved_ : 6,
}
packet WriteVoiceSetting : Command (op_code = WRITE_VOICE_SETTING) {
voice_setting : 10,
_reserved_ : 6,
}
packet WriteVoiceSettingComplete : CommandComplete (command_op_code = WRITE_VOICE_SETTING) {
status : ErrorCode,
}
packet ReadAutomaticFlushTimeout : Command (op_code = READ_AUTOMATIC_FLUSH_TIMEOUT) {
connection_handle : 12,
_reserved_ : 4,
}
packet ReadAutomaticFlushTimeoutComplete : CommandComplete (command_op_code = READ_AUTOMATIC_FLUSH_TIMEOUT) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
flush_timeout : 16,
}
packet WriteAutomaticFlushTimeout : Command (op_code = WRITE_AUTOMATIC_FLUSH_TIMEOUT) {
connection_handle : 12,
_reserved_ : 4,
flush_timeout : 16, // 0x0000-0x07FF Default 0x0000 (No Automatic Flush)
}
packet WriteAutomaticFlushTimeoutComplete : CommandComplete (command_op_code = WRITE_AUTOMATIC_FLUSH_TIMEOUT) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
}
packet ReadNumBroadcastRetransmits : Command (op_code = READ_NUM_BROADCAST_RETRANSMITS) {
}
packet ReadNumBroadcastRetransmitsComplete : CommandComplete (command_op_code = READ_NUM_BROADCAST_RETRANSMITS) {
status : ErrorCode,
num_broadcast_retransmissions : 8,
}
packet WriteNumBroadcastRetransmits : Command (op_code = WRITE_NUM_BROADCAST_RETRANSMITS) {
num_broadcast_retransmissions : 8,
}
packet WriteNumBroadcastRetransmitsComplete : CommandComplete (command_op_code = WRITE_NUM_BROADCAST_RETRANSMITS) {
status : ErrorCode,
}
enum HoldModeActivity : 8 {
MAINTAIN_CURRENT_POWER_STATE = 0x00,
SUSPEND_PAGE_SCAN = 0x01,
SUSPEND_INQUIRY_SCAN = 0x02,
SUSPEND_PERIODIC_INQUIRY = 0x03,
}
packet ReadHoldModeActivity : Command (op_code = READ_HOLD_MODE_ACTIVITY) {
}
packet ReadHoldModeActivityComplete : CommandComplete (command_op_code = READ_HOLD_MODE_ACTIVITY) {
status : ErrorCode,
hold_mode_activity : HoldModeActivity,
}
packet WriteHoldModeActivity : Command (op_code = WRITE_HOLD_MODE_ACTIVITY) {
hold_mode_activity : HoldModeActivity,
}
packet WriteHoldModeActivityComplete : CommandComplete (command_op_code = WRITE_HOLD_MODE_ACTIVITY) {
status : ErrorCode,
}
enum TransmitPowerLevelType : 8 {
CURRENT = 0x00,
MAXIMUM = 0x01,
}
packet ReadTransmitPowerLevel : Command (op_code = READ_TRANSMIT_POWER_LEVEL) {
connection_handle : 12,
_reserved_ : 4,
transmit_power_level_type : TransmitPowerLevelType,
}
packet ReadTransmitPowerLevelComplete : CommandComplete (command_op_code = READ_TRANSMIT_POWER_LEVEL) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
transmit_power_level : 8,
}
packet ReadSynchronousFlowControlEnable : Command (op_code = READ_SYNCHRONOUS_FLOW_CONTROL_ENABLE) {
}
packet ReadSynchronousFlowControlEnableComplete : CommandComplete (command_op_code = READ_SYNCHRONOUS_FLOW_CONTROL_ENABLE) {
status : ErrorCode,
enable : Enable,
}
packet WriteSynchronousFlowControlEnable : Command (op_code = WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE) {
enable : Enable,
}
packet WriteSynchronousFlowControlEnableComplete : CommandComplete (command_op_code = WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE) {
status : ErrorCode,
}
packet SetControllerToHostFlowControl : Command (op_code = SET_CONTROLLER_TO_HOST_FLOW_CONTROL) {
acl : 1,
synchronous : 1,
_reserved_ : 6,
}
packet SetControllerToHostFlowControlComplete : CommandComplete (command_op_code = SET_CONTROLLER_TO_HOST_FLOW_CONTROL) {
status : ErrorCode,
}
packet HostBufferSize : Command (op_code = HOST_BUFFER_SIZE) {
host_acl_data_packet_length : 16,
host_synchronous_data_packet_length : 8,
host_total_num_acl_data_packets : 16,
host_total_num_synchronous_data_packets : 16,
}
test HostBufferSize {
"\x33\x0c\x07\x9b\x06\xff\x14\x00\x0a\x00",
}
packet HostBufferSizeComplete : CommandComplete (command_op_code = HOST_BUFFER_SIZE) {
status : ErrorCode,
}
test HostBufferSizeComplete {
"\x0e\x04\x01\x33\x0c\x00",
}
struct CompletedPackets {
connection_handle : 12,
_reserved_ : 4,
host_num_of_completed_packets : 16,
}
packet HostNumCompletedPackets : Command (op_code = HOST_NUMBER_OF_COMPLETED_PACKETS) {
_count_(completed_packets) : 8,
completed_packets : CompletedPackets[],
}
packet HostNumCompletedPacketsError : CommandComplete (command_op_code = HOST_NUMBER_OF_COMPLETED_PACKETS) {
error_code : ErrorCode,
}
packet ReadLinkSupervisionTimeout : Command (op_code = READ_LINK_SUPERVISION_TIMEOUT) {
connection_handle : 12,
_reserved_ : 4,
}
packet ReadLinkSupervisionTimeoutComplete : CommandComplete (command_op_code = READ_LINK_SUPERVISION_TIMEOUT) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
link_supervision_timeout : 16, // 0x001-0xFFFF (0.625ms-40.9s)
}
packet WriteLinkSupervisionTimeout : Command (op_code = WRITE_LINK_SUPERVISION_TIMEOUT) {
connection_handle : 12,
_reserved_ : 4,
link_supervision_timeout : 16, // 0x001-0xFFFF (0.625ms-40.9s)
}
packet WriteLinkSupervisionTimeoutComplete : CommandComplete (command_op_code = WRITE_LINK_SUPERVISION_TIMEOUT) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
}
packet ReadNumberOfSupportedIac : Command (op_code = READ_NUMBER_OF_SUPPORTED_IAC) {
}
test ReadNumberOfSupportedIac {
"\x38\x0c\x00",
}
packet ReadNumberOfSupportedIacComplete : CommandComplete (command_op_code = READ_NUMBER_OF_SUPPORTED_IAC) {
status : ErrorCode,
num_support_iac : 8,
}
test ReadNumberOfSupportedIacComplete {
"\x0e\x05\x01\x38\x0c\x00\x99",
}
packet ReadCurrentIacLap : Command (op_code = READ_CURRENT_IAC_LAP) {
}
test ReadCurrentIacLap {
"\x39\x0c\x00",
}
packet ReadCurrentIacLapComplete : CommandComplete (command_op_code = READ_CURRENT_IAC_LAP) {
status : ErrorCode,
_count_(laps_to_read) : 8,
laps_to_read : Lap[],
}
test ReadCurrentIacLapComplete {
"\x0e\x0b\x01\x39\x0c\x00\x02\x11\x8b\x9e\x22\x8b\x9e",
}
packet WriteCurrentIacLap : Command (op_code = WRITE_CURRENT_IAC_LAP) {
_count_(laps_to_write) : 8,
laps_to_write : Lap[],
}
test WriteCurrentIacLap {
"\x3a\x0c\x07\x02\x11\x8b\x9e\x22\x8b\x9e",
}
packet WriteCurrentIacLapComplete : CommandComplete (command_op_code = WRITE_CURRENT_IAC_LAP) {
status : ErrorCode,
}
test WriteCurrentIacLapComplete {
"\x0e\x04\x01\x3a\x0c\x00",
}
packet SetAfhHostChannelClassification : Command (op_code = SET_AFH_HOST_CHANNEL_CLASSIFICATION) {
afh_host_channel_classification : 8[10],
}
packet SetAfhHostChannelClassificationComplete : CommandComplete (command_op_code = SET_AFH_HOST_CHANNEL_CLASSIFICATION) {
status : ErrorCode,
}
enum InquiryScanType : 8 {
STANDARD = 0x00,
INTERLACED = 0x01,
}
packet ReadInquiryScanType : Command (op_code = READ_INQUIRY_SCAN_TYPE) {
}
packet ReadInquiryScanTypeComplete : CommandComplete (command_op_code = READ_INQUIRY_SCAN_TYPE) {
status : ErrorCode,
inquiry_scan_type : InquiryScanType,
}
packet WriteInquiryScanType : Command (op_code = WRITE_INQUIRY_SCAN_TYPE) {
inquiry_scan_type : InquiryScanType,
}
packet WriteInquiryScanTypeComplete : CommandComplete (command_op_code = WRITE_INQUIRY_SCAN_TYPE) {
status : ErrorCode,
}
enum InquiryMode : 8 {
STANDARD = 0x00,
RSSI = 0x01,
RSSI_OR_EXTENDED = 0x02,
}
packet ReadInquiryMode : Command (op_code = READ_INQUIRY_MODE) {
}
packet ReadInquiryModeComplete : CommandComplete (command_op_code = READ_INQUIRY_MODE) {
status : ErrorCode,
inquiry_mode : InquiryMode,
}
packet WriteInquiryMode : Command (op_code = WRITE_INQUIRY_MODE) {
inquiry_mode : InquiryMode,
}
packet WriteInquiryModeComplete : CommandComplete (command_op_code = WRITE_INQUIRY_MODE) {
status : ErrorCode,
}
enum PageScanType : 8 {
STANDARD = 0x00,
INTERLACED = 0x01,
}
packet ReadPageScanType : Command (op_code = READ_PAGE_SCAN_TYPE) {
}
packet ReadPageScanTypeComplete : CommandComplete (command_op_code = READ_PAGE_SCAN_TYPE) {
status : ErrorCode,
page_scan_type : PageScanType,
}
packet WritePageScanType : Command (op_code = WRITE_PAGE_SCAN_TYPE) {
page_scan_type : PageScanType,
}
packet WritePageScanTypeComplete : CommandComplete (command_op_code = WRITE_PAGE_SCAN_TYPE) {
status : ErrorCode,
}
packet ReadAfhChannelAssessmentMode : Command (op_code = READ_AFH_CHANNEL_ASSESSMENT_MODE) {
}
packet ReadAfhChannelAssessmentModeComplete : CommandComplete (command_op_code = READ_AFH_CHANNEL_ASSESSMENT_MODE) {
status : ErrorCode,
controller_channel_assessment : Enable,
}
packet WriteAfhChannelAssessmentMode : Command (op_code = WRITE_AFH_CHANNEL_ASSESSMENT_MODE) {
controller_channel_assessment : Enable,
}
packet WriteAfhChannelAssessmentModeComplete : CommandComplete (command_op_code = WRITE_AFH_CHANNEL_ASSESSMENT_MODE) {
status : ErrorCode,
}
enum FecRequired : 8 {
NOT_REQUIRED = 0x00,
REQUIRED = 0x01,
}
packet ReadExtendedInquiryResponse : Command (op_code = READ_EXTENDED_INQUIRY_RESPONSE) {
}
packet ReadExtendedInquiryResponseComplete : CommandComplete (command_op_code = READ_EXTENDED_INQUIRY_RESPONSE) {
status : ErrorCode,
fec_required : FecRequired,
extended_inquiry_response : 8[240],
}
packet WriteExtendedInquiryResponse : Command (op_code = WRITE_EXTENDED_INQUIRY_RESPONSE) {
fec_required : FecRequired,
extended_inquiry_response : 8[240],
}
packet WriteExtendedInquiryResponseComplete : CommandComplete (command_op_code = WRITE_EXTENDED_INQUIRY_RESPONSE) {
status : ErrorCode,
}
packet RefreshEncryptionKey : Command (op_code = REFRESH_ENCRYPTION_KEY) {
connection_handle : 12,
_reserved_ : 4,
}
packet RefreshEncryptionKeyStatus : CommandStatus (command_op_code = REFRESH_ENCRYPTION_KEY) {
}
packet ReadSimplePairingMode : Command (op_code = READ_SIMPLE_PAIRING_MODE) {
}
packet ReadSimplePairingModeComplete : CommandComplete (command_op_code = READ_SIMPLE_PAIRING_MODE) {
status : ErrorCode,
simple_pairing_mode : Enable,
}
packet WriteSimplePairingMode : Command (op_code = WRITE_SIMPLE_PAIRING_MODE) {
simple_pairing_mode : Enable,
}
test WriteSimplePairingMode {
"\x56\x0c\x01\x01",
}
packet WriteSimplePairingModeComplete : CommandComplete (command_op_code = WRITE_SIMPLE_PAIRING_MODE) {
status : ErrorCode,
}
test WriteSimplePairingModeComplete {
"\x0e\x04\x01\x56\x0c\x00",
}
packet ReadLocalOobData : Command (op_code = READ_LOCAL_OOB_DATA) {
}
packet ReadLocalOobDataComplete : CommandComplete (command_op_code = READ_LOCAL_OOB_DATA) {
status : ErrorCode,
c : 8[16],
r : 8[16],
}
packet ReadInquiryResponseTransmitPowerLevel : Command (op_code = READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL) {
}
packet ReadInquiryResponseTransmitPowerLevelComplete : CommandComplete (command_op_code = READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL) {
status : ErrorCode,
tx_power : 8, // (-70dBm to 20dBm)
}
packet WriteInquiryTransmitPowerLevel : Command (op_code = WRITE_INQUIRY_TRANSMIT_POWER_LEVEL) {
tx_power : 8,
}
packet WriteInquiryResponseTransmitPowerLevelComplete : CommandComplete (command_op_code = WRITE_INQUIRY_TRANSMIT_POWER_LEVEL) {
status : ErrorCode,
}
enum KeypressNotificationType : 8 {
ENTRY_STARTED = 0,
DIGIT_ENTERED = 1,
DIGIT_ERASED = 2,
CLEARED = 3,
ENTRY_COMPLETED = 4,
}
packet SendKeypressNotification : Command (op_code = SEND_KEYPRESS_NOTIFICATION) {
bd_addr : Address,
notification_type : KeypressNotificationType,
}
packet SendKeypressNotificationComplete : CommandComplete (command_op_code = SEND_KEYPRESS_NOTIFICATION) {
status : ErrorCode,
bd_addr : Address,
}
packet SetEventMaskPage2 : Command (op_code = SET_EVENT_MASK_PAGE_2) {
event_mask_page_2: 64,
}
packet SetEventMaskPage2Complete : CommandComplete (command_op_code = SET_EVENT_MASK_PAGE_2) {
status: ErrorCode,
}
packet ReadEnhancedTransmitPowerLevel : Command (op_code = READ_ENHANCED_TRANSMIT_POWER_LEVEL) {
connection_handle : 12,
_reserved_ : 4,
transmit_power_level_type : TransmitPowerLevelType,
}
packet ReadEnhancedTransmitPowerLevelComplete : CommandComplete (command_op_code = READ_ENHANCED_TRANSMIT_POWER_LEVEL) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
tx_power_level_gfsk : 8,
tx_power_level_dqpsk : 8,
tx_power_level_8dpsk : 8,
}
packet ReadLeHostSupport : Command (op_code = READ_LE_HOST_SUPPORT) {
}
packet ReadLeHostSupportComplete : CommandComplete (command_op_code = READ_LE_HOST_SUPPORT) {
status : ErrorCode,
le_supported_host : Enable,
_reserved_ : 8, // simultaneous_le_host reserved since 4.1
}
packet WriteLeHostSupport : Command (op_code = WRITE_LE_HOST_SUPPORT) {
le_supported_host : Enable,
simultaneous_le_host : Enable, // According to the spec, this should be 0x00 since 4.1
}
test WriteLeHostSupport {
"\x6d\x0c\x02\x01\x01",
}
packet WriteLeHostSupportComplete : CommandComplete (command_op_code = WRITE_LE_HOST_SUPPORT) {
status : ErrorCode,
}
test WriteLeHostSupportComplete {
"\x0e\x04\x01\x6d\x0c\x00",
}
packet ReadSecureConnectionsHostSupport : Command (op_code = READ_SECURE_CONNECTIONS_HOST_SUPPORT) {
}
packet ReadSecureConnectionsHostSupportComplete : CommandComplete (command_op_code = READ_SECURE_CONNECTIONS_HOST_SUPPORT) {
status : ErrorCode,
secure_connections_host_support : Enable,
}
packet WriteSecureConnectionsHostSupport : Command (op_code = WRITE_SECURE_CONNECTIONS_HOST_SUPPORT) {
secure_connections_host_support : Enable,
}
test WriteSecureConnectionsHostSupport {
"\x7a\x0c\x01\x01",
}
packet WriteSecureConnectionsHostSupportComplete : CommandComplete (command_op_code = WRITE_SECURE_CONNECTIONS_HOST_SUPPORT) {
status : ErrorCode,
}
test WriteSecureConnectionsHostSupportComplete {
"\x0e\x04\x01\x7a\x0c\x00",
}
packet ReadLocalOobExtendedData : Command (op_code = READ_LOCAL_OOB_EXTENDED_DATA) {
}
packet ReadLocalOobExtendedDataComplete : CommandComplete (command_op_code = READ_LOCAL_OOB_EXTENDED_DATA) {
status : ErrorCode,
c_192 : 8[16],
r_192 : 8[16],
c_256 : 8[16],
r_256 : 8[16],
}
packet SetEcosystemBaseInterval : Command (op_code = SET_ECOSYSTEM_BASE_INTERVAL) {
interval : 16,
}
packet SetEcosystemBaseIntervalComplete : CommandComplete (command_op_code = SET_ECOSYSTEM_BASE_INTERVAL) {
status : ErrorCode,
}
enum DataPathDirection : 8 {
INPUT = 0,
OUTPUT = 1,
}
packet ConfigureDataPath : Command (op_code = CONFIGURE_DATA_PATH) {
data_path_direction : DataPathDirection,
data_path_id : 8,
_size_(vendor_specific_config) : 8,
vendor_specific_config : 8[],
}
packet ConfigureDataPathComplete : CommandComplete (command_op_code = CONFIGURE_DATA_PATH) {
status : ErrorCode,
}
packet SetMinEncryptionKeySize : Command (op_code = SET_MIN_ENCRYPTION_KEY_SIZE) {
min_encryption_key_size : 8,
}
packet SetMinEncryptionKeySizeComplete : CommandComplete (command_op_code = SET_MIN_ENCRYPTION_KEY_SIZE) {
status : ErrorCode,
}
// INFORMATIONAL_PARAMETERS
packet ReadLocalVersionInformation : Command (op_code = READ_LOCAL_VERSION_INFORMATION) {
}
test ReadLocalVersionInformation {
"\x01\x10\x00",
}
enum HciVersion : 8 {
V_1_0B = 0x00,
V_1_1 = 0x01,
V_1_2 = 0x02,
V_2_0 = 0x03, // + EDR
V_2_1 = 0x04, // + EDR
V_3_0 = 0x05, // + HS
V_4_0 = 0x06,
V_4_1 = 0x07,
V_4_2 = 0x08,
V_5_0 = 0x09,
V_5_1 = 0x0a,
V_5_2 = 0x0b,
V_5_3 = 0x0c,
V_5_4 = 0x0d,
V_6_0 = 0x0e,
}
enum LmpVersion : 8 {
V_1_0B = 0x00, // withdrawn
V_1_1 = 0x01, // withdrawn
V_1_2 = 0x02, // withdrawn
V_2_0 = 0x03, // + EDR
V_2_1 = 0x04, // + EDR
V_3_0 = 0x05, // + HS
V_4_0 = 0x06,
V_4_1 = 0x07,
V_4_2 = 0x08,
V_5_0 = 0x09,
V_5_1 = 0x0a,
V_5_2 = 0x0b,
V_5_3 = 0x0c,
V_5_4 = 0x0d,
V_6_0 = 0x0e,
}
struct LocalVersionInformation {
hci_version : HciVersion,
hci_revision : 16,
lmp_version : LmpVersion,
manufacturer_name : 16,
lmp_subversion : 16,
}
packet ReadLocalVersionInformationComplete : CommandComplete (command_op_code = READ_LOCAL_VERSION_INFORMATION) {
status : ErrorCode,
local_version_information : LocalVersionInformation,
}
test ReadLocalVersionInformationComplete {
"\x0e\x0c\x01\x01\x10\x00\x09\x00\x00\x09\x1d\x00\xbe\x02",
}
packet ReadLocalSupportedCommands : Command (op_code = READ_LOCAL_SUPPORTED_COMMANDS) {
}
test ReadLocalSupportedCommands {
"\x02\x10\x00",
}
packet ReadLocalSupportedCommandsComplete : CommandComplete (command_op_code = READ_LOCAL_SUPPORTED_COMMANDS) {
status : ErrorCode,
supported_commands : 8[64],
}
test ReadLocalSupportedCommandsComplete {
"\x0e\x44\x01\x02\x10\x00\xff\xff\xff\x03\xce\xff\xef\xff\xff\xff\xff\x7f\xf2\x0f\xe8\xfe\x3f\xf7\x83\xff\x1c\x00\x00\x00\x61\xff\xff\xff\x7f\xbe\x20\xf5\xff\xf0\xff\xff\xff\xff\xff\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
}
packet ReadLocalSupportedFeatures : Command (op_code = READ_LOCAL_SUPPORTED_FEATURES) {
}
packet ReadLocalSupportedFeaturesComplete : CommandComplete (command_op_code = READ_LOCAL_SUPPORTED_FEATURES) {
status : ErrorCode,
lmp_features : 64,
}
packet ReadLocalExtendedFeatures : Command (op_code = READ_LOCAL_EXTENDED_FEATURES) {
page_number : 8,
}
test ReadLocalExtendedFeatures {
"\x04\x10\x01\x00",
"\x04\x10\x01\x01",
"\x04\x10\x01\x02",
}
enum LMPFeaturesPage0Bits: 64 {
// Byte 0
LMP_3_SLOT_PACKETS = 0x01,
LMP_5_SLOT_PACKETS = 0x02,
ENCRYPTION = 0x04,
SLOT_OFFSET = 0x08,
TIMING_ACCURACY = 0x10,
ROLE_SWITCH = 0x20,
HOLD_MODE = 0x40,
SNIFF_MODE = 0x80,
// Byte 1
POWER_CONTROL_REQUESTS = 0x0200,
CHANNEL_QUALITY_DRIVEN_DATA_RATE = 0x0400,
SCO_LINK = 0x0800,
HV2_PACKETS = 0x1000,
HV3_PACKETS = 0x2000,
M_LAW_LOG_SYNCHRONOUS_DATA = 0x4000,
A_LAW_LOG_SYNCHRONOUS_DATA = 0x8000,
// Byte 2
CVSD_SYNCHRONOUS_DATA = 0x010000,
PAGING_PARAMETER_NEGOTIATION = 0x020000,
POWER_CONTROL = 0x040000,
TRANSPARENT_SYNCHRONOUS_DATA = 0x080000,
FLOW_CONTROL_LAG_LEAST_SIGNIFICANT_BIT = 0x100000,
FLOW_CONTROL_LAG_MIDDLE_BIT = 0x200000,
FLOW_CONTROL_LAG_MOST_SIGNIFICANT_BIT = 0x400000,
BROADCAST_ENCRYPTION = 0x800000,
// Byte 3
ENHANCED_DATA_RATE_ACL_2_MB_S_MODE = 0x02000000,
ENHANCED_DATA_RATE_ACL_3_MB_S_MODE = 0x04000000,
ENHANCED_INQUIRY_SCAN = 0x08000000,
INTERLACED_INQUIRY_SCAN = 0x10000000,
INTERLACED_PAGE_SCAN = 0x20000000,
RSSI_WITH_INQUIRY_RESULTS = 0x40000000,
EXTENDED_SCO_LINK = 0x80000000,
// Byte 4
EV4_PACKETS = 0x0100000000,
EV5_PACKETS = 0x0200000000,
AFH_CAPABLE_PERIPHERAL = 0x0800000000,
AFH_CLASSIFICATION_PERIPHERAL = 0x1000000000,
BR_EDR_NOT_SUPPORTED = 0x2000000000,
LE_SUPPORTED_CONTROLLER = 0x4000000000,
LMP_3_SLOT_ENHANCED_DATA_RATE_ACL_PACKETS = 0x8000000000,
// Byte 5
LMP_5_SLOT_ENHANCED_DATA_RATE_ACL_PACKETS = 0x010000000000,
SNIFF_SUBRATING = 0x020000000000,
PAUSE_ENCRYPTION = 0x040000000000,
AFH_CAPABLE_CENTRAL = 0x080000000000,
AFH_CLASSIFICATION_CENTRAL = 0x100000000000,
ENHANCED_DATA_RATE_ESCO_2_MB_S_MODE = 0x200000000000,
ENHANCED_DATA_RATE_ESCO_3_MB_S_MODE = 0x400000000000,
LMP_3_SLOT_ENHANCED_DATA_RATE_ESCO_PACKETS = 0x800000000000,
// Byte 6
EXTENDED_INQUIRY_RESPONSE = 0x01000000000000,
SIMULTANEOUS_LE_AND_BR_CONTROLLER = 0x02000000000000,
SECURE_SIMPLE_PAIRING_CONTROLLER = 0x08000000000000,
ENCAPSULATED_PDU = 0x10000000000000,
ERRONEOUS_DATA_REPORTING = 0x20000000000000,
NON_FLUSHABLE_PACKET_BOUNDARY_FLAG = 0x40000000000000,
// Byte 7
HCI_LINK_SUPERVISION_TIMEOUT_CHANGED_EVENT = 0x0100000000000000,
VARIABLE_INQUIRY_TX_POWER_LEVEL = 0x0200000000000000,
ENHANCED_POWER_CONTROL = 0x0400000000000000,
EXTENDED_FEATURES = 0x8000000000000000,
}
enum LMPFeaturesPage1Bits: 64 {
// Byte 0
SECURE_SIMPLE_PAIRING_HOST_SUPPORT = 0x01,
LE_SUPPORTED_HOST = 0x02,
SIMULTANEOUS_LE_AND_BR_HOST = 0x04,
SECURE_CONNECTIONS_HOST_SUPPORT = 0x08,
}
enum LMPFeaturesPage2Bits: 64 {
// Byte 0
CONNECTIONLESS_PERIPHERAL_BROADCAST_TRANSMITTER_OPERATION = 0x01,
CONNECTIONLESS_PERIPHERAL_BROADCAST_RECEIVER_OPERATION = 0x02,
SYNCHRONIZATION_TRAIN = 0x04,
SYNCHRONIZATION_SCAN = 0x08,
HCI_INQUIRY_RESPONSE_NOTIFICATION_EVENT = 0x10,
GENERALIZED_INTERLACED_SCAN = 0x20,
COARSE_CLOCK_ADJUSTMENT = 0x40,
// Byte 1
SECURE_CONNECTIONS_CONTROLLER_SUPPORT = 0x0100,
PING = 0x0200,
SLOT_AVAILABILITY_MASK = 0x0400,
TRAIN_NUDGING = 0x0800,
}
packet ReadLocalExtendedFeaturesComplete : CommandComplete (command_op_code = READ_LOCAL_EXTENDED_FEATURES) {
status : ErrorCode,
page_number : 8,
maximum_page_number : 8,
extended_lmp_features : 64,
}
test ReadLocalExtendedFeaturesComplete {
"\x0e\x0e\x01\x04\x10\x00\x00\x02\xff\xfe\x8f\xfe\xd8\x3f\x5b\x87",
"\x0e\x0e\x01\x04\x10\x00\x01\x02\x07\x00\x00\x00\x00\x00\x00\x00",
"\x0e\x0e\x01\x04\x10\x00\x02\x02\x45\x03\x00\x00\x00\x00\x00\x00",
}
packet ReadBufferSize : Command (op_code = READ_BUFFER_SIZE) {
}
test ReadBufferSize {
"\x05\x10\x00",
}
packet ReadBufferSizeComplete : CommandComplete (command_op_code = READ_BUFFER_SIZE) {
status : ErrorCode,
acl_data_packet_length : 16,
synchronous_data_packet_length : 8,
total_num_acl_data_packets : 16,
total_num_synchronous_data_packets : 16,
}
test ReadBufferSizeComplete {
"\x0e\x0b\x01\x05\x10\x00\x00\x04\x3c\x07\x00\x08\x00",
}
packet ReadBdAddr : Command (op_code = READ_BD_ADDR) {
}
test ReadBdAddr {
"\x09\x10\x00",
}
packet ReadBdAddrComplete : CommandComplete (command_op_code = READ_BD_ADDR) {
status : ErrorCode,
bd_addr : Address,
}
test ReadBdAddrComplete {
"\x0e\x0a\x01\x09\x10\x00\x14\x8e\x61\x5f\x36\x88",
}
packet ReadDataBlockSize : Command (op_code = READ_DATA_BLOCK_SIZE) {
}
packet ReadDataBlockSizeComplete : CommandComplete (command_op_code = READ_DATA_BLOCK_SIZE) {
status : ErrorCode,
max_acl_data_packet_length : 16,
data_block_length : 16,
total_num_data_blocks : 16,
}
packet ReadLocalSupportedCodecsV1 : Command (op_code = READ_LOCAL_SUPPORTED_CODECS_V1) {
}
packet ReadLocalSupportedCodecsV1Complete : CommandComplete (command_op_code = READ_LOCAL_SUPPORTED_CODECS_V1) {
status : ErrorCode,
_count_(supported_codecs) : 8,
supported_codecs : 8[],
_count_(vendor_specific_codecs) : 8,
vendor_specific_codecs : 32[],
}
packet ReadLocalSupportedCodecsV2 : Command (op_code = READ_LOCAL_SUPPORTED_CODECS_V2) {
}
group CodecTransport {
br_edr : 1,
br_edr_sco_and_esco : 1,
le_cis : 1,
le_bis : 1,
_reserved_ : 4,
}
struct CodecConfiguration {
codec_id : 8,
CodecTransport,
}
struct VendorCodecConfiguration {
company_id : 16,
codec_vendor_id : 16,
CodecTransport,
}
packet ReadLocalSupportedCodecsV2Complete : CommandComplete (command_op_code = READ_LOCAL_SUPPORTED_CODECS_V2) {
status : ErrorCode,
_count_(supported_codecs) : 8,
supported_codecs : CodecConfiguration[],
_count_(vendor_specific_codecs) : 8,
vendor_specific_codecs : VendorCodecConfiguration[],
}
packet ReadLocalSupportedCodecCapabilities : Command (op_code = READ_LOCAL_SUPPORTED_CODEC_CAPABILITIES) {
codec_id : 8,
company_id : 16,
codec_vendor_id : 16,
CodecTransport,
direction : DataPathDirection,
}
struct CodecCapability {
_size_(capability) : 8,
capability : 8[],
}
packet ReadLocalSupportedCodecCapabilitiesComplete : CommandComplete (command_op_code = READ_LOCAL_SUPPORTED_CODEC_CAPABILITIES) {
status : ErrorCode,
_count_(codec_capabilities) : 8,
codec_capabilities : CodecCapability[],
}
packet ReadLocalSupportedControllerDelay : Command (op_code = READ_LOCAL_SUPPORTED_CONTROLLER_DELAY) {
codec_id : 8,
company_id : 16,
codec_vendor_id : 16,
CodecTransport,
direction : DataPathDirection,
_size_(codec_configuration) : 8,
codec_configuration : 8[],
}
packet ReadLocalSupportedControllerDelayComplete : CommandComplete (command_op_code = READ_LOCAL_SUPPORTED_CONTROLLER_DELAY) {
status : ErrorCode,
min_controller_delay : 24,
max_controller_delay : 24,
}
// STATUS_PARAMETERS
packet ReadFailedContactCounter : Command (op_code = READ_FAILED_CONTACT_COUNTER) {
connection_handle : 12,
_reserved_ : 4,
}
packet ReadFailedContactCounterComplete : CommandComplete (command_op_code = READ_FAILED_CONTACT_COUNTER) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
failed_contact_counter : 16,
}
packet ResetFailedContactCounter : Command (op_code = RESET_FAILED_CONTACT_COUNTER) {
connection_handle : 12,
_reserved_ : 4,
}
packet ResetFailedContactCounterComplete : CommandComplete (command_op_code = RESET_FAILED_CONTACT_COUNTER) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
}
packet ReadLinkQuality : Command (op_code = READ_LINK_QUALITY) {
connection_handle : 12,
_reserved_ : 4,
}
packet ReadLinkQualityComplete : CommandComplete (command_op_code = READ_LINK_QUALITY) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
link_quality : 8,
}
packet ReadRssi : Command (op_code = READ_RSSI) {
connection_handle : 12,
_reserved_ : 4,
}
packet ReadRssiComplete : CommandComplete (command_op_code = READ_RSSI) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
rssi : 8,
}
packet ReadAfhChannelMap : Command (op_code = READ_AFH_CHANNEL_MAP) {
connection_handle : 12,
_reserved_ : 4,
}
enum AfhMode : 8 {
AFH_DISABLED = 0x00,
AFH_ENABLED = 0x01,
}
packet ReadAfhChannelMapComplete : CommandComplete (command_op_code = READ_AFH_CHANNEL_MAP) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
afh_mode : AfhMode,
afh_channel_map : 8[10],
}
enum WhichClock : 8 {
LOCAL = 0x00,
PICONET = 0x01,
}
packet ReadClock : Command (op_code = READ_CLOCK) {
connection_handle : 12,
_reserved_ : 4,
which_clock : WhichClock,
}
packet ReadClockComplete : CommandComplete (command_op_code = READ_CLOCK) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
clock : 28,
_reserved_ : 4,
accuracy : 16,
}
packet ReadEncryptionKeySize : Command (op_code = READ_ENCRYPTION_KEY_SIZE) {
connection_handle : 12,
_reserved_ : 4,
}
packet ReadEncryptionKeySizeComplete : CommandComplete (command_op_code = READ_ENCRYPTION_KEY_SIZE) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
key_size : 8,
}
// TESTING
enum LoopbackMode : 8 {
NO_LOOPBACK = 0x00,
ENABLE_LOCAL = 0x01,
ENABLE_REMOTE = 0x02,
}
packet ReadLoopbackMode : Command (op_code = READ_LOOPBACK_MODE) {
}
packet ReadLoopbackModeComplete : CommandComplete (command_op_code = READ_LOOPBACK_MODE) {
status : ErrorCode,
loopback_mode : LoopbackMode,
}
packet WriteLoopbackMode : Command (op_code = WRITE_LOOPBACK_MODE) {
loopback_mode : LoopbackMode,
}
packet WriteLoopbackModeComplete : CommandComplete (command_op_code = WRITE_LOOPBACK_MODE) {
status : ErrorCode,
}
packet EnableImplementationUnderTestMode : Command (op_code = ENABLE_IMPLEMENTATION_UNDER_TEST_MODE) {
}
packet EnableImplementationUnderTestModeComplete : CommandComplete (command_op_code = ENABLE_IMPLEMENTATION_UNDER_TEST_MODE) {
status : ErrorCode,
}
packet WriteSimplePairingDebugMode : Command (op_code = WRITE_SIMPLE_PAIRING_DEBUG_MODE) {
simple_pairing_debug_mode : Enable,
}
packet WriteSimplePairingDebugModeComplete : CommandComplete (command_op_code = WRITE_SIMPLE_PAIRING_DEBUG_MODE) {
status : ErrorCode,
}
packet WriteSecureConnectionsTestMode : Command (op_code = WRITE_SECURE_CONNECTIONS_TEST_MODE) {
connection_handle : 12,
_reserved_ : 4,
dm1_aclu_mode : Enable,
esco_loopback_mode : Enable,
}
packet WriteSecureConnectionsTestModeComplete : CommandComplete (command_op_code = WRITE_SECURE_CONNECTIONS_TEST_MODE) {
status : ErrorCode,
}
// LE_CONTROLLER
packet LeSetEventMask : Command (op_code = LE_SET_EVENT_MASK) {
le_event_mask : 64,
}
packet LeSetEventMaskComplete : CommandComplete (command_op_code = LE_SET_EVENT_MASK) {
status : ErrorCode,
}
packet LeReadBufferSizeV1 : Command (op_code = LE_READ_BUFFER_SIZE_V1) {
}
struct LeBufferSize {
le_data_packet_length : 16,
total_num_le_packets : 8,
}
test LeReadBufferSizeV1 {
"\x02\x20\x00",
}
packet LeReadBufferSizeV1Complete : CommandComplete (command_op_code = LE_READ_BUFFER_SIZE_V1) {
status : ErrorCode,
le_buffer_size : LeBufferSize,
}
test LeReadBufferSizeV1Complete {
"\x0e\x07\x01\x02\x20\x00\xfb\x00\x10",
}
/// Core Specification Vol 6, Part B 4.6 § Feature support
enum LLFeaturesBits : 64 {
// Byte 0
LE_ENCRYPTION = 0x0000000000000001,
CONNECTION_PARAMETERS_REQUEST_PROCEDURE = 0x0000000000000002,
EXTENDED_REJECT_INDICATION = 0x0000000000000004,
PERIPHERAL_INITIATED_FEATURES_EXCHANGE = 0x0000000000000008,
LE_PING = 0x0000000000000010,
LE_DATA_PACKET_LENGTH_EXTENSION = 0x0000000000000020,
LL_PRIVACY = 0x0000000000000040,
EXTENDED_SCANNER_FILTER_POLICIES = 0x0000000000000080,
// Byte 1
LE_2M_PHY = 0x0000000000000100,
STABLE_MODULATION_INDEX_TRANSMITTER = 0x0000000000000200,
STABLE_MODULATION_INDEX_RECEIVER = 0x0000000000000400,
LE_CODED_PHY = 0x0000000000000800,
LE_EXTENDED_ADVERTISING = 0x0000000000001000,
LE_PERIODIC_ADVERTISING = 0x0000000000002000,
CHANNEL_SELECTION_ALGORITHM_2 = 0x0000000000004000,
LE_POWER_CLASS_1 = 0x0000000000008000,
// Byte 2
MINIMUM_NUMBER_OF_USED_CHANNELS_PROCEDURE = 0x0000000000010000,
CONNECTION_CTE_REQUEST = 0x0000000000020000,
CONNECTION_CTE_RESPONSE = 0x0000000000040000,
CONNECTIONLESS_CTE_TRANSMITTER = 0x0000000000080000,
CONNECTIONLESS_CTE_RECEIVER = 0x0000000000100000,
ANTENNA_SWITCHING_DURING_CTE_TRANSMISSION = 0x0000000000200000,
ANTENNA_SWITCHING_DURING_CTE_RECEPTION = 0x0000000000400000,
RECEIVING_CONSTANT_TONE_EXTENSIONS = 0x0000000000800000,
// Byte 3
PERIODIC_ADVERTISING_SYNC_TRANSFER_SENDER = 0x0000000001000000,
PERIODIC_ADVERTISING_SYNC_TRANSFER_RECIPIENT = 0x0000000002000000,
SLEEP_CLOCK_ACCURACY_UPDATES = 0x0000000004000000,
REMOTE_PUBLIC_KEY_VALIDATION = 0x0000000008000000,
CONNECTED_ISOCHRONOUS_STREAM_CENTRAL = 0x0000000010000000,
CONNECTED_ISOCHRONOUS_STREAM_PERIPHERAL = 0x0000000020000000,
ISOCHRONOUS_BROADCASTER = 0x0000000040000000,
SYNCHRONIZED_RECEIVER = 0x0000000080000000,
// Byte 4
CONNECTED_ISOCHRONOUS_STREAM_HOST_SUPPORT = 0x0000000100000000,
LE_POWER_CONTROL_REQUEST = 0x0000000200000000,
LE_POWER_CONTROL_REQUEST_BIS = 0x0000000400000000,
LE_PATH_LOSS_MONITORING = 0x0000000800000000,
PERIODIC_ADVERTISING_ADI_SUPPORT = 0x0000001000000000,
CONNECTION_SUBRATING = 0x0000002000000000,
CONNECTION_SUBRATING_HOST_SUPPORT = 0x0000004000000000,
CHANNEL_CLASSIFICATION = 0x0000008000000000,
// Byte 5
ADVERTISING_CODING_SELECTION = 0x0000010000000000,
ADVERTISING_CODING_SELECTION_HOST_SUPPORT = 0x0000020000000000,
DECISION_BASED_ADVERTISING_FILTERING = 0x0000040000000000,
PERIODIC_ADVERTISING_WITH_RESPONSES_ADVERTISER = 0x0000080000000000,
PERIODIC_ADVERTISING_WITH_RESPONSES_SCANNER = 0x0000100000000000,
UNSEGMENTED_FRAMED_MODE = 0x0000200000000000,
CHANNEL_SOUNDING = 0x0000400000000000,
CHANNEL_SOUNDING_HOST_SUPPORT = 0x0000800000000000,
}
packet LeReadLocalSupportedFeaturesPage0 : Command (op_code = LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0) {
}
packet LeReadLocalSupportedFeaturesPage0Complete : CommandComplete (command_op_code = LE_READ_LOCAL_SUPPORTED_FEATURES_PAGE_0) {
status : ErrorCode,
le_features : 64,
}
packet LeReadAllLocalSupportedFeatures : Command (op_code = LE_READ_ALL_LOCAL_SUPPORTED_FEATURES) {
}
packet LeReadAllLocalSupportedFeaturesComplete : CommandComplete (command_op_code = LE_READ_ALL_LOCAL_SUPPORTED_FEATURES) {
status : ErrorCode,
max_page : 8,
le_features : 8[248],
}
packet LeSetRandomAddress : Command (op_code = LE_SET_RANDOM_ADDRESS) {
random_address : Address,
}
packet LeSetRandomAddressComplete : CommandComplete (command_op_code = LE_SET_RANDOM_ADDRESS) {
status : ErrorCode,
}
enum AdvertisingFilterPolicy : 2 {
ALL_DEVICES = 0, // Default
LISTED_SCAN = 1,
LISTED_CONNECT = 2,
LISTED_SCAN_AND_CONNECT = 3,
}
enum PeerAddressType : 8 {
PUBLIC_DEVICE_OR_IDENTITY_ADDRESS = 0x00,
RANDOM_DEVICE_OR_IDENTITY_ADDRESS = 0x01,
}
enum AdvertisingType : 8 {
ADV_IND = 0x00,
ADV_DIRECT_IND_HIGH = 0x01,
ADV_SCAN_IND = 0x02,
ADV_NONCONN_IND = 0x03,
ADV_DIRECT_IND_LOW = 0x04,
}
enum AddressType : 8 {
PUBLIC_DEVICE_ADDRESS = 0x00,
RANDOM_DEVICE_ADDRESS = 0x01,
PUBLIC_IDENTITY_ADDRESS = 0x02,
RANDOM_IDENTITY_ADDRESS = 0x03,
}
enum OwnAddressType : 8 {
PUBLIC_DEVICE_ADDRESS = 0x00,
RANDOM_DEVICE_ADDRESS = 0x01,
RESOLVABLE_OR_PUBLIC_ADDRESS = 0x02,
RESOLVABLE_OR_RANDOM_ADDRESS = 0x03,
}
packet LeSetAdvertisingParameters : Command (op_code = LE_SET_ADVERTISING_PARAMETERS) {
advertising_interval_min : 16,
advertising_interval_max : 16,
advertising_type : AdvertisingType,
own_address_type : OwnAddressType,
peer_address_type : PeerAddressType,
peer_address : Address,
advertising_channel_map : 8,
advertising_filter_policy : AdvertisingFilterPolicy,
_reserved_ : 6,
}
packet LeSetAdvertisingParametersComplete : CommandComplete (command_op_code = LE_SET_ADVERTISING_PARAMETERS) {
status : ErrorCode,
}
packet LeReadAdvertisingPhysicalChannelTxPower : Command (op_code = LE_READ_ADVERTISING_PHYSICAL_CHANNEL_TX_POWER) {
}
packet LeReadAdvertisingPhysicalChannelTxPowerComplete : CommandComplete (command_op_code = LE_READ_ADVERTISING_PHYSICAL_CHANNEL_TX_POWER) {
status : ErrorCode,
transmit_power_level : 8, // (-127dBm to 20dBm) Accuracy: +/-4dB
}
packet LeSetAdvertisingData : Command (op_code = LE_SET_ADVERTISING_DATA) {
_size_(advertising_data) : 8,
advertising_data : 8[],
_padding_[31], // Zero padding to 31 bytes of advertising_data
}
packet LeSetAdvertisingDataComplete : CommandComplete (command_op_code = LE_SET_ADVERTISING_DATA) {
status : ErrorCode,
}
packet LeSetScanResponseData : Command (op_code = LE_SET_SCAN_RESPONSE_DATA) {
_size_(advertising_data) : 8,
advertising_data : 8[],
_padding_[31], // Zero padding to 31 bytes of advertising_data
}
packet LeSetScanResponseDataComplete : CommandComplete (command_op_code = LE_SET_SCAN_RESPONSE_DATA) {
status : ErrorCode,
}
packet LeSetAdvertisingEnable : Command (op_code = LE_SET_ADVERTISING_ENABLE) {
advertising_enable : Enable, // Default DISABLED
}
packet LeSetAdvertisingEnableComplete : CommandComplete (command_op_code = LE_SET_ADVERTISING_ENABLE) {
status : ErrorCode,
}
enum LeScanType : 8 {
PASSIVE = 0x00, // Default
ACTIVE = 0x01,
}
enum LeScanningFilterPolicy : 8 {
ACCEPT_ALL = 0x00, // Default
FILTER_ACCEPT_LIST_ONLY = 0x01,
CHECK_INITIATORS_IDENTITY = 0x02,
FILTER_ACCEPT_LIST_AND_INITIATORS_IDENTITY = 0x03,
}
packet LeSetScanParameters : Command (op_code = LE_SET_SCAN_PARAMETERS) {
le_scan_type : LeScanType,
le_scan_interval : 16, // 0x0004-0x4000 Default 0x10 (10ms)
le_scan_window : 16, // Default 0x10 (10ms)
own_address_type : OwnAddressType,
scanning_filter_policy : LeScanningFilterPolicy,
}
test LeSetScanParameters {
"\x0b\x20\x07\x01\x12\x00\x12\x00\x01\x00",
}
packet LeSetScanParametersComplete : CommandComplete (command_op_code = LE_SET_SCAN_PARAMETERS) {
status : ErrorCode,
}
packet LeSetScanEnable : Command (op_code = LE_SET_SCAN_ENABLE) {
le_scan_enable : Enable,
filter_duplicates : Enable,
}
test LeSetScanEnable {
"\x0c\x20\x02\x01\x00",
}
packet LeSetScanEnableComplete : CommandComplete (command_op_code = LE_SET_SCAN_ENABLE) {
status : ErrorCode,
}
enum InitiatorFilterPolicy : 8 {
USE_PEER_ADDRESS = 0x00,
USE_FILTER_ACCEPT_LIST_WITH_PEER_ADDRESS = 0x01,
USE_DECISION_PDUS = 0x02,
USE_FILTER_ACCEPT_LIST_WITH_DECISION_PDUS = 0x03,
}
packet LeCreateConnection : Command (op_code = LE_CREATE_CONNECTION) {
le_scan_interval : 16, // 0x0004-0x4000
le_scan_window : 16, // < = LeScanInterval
initiator_filter_policy : InitiatorFilterPolicy,
peer_address_type : AddressType,
peer_address : Address,
own_address_type : OwnAddressType,
connection_interval_min : 16, // 0x0006-0x0C80 (7.5ms to 4s)
connection_interval_max : 16, // 0x0006-0x0C80 (7.5ms to 4s)
max_latency : 16, // 0x0006-0x01F3
supervision_timeout : 16, // 0x00A to 0x0C80 (100ms to 32s)
min_ce_length : 16, // 0.625ms
max_ce_length : 16, // 0.625ms
}
packet LeCreateConnectionStatus : CommandStatus (command_op_code = LE_CREATE_CONNECTION) {
}
packet LeCreateConnectionCancel : Command (op_code = LE_CREATE_CONNECTION_CANCEL) {
}
packet LeCreateConnectionCancelComplete : CommandComplete (command_op_code = LE_CREATE_CONNECTION_CANCEL) {
status : ErrorCode,
}
packet LeReadFilterAcceptListSize : Command (op_code = LE_READ_FILTER_ACCEPT_LIST_SIZE) {
}
test LeReadFilterAcceptListSize {
"\x0f\x20\x00",
}
packet LeReadFilterAcceptListSizeComplete : CommandComplete (command_op_code = LE_READ_FILTER_ACCEPT_LIST_SIZE) {
status : ErrorCode,
filter_accept_list_size : 8,
}
test LeReadFilterAcceptListSizeComplete {
"\x0e\x05\x01\x0f\x20\x00\x80",
}
packet LeClearFilterAcceptList : Command (op_code = LE_CLEAR_FILTER_ACCEPT_LIST) {
}
packet LeClearFilterAcceptListComplete : CommandComplete (command_op_code = LE_CLEAR_FILTER_ACCEPT_LIST) {
status : ErrorCode,
}
enum FilterAcceptListAddressType : 8 {
PUBLIC = 0x00,
RANDOM = 0x01,
ANONYMOUS_ADVERTISERS = 0xFF,
}
packet LeAddDeviceToFilterAcceptList : Command (op_code = LE_ADD_DEVICE_TO_FILTER_ACCEPT_LIST) {
address_type : FilterAcceptListAddressType,
address : Address,
}
packet LeAddDeviceToFilterAcceptListComplete : CommandComplete (command_op_code = LE_ADD_DEVICE_TO_FILTER_ACCEPT_LIST) {
status : ErrorCode,
}
packet LeRemoveDeviceFromFilterAcceptList : Command (op_code = LE_REMOVE_DEVICE_FROM_FILTER_ACCEPT_LIST) {
address_type : FilterAcceptListAddressType,
address : Address,
}
packet LeRemoveDeviceFromFilterAcceptListComplete : CommandComplete (command_op_code = LE_REMOVE_DEVICE_FROM_FILTER_ACCEPT_LIST) {
status : ErrorCode,
}
packet LeConnectionUpdate : Command (op_code = LE_CONNECTION_UPDATE) {
connection_handle : 12,
_reserved_ : 4,
connection_interval_min : 16, // 0x0006-0x0C80 (7.5ms to 4s)
connection_interval_max : 16, // 0x0006-0x0C80 (7.5ms to 4s)
max_latency : 16, // 0x0006-0x01F3
supervision_timeout : 16, // 0x00A to 0x0C80 (100ms to 32s)
min_ce_length : 16, // 0.625ms
max_ce_length : 16, // 0.625ms
}
packet LeConnectionUpdateStatus : CommandStatus (command_op_code = LE_CONNECTION_UPDATE) {
}
packet LeSetHostChannelClassification : Command (op_code = LE_SET_HOST_CHANNEL_CLASSIFICATION) {
channel_map : 8[5],
}
packet LeSetHostChannelClassificationComplete : CommandComplete (command_op_code = LE_SET_HOST_CHANNEL_CLASSIFICATION) {
status : ErrorCode,
}
packet LeReadChannelMap : Command (op_code = LE_READ_CHANNEL_MAP) {
}
packet LeReadChannelMapComplete : CommandComplete (command_op_code = LE_READ_CHANNEL_MAP) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
channel_map : 8[5],
}
packet LeReadRemoteFeaturesPage0 : Command (op_code = LE_READ_REMOTE_FEATURES_PAGE_0) {
connection_handle : 12,
_reserved_ : 4,
}
packet LeReadRemoteFeaturesPage0Status : CommandStatus (command_op_code = LE_READ_REMOTE_FEATURES_PAGE_0) {
}
packet LeReadRemoteFeaturesPage0Complete : LeMetaEvent (subevent_code = LE_READ_REMOTE_FEATURES_PAGE_0_COMPLETE) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
le_features : 64,
}
packet LeReadAllRemoteFeatures : Command (op_code = LE_READ_ALL_REMOTE_FEATURES) {
connection_handle : 12,
_reserved_ : 4,
pages_requested : 8,
}
packet LeReadAllRemoteFeaturesStatus : CommandStatus (command_op_code = LE_READ_ALL_REMOTE_FEATURES) {
}
packet LeReadAllRemoteFeaturesComplete : LeMetaEvent (subevent_code = LE_READ_ALL_REMOTE_FEATURES_COMPLETE) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
max_remote_page : 8,
max_valid_page : 8,
le_features : 8[248],
}
packet LeEncrypt : Command (op_code = LE_ENCRYPT) {
key : 8[16],
plaintext_data : 8[16],
}
packet LeEncryptComplete : CommandComplete (command_op_code = LE_ENCRYPT) {
status : ErrorCode,
encrypted_data : 8[16],
}
packet LeRand : Command (op_code = LE_RAND) {
}
packet LeRandComplete : CommandComplete (command_op_code = LE_RAND) {
status : ErrorCode,
random_number : 64,
}
packet LeStartEncryption : Command (op_code = LE_START_ENCRYPTION) {
connection_handle: 16,
rand: 8[8],
ediv: 16,
ltk: 8[16],
}
packet LeStartEncryptionStatus : CommandStatus (command_op_code = LE_START_ENCRYPTION) {
}
packet LeLongTermKeyRequestReply : Command (op_code = LE_LONG_TERM_KEY_REQUEST_REPLY) {
connection_handle: 16,
long_term_key: 8[16],
}
packet LeLongTermKeyRequestReplyComplete : CommandComplete (command_op_code = LE_LONG_TERM_KEY_REQUEST_REPLY) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
}
packet LeLongTermKeyRequestNegativeReply : Command (op_code = LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY) {
connection_handle : 12,
_reserved_ : 4,
}
packet LeLongTermKeyRequestNegativeReplyComplete : CommandComplete (command_op_code = LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
}
packet LeReadSupportedStates : Command (op_code = LE_READ_SUPPORTED_STATES) {
}
packet LeReadSupportedStatesComplete : CommandComplete (command_op_code = LE_READ_SUPPORTED_STATES) {
status : ErrorCode,
le_states : 64,
}
packet LeReceiverTest : Command (op_code = LE_RECEIVER_TEST_V1) {
rx_channel : 8,
}
packet LeReceiverTestComplete : CommandComplete (command_op_code = LE_RECEIVER_TEST_V1) {
status : ErrorCode,
}
enum LeTestPayload : 8 {
PRBS9 = 0x00,
REPEATED_F0 = 0x01,
REPEATED_AA = 0x02,
PRBS15 = 0x03,
REPEATED_FF = 0x04,
REPEATED_00 = 0x05,
REPEATED_0F = 0x06,
REPEATED_55 = 0x07,
}
packet LeTransmitterTest : Command (op_code = LE_TRANSMITTER_TEST_V1) {
tx_channel : 8,
test_data_length : 8,
packet_payload : LeTestPayload,
}
packet LeTransmitterTestComplete : CommandComplete (command_op_code = LE_TRANSMITTER_TEST_V1) {
status : ErrorCode,
}
packet LeTestEnd : Command (op_code = LE_TEST_END) {
}
packet LeTestEndComplete : CommandComplete (command_op_code = LE_TEST_END) {
status : ErrorCode,
}
packet LeRemoteConnectionParameterRequestReply : Command (op_code = LE_REMOTE_CONNECTION_PARAMETER_REQUEST_REPLY) {
connection_handle : 12,
_reserved_ : 4,
interval_min : 16, // 0x0006-0x0C80 (7.5ms to 4s)
interval_max : 16, // 0x0006-0x0C80 (7.5ms to 4s)
latency : 16, // 0x0006-0x01F3
timeout : 16, // 0x00A to 0x0C80 (100ms to 32s)
minimum_ce_length : 16, // 0.625ms
maximum_ce_length : 16, // 0.625ms
}
packet LeRemoteConnectionParameterRequestReplyComplete : CommandComplete (command_op_code = LE_REMOTE_CONNECTION_PARAMETER_REQUEST_REPLY) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
}
packet LeRemoteConnectionParameterRequestNegativeReply : Command (op_code = LE_REMOTE_CONNECTION_PARAMETER_REQUEST_NEGATIVE_REPLY) {
connection_handle : 12,
_reserved_ : 4,
reason : ErrorCode,
}
packet LeRemoteConnectionParameterRequestNegativeReplyComplete : CommandComplete (command_op_code = LE_REMOTE_CONNECTION_PARAMETER_REQUEST_NEGATIVE_REPLY) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
}
packet LeSetDataLength : Command (op_code = LE_SET_DATA_LENGTH) {
connection_handle : 12,
_reserved_ : 4,
tx_octets : 16, // payload octets per single PDU 0x1B to 0x00FB
tx_time : 16, // microseconds used to transmit a single PDU 0x0148 to 0x4290
}
packet LeSetDataLengthComplete : CommandComplete (command_op_code = LE_SET_DATA_LENGTH) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
}
packet LeReadSuggestedDefaultDataLength : Command (op_code = LE_READ_SUGGESTED_DEFAULT_DATA_LENGTH) {
}
packet LeReadSuggestedDefaultDataLengthComplete : CommandComplete (command_op_code = LE_READ_SUGGESTED_DEFAULT_DATA_LENGTH) {
status : ErrorCode,
tx_octets : 16, // payload octets per single PDU 0x1B to 0x00FB
tx_time : 16, // microseconds used to transmit a single PDU 0x0148 to 0x4290
}
packet LeWriteSuggestedDefaultDataLength : Command (op_code = LE_WRITE_SUGGESTED_DEFAULT_DATA_LENGTH) {
tx_octets : 16, // payload octets per single PDU 0x1B to 0x00FB
tx_time : 16, // microseconds used to transmit a single PDU 0x0148 to 0x4290
}
packet LeWriteSuggestedDefaultDataLengthComplete : CommandComplete (command_op_code = LE_WRITE_SUGGESTED_DEFAULT_DATA_LENGTH) {
status : ErrorCode,
}
packet LeReadLocalP256PublicKey : Command (op_code = LE_READ_LOCAL_P_256_PUBLIC_KEY) {
}
packet LeReadLocalP256PublicKeyStatus : CommandStatus (command_op_code = LE_READ_LOCAL_P_256_PUBLIC_KEY) {
}
packet LeGenerateDhkeyV1 : Command (op_code = LE_GENERATE_DHKEY_V1) {
remote_p_256_public_key : 8[64],
}
packet LeGenerateDhkeyV1Status : CommandStatus (command_op_code = LE_GENERATE_DHKEY_V1) {
}
packet LeAddDeviceToResolvingList : Command (op_code = LE_ADD_DEVICE_TO_RESOLVING_LIST) {
peer_identity_address_type : PeerAddressType,
peer_identity_address : Address,
peer_irk : 8[16],
local_irk : 8[16],
}
packet LeAddDeviceToResolvingListComplete : CommandComplete (command_op_code = LE_ADD_DEVICE_TO_RESOLVING_LIST) {
status : ErrorCode,
}
packet LeRemoveDeviceFromResolvingList : Command (op_code = LE_REMOVE_DEVICE_FROM_RESOLVING_LIST) {
peer_identity_address_type : PeerAddressType,
peer_identity_address : Address,
}
packet LeRemoveDeviceFromResolvingListComplete : CommandComplete (command_op_code = LE_REMOVE_DEVICE_FROM_RESOLVING_LIST) {
status : ErrorCode,
}
packet LeClearResolvingList : Command (op_code = LE_CLEAR_RESOLVING_LIST) {
}
packet LeClearResolvingListComplete : CommandComplete (command_op_code = LE_CLEAR_RESOLVING_LIST) {
status : ErrorCode,
}
packet LeReadResolvingListSize : Command (op_code = LE_READ_RESOLVING_LIST_SIZE) {
}
packet LeReadResolvingListSizeComplete : CommandComplete (command_op_code = LE_READ_RESOLVING_LIST_SIZE) {
status : ErrorCode,
resolving_list_size : 8,
}
packet LeReadPeerResolvableAddress : Command (op_code = LE_READ_PEER_RESOLVABLE_ADDRESS) {
peer_identity_address_type : PeerAddressType,
peer_identity_address : Address,
}
packet LeReadPeerResolvableAddressComplete : CommandComplete (command_op_code = LE_READ_PEER_RESOLVABLE_ADDRESS) {
status : ErrorCode,
peer_resolvable_address : Address,
}
packet LeReadLocalResolvableAddress : Command (op_code = LE_READ_LOCAL_RESOLVABLE_ADDRESS) {
peer_identity_address_type : PeerAddressType,
peer_identity_address : Address,
}
packet LeReadLocalResolvableAddressComplete : CommandComplete (command_op_code = LE_READ_LOCAL_RESOLVABLE_ADDRESS) {
status : ErrorCode,
local_resolvable_address : Address,
}
packet LeSetAddressResolutionEnable : Command (op_code = LE_SET_ADDRESS_RESOLUTION_ENABLE) {
address_resolution_enable : Enable,
}
packet LeSetAddressResolutionEnableComplete : CommandComplete (command_op_code = LE_SET_ADDRESS_RESOLUTION_ENABLE) {
status : ErrorCode,
}
packet LeSetResolvablePrivateAddressTimeout : Command (op_code = LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT) {
rpa_timeout : 16, // RPA_Timeout measured in seconds 0x0001 to 0xA1B8 1s to 11.5 hours
}
packet LeSetResolvablePrivateAddressTimeoutComplete : CommandComplete (command_op_code = LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT) {
status : ErrorCode,
}
packet LeReadMaximumDataLength : Command (op_code = LE_READ_MAXIMUM_DATA_LENGTH) {
}
struct LeMaximumDataLength {
supported_max_tx_octets : 16,
supported_max_tx_time: 16,
supported_max_rx_octets : 16,
supported_max_rx_time: 16,
}
packet LeReadMaximumDataLengthComplete : CommandComplete (command_op_code = LE_READ_MAXIMUM_DATA_LENGTH) {
status : ErrorCode,
le_maximum_data_length : LeMaximumDataLength,
}
packet LeReadPhy : Command (op_code = LE_READ_PHY) {
connection_handle : 12,
_reserved_ : 4,
}
enum PhyType : 8 {
LE_1M = 0x01,
LE_2M = 0x02,
LE_CODED = 0x03,
}
packet LeReadPhyComplete : CommandComplete (command_op_code = LE_READ_PHY) {
status : ErrorCode,
connection_handle : 12,
_reserved_ : 4,
tx_phy : PhyType,
rx_phy : PhyType,
}
packet LeSetDefaultPhy : Command (op_code = LE_SET_DEFAULT_PHY) {
all_phys_no_transmit_preference : 1,
all_phys_no_receive_preference : 1,
_reserved_ : 6,
tx_phys : 3,
_reserved_ : 5,
rx_phys : 3,
_reserved_ : 5,
}
packet LeSetDefaultPhyComplete : CommandComplete (command_op_code = LE_SET_DEFAULT_PHY) {
status : ErrorCode,
}
enum PhyOptions : 16 {
NO_PREFERENCE = 0x00,
S_2 = 0x01,
S_8 = 0x02,
}
packet LeSetPhy : Command (op_code = LE_SET_PHY) {
connection_handle : 12,
_reserved_ : 4,
all_phys_no_transmit_preference : 1,
all_phys_no_receive_preference : 1,
_reserved_ : 6,
tx_phys : 3,
_reserved_ : 5,
rx_phys : 3,
_reserved_ : 5,
phy_options : PhyOptions,
}
packet LeSetPhyStatus : CommandStatus (command_op_code = LE_SET_PHY) {
}
enum ModulationIndex : 8 {
STANDARD = 0x00,
STABLE = 0x01,
}
packet LeEnhancedReceiverTest : Command (op_code = LE_RECEIVER_TEST_V2) {
rx_channel : 8,
phy : PhyType,
modulation_index : ModulationIndex,
}
packet LeEnhancedReceiverTestComplete : CommandComplete (command_op_code = LE_RECEIVER_TEST_V2) {
status : ErrorCode,
}
packet LeEnhancedTransmitterTest : Command (op_code = LE_TRANSMITTER_TEST_V2) {
tx_channel : 8,
test_data_length : 8,
packet_payload : LeTestPayload,
phy : PhyType,
}
packet LeEnhancedTransmitterTestComplete : CommandComplete (command_op_code = LE_TRANSMITTER_TEST_V2) {