Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1 | little_endian_packets |
| 2 | |
Martin Brabham | 94db40c | 2019-03-29 10:24:52 -0700 | [diff] [blame] | 3 | custom_field Address : 48 "hci/" |
| 4 | custom_field ClassOfDevice : 24 "hci/" |
Myles Watson | c150612 | 2019-04-12 10:40:43 -0700 | [diff] [blame] | 5 | |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 6 | enum Enable : 8 { |
| 7 | DISABLED = 0x00, |
| 8 | ENABLED = 0x01, |
| 9 | } |
| 10 | |
| 11 | // https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile |
Myles Watson | 7a0dc39 | 2019-07-09 15:24:54 -0700 | [diff] [blame] | 12 | enum GapDataType : 8 { |
| 13 | INVALID = 0x00, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 14 | FLAGS = 0x01, |
| 15 | INCOMPLETE_LIST_16_BIT_UUIDS = 0x02, |
| 16 | COMPLETE_LIST_16_BIT_UUIDS = 0x03, |
| 17 | INCOMPLETE_LIST_32_BIT_UUIDS = 0x04, |
| 18 | COMPLETE_LIST_32_BIT_UUIDS = 0x05, |
| 19 | INCOMPLETE_LIST_128_BIT_UUIDS = 0x06, |
| 20 | COMPLETE_LIST_128_BIT_UUIDS = 0x07, |
| 21 | SHORTENED_LOCAL_NAME = 0x08, |
| 22 | COMPLETE_LOCAL_NAME = 0x09, |
| 23 | TX_POWER_LEVEL = 0x0A, |
| 24 | CLASS_OF_DEVICE = 0x0D, |
| 25 | } |
| 26 | |
Myles Watson | 7a0dc39 | 2019-07-09 15:24:54 -0700 | [diff] [blame] | 27 | struct GapData { |
| 28 | _size_(data) : 8, // Including one byte for data_type |
| 29 | data_type : GapDataType, |
| 30 | data : 8[+1*8], |
| 31 | } |
| 32 | |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 33 | // HCI ACL Packets |
| 34 | |
| 35 | enum PacketBoundaryFlag : 2 { |
| 36 | FIRST_NON_AUTOMATICALLY_FLUSHABLE = 0, |
| 37 | CONTINUING_FRAGMENT = 1, |
| 38 | FIRST_AUTOMATICALLY_FLUSHABLE = 2, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | enum BroadcastFlag : 2 { |
| 42 | POINT_TO_POINT = 0, |
| 43 | ACTIVE_SLAVE_BROADCAST = 1, |
| 44 | } |
| 45 | |
| 46 | packet AclPacket { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 47 | handle : 12, |
| 48 | packet_boundary_flag : PacketBoundaryFlag, |
| 49 | broadcast_flag : BroadcastFlag, |
| 50 | _size_(_payload_) : 16, |
| 51 | _payload_, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | // HCI SCO Packets |
| 55 | |
| 56 | enum PacketStatusFlag : 2 { |
| 57 | CORRECTLY_RECEIVED = 0, |
| 58 | POSSIBLY_INCOMPLETE = 1, |
| 59 | NO_DATA = 2, |
| 60 | PARTIALLY_LOST = 3, |
| 61 | } |
| 62 | |
| 63 | packet ScoPacket { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 64 | handle : 12, |
| 65 | packet_status_flag : PacketStatusFlag, |
| 66 | _reserved_ : 2, // BroadcastFlag |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 67 | _size_(data) : 8, |
| 68 | data : 8[], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | // HCI Command Packets |
| 72 | |
| 73 | enum OpCode : 16 { |
| 74 | NONE = 0x0000, |
| 75 | |
| 76 | // LINK_CONTROL |
| 77 | INQUIRY = 0x0401, |
| 78 | INQUIRY_CANCEL = 0x0402, |
| 79 | PERIODIC_INQUIRY_MODE = 0x0403, |
| 80 | EXIT_PERIODIC_INQUIRY_MODE = 0x0404, |
| 81 | CREATE_CONNECTION = 0x0405, |
| 82 | DISCONNECT = 0x0406, |
| 83 | CREATE_CONNECTION_CANCEL = 0x0408, |
| 84 | ACCEPT_CONNECTION_REQUEST = 0x0409, |
| 85 | REJECT_CONNECTION_REQUEST = 0x040A, |
| 86 | LINK_KEY_REQUEST_REPLY = 0x040B, |
| 87 | LINK_KEY_REQUEST_NEGATIVE_REPLY = 0x040C, |
| 88 | PIN_CODE_REQUEST_REPLY = 0x040D, |
| 89 | PIN_CODE_REQUEST_NEGATIVE_REPLY = 0x040E, |
| 90 | CHANGE_CONNECTION_PACKET_TYPE = 0x040F, |
| 91 | AUTHENTICATION_REQUESTED = 0x0411, |
| 92 | SET_CONNECTION_ENCRYPTION = 0x0413, |
| 93 | CHANGE_CONNECTION_LINK_KEY = 0x0415, |
| 94 | MASTER_LINK_KEY = 0x0417, |
| 95 | REMOTE_NAME_REQUEST = 0x0419, |
| 96 | REMOTE_NAME_REQUEST_CANCEL = 0x041A, |
| 97 | READ_REMOTE_SUPPORTED_FEATURES = 0x041B, |
| 98 | READ_REMOTE_EXTENDED_FEATURES = 0x041C, |
| 99 | READ_REMOTE_VERSION_INFORMATION = 0x041D, |
| 100 | READ_CLOCK_OFFSET = 0x041F, |
| 101 | READ_LMP_HANDLE = 0x0420, |
| 102 | SETUP_SYNCHRONOUS_CONNECTION = 0x0428, |
| 103 | ACCEPT_SYNCHRONOUS_CONNECTION = 0x0429, |
| 104 | REJECT_SYNCHRONOUS_CONNECTION = 0x042A, |
| 105 | IO_CAPABILITY_REQUEST_REPLY = 0x042B, |
| 106 | USER_CONFIRMATION_REQUEST_REPLY = 0x042C, |
| 107 | USER_CONFIRMATION_REQUEST_NEGATIVE_REPLY = 0x042D, |
| 108 | USER_PASSKEY_REQUEST_REPLY = 0x042E, |
| 109 | USER_PASSKEY_REQUEST_NEGATIVE_REPLY = 0x042F, |
| 110 | REMOTE_OOB_DATA_REQUEST_REPLY = 0x0430, |
| 111 | REMOTE_OOB_DATA_REQUEST_NEGATIVE_REPLY = 0x0433, |
| 112 | IO_CAPABILITY_REQUEST_NEGATIVE_REPLY = 0x0434, |
| 113 | ENHANCED_SETUP_SYNCHRONOUS_CONNECTION = 0x043D, |
| 114 | ENHANCED_ACCEPT_SYNCHRONOUS_CONNECTION = 0x043E, |
| 115 | |
| 116 | // LINK_POLICY |
| 117 | HOLD_MODE = 0x0801, |
| 118 | SNIFF_MODE = 0x0803, |
| 119 | EXIT_SNIFF_MODE = 0x0804, |
| 120 | QOS_SETUP = 0x0807, |
| 121 | ROLE_DISCOVERY = 0x0809, |
| 122 | SWITCH_ROLE = 0x080B, |
| 123 | READ_LINK_POLICY_SETTINGS = 0x080C, |
| 124 | WRITE_LINK_POLICY_SETTINGS = 0x080D, |
| 125 | READ_DEFAULT_LINK_POLICY_SETTINGS = 0x080E, |
| 126 | WRITE_DEFAULT_LINK_POLICY_SETTINGS = 0x080F, |
| 127 | FLOW_SPECIFICATION = 0x0810, |
| 128 | SNIFF_SUBRATING = 0x0811, |
| 129 | |
| 130 | // CONTROLLER_AND_BASEBAND |
| 131 | SET_EVENT_MASK = 0x0C01, |
| 132 | RESET = 0x0C03, |
| 133 | SET_EVENT_FILTER = 0x0C05, |
| 134 | FLUSH = 0x0C08, |
| 135 | READ_PIN_TYPE = 0x0C09, |
| 136 | WRITE_PIN_TYPE = 0x0C0A, |
| 137 | CREATE_NEW_UNIT_KEY = 0x0C0B, |
| 138 | READ_STORED_LINK_KEY = 0x0C0D, |
| 139 | WRITE_STORED_LINK_KEY = 0x0C11, |
| 140 | DELETE_STORED_LINK_KEY = 0x0C12, |
| 141 | WRITE_LOCAL_NAME = 0x0C13, |
| 142 | READ_LOCAL_NAME = 0x0C14, |
| 143 | READ_CONNECTION_ACCEPT_TIMEOUT = 0x0C15, |
| 144 | WRITE_CONNECTION_ACCEPT_TIMEOUT = 0x0C16, |
| 145 | READ_PAGE_TIMEOUT = 0x0C17, |
| 146 | WRITE_PAGE_TIMEOUT = 0x0C18, |
| 147 | READ_SCAN_ENABLE = 0x0C19, |
| 148 | WRITE_SCAN_ENABLE = 0x0C1A, |
| 149 | READ_PAGE_SCAN_ACTIVITY = 0x0C1B, |
| 150 | WRITE_PAGE_SCAN_ACTIVITY = 0x0C1C, |
| 151 | READ_INQUIRY_SCAN_ACTIVITY = 0x0C1D, |
| 152 | WRITE_INQUIRY_SCAN_ACTIVITY = 0x0C1E, |
| 153 | READ_AUTHENTICATION_ENABLE = 0x0C1F, |
| 154 | WRITE_AUTHENTICATION_ENABLE = 0x0C20, |
| 155 | READ_CLASS_OF_DEVICE = 0x0C23, |
| 156 | WRITE_CLASS_OF_DEVICE = 0x0C24, |
| 157 | READ_VOICE_SETTING = 0x0C25, |
| 158 | WRITE_VOICE_SETTING = 0x0C26, |
| 159 | READ_AUTOMATIC_FLUSH_TIMEOUT = 0x0C27, |
| 160 | WRITE_AUTOMATIC_FLUSH_TIMEOUT = 0x0C28, |
| 161 | READ_NUM_BROADCAST_RETRANSMITS = 0x0C29, |
| 162 | WRITE_NUM_BROADCAST_RETRANSMITS = 0x0C2A, |
| 163 | READ_HOLD_MODE_ACTIVITY = 0x0C2B, |
| 164 | WRITE_HOLD_MODE_ACTIVITY = 0x0C2C, |
| 165 | READ_TRANSMIT_POWER_LEVEL = 0x0C2D, |
| 166 | READ_SYNCHRONOUS_FLOW_CONTROL_ENABLE = 0x0C2E, |
| 167 | WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE = 0x0C2F, |
| 168 | SET_CONTROLLER_TO_HOST_FLOW_CONTROL = 0x0C31, |
| 169 | HOST_BUFFER_SIZE = 0x0C33, |
| 170 | HOST_NUM_COMPLETED_PACKETS = 0x0C35, |
| 171 | READ_LINK_SUPERVISION_TIMEOUT = 0x0C36, |
| 172 | WRITE_LINK_SUPERVISION_TIMEOUT = 0x0C37, |
| 173 | READ_NUMBER_OF_SUPPORTED_IAC = 0x0C38, |
| 174 | READ_CURRENT_IAC_LAP = 0x0C39, |
| 175 | WRITE_CURRENT_IAC_LAP = 0x0C3A, |
| 176 | SET_AFH_HOST_CHANNEL_CLASSIFICATION = 0x0C3F, |
| 177 | READ_INQUIRY_SCAN_TYPE = 0x0C42, |
| 178 | WRITE_INQUIRY_SCAN_TYPE = 0x0C43, |
| 179 | READ_INQUIRY_MODE = 0x0C44, |
| 180 | WRITE_INQUIRY_MODE = 0x0C45, |
| 181 | READ_PAGE_SCAN_TYPE = 0x0C46, |
| 182 | WRITE_PAGE_SCAN_TYPE = 0x0C47, |
| 183 | READ_AFH_CHANNEL_ASSESSMENT_MODE = 0x0C48, |
| 184 | WRITE_AFH_CHANNEL_ASSESSMENT_MODE = 0x0C49, |
| 185 | READ_EXTENDED_INQUIRY_RESPONSE = 0x0C51, |
| 186 | WRITE_EXTENDED_INQUIRY_RESPONSE = 0x0C52, |
| 187 | REFRESH_ENCRYPTION_KEY = 0x0C53, |
| 188 | READ_SIMPLE_PAIRING_MODE = 0x0C55, |
| 189 | WRITE_SIMPLE_PAIRING_MODE = 0x0C56, |
| 190 | READ_LOCAL_OOB_DATA = 0x0C57, |
| 191 | READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL = 0x0C58, |
| 192 | WRITE_INQUIRY_TRANSMIT_POWER_LEVEL = 0x0C59, |
| 193 | SEND_KEYPRESS_NOTIFICATION = 0x0C60, |
| 194 | |
| 195 | READ_LE_HOST_SUPPORT = 0x0C6C, |
| 196 | WRITE_LE_HOST_SUPPORT = 0x0C6D, |
| 197 | |
| 198 | READ_SECURE_CONNECTIONS_HOST_SUPPORT = 0x0C79, |
| 199 | WRITE_SECURE_CONNECTIONS_HOST_SUPPORT = 0x0C7A, |
Chienyuan | 4d7cc81 | 2019-07-12 18:00:12 +0800 | [diff] [blame] | 200 | READ_LOCAL_OOB_EXTENDED_DATA = 0x0C7D, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 201 | |
| 202 | // INFORMATIONAL_PARAMETERS |
| 203 | READ_LOCAL_VERSION_INFORMATION = 0x1001, |
| 204 | READ_LOCAL_SUPPORTED_COMMANDS = 0x1002, |
| 205 | READ_LOCAL_SUPPORTED_FEATURES = 0x1003, |
| 206 | READ_LOCAL_EXTENDED_FEATURES = 0x1004, |
| 207 | READ_BUFFER_SIZE = 0x1005, |
| 208 | READ_BD_ADDR = 0x1009, |
| 209 | READ_DATA_BLOCK_SIZE = 0x100A, |
| 210 | READ_LOCAL_SUPPORTED_CODECS = 0x100B, |
| 211 | |
| 212 | // STATUS_PARAMETERS |
| 213 | READ_FAILED_CONTACT_COUNTER = 0x1401, |
| 214 | RESET_FAILED_CONTACT_COUNTER = 0x1402, |
| 215 | READ_LINK_QUALITY = 0x1403, |
| 216 | READ_RSSI = 0x1405, |
| 217 | READ_AFH_CHANNEL_MAP = 0x1406, |
| 218 | READ_CLOCK = 0x1407, |
| 219 | READ_ENCRYPTION_KEY_SIZE = 0x1408, |
| 220 | |
| 221 | // TESTING |
| 222 | READ_LOOPBACK_MODE = 0x1801, |
| 223 | WRITE_LOOPBACK_MODE = 0x1802, |
| 224 | ENABLE_DEVICE_UNDER_TEST_MODE = 0x1803, |
| 225 | WRITE_SIMPLE_PAIRING_DEBUG_MODE = 0x1804, |
| 226 | WRITE_SECURE_CONNECTIONS_TEST_MODE = 0x180A, |
| 227 | |
| 228 | // LE_CONTROLLER |
| 229 | LE_SET_EVENT_MASK = 0x2001, |
| 230 | LE_READ_BUFFER_SIZE = 0x2002, |
| 231 | LE_READ_LOCAL_SUPPORTED_FEATURES = 0x2003, |
| 232 | LE_SET_RANDOM_ADDRESS = 0x2005, |
| 233 | LE_SET_ADVERTISING_PARAMETERS = 0x2006, |
| 234 | LE_READ_ADVERTISING_CHANNEL_TX_POWER = 0x2007, |
| 235 | LE_SET_ADVERTISING_DATA = 0x2008, |
| 236 | LE_SET_SCAN_RESPONSE_DATA = 0x2009, |
| 237 | LE_SET_ADVERTISING_ENABLE = 0x200A, |
| 238 | LE_SET_SCAN_PARAMETERS = 0x200B, |
| 239 | LE_SET_SCAN_ENABLE = 0x200C, |
| 240 | LE_CREATE_CONNECTION = 0x200D, |
| 241 | LE_CREATE_CONNECTION_CANCEL = 0x200E, |
| 242 | LE_READ_WHITE_LIST_SIZE = 0x200F, |
| 243 | LE_CLEAR_WHITE_LIST = 0x2010, |
| 244 | LE_ADD_DEVICE_TO_WHITE_LIST = 0x2011, |
| 245 | LE_REMOVE_DEVICE_FROM_WHITE_LIST = 0x2012, |
| 246 | LE_CONNECTION_UPDATE = 0x2013, |
| 247 | LE_SET_HOST_CHANNEL_CLASSIFICATION = 0x2014, |
| 248 | LE_READ_CHANNEL_MAP = 0x2015, |
| 249 | LE_READ_REMOTE_FEATURES = 0x2016, |
| 250 | LE_ENCRYPT = 0x2017, |
| 251 | LE_RAND = 0x2018, |
| 252 | LE_START_ENCRYPTION = 0x2019, |
| 253 | LE_LONG_TERM_KEY_REQUEST_REPLY = 0x201A, |
| 254 | LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY = 0x201B, |
| 255 | LE_READ_SUPPORTED_STATES = 0x201C, |
| 256 | LE_RECEIVER_TEST = 0x201D, |
| 257 | LE_TRANSMITTER_TEST = 0x201E, |
| 258 | LE_TEST_END = 0x201F, |
| 259 | LE_REMOTE_CONNECTION_PARAMETER_REQUEST_REPLY = 0x2020, |
| 260 | LE_REMOTE_CONNECTION_PARAMETER_REQUEST_NEGATIVE_REPLY = 0x2021, |
| 261 | |
| 262 | LE_SET_DATA_LENGTH = 0x2022, |
| 263 | LE_READ_SUGGESTED_DEFAULT_DATA_LENGTH = 0x2023, |
| 264 | LE_WRITE_SUGGESTED_DEFAULT_DATA_LENGTH = 0x2024, |
| 265 | LE_READ_LOCAL_P_256_PUBLIC_KEY_COMMAND = 0x2025, |
| 266 | LE_GENERATE_DHKEY_COMMAND = 0x2026, |
| 267 | LE_ADD_DEVICE_TO_RESOLVING_LIST = 0x2027, |
| 268 | LE_REMOVE_DEVICE_FROM_RESOLVING_LIST = 0x2028, |
| 269 | LE_CLEAR_RESOLVING_LIST = 0x2029, |
| 270 | LE_READ_RESOLVING_LIST_SIZE = 0x202A, |
| 271 | LE_READ_PEER_RESOLVABLE_ADDRESS = 0x202B, |
| 272 | LE_READ_LOCAL_RESOLVABLE_ADDRESS = 0x202C, |
| 273 | LE_SET_ADDRESS_RESOLUTION_ENABLE = 0x202D, |
| 274 | LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT = 0x202E, |
| 275 | LE_READ_MAXIMUM_DATA_LENGTH = 0x202F, |
| 276 | LE_READ_PHY = 0x2030, |
| 277 | LE_SET_DEFAULT_PHY = 0x2031, |
| 278 | LE_SET_PHY = 0x2032, |
| 279 | LE_ENHANCED_RECEIVER_TEST = 0x2033, |
| 280 | LE_ENHANCED_TRANSMITTER_TEST = 0x2034, |
| 281 | LE_SET_EXTENDED_ADVERTISING_RANDOM_ADDRESS = 0x2035, |
| 282 | LE_SET_EXTENDED_ADVERTISING_PARAMETERS = 0x2036, |
| 283 | LE_SET_EXTENDED_ADVERTISING_DATA = 0x2037, |
| 284 | LE_SET_EXTENDED_ADVERTISING_SCAN_RESPONSE = 0x2038, |
| 285 | LE_SET_EXTENDED_ADVERTISING_ENABLE = 0x2039, |
| 286 | LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH = 0x203A, |
| 287 | LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS = 0x203B, |
| 288 | LE_REMOVE_ADVERTISING_SET = 0x203C, |
| 289 | LE_CLEAR_ADVERTISING_SETS = 0x203D, |
| 290 | LE_SET_PERIODIC_ADVERTISING_PARAM = 0x203E, |
| 291 | LE_SET_PERIODIC_ADVERTISING_DATA = 0x203F, |
| 292 | LE_SET_PERIODIC_ADVERTISING_ENABLE = 0x2040, |
| 293 | LE_SET_EXTENDED_SCAN_PARAMETERS = 0x2041, |
| 294 | LE_SET_EXTENDED_SCAN_ENABLE = 0x2042, |
| 295 | LE_EXTENDED_CREATE_CONNECTION = 0x2043, |
| 296 | LE_PERIODIC_ADVERTISING_CREATE_SYNC = 0x2044, |
| 297 | LE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL = 0x2045, |
| 298 | LE_PERIODIC_ADVERTISING_TERMINATE_SYNC = 0x2046, |
| 299 | LE_ADD_DEVICE_TO_PERIODIC_ADVERTISING_LIST = 0x2047, |
| 300 | LE_REMOVE_DEVICE_FROM_PERIODIC_ADVERTISING_LIST = 0x2048, |
| 301 | LE_CLEAR_PERIODIC_ADVERTISING_LIST = 0x2049, |
| 302 | LE_READ_PERIODIC_ADVERTISING_LIST_SIZE = 0x204A, |
| 303 | LE_READ_TRANSMIT_POWER = 0x204B, |
| 304 | LE_READ_RF_PATH_COMPENSATION_POWER = 0x204C, |
| 305 | LE_WRITE_RF_PATH_COMPENSATION_POWER = 0x204D, |
| 306 | LE_SET_PRIVACY_MODE = 0x204E, |
| 307 | |
| 308 | // VENDOR_SPECIFIC |
| 309 | LE_GET_VENDOR_CAPABILITIES = 0xFD53, |
| 310 | LE_MULTI_ADVT = 0xFD54, |
| 311 | LE_BATCH_SCAN = 0xFD56, |
| 312 | LE_ADV_FILTER = 0xFD57, |
| 313 | LE_TRACK_ADV = 0xFD58, |
| 314 | LE_ENERGY_INFO = 0xFD59, |
| 315 | LE_EXTENDED_SCAN_PARAMS = 0xFD5A, |
| 316 | CONTROLLER_DEBUG_INFO = 0xFD5B, |
| 317 | CONTROLLER_A2DP_OPCODE = 0xFD5D, |
| 318 | } |
| 319 | |
Chienyuan | a7ad3fb | 2019-08-15 18:04:32 +0800 | [diff] [blame] | 320 | // For mapping Local Supported Commands command |
| 321 | // Value = Octet * 10 + bit |
| 322 | enum OpCodeIndex : 16 { |
| 323 | INQUIRY = 0, |
| 324 | INQUIRY_CANCEL = 1, |
| 325 | PERIODIC_INQUIRY_MODE = 2, |
| 326 | EXIT_PERIODIC_INQUIRY_MODE = 3, |
| 327 | CREATE_CONNECTION = 4, |
| 328 | DISCONNECT = 5, |
| 329 | CREATE_CONNECTION_CANCEL = 7, |
| 330 | ACCEPT_CONNECTION_REQUEST = 10, |
| 331 | REJECT_CONNECTION_REQUEST = 11, |
| 332 | LINK_KEY_REQUEST_REPLY = 12, |
| 333 | LINK_KEY_REQUEST_NEGATIVE_REPLY = 13, |
| 334 | PIN_CODE_REQUEST_REPLY = 14, |
| 335 | PIN_CODE_REQUEST_NEGATIVE_REPLY = 15, |
| 336 | CHANGE_CONNECTION_PACKET_TYPE = 16, |
| 337 | AUTHENTICATION_REQUESTED = 17, |
| 338 | SET_CONNECTION_ENCRYPTION = 20, |
| 339 | CHANGE_CONNECTION_LINK_KEY = 21, |
| 340 | MASTER_LINK_KEY = 22, |
| 341 | REMOTE_NAME_REQUEST = 23, |
| 342 | REMOTE_NAME_REQUEST_CANCEL = 24, |
| 343 | READ_REMOTE_SUPPORTED_FEATURES = 25, |
| 344 | READ_REMOTE_EXTENDED_FEATURES = 26, |
| 345 | READ_REMOTE_VERSION_INFORMATION = 27, |
| 346 | READ_CLOCK_OFFSET = 30, |
| 347 | READ_LMP_HANDLE = 31, |
| 348 | HOLD_MODE = 41, |
| 349 | SNIFF_MODE = 42, |
| 350 | EXIT_SNIFF_MODE = 43, |
| 351 | QOS_SETUP = 46, |
| 352 | ROLE_DISCOVERY = 47, |
| 353 | SWITCH_ROLE = 50, |
| 354 | READ_LINK_POLICY_SETTINGS = 51, |
| 355 | WRITE_LINK_POLICY_SETTINGS = 52, |
| 356 | READ_DEFAULT_LINK_POLICY_SETTINGS = 53, |
| 357 | WRITE_DEFAULT_LINK_POLICY_SETTINGS = 54, |
| 358 | FLOW_SPECIFICATION = 55, |
| 359 | SET_EVENT_MASK = 56, |
| 360 | RESET = 57, |
| 361 | SET_EVENT_FILTER = 60, |
| 362 | FLUSH = 61, |
| 363 | READ_PIN_TYPE = 62, |
| 364 | WRITE_PIN_TYPE = 63, |
| 365 | READ_STORED_LINK_KEY = 65, |
| 366 | WRITE_STORED_LINK_KEY = 66, |
| 367 | DELETE_STORED_LINK_KEY = 67, |
| 368 | WRITE_LOCAL_NAME = 70, |
| 369 | READ_LOCAL_NAME = 71, |
| 370 | READ_CONNECTION_ACCEPT_TIMEOUT = 72, |
| 371 | WRITE_CONNECTION_ACCEPT_TIMEOUT = 73, |
| 372 | READ_PAGE_TIMEOUT = 74, |
| 373 | WRITE_PAGE_TIMEOUT = 75, |
| 374 | READ_SCAN_ENABLE = 76, |
| 375 | WRITE_SCAN_ENABLE = 77, |
| 376 | READ_PAGE_SCAN_ACTIVITY = 80, |
| 377 | WRITE_PAGE_SCAN_ACTIVITY = 81, |
| 378 | READ_INQUIRY_SCAN_ACTIVITY = 82, |
| 379 | WRITE_INQUIRY_SCAN_ACTIVITY = 83, |
| 380 | READ_AUTHENTICATION_ENABLE = 84, |
| 381 | WRITE_AUTHENTICATION_ENABLE = 85, |
| 382 | READ_CLASS_OF_DEVICE = 90, |
| 383 | WRITE_CLASS_OF_DEVICE = 91, |
| 384 | READ_VOICE_SETTING = 92, |
| 385 | WRITE_VOICE_SETTING = 93, |
| 386 | READ_AUTOMATIC_FLUSH_TIMEOUT = 94, |
| 387 | WRITE_AUTOMATIC_FLUSH_TIMEOUT = 95, |
| 388 | READ_NUM_BROADCAST_RETRANSMITS = 96, |
| 389 | WRITE_NUM_BROADCAST_RETRANSMITS = 97, |
| 390 | READ_HOLD_MODE_ACTIVITY = 100, |
| 391 | WRITE_HOLD_MODE_ACTIVITY = 101, |
| 392 | READ_TRANSMIT_POWER_LEVEL = 102, |
| 393 | READ_SYNCHRONOUS_FLOW_CONTROL_ENABLE = 103, |
| 394 | WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE = 104, |
| 395 | SET_CONTROLLER_TO_HOST_FLOW_CONTROL = 105, |
| 396 | HOST_BUFFER_SIZE = 106, |
| 397 | HOST_NUM_COMPLETED_PACKETS = 107, |
| 398 | READ_LINK_SUPERVISION_TIMEOUT = 110, |
| 399 | WRITE_LINK_SUPERVISION_TIMEOUT = 111, |
| 400 | READ_NUMBER_OF_SUPPORTED_IAC = 112, |
| 401 | READ_CURRENT_IAC_LAP = 113, |
| 402 | WRITE_CURRENT_IAC_LAP = 114, |
| 403 | SET_AFH_HOST_CHANNEL_CLASSIFICATION = 121, |
| 404 | READ_INQUIRY_SCAN_TYPE = 124, |
| 405 | WRITE_INQUIRY_SCAN_TYPE = 125, |
| 406 | READ_INQUIRY_MODE = 126, |
| 407 | WRITE_INQUIRY_MODE = 127, |
| 408 | READ_PAGE_SCAN_TYPE = 130, |
| 409 | WRITE_PAGE_SCAN_TYPE = 131, |
| 410 | READ_AFH_CHANNEL_ASSESSMENT_MODE = 132, |
| 411 | WRITE_AFH_CHANNEL_ASSESSMENT_MODE = 133, |
| 412 | READ_LOCAL_VERSION_INFORMATION = 143, |
| 413 | READ_LOCAL_SUPPORTED_FEATURES = 145, |
| 414 | READ_LOCAL_EXTENDED_FEATURES = 146, |
| 415 | READ_BUFFER_SIZE = 147, |
| 416 | READ_BD_ADDR = 151, |
| 417 | READ_FAILED_CONTACT_COUNTER = 152, |
| 418 | RESET_FAILED_CONTACT_COUNTER = 153, |
| 419 | READ_LINK_QUALITY = 154, |
| 420 | READ_RSSI = 155, |
| 421 | READ_AFH_CHANNEL_MAP = 156, |
| 422 | READ_CLOCK = 157, |
| 423 | READ_LOOPBACK_MODE = 160, |
| 424 | WRITE_LOOPBACK_MODE = 161, |
| 425 | ENABLE_DEVICE_UNDER_TEST_MODE = 162, |
| 426 | SETUP_SYNCHRONOUS_CONNECTION = 163, |
| 427 | ACCEPT_SYNCHRONOUS_CONNECTION = 164, |
| 428 | REJECT_SYNCHRONOUS_CONNECTION = 165, |
| 429 | READ_EXTENDED_INQUIRY_RESPONSE = 170, |
| 430 | WRITE_EXTENDED_INQUIRY_RESPONSE = 171, |
| 431 | REFRESH_ENCRYPTION_KEY = 172, |
| 432 | SNIFF_SUBRATING = 174, |
| 433 | READ_SIMPLE_PAIRING_MODE = 175, |
| 434 | WRITE_SIMPLE_PAIRING_MODE = 176, |
| 435 | READ_LOCAL_OOB_DATA = 177, |
| 436 | READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL = 180, |
| 437 | WRITE_INQUIRY_TRANSMIT_POWER_LEVEL = 181, |
| 438 | IO_CAPABILITY_REQUEST_REPLY = 187, |
| 439 | USER_CONFIRMATION_REQUEST_REPLY = 190, |
| 440 | USER_CONFIRMATION_REQUEST_NEGATIVE_REPLY = 191, |
| 441 | USER_PASSKEY_REQUEST_REPLY = 192, |
| 442 | USER_PASSKEY_REQUEST_NEGATIVE_REPLY = 193, |
| 443 | REMOTE_OOB_DATA_REQUEST_REPLY = 194, |
| 444 | WRITE_SIMPLE_PAIRING_DEBUG_MODE = 195, |
| 445 | REMOTE_OOB_DATA_REQUEST_NEGATIVE_REPLY = 197, |
| 446 | SEND_KEYPRESS_NOTIFICATION = 202, |
| 447 | IO_CAPABILITY_REQUEST_NEGATIVE_REPLY = 203, |
| 448 | READ_ENCRYPTION_KEY_SIZE = 204, |
| 449 | READ_DATA_BLOCK_SIZE = 232, |
| 450 | READ_LE_HOST_SUPPORT = 245, |
| 451 | WRITE_LE_HOST_SUPPORT = 246, |
| 452 | LE_SET_EVENT_MASK = 250, |
| 453 | LE_READ_BUFFER_SIZE = 251, |
| 454 | LE_READ_LOCAL_SUPPORTED_FEATURES = 252, |
| 455 | LE_SET_RANDOM_ADDRESS = 254, |
| 456 | LE_SET_ADVERTISING_PARAMETERS = 255, |
| 457 | LE_READ_ADVERTISING_CHANNEL_TX_POWER = 256, |
| 458 | LE_SET_ADVERTISING_DATA = 257, |
| 459 | LE_SET_SCAN_RESPONSE_DATA = 260, |
| 460 | LE_SET_ADVERTISING_ENABLE = 261, |
| 461 | LE_SET_SCAN_PARAMETERS = 262, |
| 462 | LE_SET_SCAN_ENABLE = 263, |
| 463 | LE_CREATE_CONNECTION = 264, |
| 464 | LE_CREATE_CONNECTION_CANCEL = 265, |
| 465 | LE_READ_WHITE_LIST_SIZE = 266, |
| 466 | LE_CLEAR_WHITE_LIST = 267, |
| 467 | LE_ADD_DEVICE_TO_WHITE_LIST = 270, |
| 468 | LE_REMOVE_DEVICE_FROM_WHITE_LIST = 271, |
| 469 | LE_CONNECTION_UPDATE = 272, |
| 470 | LE_SET_HOST_CHANNEL_CLASSIFICATION = 273, |
| 471 | LE_READ_CHANNEL_MAP = 274, |
| 472 | LE_READ_REMOTE_FEATURES = 275, |
| 473 | LE_ENCRYPT = 276, |
| 474 | LE_RAND = 277, |
| 475 | LE_START_ENCRYPTION = 280, |
| 476 | LE_LONG_TERM_KEY_REQUEST_REPLY = 281, |
| 477 | LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY = 282, |
| 478 | LE_READ_SUPPORTED_STATES = 283, |
| 479 | LE_RECEIVER_TEST = 284, |
| 480 | LE_TRANSMITTER_TEST = 285, |
| 481 | LE_TEST_END = 286, |
| 482 | ENHANCED_SETUP_SYNCHRONOUS_CONNECTION = 293, |
| 483 | ENHANCED_ACCEPT_SYNCHRONOUS_CONNECTION = 294, |
| 484 | READ_LOCAL_SUPPORTED_CODECS = 295, |
| 485 | READ_SECURE_CONNECTIONS_HOST_SUPPORT = 322, |
| 486 | WRITE_SECURE_CONNECTIONS_HOST_SUPPORT = 323, |
| 487 | READ_LOCAL_OOB_EXTENDED_DATA = 326, |
| 488 | WRITE_SECURE_CONNECTIONS_TEST_MODE = 327, |
| 489 | LE_REMOTE_CONNECTION_PARAMETER_REQUEST_REPLY = 334, |
| 490 | LE_REMOTE_CONNECTION_PARAMETER_REQUEST_NEGATIVE_REPLY = 335, |
| 491 | LE_SET_DATA_LENGTH = 336, |
| 492 | LE_READ_SUGGESTED_DEFAULT_DATA_LENGTH = 337, |
| 493 | LE_WRITE_SUGGESTED_DEFAULT_DATA_LENGTH = 340, |
| 494 | LE_READ_LOCAL_P_256_PUBLIC_KEY_COMMAND = 341, |
| 495 | LE_GENERATE_DHKEY_COMMAND = 342, |
| 496 | LE_ADD_DEVICE_TO_RESOLVING_LIST = 343, |
| 497 | LE_REMOVE_DEVICE_FROM_RESOLVING_LIST = 344, |
| 498 | LE_CLEAR_RESOLVING_LIST = 345, |
| 499 | LE_READ_RESOLVING_LIST_SIZE = 346, |
| 500 | LE_READ_PEER_RESOLVABLE_ADDRESS = 347, |
| 501 | LE_READ_LOCAL_RESOLVABLE_ADDRESS = 350, |
| 502 | LE_SET_ADDRESS_RESOLUTION_ENABLE = 351, |
| 503 | LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT = 352, |
| 504 | LE_READ_MAXIMUM_DATA_LENGTH = 353, |
| 505 | LE_READ_PHY = 354, |
| 506 | LE_SET_DEFAULT_PHY = 355, |
| 507 | LE_SET_PHY = 356, |
| 508 | LE_ENHANCED_RECEIVER_TEST = 357, |
| 509 | LE_ENHANCED_TRANSMITTER_TEST = 360, |
| 510 | LE_SET_EXTENDED_ADVERTISING_RANDOM_ADDRESS = 361, |
| 511 | LE_SET_EXTENDED_ADVERTISING_PARAMETERS = 362, |
| 512 | LE_SET_EXTENDED_ADVERTISING_DATA = 363, |
| 513 | LE_SET_EXTENDED_ADVERTISING_SCAN_RESPONSE = 364, |
| 514 | LE_SET_EXTENDED_ADVERTISING_ENABLE = 365, |
| 515 | LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH = 366, |
| 516 | LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS = 367, |
| 517 | LE_REMOVE_ADVERTISING_SET = 370, |
| 518 | LE_CLEAR_ADVERTISING_SETS = 371, |
| 519 | LE_SET_PERIODIC_ADVERTISING_PARAM = 372, |
| 520 | LE_SET_PERIODIC_ADVERTISING_DATA = 373, |
| 521 | LE_SET_PERIODIC_ADVERTISING_ENABLE = 374, |
| 522 | LE_SET_EXTENDED_SCAN_PARAMETERS = 375, |
| 523 | LE_SET_EXTENDED_SCAN_ENABLE = 376, |
| 524 | LE_EXTENDED_CREATE_CONNECTION = 377, |
| 525 | LE_PERIODIC_ADVERTISING_CREATE_SYNC = 380, |
| 526 | LE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL = 381, |
| 527 | LE_PERIODIC_ADVERTISING_TERMINATE_SYNC = 382, |
| 528 | LE_ADD_DEVICE_TO_PERIODIC_ADVERTISING_LIST = 383, |
| 529 | LE_REMOVE_DEVICE_FROM_PERIODIC_ADVERTISING_LIST = 384, |
| 530 | LE_CLEAR_PERIODIC_ADVERTISING_LIST = 385, |
| 531 | LE_READ_PERIODIC_ADVERTISING_LIST_SIZE = 386, |
| 532 | LE_READ_TRANSMIT_POWER = 387, |
| 533 | LE_READ_RF_PATH_COMPENSATION_POWER = 390, |
| 534 | LE_WRITE_RF_PATH_COMPENSATION_POWER = 391, |
| 535 | LE_SET_PRIVACY_MODE = 392, |
| 536 | } |
| 537 | |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 538 | packet CommandPacket { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 539 | op_code : OpCode, |
| 540 | _size_(_payload_) : 8, |
| 541 | _payload_, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 542 | } |
| 543 | |
| 544 | // Packets for interfaces |
| 545 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 546 | packet DiscoveryCommand : CommandPacket { _payload_, } |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 547 | packet ConnectionManagementCommand : CommandPacket { _payload_, } |
| 548 | packet SecurityCommand : CommandPacket { _payload_, } |
| 549 | packet ScoConnectionCommand : CommandPacket { _payload_, } |
| 550 | packet LeAdvertisingCommand : CommandPacket { _payload_, } |
Myles Watson | 742597d | 2019-10-14 16:23:38 -0700 | [diff] [blame] | 551 | packet LeScanningCommand : CommandPacket { _payload_, } |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 552 | packet LeConnectionManagementCommand : CommandPacket { _payload_, } |
| 553 | packet LeSecurityCommand : CommandPacket { _payload_, } |
| 554 | packet VendorCommand : CommandPacket { _payload_, } |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 555 | |
| 556 | // HCI Event Packets |
| 557 | |
| 558 | enum EventCode : 8 { |
| 559 | INQUIRY_COMPLETE = 0x01, |
| 560 | INQUIRY_RESULT = 0x02, |
| 561 | CONNECTION_COMPLETE = 0x03, |
| 562 | CONNECTION_REQUEST = 0x04, |
| 563 | DISCONNECTION_COMPLETE = 0x05, |
| 564 | AUTHENTICATION_COMPLETE = 0x06, |
| 565 | REMOTE_NAME_REQUEST_COMPLETE = 0x07, |
| 566 | ENCRYPTION_CHANGE = 0x08, |
| 567 | CHANGE_CONNECTION_LINK_KEY_COMPLETE = 0x09, |
| 568 | MASTER_LINK_KEY_COMPLETE = 0x0A, |
| 569 | READ_REMOTE_SUPPORTED_FEATURES_COMPLETE = 0x0B, |
| 570 | READ_REMOTE_VERSION_INFORMATION_COMPLETE = 0x0C, |
| 571 | QOS_SETUP_COMPLETE = 0x0D, |
| 572 | COMMAND_COMPLETE = 0x0E, |
| 573 | COMMAND_STATUS = 0x0F, |
| 574 | HARDWARE_ERROR = 0x10, |
| 575 | FLUSH_OCCURRED = 0x11, |
| 576 | ROLE_CHANGE = 0x12, |
| 577 | NUMBER_OF_COMPLETED_PACKETS = 0x13, |
| 578 | MODE_CHANGE = 0x14, |
| 579 | RETURN_LINK_KEYS = 0x15, |
| 580 | PIN_CODE_REQUEST = 0x16, |
| 581 | LINK_KEY_REQUEST = 0x17, |
| 582 | LINK_KEY_NOTIFICATION = 0x18, |
| 583 | LOOPBACK_COMMAND = 0x19, |
| 584 | DATA_BUFFER_OVERFLOW = 0x1A, |
| 585 | MAX_SLOTS_CHANGE = 0x1B, |
| 586 | READ_CLOCK_OFFSET_COMPLETE = 0x1C, |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 587 | CONNECTION_PACKET_TYPE_CHANGED = 0x1D, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 588 | QOS_VIOLATION = 0x1E, |
| 589 | PAGE_SCAN_REPETITION_MODE_CHANGE = 0x20, |
| 590 | FLOW_SPECIFICATION_COMPLETE = 0x21, |
| 591 | INQUIRY_RESULT_WITH_RSSI = 0x22, |
| 592 | READ_REMOTE_EXTENDED_FEATURES_COMPLETE = 0x23, |
| 593 | SYNCHRONOUS_CONNECTION_COMPLETE = 0x2C, |
| 594 | SYNCHRONOUS_CONNECTION_CHANGED = 0x2D, |
| 595 | SNIFF_SUBRATING = 0x2E, |
| 596 | EXTENDED_INQUIRY_RESULT = 0x2F, |
| 597 | ENCRYPTION_KEY_REFRESH_COMPLETE = 0x30, |
| 598 | IO_CAPABILITY_REQUEST = 0x31, |
| 599 | IO_CAPABILITY_RESPONSE = 0x32, |
| 600 | USER_CONFIRMATION_REQUEST = 0x33, |
| 601 | USER_PASSKEY_REQUEST = 0x34, |
| 602 | REMOTE_OOB_DATA_REQUEST = 0x35, |
| 603 | SIMPLE_PAIRING_COMPLETE = 0x36, |
| 604 | LINK_SUPERVISION_TIMEOUT_CHANGED = 0x38, |
| 605 | ENHANCED_FLUSH_COMPLETE = 0x39, |
| 606 | USER_PASSKEY_NOTIFICATION = 0x3B, |
| 607 | KEYPRESS_NOTIFICATION = 0x3C, |
| 608 | REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION = 0x3D, |
| 609 | LE_META_EVENT = 0x3e, |
| 610 | NUMBER_OF_COMPLETED_DATA_BLOCKS = 0x48, |
Chienyuan | aa235aa | 2019-08-06 16:39:20 +0800 | [diff] [blame] | 611 | VENDOR_SPECIFIC = 0xFF, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 612 | } |
| 613 | |
| 614 | packet EventPacket { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 615 | event_code : EventCode, |
| 616 | _size_(_payload_) : 8, |
| 617 | _payload_, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 618 | } |
| 619 | |
| 620 | // LE Events |
| 621 | |
| 622 | enum SubeventCode : 8 { |
| 623 | CONNECTION_COMPLETE = 0x01, |
| 624 | ADVERTISING_REPORT = 0x02, |
| 625 | CONNECTION_UPDATE_COMPLETE = 0x03, |
| 626 | READ_REMOTE_FEATURES_COMPLETE = 0x04, |
| 627 | LONG_TERM_KEY_REQUEST = 0x05, |
| 628 | REMOTE_CONNECTION_PARAMETER_REQUEST = 0x06, |
| 629 | DATA_LENGTH_CHANGE = 0x07, |
| 630 | READ_LOCAL_P256_PUBLIC_KEY_COMPLETE = 0x08, |
| 631 | GENERATE_DHKEY_COMPLETE = 0x09, |
| 632 | ENHANCED_CONNECTION_COMPLETE = 0x0a, |
| 633 | DIRECTED_ADVERTISING_REPORT = 0x0b, |
| 634 | PHY_UPDATE_COMPLETE = 0x0c, |
| 635 | EXTENDED_ADVERTISING_REPORT = 0x0D, |
| 636 | PERIODIC_ADVERTISING_SYNC_ESTABLISHED = 0x0E, |
| 637 | PERIODIC_ADVERTISING_REPORT = 0x0F, |
| 638 | PERIODIC_ADVERTISING_SYNC_LOST = 0x10, |
| 639 | SCAN_TIMEOUT = 0x11, |
| 640 | ADVERTISING_SET_TERMINATED = 0x12, |
| 641 | SCAN_REQUEST_RECEIVED = 0x13, |
| 642 | } |
| 643 | |
| 644 | // Common definitions for commands and events |
| 645 | |
| 646 | enum FeatureFlag : 1 { |
| 647 | UNSUPPORTED = 0, |
| 648 | SUPPORTED = 1, |
| 649 | } |
| 650 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 651 | enum ErrorCode: 8 { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 652 | SUCCESS = 0x00, |
| 653 | UNKNOWN_HCI_COMMAND = 0x01, |
| 654 | UNKNOWN_CONNECTION = 0x02, |
| 655 | HARDWARE_FAILURE = 0x03, |
| 656 | PAGE_TIMEOUT = 0x04, |
| 657 | AUTHENTICATION_FAILURE = 0x05, |
| 658 | PIN_OR_KEY_MISSING = 0x06, |
| 659 | MEMORY_CAPACITY_EXCEEDED = 0x07, |
| 660 | CONNECTION_TIMEOUT = 0x08, |
| 661 | CONNECTION_LIMIT_EXCEEDED = 0x09, |
| 662 | SYNCHRONOUS_CONNECTION_LIMIT_EXCEEDED = 0x0A, |
| 663 | CONNECTION_ALREADY_EXISTS = 0x0B, |
| 664 | COMMAND_DISALLOWED = 0x0C, |
| 665 | CONNECTION_REJECTED_LIMITED_RESOURCES = 0x0D, |
| 666 | CONNECTION_REJECTED_SECURITY_REASONS = 0x0E, |
| 667 | CONNECTION_REJECTED_UNACCEPTABLE_BD_ADDR = 0x0F, |
| 668 | CONNECTION_ACCEPT_TIMEOUT = 0x10, |
| 669 | UNSUPORTED_FEATURE_OR_PARAMETER_VALUE = 0x11, |
| 670 | INVALID_HCI_COMMAND_PARAMETERS = 0x12, |
| 671 | REMOTE_USER_TERMINATED_CONNECTION = 0x13, |
| 672 | REMOTE_DEVICE_TERMINATED_CONNECTION_LOW_RESOURCES = 0x14, |
| 673 | REMOTE_DEVICE_TERMINATED_CONNECTION_POWER_OFF = 0x15, |
| 674 | CONNECTION_TERMINATED_BY_LOCAL_HOST = 0x16, |
| 675 | REPEATED_ATTEMPTS = 0x17, |
| 676 | PAIRING_NOT_ALLOWED = 0x18, |
| 677 | UNKNOWN_LMP_PDU = 0x19, |
| 678 | UNSUPPORTED_REMOTE_OR_LMP_FEATURE = 0x1A, |
| 679 | SCO_OFFSET_REJECTED = 0x1B, |
| 680 | SCO_INTERVAL_REJECTED = 0x1C, |
| 681 | SCO_AIR_MODE_REJECTED = 0x1D, |
| 682 | INVALID_LMP_OR_LL_PARAMETERS = 0x1E, |
| 683 | UNSPECIFIED_ERROR = 0x1F, |
| 684 | UNSUPPORTED_LMP_OR_LL_PARAMETER = 0x20, |
| 685 | ROLE_CHANGE_NOT_ALLOWED = 0x21, |
Chienyuan | f58d511 | 2019-11-14 20:25:26 +0800 | [diff] [blame] | 686 | ENCRYPTION_MODE_NOT_ACCEPTABLE = 0x25, |
| 687 | CONTROLLER_BUSY = 0x3A, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 688 | } |
| 689 | |
| 690 | // Events that are defined with their respective commands |
| 691 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 692 | packet CommandComplete : EventPacket (event_code = COMMAND_COMPLETE){ |
| 693 | num_hci_command_packets : 8, |
| 694 | command_op_code : OpCode, |
| 695 | _payload_, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 696 | } |
| 697 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 698 | packet CommandStatus : EventPacket (event_code = COMMAND_STATUS){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 699 | status : ErrorCode, // SUCCESS means PENDING |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 700 | num_hci_command_packets : 8, |
| 701 | command_op_code : OpCode, |
| 702 | _payload_, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 703 | } |
| 704 | |
Myles Watson | b39fc3e | 2019-06-12 14:57:46 -0700 | [diff] [blame] | 705 | // Credits |
| 706 | packet NoCommandComplete : CommandComplete (command_op_code = NONE){ |
| 707 | } |
| 708 | |
Chris Manton | b365084 | 2019-10-03 17:31:12 -0700 | [diff] [blame] | 709 | struct Lap { // Lower Address Part |
| 710 | lap : 6, |
| 711 | _reserved_ : 2, |
| 712 | _fixed_ = 0x9e8b : 16, |
| 713 | } |
| 714 | |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 715 | // LINK_CONTROL |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 716 | packet Inquiry : DiscoveryCommand (op_code = INQUIRY) { |
Chris Manton | b365084 | 2019-10-03 17:31:12 -0700 | [diff] [blame] | 717 | lap : Lap, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 718 | inquiry_length : 8, // 0x1 - 0x30 (times 1.28s) |
| 719 | num_responses : 8, // 0x00 unlimited |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 720 | } |
| 721 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 722 | packet InquiryStatus : CommandStatus (command_op_code = INQUIRY) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 723 | } |
| 724 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 725 | packet InquiryCancel : DiscoveryCommand (op_code = INQUIRY_CANCEL) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 726 | } |
| 727 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 728 | packet InquiryCancelComplete : CommandComplete (command_op_code = INQUIRY_CANCEL) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 729 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 730 | } |
| 731 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 732 | packet PeriodicInquiryMode : DiscoveryCommand (op_code = PERIODIC_INQUIRY_MODE) { |
Chris Manton | 16d2001 | 2019-10-14 13:11:55 -0700 | [diff] [blame] | 733 | max_period_length : 16, // Range 0x0003 to 0xffff (times 1.28s) |
| 734 | min_period_length : 16, // Range 0x0002 to 0xfffe (times 1.28s) |
| 735 | lap : Lap, |
| 736 | inquiry_length : 8, // 0x1 - 0x30 (times 1.28s) |
| 737 | num_responses : 8, // 0x00 unlimited |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 738 | } |
| 739 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 740 | packet PeriodicInquiryModeComplete : CommandComplete (command_op_code = PERIODIC_INQUIRY_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 741 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 742 | } |
| 743 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 744 | packet ExitPeriodicInquiryMode : DiscoveryCommand (op_code = EXIT_PERIODIC_INQUIRY_MODE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 745 | } |
| 746 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 747 | packet ExitPeriodicInquiryModeComplete : CommandComplete (command_op_code = EXIT_PERIODIC_INQUIRY_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 748 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 749 | } |
| 750 | |
| 751 | enum PageScanRepetitionMode : 8 { |
| 752 | R0 = 0x00, |
| 753 | R1 = 0x01, |
| 754 | R2 = 0x02, |
| 755 | } |
| 756 | |
| 757 | enum ClockOffsetValid : 1 { |
| 758 | INVALID = 0, |
| 759 | VALID = 1, |
| 760 | } |
| 761 | |
Myles Watson | 7a5b723 | 2019-04-08 16:41:33 -0700 | [diff] [blame] | 762 | enum CreateConnectionRoleSwitch : 8 { |
| 763 | REMAIN_MASTER = 0x00, |
| 764 | ALLOW_ROLE_SWITCH = 0x01, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 765 | } |
| 766 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 767 | packet CreateConnection : ConnectionManagementCommand (op_code = CREATE_CONNECTION) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 768 | bd_addr : Address, |
| 769 | packet_type : 16, |
| 770 | page_scan_repetition_mode : PageScanRepetitionMode, |
| 771 | _reserved_ : 8, |
| 772 | clock_offset : 15, |
| 773 | clock_offset_valid : ClockOffsetValid, |
| 774 | allow_role_switch : CreateConnectionRoleSwitch, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 775 | } |
| 776 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 777 | packet CreateConnectionStatus : CommandStatus (command_op_code = CREATE_CONNECTION) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 778 | } |
| 779 | |
| 780 | enum DisconnectReason : 8 { |
| 781 | AUTHENTICATION_FAILURE = 0x05, |
| 782 | REMOTE_USER_TERMINATED_CONNECTION = 0x13, |
| 783 | REMOTE_DEVICE_TERMINATED_CONNECTION_LOW_RESOURCES = 0x14, |
| 784 | REMOTE_DEVICE_TERMINATED_CONNECTION_POWER_OFF = 0x15, |
| 785 | UNSUPPORTED_REMOTE_FEATURE = 0x1A, |
| 786 | PAIRING_WITH_UNIT_KEY_NOT_SUPPORTED = 0x29, |
| 787 | UNACCEPTABLE_CONNECTION_PARAMETERS = 0x3B, |
| 788 | } |
| 789 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 790 | packet Disconnect : ConnectionManagementCommand (op_code = DISCONNECT) { |
| 791 | connection_handle : 12, |
| 792 | _reserved_ : 4, |
| 793 | reason : DisconnectReason, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 794 | } |
| 795 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 796 | packet DisconnectStatus : CommandStatus (command_op_code = DISCONNECT) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 797 | } |
| 798 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 799 | packet CreateConnectionCancel : ConnectionManagementCommand (op_code = CREATE_CONNECTION_CANCEL) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 800 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 801 | } |
| 802 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 803 | packet CreateConnectionCancelComplete : CommandComplete (command_op_code = CREATE_CONNECTION_CANCEL) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 804 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 805 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 806 | } |
| 807 | |
| 808 | enum AcceptConnectionRequestRole : 8 { |
| 809 | BECOME_MASTER = 0x00, |
| 810 | REMAIN_SLAVE = 0x01, |
| 811 | } |
| 812 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 813 | packet AcceptConnectionRequest : ConnectionManagementCommand (op_code = ACCEPT_CONNECTION_REQUEST) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 814 | bd_addr : Address, |
| 815 | role : AcceptConnectionRequestRole, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 816 | } |
| 817 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 818 | packet AcceptConnectionRequestStatus : CommandStatus (command_op_code = ACCEPT_CONNECTION_REQUEST) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 819 | } |
| 820 | |
| 821 | enum RejectConnectionReason : 8 { |
| 822 | LIMITED_RESOURCES = 0x0D, |
| 823 | SECURITY_REASONS = 0x0E, |
| 824 | UNACCEPTABLE_BD_ADDR = 0x0F, |
| 825 | } |
| 826 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 827 | packet RejectConnectionRequest : ConnectionManagementCommand (op_code = REJECT_CONNECTION_REQUEST) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 828 | bd_addr : Address, |
| 829 | reason : RejectConnectionReason, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 830 | } |
| 831 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 832 | packet RejectConnectionRequestStatus : CommandStatus (command_op_code = REJECT_CONNECTION_REQUEST) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 833 | } |
| 834 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 835 | packet LinkKeyRequestReply : SecurityCommand (op_code = LINK_KEY_REQUEST_REPLY) { |
| 836 | bd_addr : Address, |
Chienyuan | 4d7cc81 | 2019-07-12 18:00:12 +0800 | [diff] [blame] | 837 | link_key : 8[16], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 838 | } |
| 839 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 840 | packet LinkKeyRequestReplyComplete : CommandComplete (command_op_code = LINK_KEY_REQUEST_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 841 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 842 | } |
| 843 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 844 | packet LinkKeyRequestNegativeReply : SecurityCommand (op_code = LINK_KEY_REQUEST_NEGATIVE_REPLY) { |
| 845 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 846 | } |
| 847 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 848 | packet LinkKeyRequestNegativeReplyComplete : CommandComplete (command_op_code = LINK_KEY_REQUEST_NEGATIVE_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 849 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 850 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 851 | } |
| 852 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 853 | packet PinCodeRequestReply : SecurityCommand (op_code = PIN_CODE_REQUEST_REPLY) { |
| 854 | bd_addr : Address, |
| 855 | pin_code_length : 5, // 0x01 - 0x10 |
| 856 | _reserved_ : 3, |
Chienyuan | 4d7cc81 | 2019-07-12 18:00:12 +0800 | [diff] [blame] | 857 | pin_code : 8[16], // string parameter, first octet first |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 858 | } |
| 859 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 860 | packet PinCodeRequestReplyComplete : CommandComplete (command_op_code = PIN_CODE_REQUEST_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 861 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 862 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 863 | } |
| 864 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 865 | packet PinCodeRequestNegativeReply : SecurityCommand (op_code = PIN_CODE_REQUEST_NEGATIVE_REPLY) { |
| 866 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 867 | } |
| 868 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 869 | packet PinCodeRequestNegativeReplyComplete : CommandComplete (command_op_code = PIN_CODE_REQUEST_NEGATIVE_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 870 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 871 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 872 | } |
| 873 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 874 | packet ChangeConnectionPacketType : ConnectionManagementCommand (op_code = CHANGE_CONNECTION_PACKET_TYPE) { |
| 875 | connection_handle : 12, |
| 876 | _reserved_ : 4, |
| 877 | packet_type : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 878 | } |
| 879 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 880 | packet ChangeConnectionPacketTypeStatus : CommandStatus (command_op_code = CHANGE_CONNECTION_PACKET_TYPE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 881 | } |
| 882 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 883 | packet AuthenticationRequested : ConnectionManagementCommand (op_code = AUTHENTICATION_REQUESTED) { |
| 884 | connection_handle : 12, |
| 885 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 886 | } |
| 887 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 888 | packet AuthenticationRequestedStatus : CommandStatus (command_op_code = AUTHENTICATION_REQUESTED) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 889 | } |
| 890 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 891 | packet SetConnectionEncryption : ConnectionManagementCommand (op_code = SET_CONNECTION_ENCRYPTION) { |
| 892 | connection_handle : 12, |
| 893 | _reserved_ : 4, |
| 894 | encryption_enable : Enable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 895 | } |
| 896 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 897 | packet SetConnectionEncryptionStatus : CommandStatus (command_op_code = SET_CONNECTION_ENCRYPTION) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 898 | } |
| 899 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 900 | packet ChangeConnectionLinkKey : ConnectionManagementCommand (op_code = CHANGE_CONNECTION_LINK_KEY) { |
| 901 | connection_handle : 12, |
| 902 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 903 | } |
| 904 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 905 | packet ChangeConnectionLinkKeyStatus : CommandStatus (command_op_code = CHANGE_CONNECTION_LINK_KEY) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 906 | } |
| 907 | |
| 908 | enum KeyFlag : 8 { |
| 909 | SEMI_PERMANENT = 0x00, |
| 910 | TEMPORARY = 0x01, |
| 911 | } |
| 912 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 913 | packet MasterLinkKey : ConnectionManagementCommand (op_code = MASTER_LINK_KEY) { |
| 914 | key_flag : KeyFlag, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 915 | } |
| 916 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 917 | packet MasterLinkKeyStatus : CommandStatus (command_op_code = MASTER_LINK_KEY) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 918 | } |
| 919 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 920 | packet RemoteNameRequest : DiscoveryCommand (op_code = REMOTE_NAME_REQUEST) { |
| 921 | bd_addr : Address, |
| 922 | page_scan_repetition_mode : PageScanRepetitionMode, |
| 923 | _reserved_ : 8, |
| 924 | clock_offset : 15, |
| 925 | clock_offset_valid : ClockOffsetValid, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 926 | } |
| 927 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 928 | packet RemoteNameRequestStatus : CommandStatus (command_op_code = REMOTE_NAME_REQUEST) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 929 | } |
| 930 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 931 | packet RemoteNameRequestCancel : DiscoveryCommand (op_code = REMOTE_NAME_REQUEST_CANCEL) { |
| 932 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 933 | } |
| 934 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 935 | packet RemoteNameRequestCancelComplete : CommandComplete (command_op_code = REMOTE_NAME_REQUEST_CANCEL) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 936 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 937 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 938 | } |
| 939 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 940 | packet ReadRemoteSupportedFeatures : DiscoveryCommand (op_code = READ_REMOTE_SUPPORTED_FEATURES) { |
| 941 | connection_handle : 12, |
| 942 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 943 | } |
| 944 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 945 | packet ReadRemoteSupportedFeaturesStatus : CommandStatus (command_op_code = READ_REMOTE_SUPPORTED_FEATURES) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 946 | } |
| 947 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 948 | packet ReadRemoteExtendedFeatures : DiscoveryCommand (op_code = READ_REMOTE_EXTENDED_FEATURES) { |
| 949 | connection_handle : 12, |
| 950 | _reserved_ : 4, |
| 951 | page_number : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 952 | } |
| 953 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 954 | packet ReadRemoteExtendedFeaturesStatus : CommandStatus (command_op_code = READ_REMOTE_EXTENDED_FEATURES) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 955 | } |
| 956 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 957 | packet ReadRemoteVersionInformation : DiscoveryCommand (op_code = READ_REMOTE_VERSION_INFORMATION) { |
| 958 | connection_handle : 12, |
| 959 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 960 | } |
| 961 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 962 | packet ReadRemoteVersionInformationStatus : CommandStatus (command_op_code = READ_REMOTE_VERSION_INFORMATION) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 963 | } |
| 964 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 965 | packet ReadClockOffset : ConnectionManagementCommand (op_code = READ_CLOCK_OFFSET) { |
| 966 | connection_handle : 12, |
| 967 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 968 | } |
| 969 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 970 | packet ReadClockOffsetStatus : CommandStatus (command_op_code = READ_CLOCK_OFFSET) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 971 | } |
| 972 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 973 | packet ReadLmpHandle : ConnectionManagementCommand (op_code = READ_LMP_HANDLE) { |
| 974 | connection_handle : 12, |
| 975 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 976 | } |
| 977 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 978 | packet ReadLmpHandleComplete : CommandComplete (command_op_code = READ_LMP_HANDLE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 979 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 980 | connection_handle : 12, |
| 981 | _reserved_ : 4, |
| 982 | lmp_handle : 8, |
| 983 | _reserved_ : 32, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 984 | } |
| 985 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 986 | packet SetupSynchronousConnection : ScoConnectionCommand (op_code = SETUP_SYNCHRONOUS_CONNECTION) { |
| 987 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 988 | } |
| 989 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 990 | packet AcceptSynchronousConnection : ScoConnectionCommand (op_code = ACCEPT_SYNCHRONOUS_CONNECTION) { |
| 991 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 992 | } |
| 993 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 994 | packet RejectSynchronousConnection : ScoConnectionCommand (op_code = REJECT_SYNCHRONOUS_CONNECTION) { |
| 995 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 996 | } |
| 997 | |
| 998 | enum IoCapability : 8 { |
| 999 | DISPLAY_ONLY = 0x00, |
| 1000 | DISPLAY_YES_NO = 0x01, |
| 1001 | KEYBOARD_ONLY = 0x02, |
| 1002 | NO_INPUT_NO_OUTPUT = 0x03, |
| 1003 | } |
| 1004 | |
| 1005 | enum OobDataPresent : 8 { |
| 1006 | NOT_PRESENT = 0x00, |
| 1007 | P_192_PRESENT = 0x01, |
| 1008 | P_256_PRESENT = 0x02, |
| 1009 | P_192_AND_256_PRESENT = 0x03, |
| 1010 | } |
| 1011 | |
| 1012 | enum AuthenticationRequirements : 8 { |
| 1013 | NO_BONDING = 0x00, |
| 1014 | NO_BONDING_MITM_PROTECTION = 0x01, |
| 1015 | DEDICATED_BONDING = 0x02, |
| 1016 | DEDICATED_BONDING_MITM_PROTECTION = 0x03, |
| 1017 | GENERAL_BONDING = 0x04, |
| 1018 | GENERAL_BONDING_MITM_PROTECTION = 0x05, |
| 1019 | } |
| 1020 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1021 | packet IoCapabilityRequestReply : SecurityCommand (op_code = IO_CAPABILITY_REQUEST_REPLY) { |
| 1022 | bd_addr : Address, |
| 1023 | io_capability : IoCapability, |
| 1024 | oob_present : OobDataPresent, |
| 1025 | authentication_requirements : AuthenticationRequirements, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1026 | } |
| 1027 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1028 | packet IoCapabilityRequestReplyComplete : CommandComplete (command_op_code = IO_CAPABILITY_REQUEST_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1029 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1030 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1031 | } |
| 1032 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1033 | packet UserConfirmationRequestReply : SecurityCommand (op_code = USER_CONFIRMATION_REQUEST_REPLY) { |
| 1034 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1035 | } |
| 1036 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1037 | packet UserConfirmationRequestReplyComplete : CommandComplete (command_op_code = USER_CONFIRMATION_REQUEST_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1038 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1039 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1040 | } |
| 1041 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1042 | packet UserConfirmationRequestNegativeReply : SecurityCommand (op_code = USER_CONFIRMATION_REQUEST_NEGATIVE_REPLY) { |
| 1043 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1044 | } |
| 1045 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1046 | packet UserConfirmationRequestNegativeReplyComplete : CommandComplete (command_op_code = USER_CONFIRMATION_REQUEST_NEGATIVE_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1047 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1048 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1049 | } |
| 1050 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1051 | packet UserPasskeyRequestReply : SecurityCommand (op_code = USER_PASSKEY_REQUEST_REPLY) { |
| 1052 | bd_addr : Address, |
| 1053 | numeric_value : 32, // 000000-999999 decimal or 0x0-0xF423F |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1054 | } |
| 1055 | |
Chienyuan | f58d511 | 2019-11-14 20:25:26 +0800 | [diff] [blame] | 1056 | packet UserPasskeyRequestReplyComplete : CommandComplete (command_op_code = USER_PASSKEY_REQUEST_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1057 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1058 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1059 | } |
| 1060 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1061 | packet UserPasskeyRequestNegativeReply : SecurityCommand (op_code = USER_PASSKEY_REQUEST_NEGATIVE_REPLY) { |
| 1062 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1063 | } |
| 1064 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1065 | packet UserPasskeyRequestNegativeReplyComplete : CommandComplete (command_op_code = USER_PASSKEY_REQUEST_NEGATIVE_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1066 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1067 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1068 | } |
| 1069 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1070 | packet RemoteOobDataRequestReply : SecurityCommand (op_code = REMOTE_OOB_DATA_REQUEST_REPLY) { |
Chienyuan | 4d7cc81 | 2019-07-12 18:00:12 +0800 | [diff] [blame] | 1071 | bd_addr : Address, |
| 1072 | c : 8[16], |
| 1073 | r : 8[16], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1074 | } |
| 1075 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1076 | packet RemoteOobDataRequestReplyComplete : CommandComplete (command_op_code = REMOTE_OOB_DATA_REQUEST_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1077 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1078 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1079 | } |
| 1080 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1081 | packet RemoteOobDataRequestNegativeReply : SecurityCommand (op_code = REMOTE_OOB_DATA_REQUEST_NEGATIVE_REPLY) { |
| 1082 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1083 | } |
| 1084 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1085 | packet RemoteOobDataRequestNegativeReplyComplete : CommandComplete (command_op_code = REMOTE_OOB_DATA_REQUEST_NEGATIVE_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1086 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1087 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1088 | } |
| 1089 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1090 | packet IoCapabilityRequestNegativeReply : SecurityCommand (op_code = IO_CAPABILITY_REQUEST_NEGATIVE_REPLY) { |
| 1091 | bd_addr : Address, |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1092 | reason : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1093 | } |
| 1094 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1095 | packet IoCapabilityRequestNegativeReplyComplete : CommandComplete (command_op_code = IO_CAPABILITY_REQUEST_NEGATIVE_REPLY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1096 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1097 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1098 | } |
| 1099 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1100 | packet EnhancedSetupSynchronousConnection : ScoConnectionCommand (op_code = ENHANCED_SETUP_SYNCHRONOUS_CONNECTION) { |
| 1101 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1102 | } |
| 1103 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1104 | packet EnhancedAcceptSynchronousConnection : ScoConnectionCommand (op_code = ENHANCED_ACCEPT_SYNCHRONOUS_CONNECTION) { |
| 1105 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1106 | } |
| 1107 | |
| 1108 | |
| 1109 | // LINK_POLICY |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1110 | packet HoldMode : ConnectionManagementCommand (op_code = HOLD_MODE) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1111 | connection_handle : 12, |
| 1112 | _reserved_ : 4, |
| 1113 | hold_mode_max_interval: 16, // 0x0002-0xFFFE (1.25ms-40.9s) |
| 1114 | hold_mode_min_interval: 16, // 0x0002-0xFFFE (1.25ms-40.9s) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1115 | } |
| 1116 | |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1117 | packet HoldModeStatus : CommandStatus (command_op_code = HOLD_MODE) { |
| 1118 | } |
| 1119 | |
| 1120 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1121 | packet SniffMode : ConnectionManagementCommand (op_code = SNIFF_MODE) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1122 | connection_handle : 12, |
| 1123 | _reserved_ : 4, |
| 1124 | sniff_max_interval: 16, // 0x0002-0xFFFE (1.25ms-40.9s) |
| 1125 | sniff_min_interval: 16, // 0x0002-0xFFFE (1.25ms-40.9s) |
| 1126 | sniff_attempt: 16, // 0x0001-0x7FFF (1.25ms-40.9s) |
| 1127 | sniff_timeout: 16, // 0x0000-0x7FFF (0ms-40.9s) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1128 | } |
| 1129 | |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1130 | packet SniffModeStatus : CommandStatus (command_op_code = SNIFF_MODE) { |
| 1131 | } |
| 1132 | |
| 1133 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1134 | packet ExitSniffMode : ConnectionManagementCommand (op_code = EXIT_SNIFF_MODE) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1135 | connection_handle : 12, |
| 1136 | _reserved_ : 4, |
| 1137 | } |
| 1138 | |
| 1139 | packet ExitSniffModeStatus : CommandStatus (command_op_code = EXIT_SNIFF_MODE) { |
| 1140 | } |
| 1141 | |
| 1142 | enum ServiceType : 8 { |
| 1143 | NO_TRAFFIC = 0x00, |
| 1144 | BEST_EFFORT = 0x01, |
| 1145 | GUARANTEED = 0x02, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1146 | } |
| 1147 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1148 | packet QosSetup : ConnectionManagementCommand (op_code = QOS_SETUP) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1149 | connection_handle : 12, |
| 1150 | _reserved_ : 4, |
| 1151 | _reserved_ : 8, |
| 1152 | service_type : ServiceType, |
| 1153 | token_rate : 32, // Octets/s |
| 1154 | peak_bandwidth : 32, // Octets/s |
| 1155 | latency : 32, // Octets/s |
| 1156 | delay_variation : 32, // microseconds |
| 1157 | } |
| 1158 | |
| 1159 | packet QosSetupStatus : CommandStatus (command_op_code = QOS_SETUP) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1160 | } |
| 1161 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1162 | packet RoleDiscovery : ConnectionManagementCommand (op_code = ROLE_DISCOVERY) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1163 | connection_handle : 12, |
| 1164 | _reserved_ : 4, |
| 1165 | } |
| 1166 | |
| 1167 | enum Role : 8 { |
| 1168 | MASTER = 0x00, |
| 1169 | SLAVE = 0x01, |
| 1170 | } |
| 1171 | |
| 1172 | packet RoleDiscoveryComplete : CommandComplete (command_op_code = ROLE_DISCOVERY) { |
| 1173 | status : ErrorCode, |
| 1174 | connection_handle : 12, |
| 1175 | _reserved_ : 4, |
| 1176 | current_role : Role, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1177 | } |
| 1178 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1179 | packet SwitchRole : ConnectionManagementCommand (op_code = SWITCH_ROLE) { |
Chienyuan | 9145e7a | 2019-10-02 15:18:55 +0800 | [diff] [blame] | 1180 | bd_addr : Address, |
| 1181 | role : Role, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1182 | } |
| 1183 | |
Chienyuan | 9145e7a | 2019-10-02 15:18:55 +0800 | [diff] [blame] | 1184 | packet SwitchRoleStatus : CommandStatus (command_op_code = SWITCH_ROLE) { |
| 1185 | } |
| 1186 | |
| 1187 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1188 | packet ReadLinkPolicySettings : ConnectionManagementCommand (op_code = READ_LINK_POLICY_SETTINGS) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1189 | connection_handle : 12, |
| 1190 | _reserved_ : 4, |
| 1191 | } |
| 1192 | |
| 1193 | enum LinkPolicy : 16 { |
| 1194 | ENABLE_ROLE_SWITCH = 0x01, |
| 1195 | ENABLE_HOLD_MODE = 0x02, |
| 1196 | ENABLE_SNIFF_MODE = 0x04, |
Chienyuan | 9145e7a | 2019-10-02 15:18:55 +0800 | [diff] [blame] | 1197 | ENABLE_PARK_MODE = 0x08, // deprecated after 5.0 |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1198 | } |
| 1199 | |
| 1200 | packet ReadLinkPolicySettingsComplete : CommandComplete (command_op_code = READ_LINK_POLICY_SETTINGS) { |
| 1201 | status : ErrorCode, |
| 1202 | connection_handle : 12, |
| 1203 | _reserved_ : 4, |
| 1204 | link_policy_settings : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1205 | } |
| 1206 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1207 | packet WriteLinkPolicySettings : ConnectionManagementCommand (op_code = WRITE_LINK_POLICY_SETTINGS) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1208 | connection_handle : 12, |
| 1209 | _reserved_ : 4, |
| 1210 | link_policy_settings : 16, |
| 1211 | } |
| 1212 | |
| 1213 | packet WriteLinkPolicySettingsComplete : CommandComplete (command_op_code = WRITE_LINK_POLICY_SETTINGS) { |
| 1214 | status : ErrorCode, |
| 1215 | connection_handle : 12, |
| 1216 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1217 | } |
| 1218 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1219 | packet ReadDefaultLinkPolicySettings : ConnectionManagementCommand (op_code = READ_DEFAULT_LINK_POLICY_SETTINGS) { |
Chienyuan | 9145e7a | 2019-10-02 15:18:55 +0800 | [diff] [blame] | 1220 | } |
| 1221 | |
| 1222 | packet ReadDefaultLinkPolicySettingsComplete : CommandComplete (command_op_code = READ_DEFAULT_LINK_POLICY_SETTINGS) { |
| 1223 | status : ErrorCode, |
| 1224 | default_link_policy_settings : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1225 | } |
| 1226 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1227 | packet WriteDefaultLinkPolicySettings : ConnectionManagementCommand (op_code = WRITE_DEFAULT_LINK_POLICY_SETTINGS) { |
Chienyuan | 9145e7a | 2019-10-02 15:18:55 +0800 | [diff] [blame] | 1228 | default_link_policy_settings : 16, |
| 1229 | } |
| 1230 | |
| 1231 | packet WriteDefaultLinkPolicySettingsComplete : CommandComplete (command_op_code = WRITE_DEFAULT_LINK_POLICY_SETTINGS) { |
| 1232 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1233 | } |
| 1234 | |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1235 | enum FlowDirection : 8 { |
| 1236 | OUTGOING_FLOW = 0x00, |
| 1237 | INCOMING_FLOW = 0x01, |
| 1238 | } |
| 1239 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1240 | packet FlowSpecification : ConnectionManagementCommand (op_code = FLOW_SPECIFICATION) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1241 | connection_handle : 12, |
| 1242 | _reserved_ : 4, |
| 1243 | _reserved_ : 8, |
| 1244 | flow_direction : FlowDirection, |
| 1245 | service_type : ServiceType, |
| 1246 | token_rate : 32, // Octets/s |
| 1247 | token_bucket_size : 32, |
| 1248 | peak_bandwidth : 32, // Octets/s |
| 1249 | access_latency : 32, // Octets/s |
| 1250 | } |
| 1251 | |
| 1252 | packet FlowSpecificationStatus : CommandStatus (command_op_code = FLOW_SPECIFICATION) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1253 | } |
| 1254 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1255 | packet SniffSubrating : ConnectionManagementCommand (op_code = SNIFF_SUBRATING) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1256 | connection_handle : 12, |
| 1257 | _reserved_ : 4, |
| 1258 | maximum_latency : 16, // 0x0002-0xFFFE (1.25ms-40.9s) |
| 1259 | minimum_remote_timeout : 16, // 0x0000-0xFFFE (0-40.9s) |
| 1260 | minimum_local_timeout: 16, // 0x0000-0xFFFE (0-40.9s) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1261 | } |
| 1262 | |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1263 | packet SniffSubratingComplete : CommandComplete (command_op_code = SNIFF_SUBRATING) { |
| 1264 | status : ErrorCode, |
| 1265 | connection_handle : 12, |
| 1266 | _reserved_ : 4, |
| 1267 | } |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1268 | |
| 1269 | // CONTROLLER_AND_BASEBAND |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1270 | packet SetEventMask : CommandPacket (op_code = SET_EVENT_MASK) { |
| 1271 | event_mask : 64, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1272 | } |
| 1273 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1274 | packet SetEventMaskComplete : CommandComplete (command_op_code = SET_EVENT_MASK) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1275 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1276 | } |
| 1277 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1278 | packet Reset : CommandPacket (op_code = RESET) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1279 | } |
| 1280 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1281 | packet ResetComplete : CommandComplete (command_op_code = RESET) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1282 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1283 | } |
| 1284 | |
Myles Watson | 46e942d | 2019-08-19 17:45:26 -0700 | [diff] [blame] | 1285 | enum FilterType : 8 { |
| 1286 | CLEAR_ALL_FILTERS = 0x00, |
| 1287 | INQUIRY_RESULT = 0x01, |
| 1288 | CONNECTION_SETUP = 0x02, |
| 1289 | } |
| 1290 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1291 | packet SetEventFilter : CommandPacket (op_code = SET_EVENT_FILTER) { |
Myles Watson | 46e942d | 2019-08-19 17:45:26 -0700 | [diff] [blame] | 1292 | filter_type : FilterType, |
| 1293 | _body_, |
| 1294 | } |
| 1295 | |
| 1296 | packet SetEventFilterComplete : CommandComplete (command_op_code = SET_EVENT_FILTER) { |
| 1297 | status : ErrorCode, |
| 1298 | } |
| 1299 | |
| 1300 | packet SetEventFilterClearAll : SetEventFilter (filter_type = CLEAR_ALL_FILTERS) { |
| 1301 | } |
| 1302 | |
| 1303 | enum FilterConditionType : 8 { |
| 1304 | ALL_DEVICES = 0x00, |
| 1305 | CLASS_OF_DEVICE = 0x01, |
| 1306 | ADDRESS = 0x02, |
| 1307 | } |
| 1308 | |
| 1309 | packet SetEventFilterInquiryResult : SetEventFilter (filter_type = INQUIRY_RESULT) { |
| 1310 | filter_condition_type : FilterConditionType, |
| 1311 | _body_, |
| 1312 | } |
| 1313 | |
| 1314 | packet SetEventFilterInquiryResultAllDevices : SetEventFilterInquiryResult (filter_condition_type = ALL_DEVICES) { |
| 1315 | } |
| 1316 | |
| 1317 | packet SetEventFilterInquiryResultClassOfDevice : SetEventFilterInquiryResult (filter_condition_type = CLASS_OF_DEVICE) { |
| 1318 | class_of_device : ClassOfDevice, |
| 1319 | class_of_device_mask : ClassOfDevice, |
| 1320 | } |
| 1321 | |
| 1322 | packet SetEventFilterInquiryResultAddress : SetEventFilterInquiryResult (filter_condition_type = ADDRESS) { |
| 1323 | address : Address, |
| 1324 | } |
| 1325 | |
| 1326 | packet SetEventFilterConnectionSetup : SetEventFilter (filter_type = CONNECTION_SETUP) { |
| 1327 | filter_condition_type : FilterConditionType, |
| 1328 | _body_, |
| 1329 | } |
| 1330 | |
| 1331 | enum AutoAcceptFlag : 8 { |
| 1332 | AUTO_ACCEPT_OFF = 0x01, |
| 1333 | AUTO_ACCEPT_ON_ROLE_SWITCH_DISABLED = 0x02, |
| 1334 | AUTO_ACCEPT_ON_ROLE_SWITCH_ENABLED = 0x03, |
| 1335 | } |
| 1336 | |
| 1337 | packet SetEventFilterConnectionSetupAllDevices : SetEventFilterConnectionSetup (filter_condition_type = ALL_DEVICES) { |
| 1338 | auto_accept_flag : AutoAcceptFlag, |
| 1339 | } |
| 1340 | |
| 1341 | packet SetEventFilterConnectionSetupClassOfDevice : SetEventFilterConnectionSetup (filter_condition_type = CLASS_OF_DEVICE) { |
| 1342 | class_of_device : ClassOfDevice, |
| 1343 | class_of_device_mask : ClassOfDevice, |
| 1344 | auto_accept_flag : AutoAcceptFlag, |
| 1345 | } |
| 1346 | |
| 1347 | packet SetEventFilterConnectionSetupAddress : SetEventFilterConnectionSetup (filter_condition_type = ADDRESS) { |
| 1348 | address : Address, |
| 1349 | auto_accept_flag : AutoAcceptFlag, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1350 | } |
| 1351 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1352 | packet Flush : ConnectionManagementCommand (op_code = FLUSH) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1353 | connection_handle : 12, |
| 1354 | _reserved_ : 4, |
| 1355 | } |
| 1356 | |
| 1357 | packet FlushComplete : CommandComplete (command_op_code = FLUSH) { |
| 1358 | status : ErrorCode, |
| 1359 | connection_handle : 12, |
| 1360 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1361 | } |
| 1362 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1363 | packet ReadPinType : CommandPacket (op_code = READ_PIN_TYPE) { |
| 1364 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1365 | } |
| 1366 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1367 | packet WritePinType : CommandPacket (op_code = WRITE_PIN_TYPE) { |
| 1368 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1369 | } |
| 1370 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1371 | packet CreateNewUnitKey : CommandPacket (op_code = CREATE_NEW_UNIT_KEY) { |
| 1372 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1373 | } |
| 1374 | |
| 1375 | enum ReadStoredLinkKeyReadAllFlag : 8 { |
| 1376 | SPECIFIED_BD_ADDR = 0x00, |
| 1377 | ALL = 0x01, |
| 1378 | } |
| 1379 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1380 | packet ReadStoredLinkKey : SecurityCommand (op_code = READ_STORED_LINK_KEY) { |
| 1381 | bd_addr : Address, |
| 1382 | read_all_flag : ReadStoredLinkKeyReadAllFlag, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1383 | } |
| 1384 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1385 | packet ReadStoredLinkKeyComplete : CommandComplete (command_op_code = READ_STORED_LINK_KEY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1386 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1387 | max_num_keys : 16, |
| 1388 | num_keys_read : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1389 | } |
| 1390 | |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 1391 | struct KeyAndAddress { |
| 1392 | address : Address, |
Chienyuan | 4d7cc81 | 2019-07-12 18:00:12 +0800 | [diff] [blame] | 1393 | link_key : 8[16], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1394 | } |
| 1395 | |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 1396 | packet WriteStoredLinkKey : SecurityCommand (op_code = WRITE_STORED_LINK_KEY) { |
| 1397 | _count_(keys_to_write) : 8, // 0x01-0x0B |
| 1398 | keys_to_write : KeyAndAddress[], |
| 1399 | } |
| 1400 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1401 | packet WriteStoredLinkKeyComplete : CommandComplete (command_op_code = WRITE_STORED_LINK_KEY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1402 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1403 | num_keys_written : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1404 | } |
| 1405 | |
| 1406 | enum DeleteStoredLinkKeyDeleteAllFlag : 8 { |
| 1407 | SPECIFIED_BD_ADDR = 0x00, |
| 1408 | ALL = 0x01, |
| 1409 | } |
| 1410 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1411 | packet DeleteStoredLinkKey : SecurityCommand (op_code = DELETE_STORED_LINK_KEY) { |
| 1412 | bd_addr : Address, |
| 1413 | delete_all_flag : DeleteStoredLinkKeyDeleteAllFlag, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1414 | } |
| 1415 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1416 | packet DeleteStoredLinkKeyComplete : CommandComplete (command_op_code = DELETE_STORED_LINK_KEY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1417 | status : ErrorCode, |
Chienyuan | f58d511 | 2019-11-14 20:25:26 +0800 | [diff] [blame] | 1418 | num_keys_deleted : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1419 | } |
| 1420 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1421 | packet WriteLocalName : CommandPacket (op_code = WRITE_LOCAL_NAME) { |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 1422 | local_name : 8[248], // Null-terminated UTF-8 encoded name |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1423 | } |
| 1424 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1425 | packet WriteLocalNameComplete : CommandComplete (command_op_code = WRITE_LOCAL_NAME) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1426 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1427 | } |
| 1428 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1429 | packet ReadLocalName : CommandPacket (op_code = READ_LOCAL_NAME) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1430 | } |
| 1431 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1432 | packet ReadLocalNameComplete : CommandComplete (command_op_code = READ_LOCAL_NAME) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1433 | status : ErrorCode, |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 1434 | local_name : 8[248], // Null-terminated UTF-8 encoded name |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1435 | } |
| 1436 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1437 | packet ReadConnectionAcceptTimeout : ConnectionManagementCommand (op_code = READ_CONNECTION_ACCEPT_TIMEOUT) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1438 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1439 | } |
| 1440 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1441 | packet WriteConnectionAcceptTimeout : ConnectionManagementCommand (op_code = WRITE_CONNECTION_ACCEPT_TIMEOUT) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1442 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1443 | } |
| 1444 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1445 | packet ReadPageTimeout : DiscoveryCommand (op_code = READ_PAGE_TIMEOUT) { |
Chris Manton | 4fda81a | 2019-10-02 16:13:31 -0700 | [diff] [blame] | 1446 | } |
| 1447 | |
| 1448 | packet ReadPageTimeoutComplete : CommandComplete (command_op_code = READ_PAGE_TIMEOUT) { |
| 1449 | status : ErrorCode, |
| 1450 | page_timeout : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1451 | } |
| 1452 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1453 | packet WritePageTimeout : DiscoveryCommand (op_code = WRITE_PAGE_TIMEOUT) { |
Chris Manton | 499fb1d | 2019-10-15 16:02:42 -0700 | [diff] [blame] | 1454 | page_timeout : 16, |
| 1455 | } |
| 1456 | |
| 1457 | packet WritePageTimeoutComplete : CommandComplete (command_op_code = WRITE_PAGE_TIMEOUT) { |
| 1458 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1459 | } |
| 1460 | |
| 1461 | enum ScanEnable : 8 { |
| 1462 | NO_SCANS = 0x00, |
| 1463 | INQUIRY_SCAN_ONLY = 0x01, |
| 1464 | PAGE_SCAN_ONLY = 0x02, |
| 1465 | INQUIRY_AND_PAGE_SCAN = 0x03, |
| 1466 | } |
| 1467 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1468 | packet ReadScanEnable : DiscoveryCommand (op_code = READ_SCAN_ENABLE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1469 | } |
| 1470 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1471 | packet ReadScanEnableComplete : CommandComplete (command_op_code = READ_SCAN_ENABLE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1472 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1473 | scan_enable : ScanEnable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1474 | } |
| 1475 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1476 | packet WriteScanEnable : DiscoveryCommand (op_code = WRITE_SCAN_ENABLE) { |
| 1477 | scan_enable : ScanEnable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1478 | } |
| 1479 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1480 | packet WriteScanEnableComplete : CommandComplete (command_op_code = WRITE_SCAN_ENABLE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1481 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1482 | } |
| 1483 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1484 | packet ReadPageScanActivity : DiscoveryCommand (op_code = READ_PAGE_SCAN_ACTIVITY) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1485 | } |
| 1486 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1487 | packet ReadPageScanActivityComplete : CommandComplete (command_op_code = READ_PAGE_SCAN_ACTIVITY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1488 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1489 | page_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms |
| 1490 | page_scan_window : 16, // 0x0011 to PageScanInterval |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1491 | } |
| 1492 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1493 | packet WritePageScanActivity : DiscoveryCommand (op_code = WRITE_PAGE_SCAN_ACTIVITY) { |
| 1494 | page_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms |
| 1495 | page_scan_window : 16, // 0x0011 to PageScanInterval |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1496 | } |
| 1497 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1498 | packet WritePageScanActivityComplete : CommandComplete (command_op_code = WRITE_PAGE_SCAN_ACTIVITY) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1499 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1500 | } |
| 1501 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1502 | packet ReadInquiryScanActivity : DiscoveryCommand (op_code = READ_INQUIRY_SCAN_ACTIVITY) { |
Chris Manton | b365084 | 2019-10-03 17:31:12 -0700 | [diff] [blame] | 1503 | } |
| 1504 | |
| 1505 | packet ReadInquiryScanActivityComplete : CommandComplete (command_op_code = READ_INQUIRY_SCAN_ACTIVITY) { |
| 1506 | status : ErrorCode, |
| 1507 | inquiry_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms |
| 1508 | inquiry_scan_window : 16, // Range: 0x0011 to 0x1000 |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1509 | } |
| 1510 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1511 | packet WriteInquiryScanActivity : DiscoveryCommand (op_code = WRITE_INQUIRY_SCAN_ACTIVITY) { |
Chris Manton | 76ccca1 | 2019-10-02 21:54:41 -0700 | [diff] [blame] | 1512 | inquiry_scan_interval : 16, // Range: 0x0012 to 0x1000; only even values are valid * 0x625 ms |
| 1513 | inquiry_scan_window : 16, // Range: 0x0011 to 0x1000 |
| 1514 | } |
| 1515 | |
| 1516 | packet WriteInquiryScanActivityComplete : CommandComplete (command_op_code = WRITE_INQUIRY_SCAN_ACTIVITY) { |
| 1517 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1518 | } |
| 1519 | |
| 1520 | enum AuthenticationEnable : 8 { |
| 1521 | NOT_REQUIRED = 0x00, |
| 1522 | REQUIRED = 0x01, |
| 1523 | } |
| 1524 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1525 | packet ReadAuthenticationEnable : CommandPacket (op_code = READ_AUTHENTICATION_ENABLE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1526 | } |
| 1527 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1528 | packet ReadAuthenticationEnableComplete : CommandComplete (command_op_code = READ_AUTHENTICATION_ENABLE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1529 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1530 | authentication_enable : AuthenticationEnable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1531 | } |
| 1532 | |
Martin Brabham | 2e76f9a | 2019-11-21 09:16:24 -0800 | [diff] [blame^] | 1533 | packet WriteAuthenticationEnable : SecurityCommand (op_code = WRITE_AUTHENTICATION_ENABLE) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1534 | authentication_enable : AuthenticationEnable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1535 | } |
| 1536 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1537 | packet WriteAuthenticationEnableComplete : CommandComplete (command_op_code = WRITE_AUTHENTICATION_ENABLE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1538 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1539 | } |
| 1540 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1541 | packet ReadClassOfDevice : DiscoveryCommand (op_code = READ_CLASS_OF_DEVICE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1542 | } |
| 1543 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1544 | packet ReadClassOfDeviceComplete : CommandComplete (command_op_code = READ_CLASS_OF_DEVICE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1545 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1546 | class_of_device : ClassOfDevice, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1547 | } |
| 1548 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1549 | packet WriteClassOfDevice : DiscoveryCommand (op_code = WRITE_CLASS_OF_DEVICE) { |
| 1550 | class_of_device : ClassOfDevice, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1551 | } |
| 1552 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1553 | packet WriteClassOfDeviceComplete : CommandComplete (command_op_code = WRITE_CLASS_OF_DEVICE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1554 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1555 | } |
| 1556 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1557 | packet ReadVoiceSetting : CommandPacket (op_code = READ_VOICE_SETTING) { |
| 1558 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1559 | } |
| 1560 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1561 | packet WriteVoiceSetting : CommandPacket (op_code = WRITE_VOICE_SETTING) { |
| 1562 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1563 | } |
| 1564 | |
Chienyuan | cefe072 | 2019-11-20 18:00:41 +0800 | [diff] [blame] | 1565 | packet WriteVoiceSettingComplete : CommandComplete (command_op_code = WRITE_VOICE_SETTING) { |
| 1566 | status : ErrorCode, |
| 1567 | } |
| 1568 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1569 | packet ReadAutomaticFlushTimeout : ConnectionManagementCommand (op_code = READ_AUTOMATIC_FLUSH_TIMEOUT) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1570 | connection_handle : 12, |
| 1571 | _reserved_ : 4, |
| 1572 | } |
| 1573 | |
| 1574 | packet ReadAutomaticFlushTimeoutComplete : CommandComplete (command_op_code = READ_AUTOMATIC_FLUSH_TIMEOUT) { |
| 1575 | status : ErrorCode, |
| 1576 | connection_handle : 12, |
| 1577 | _reserved_ : 4, |
| 1578 | flush_timeout : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1579 | } |
| 1580 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1581 | packet WriteAutomaticFlushTimeout : ConnectionManagementCommand (op_code = WRITE_AUTOMATIC_FLUSH_TIMEOUT) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1582 | connection_handle : 12, |
| 1583 | _reserved_ : 4, |
| 1584 | flush_timeout : 16, // 0x0000-0x07FF Default 0x0000 (No Automatic Flush) |
| 1585 | } |
| 1586 | |
| 1587 | packet WriteAutomaticFlushTimeoutComplete : CommandComplete (command_op_code = WRITE_AUTOMATIC_FLUSH_TIMEOUT) { |
| 1588 | status : ErrorCode, |
| 1589 | connection_handle : 12, |
| 1590 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1591 | } |
| 1592 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1593 | packet ReadNumBroadcastRetransmits : CommandPacket (op_code = READ_NUM_BROADCAST_RETRANSMITS) { |
| 1594 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1595 | } |
| 1596 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1597 | packet WriteNumBroadcastRetransmits : CommandPacket (op_code = WRITE_NUM_BROADCAST_RETRANSMITS) { |
| 1598 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1599 | } |
| 1600 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1601 | packet ReadHoldModeActivity : CommandPacket (op_code = READ_HOLD_MODE_ACTIVITY) { |
| 1602 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1603 | } |
| 1604 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1605 | packet WriteHoldModeActivity : CommandPacket (op_code = WRITE_HOLD_MODE_ACTIVITY) { |
| 1606 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1607 | } |
| 1608 | |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1609 | |
| 1610 | enum TransmitPowerLevelType : 8 { |
| 1611 | CURRENT = 0x00, |
| 1612 | MAXIMUM = 0x01, |
| 1613 | } |
| 1614 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1615 | packet ReadTransmitPowerLevel : ConnectionManagementCommand (op_code = READ_TRANSMIT_POWER_LEVEL) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1616 | connection_handle : 12, |
| 1617 | _reserved_ : 4, |
| 1618 | type : TransmitPowerLevelType, |
| 1619 | |
| 1620 | } |
| 1621 | |
| 1622 | packet ReadTransmitPowerLevelComplete : CommandComplete (command_op_code = READ_TRANSMIT_POWER_LEVEL) { |
| 1623 | status : ErrorCode, |
| 1624 | connection_handle : 12, |
| 1625 | _reserved_ : 4, |
| 1626 | transmit_power_level : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1627 | } |
| 1628 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1629 | packet ReadSynchronousFlowControlEnable : CommandPacket (op_code = READ_SYNCHRONOUS_FLOW_CONTROL_ENABLE) { |
| 1630 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1631 | } |
| 1632 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1633 | packet WriteSynchronousFlowControlEnable : CommandPacket (op_code = WRITE_SYNCHRONOUS_FLOW_CONTROL_ENABLE) { |
| 1634 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1635 | } |
| 1636 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1637 | packet SetControllerToHostFlowControl : CommandPacket (op_code = SET_CONTROLLER_TO_HOST_FLOW_CONTROL) { |
| 1638 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1639 | } |
| 1640 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1641 | packet HostBufferSize : CommandPacket (op_code = HOST_BUFFER_SIZE) { |
| 1642 | host_acl_data_packet_length : 16, |
| 1643 | host_synchronous_data_packet_length : 8, |
| 1644 | host_total_num_acl_data_packets : 16, |
| 1645 | host_total_num_synchronous_data_packets : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1646 | } |
| 1647 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1648 | packet HostBufferSizeComplete : CommandComplete (command_op_code = HOST_BUFFER_SIZE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1649 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1650 | } |
| 1651 | |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 1652 | struct CompletedPackets { |
| 1653 | connection_handle : 12, |
| 1654 | _reserved_ : 4, |
| 1655 | host_num_of_completed_packets : 16, |
| 1656 | } |
| 1657 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1658 | packet HostNumCompletedPackets : CommandPacket (op_code = HOST_NUM_COMPLETED_PACKETS) { |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 1659 | _count_(completed_packets) : 8, |
| 1660 | completed_packets : CompletedPackets[], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1661 | } |
| 1662 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1663 | packet HostNumCompletedPacketsError : CommandComplete (command_op_code = HOST_NUM_COMPLETED_PACKETS) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1664 | error_code : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1665 | } |
| 1666 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1667 | packet ReadLinkSupervisionTimeout : ConnectionManagementCommand (op_code = READ_LINK_SUPERVISION_TIMEOUT) { |
| 1668 | connection_handle : 12, |
| 1669 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1670 | } |
| 1671 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1672 | packet ReadLinkSupervisionTimeoutComplete : CommandComplete (command_op_code = READ_LINK_SUPERVISION_TIMEOUT) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1673 | status : ErrorCode, |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1674 | connection_handle : 12, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1675 | _reserved_ : 4, |
| 1676 | link_supervision_timeout : 16, // 0x001-0xFFFF (0.625ms-40.9s) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1677 | } |
| 1678 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1679 | packet WriteLinkSupervisionTimeout : ConnectionManagementCommand (op_code = WRITE_LINK_SUPERVISION_TIMEOUT) { |
| 1680 | handle : 12, |
| 1681 | _reserved_ : 4, |
| 1682 | link_supervision_timeout : 16, // 0x001-0xFFFF (0.625ms-40.9s) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1683 | } |
| 1684 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1685 | packet WriteLinkSupervisionTimeoutComplete : CommandComplete (command_op_code = WRITE_LINK_SUPERVISION_TIMEOUT) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1686 | status : ErrorCode, |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 1687 | connection_handle : 12, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1688 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1689 | } |
| 1690 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1691 | packet ReadNumberOfSupportedIac : DiscoveryCommand (op_code = READ_NUMBER_OF_SUPPORTED_IAC) { |
Chris Manton | d3d317f | 2019-10-02 16:51:58 -0700 | [diff] [blame] | 1692 | } |
| 1693 | |
| 1694 | packet ReadNumberOfSupportedIacComplete : CommandComplete (command_op_code = READ_NUMBER_OF_SUPPORTED_IAC) { |
| 1695 | status : ErrorCode, |
| 1696 | num_support_iac : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1697 | } |
| 1698 | |
Chris Manton | b365084 | 2019-10-03 17:31:12 -0700 | [diff] [blame] | 1699 | packet ReadCurrentIacLap : DiscoveryCommand (op_code = READ_CURRENT_IAC_LAP) { |
Chris Manton | 76ccca1 | 2019-10-02 21:54:41 -0700 | [diff] [blame] | 1700 | } |
| 1701 | |
Chris Manton | b365084 | 2019-10-03 17:31:12 -0700 | [diff] [blame] | 1702 | packet ReadCurrentIacLapComplete : CommandComplete (command_op_code = READ_CURRENT_IAC_LAP) { |
| 1703 | status : ErrorCode, |
| 1704 | _count_(laps_to_read) : 8, |
| 1705 | laps_to_read : Lap[], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1706 | } |
| 1707 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1708 | packet WriteCurrentIacLap : DiscoveryCommand (op_code = WRITE_CURRENT_IAC_LAP) { |
Chris Manton | 76ccca1 | 2019-10-02 21:54:41 -0700 | [diff] [blame] | 1709 | _count_(laps_to_write) : 8, |
| 1710 | laps_to_write : Lap[], |
| 1711 | } |
| 1712 | |
| 1713 | packet WriteCurrentIacLapComplete : CommandComplete (command_op_code = WRITE_CURRENT_IAC_LAP) { |
| 1714 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1715 | } |
| 1716 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1717 | packet SetAfhHostChannelClassification : CommandPacket (op_code = SET_AFH_HOST_CHANNEL_CLASSIFICATION) { |
| 1718 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1719 | } |
| 1720 | |
| 1721 | enum InquiryScanType : 8 { |
| 1722 | STANDARD = 0x00, |
| 1723 | INTERLACED = 0x01, |
| 1724 | } |
| 1725 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1726 | packet ReadInquiryScanType : DiscoveryCommand (op_code = READ_INQUIRY_SCAN_TYPE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1727 | } |
| 1728 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1729 | packet ReadInquiryScanTypeComplete : CommandComplete (command_op_code = READ_INQUIRY_SCAN_TYPE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1730 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1731 | inquiry_scan_type : InquiryScanType, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1732 | } |
| 1733 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1734 | packet WriteInquiryScanType : DiscoveryCommand (op_code = WRITE_INQUIRY_SCAN_TYPE) { |
| 1735 | inquiry_scan_type : InquiryScanType, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1736 | } |
| 1737 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1738 | packet WriteInquiryScanTypeComplete : CommandComplete (command_op_code = WRITE_INQUIRY_SCAN_TYPE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1739 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1740 | } |
| 1741 | |
| 1742 | enum InquiryMode : 8 { |
| 1743 | STANDARD = 0x00, |
| 1744 | RSSI = 0x01, |
| 1745 | RSSI_OR_EXTENDED = 0x02, |
| 1746 | } |
| 1747 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1748 | packet ReadInquiryMode : DiscoveryCommand (op_code = READ_INQUIRY_MODE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1749 | } |
| 1750 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1751 | packet ReadInquiryModeComplete : CommandComplete (command_op_code = READ_INQUIRY_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1752 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1753 | inquiry_mode : InquiryMode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1754 | } |
| 1755 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1756 | packet WriteInquiryMode : DiscoveryCommand (op_code = WRITE_INQUIRY_MODE) { |
| 1757 | inquiry_mode : InquiryMode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1758 | } |
| 1759 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1760 | packet WriteInquiryModeComplete : CommandComplete (command_op_code = WRITE_INQUIRY_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1761 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1762 | } |
| 1763 | |
| 1764 | enum PageScanType : 8 { |
| 1765 | STANDARD = 0x00, |
| 1766 | INTERLACED = 0x01, |
| 1767 | } |
| 1768 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1769 | packet ReadPageScanType : DiscoveryCommand (op_code = READ_PAGE_SCAN_TYPE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1770 | } |
| 1771 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1772 | packet ReadPageScanTypeComplete : CommandComplete (command_op_code = READ_PAGE_SCAN_TYPE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1773 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1774 | page_scan_type : PageScanType, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1775 | } |
| 1776 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1777 | packet WritePageScanType : DiscoveryCommand (op_code = WRITE_PAGE_SCAN_TYPE) { |
| 1778 | page_scan_type : PageScanType, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1779 | } |
| 1780 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1781 | packet WritePageScanTypeComplete : CommandComplete (command_op_code = WRITE_PAGE_SCAN_TYPE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1782 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1783 | } |
| 1784 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1785 | packet ReadAfhChannelAssessmentMode : CommandPacket (op_code = READ_AFH_CHANNEL_ASSESSMENT_MODE) { |
| 1786 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1787 | } |
| 1788 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1789 | packet WriteAfhChannelAssessmentMode : CommandPacket (op_code = WRITE_AFH_CHANNEL_ASSESSMENT_MODE) { |
| 1790 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1791 | } |
| 1792 | |
| 1793 | enum FecRequired : 8 { |
| 1794 | NOT_REQUIRED = 0x00, |
| 1795 | REQUIRED = 0x01, |
| 1796 | } |
| 1797 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1798 | packet ReadExtendedInquiryResponse : CommandPacket (op_code = READ_EXTENDED_INQUIRY_RESPONSE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1799 | } |
| 1800 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1801 | packet ReadExtendedInquiryResponseComplete : CommandComplete (command_op_code = READ_EXTENDED_INQUIRY_RESPONSE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1802 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1803 | fec_required : FecRequired, |
Myles Watson | 7a0dc39 | 2019-07-09 15:24:54 -0700 | [diff] [blame] | 1804 | extended_inquiry_response : GapData[], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1805 | } |
| 1806 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1807 | packet WriteExtendedInquiryResponse : CommandPacket (op_code = WRITE_EXTENDED_INQUIRY_RESPONSE) { |
| 1808 | fec_required : FecRequired, |
Myles Watson | 7a0dc39 | 2019-07-09 15:24:54 -0700 | [diff] [blame] | 1809 | extended_inquiry_response : GapData[], |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 1810 | _padding_[244], // Zero padding to be 240 octets (GapData[]) + 2 (opcode) + 1 (size) + 1 (FecRequired) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1811 | } |
| 1812 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1813 | packet WriteExtendedInquiryResponseComplete : CommandComplete (command_op_code = WRITE_EXTENDED_INQUIRY_RESPONSE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1814 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1815 | } |
| 1816 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1817 | packet RefreshEncryptionKey : SecurityCommand (op_code = REFRESH_ENCRYPTION_KEY) { |
| 1818 | connection_handle : 12, |
| 1819 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1820 | } |
| 1821 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1822 | packet RefreshEncryptionKeyStatus : CommandStatus (command_op_code = REFRESH_ENCRYPTION_KEY) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1823 | } |
| 1824 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1825 | packet ReadSimplePairingMode : SecurityCommand (op_code = READ_SIMPLE_PAIRING_MODE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1826 | } |
| 1827 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1828 | packet ReadSimplePairingModeComplete : CommandComplete (command_op_code = READ_SIMPLE_PAIRING_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1829 | status : ErrorCode, |
| 1830 | simple_pairing_mode : Enable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1831 | } |
| 1832 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1833 | packet WriteSimplePairingMode : SecurityCommand (op_code = WRITE_SIMPLE_PAIRING_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1834 | simple_pairing_mode : Enable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1835 | } |
| 1836 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1837 | packet WriteSimplePairingModeComplete : CommandComplete (command_op_code = WRITE_SIMPLE_PAIRING_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1838 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1839 | } |
| 1840 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1841 | packet ReadLocalOobData : SecurityCommand (op_code = READ_LOCAL_OOB_DATA) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1842 | } |
| 1843 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1844 | packet ReadLocalOobDataComplete : CommandComplete (command_op_code = READ_LOCAL_OOB_DATA) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1845 | status : ErrorCode, |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 1846 | c : 8[16], |
| 1847 | r : 8[16], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1848 | } |
| 1849 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1850 | packet ReadInquiryResponseTransmitPowerLevel : DiscoveryCommand (op_code = READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1851 | } |
| 1852 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1853 | packet ReadInquiryResponseTransmitPowerLevelComplete : CommandComplete (command_op_code = READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1854 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1855 | tx_power : 8, // (-70dBm to 20dBm) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1856 | } |
| 1857 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1858 | packet WriteInquiryTransmitPowerLevel : DiscoveryCommand (op_code = WRITE_INQUIRY_TRANSMIT_POWER_LEVEL) { |
| 1859 | tx_power : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1860 | } |
| 1861 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1862 | packet WriteInquiryResponseTransmitPowerLevelComplete : CommandComplete (command_op_code = WRITE_INQUIRY_TRANSMIT_POWER_LEVEL) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1863 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1864 | } |
| 1865 | |
| 1866 | enum KeypressNotificationType : 8 { |
| 1867 | ENTRY_STARTED = 0, |
| 1868 | DIGIT_ENTERED = 1, |
| 1869 | DIGIT_ERASED = 2, |
| 1870 | CLEARED = 3, |
| 1871 | ENTRY_COMPLETED = 4, |
| 1872 | } |
| 1873 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1874 | packet SendKeypressNotification : SecurityCommand (op_code = SEND_KEYPRESS_NOTIFICATION) { |
| 1875 | bd_addr : Address, |
| 1876 | notification_type : KeypressNotificationType, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1877 | } |
| 1878 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1879 | packet SendKeypressNotificationComplete : CommandComplete (command_op_code = SEND_KEYPRESS_NOTIFICATION) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1880 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1881 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1882 | } |
| 1883 | |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1884 | enum SimultaneousLeHost : 8 { |
| 1885 | DISABLED = 0x00, |
| 1886 | } |
| 1887 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1888 | packet ReadLeHostSupport : CommandPacket (op_code = READ_LE_HOST_SUPPORT) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1889 | } |
| 1890 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1891 | packet ReadLeHostSupportComplete : CommandComplete (command_op_code = READ_LE_HOST_SUPPORT) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1892 | status : ErrorCode, |
| 1893 | le_supported_host : Enable, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1894 | simultaneous_le_host : SimultaneousLeHost, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1895 | } |
| 1896 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1897 | packet WriteLeHostSupport : CommandPacket (op_code = WRITE_LE_HOST_SUPPORT) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1898 | le_supported_host : Enable, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1899 | simultaneous_le_host : SimultaneousLeHost, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1900 | } |
| 1901 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1902 | packet WriteLeHostSupportComplete : CommandComplete (command_op_code = WRITE_LE_HOST_SUPPORT) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1903 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1904 | } |
| 1905 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1906 | packet ReadSecureConnectionsHostSupport : CommandPacket (op_code = READ_SECURE_CONNECTIONS_HOST_SUPPORT) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1907 | } |
| 1908 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1909 | packet ReadSecureConnectionsHostSupportComplete : CommandComplete (command_op_code = READ_SECURE_CONNECTIONS_HOST_SUPPORT) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1910 | status : ErrorCode, |
| 1911 | secure_connections_host_support : Enable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1912 | } |
| 1913 | |
Martin Brabham | 2e76f9a | 2019-11-21 09:16:24 -0800 | [diff] [blame^] | 1914 | packet WriteSecureConnectionsHostSupport : SecurityCommand (op_code = WRITE_SECURE_CONNECTIONS_HOST_SUPPORT) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1915 | secure_connections_host_support : Enable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1916 | } |
| 1917 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1918 | packet WriteSecureConnectionsHostSupportComplete : CommandComplete (command_op_code = WRITE_SECURE_CONNECTIONS_HOST_SUPPORT) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 1919 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1920 | } |
| 1921 | |
Chienyuan | 4d7cc81 | 2019-07-12 18:00:12 +0800 | [diff] [blame] | 1922 | packet ReadLocalOobExtendedData : SecurityCommand (op_code = READ_LOCAL_OOB_EXTENDED_DATA) { |
| 1923 | } |
| 1924 | |
| 1925 | packet ReadLocalOobExtendedDataComplete : CommandComplete (command_op_code = READ_LOCAL_OOB_EXTENDED_DATA) { |
| 1926 | status : ErrorCode, |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 1927 | c_192 : 8[16], |
| 1928 | r_192 : 8[16], |
| 1929 | c_256 : 8[16], |
| 1930 | r_256 : 8[16], |
Chienyuan | 4d7cc81 | 2019-07-12 18:00:12 +0800 | [diff] [blame] | 1931 | } |
| 1932 | |
| 1933 | |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1934 | // INFORMATIONAL_PARAMETERS |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1935 | packet ReadLocalVersionInformation : CommandPacket (op_code = READ_LOCAL_VERSION_INFORMATION) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1936 | } |
| 1937 | |
Myles Watson | b39fc3e | 2019-06-12 14:57:46 -0700 | [diff] [blame] | 1938 | enum HciVersion : 8 { |
Myles Watson | b5ad62e | 2019-09-30 13:27:20 -0700 | [diff] [blame] | 1939 | V_1_0B = 0x00, |
Myles Watson | b39fc3e | 2019-06-12 14:57:46 -0700 | [diff] [blame] | 1940 | V_1_1 = 0x01, |
| 1941 | V_1_2 = 0x02, |
| 1942 | V_2_0 = 0x03, // + EDR |
| 1943 | V_2_1 = 0x04, // + EDR |
| 1944 | V_3_0 = 0x05, // + HS |
| 1945 | V_4_0 = 0x06, |
| 1946 | V_4_1 = 0x07, |
| 1947 | V_4_2 = 0x08, |
| 1948 | V_5_0 = 0x09, |
| 1949 | V_5_1 = 0x0a, |
| 1950 | } |
| 1951 | |
| 1952 | enum LmpVersion : 8 { |
Myles Watson | b5ad62e | 2019-09-30 13:27:20 -0700 | [diff] [blame] | 1953 | V_1_0B = 0x00, // withdrawn |
Myles Watson | b39fc3e | 2019-06-12 14:57:46 -0700 | [diff] [blame] | 1954 | V_1_1 = 0x01, // withdrawn |
| 1955 | V_1_2 = 0x02, // withdrawn |
| 1956 | V_2_0 = 0x03, // + EDR |
| 1957 | V_2_1 = 0x04, // + EDR |
| 1958 | V_3_0 = 0x05, // + HS |
| 1959 | V_4_0 = 0x06, |
| 1960 | V_4_1 = 0x07, |
| 1961 | V_4_2 = 0x08, |
| 1962 | V_5_0 = 0x09, |
| 1963 | V_5_1 = 0x0a, |
| 1964 | } |
| 1965 | |
Chienyuan | a7ad3fb | 2019-08-15 18:04:32 +0800 | [diff] [blame] | 1966 | struct LocalVersionInformation { |
Myles Watson | b39fc3e | 2019-06-12 14:57:46 -0700 | [diff] [blame] | 1967 | hci_version : HciVersion, |
| 1968 | hci_revision : 16, |
| 1969 | lmp_version : LmpVersion, |
| 1970 | manufacturer_name : 16, |
| 1971 | lmp_subversion : 16, |
| 1972 | } |
| 1973 | |
Chienyuan | a7ad3fb | 2019-08-15 18:04:32 +0800 | [diff] [blame] | 1974 | packet ReadLocalVersionInformationComplete : CommandComplete (command_op_code = READ_LOCAL_VERSION_INFORMATION) { |
| 1975 | status : ErrorCode, |
| 1976 | local_version_information : LocalVersionInformation, |
| 1977 | } |
| 1978 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1979 | packet ReadLocalSupportedCommands : CommandPacket (op_code = READ_LOCAL_SUPPORTED_COMMANDS) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1980 | } |
| 1981 | |
Myles Watson | b39fc3e | 2019-06-12 14:57:46 -0700 | [diff] [blame] | 1982 | packet ReadLocalSupportedCommandsComplete : CommandComplete (command_op_code = READ_LOCAL_SUPPORTED_COMMANDS) { |
| 1983 | status : ErrorCode, |
| 1984 | supported_commands : 8[64], |
| 1985 | } |
| 1986 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1987 | packet ReadLocalSupportedFeatures : CommandPacket (op_code = READ_LOCAL_SUPPORTED_FEATURES) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1988 | } |
| 1989 | |
Myles Watson | b39fc3e | 2019-06-12 14:57:46 -0700 | [diff] [blame] | 1990 | packet ReadLocalSupportedFeaturesComplete : CommandComplete (command_op_code = READ_LOCAL_SUPPORTED_FEATURES) { |
| 1991 | status : ErrorCode, |
| 1992 | lmp_features : 64, |
| 1993 | } |
| 1994 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 1995 | packet ReadLocalExtendedFeatures : CommandPacket (op_code = READ_LOCAL_EXTENDED_FEATURES) { |
| 1996 | page_number : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 1997 | } |
| 1998 | |
Myles Watson | fc57a96 | 2019-08-22 16:11:01 -0700 | [diff] [blame] | 1999 | packet ReadLocalExtendedFeaturesComplete : CommandComplete (command_op_code = READ_LOCAL_EXTENDED_FEATURES) { |
| 2000 | status : ErrorCode, |
| 2001 | page_number : 8, |
| 2002 | maximum_page_number : 8, |
| 2003 | extended_lmp_features : 64, |
| 2004 | } |
| 2005 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2006 | packet ReadBufferSize : CommandPacket (op_code = READ_BUFFER_SIZE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2007 | } |
| 2008 | |
Myles Watson | b39fc3e | 2019-06-12 14:57:46 -0700 | [diff] [blame] | 2009 | packet ReadBufferSizeComplete : CommandComplete (command_op_code = READ_BUFFER_SIZE) { |
| 2010 | status : ErrorCode, |
| 2011 | acl_data_packet_length : 16, |
| 2012 | synchronous_data_packet_length : 8, |
| 2013 | total_num_acl_data_packets : 16, |
| 2014 | total_num_synchronous_data_packets : 16, |
| 2015 | } |
| 2016 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2017 | packet ReadBdAddr : CommandPacket (op_code = READ_BD_ADDR) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2018 | } |
| 2019 | |
Hansong Zhang | c443be7 | 2019-06-18 16:04:01 -0700 | [diff] [blame] | 2020 | packet ReadBdAddrComplete : CommandComplete (command_op_code = READ_BD_ADDR) { |
| 2021 | status : ErrorCode, |
| 2022 | bd_addr : Address, |
| 2023 | } |
| 2024 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2025 | packet ReadDataBlockSize : CommandPacket (op_code = READ_DATA_BLOCK_SIZE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2026 | } |
| 2027 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2028 | packet ReadLocalSupportedCodecs : CommandPacket (op_code = READ_LOCAL_SUPPORTED_CODECS) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2029 | } |
| 2030 | |
Chienyuan | f58d511 | 2019-11-14 20:25:26 +0800 | [diff] [blame] | 2031 | packet ReadLocalSupportedCodecsComplete : CommandComplete (command_op_code = READ_LOCAL_SUPPORTED_CODECS) { |
| 2032 | status : ErrorCode, |
| 2033 | _size_(supported_codecs) : 8, |
| 2034 | supported_codecs : 8[], |
| 2035 | _size_(vendor_specific_codecs) : 8, |
| 2036 | vendor_specific_codecs : 32[], |
| 2037 | } |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2038 | |
| 2039 | // STATUS_PARAMETERS |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2040 | packet ReadFailedContactCounter : ConnectionManagementCommand (op_code = READ_FAILED_CONTACT_COUNTER) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 2041 | connection_handle : 12, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2042 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2043 | } |
| 2044 | |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 2045 | packet ReadFailedContactCounterComplete : CommandComplete (command_op_code = READ_FAILED_CONTACT_COUNTER) { |
| 2046 | status : ErrorCode, |
| 2047 | connection_handle : 12, |
| 2048 | _reserved_ : 4, |
| 2049 | failed_contact_counter : 16, |
| 2050 | } |
| 2051 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2052 | packet ResetFailedContactCounter : ConnectionManagementCommand (op_code = RESET_FAILED_CONTACT_COUNTER) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 2053 | connection_handle : 12, |
| 2054 | _reserved_ : 4, |
| 2055 | } |
| 2056 | |
| 2057 | packet ResetFailedContactCounterComplete : CommandComplete (command_op_code = RESET_FAILED_CONTACT_COUNTER) { |
| 2058 | status : ErrorCode, |
| 2059 | connection_handle : 12, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2060 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2061 | } |
| 2062 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2063 | packet ReadLinkQuality : ConnectionManagementCommand (op_code = READ_LINK_QUALITY) { |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 2064 | connection_handle : 12, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2065 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2066 | } |
| 2067 | |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 2068 | packet ReadLinkQualityComplete : CommandComplete (command_op_code = READ_LINK_QUALITY) { |
| 2069 | status : ErrorCode, |
| 2070 | connection_handle : 12, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2071 | _reserved_ : 4, |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 2072 | link_quality : 8, |
| 2073 | } |
| 2074 | |
| 2075 | packet ReadRssi : ConnectionManagementCommand (op_code = READ_RSSI) { |
| 2076 | connection_handle : 12, |
| 2077 | _reserved_ : 4, |
| 2078 | } |
| 2079 | |
| 2080 | packet ReadRssiComplete : CommandComplete (command_op_code = READ_RSSI) { |
| 2081 | status : ErrorCode, |
| 2082 | connection_handle : 12, |
| 2083 | _reserved_ : 4, |
| 2084 | rssi : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2085 | } |
| 2086 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2087 | packet ReadAfhChannelMap : ConnectionManagementCommand (op_code = READ_AFH_CHANNEL_MAP) { |
| 2088 | connection_handle : 12, |
| 2089 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2090 | } |
| 2091 | |
Chienyuan | 9145e7a | 2019-10-02 15:18:55 +0800 | [diff] [blame] | 2092 | enum AfhMode : 8 { |
| 2093 | AFH_DISABLED = 0x00, |
| 2094 | AFH_ENABLED = 0x01, |
| 2095 | } |
| 2096 | |
| 2097 | packet ReadAfhChannelMapComplete : CommandComplete (command_op_code = READ_AFH_CHANNEL_MAP) { |
| 2098 | status : ErrorCode, |
| 2099 | connection_handle : 12, |
| 2100 | _reserved_ : 4, |
| 2101 | afh_mode : AfhMode, |
| 2102 | afh_channel_map : 8[10], |
| 2103 | } |
| 2104 | |
| 2105 | |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2106 | enum WhichClock : 8 { |
| 2107 | LOCAL = 0x00, |
| 2108 | PICONET = 0x01, |
| 2109 | } |
| 2110 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2111 | packet ReadClock : ConnectionManagementCommand (op_code = READ_CLOCK) { |
| 2112 | connection_handle : 12, |
| 2113 | _reserved_ : 4, |
| 2114 | which_clock : WhichClock, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2115 | } |
| 2116 | |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 2117 | packet ReadClockComplete : CommandComplete (command_op_code = READ_CLOCK) { |
| 2118 | status : ErrorCode, |
| 2119 | connection_handle : 12, |
| 2120 | _reserved_ : 4, |
| 2121 | clock : 28, |
| 2122 | _reserved_ : 4, |
| 2123 | accuracy : 16, |
| 2124 | } |
| 2125 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2126 | packet ReadEncryptionKeySize : SecurityCommand (op_code = READ_ENCRYPTION_KEY_SIZE) { |
| 2127 | connection_handle : 12, |
| 2128 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2129 | } |
| 2130 | |
Chienyuan | f58d511 | 2019-11-14 20:25:26 +0800 | [diff] [blame] | 2131 | packet ReadEncryptionKeySizeComplete : CommandComplete (command_op_code = READ_ENCRYPTION_KEY_SIZE) { |
| 2132 | status : ErrorCode, |
| 2133 | connection_handle : 12, |
| 2134 | _reserved_ : 4, |
| 2135 | key_size : 8, |
| 2136 | } |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2137 | |
| 2138 | // TESTING |
| 2139 | enum LoopbackMode : 8 { |
| 2140 | NO_LOOPBACK = 0x00, |
| 2141 | ENABLE_LOCAL = 0x01, |
| 2142 | ENABLE_REMOTE = 0x02, |
| 2143 | } |
| 2144 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2145 | packet ReadLoopbackMode : CommandPacket (op_code = READ_LOOPBACK_MODE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2146 | } |
| 2147 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2148 | packet ReadLoopbackModeComplete : CommandComplete (command_op_code = READ_LOOPBACK_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2149 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2150 | loopback_mode : LoopbackMode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2151 | } |
| 2152 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2153 | packet WriteLoopbackMode : CommandPacket (op_code = WRITE_LOOPBACK_MODE) { |
| 2154 | loopback_mode : LoopbackMode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2155 | } |
| 2156 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2157 | packet WriteLoopbackModeComplete : CommandComplete (command_op_code = WRITE_LOOPBACK_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2158 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2159 | } |
| 2160 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2161 | packet EnableDeviceUnderTestMode : CommandPacket (op_code = ENABLE_DEVICE_UNDER_TEST_MODE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2162 | } |
| 2163 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2164 | packet EnableDeviceUnderTestModeComplete : CommandComplete (command_op_code = ENABLE_DEVICE_UNDER_TEST_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2165 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2166 | } |
| 2167 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2168 | packet WriteSimplePairingDebugMode : CommandPacket (op_code = WRITE_SIMPLE_PAIRING_DEBUG_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2169 | simple_pairing_debug_mode : Enable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2170 | } |
| 2171 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2172 | packet WriteSimplePairingDebugModeComplete : CommandComplete (command_op_code = WRITE_SIMPLE_PAIRING_DEBUG_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2173 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2174 | } |
| 2175 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2176 | packet WriteSecureConnectionsTestMode : CommandPacket (op_code = WRITE_SECURE_CONNECTIONS_TEST_MODE) { |
| 2177 | connection_handle : 12, |
| 2178 | _reserved_ : 4, |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2179 | dm1_aclu_mode : Enable, |
| 2180 | esco_loopback_mode : Enable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2181 | } |
| 2182 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2183 | packet WriteSecureConnectionsTestModeComplete : CommandComplete (command_op_code = WRITE_SECURE_CONNECTIONS_TEST_MODE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2184 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2185 | } |
| 2186 | |
| 2187 | // LE_CONTROLLER |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2188 | packet LeSetEventMask : CommandPacket (op_code = LE_SET_EVENT_MASK) { |
| 2189 | le_event_mask : 64, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2190 | } |
| 2191 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2192 | packet LeSetEventMaskComplete : CommandComplete (command_op_code = LE_SET_EVENT_MASK) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2193 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2194 | } |
| 2195 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2196 | packet LeReadBufferSize : CommandPacket (op_code = LE_READ_BUFFER_SIZE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2197 | } |
| 2198 | |
Chienyuan | a7ad3fb | 2019-08-15 18:04:32 +0800 | [diff] [blame] | 2199 | struct LeBufferSize { |
| 2200 | le_data_packet_length : 16, |
| 2201 | total_num_le_packets : 8, |
| 2202 | } |
| 2203 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2204 | packet LeReadBufferSizeComplete : CommandComplete (command_op_code = LE_READ_BUFFER_SIZE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2205 | status : ErrorCode, |
Chienyuan | a7ad3fb | 2019-08-15 18:04:32 +0800 | [diff] [blame] | 2206 | le_buffer_size : LeBufferSize, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2207 | } |
| 2208 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2209 | packet LeReadLocalSupportedFeatures : CommandPacket (op_code = LE_READ_LOCAL_SUPPORTED_FEATURES) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2210 | } |
| 2211 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2212 | packet LeReadLocalSupportedFeaturesComplete : CommandComplete (command_op_code = LE_READ_LOCAL_SUPPORTED_FEATURES) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2213 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2214 | le_features : 64, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2215 | } |
| 2216 | |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2217 | packet LeSetRandomAddress : LeAdvertisingCommand (op_code = LE_SET_RANDOM_ADDRESS) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2218 | random_address : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2219 | } |
| 2220 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2221 | packet LeSetRandomAddressComplete : CommandComplete (command_op_code = LE_SET_RANDOM_ADDRESS) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2222 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2223 | } |
| 2224 | |
Myles Watson | 41bab61 | 2019-11-11 08:34:49 -0800 | [diff] [blame] | 2225 | enum AdvertisingFilterPolicy : 2 { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2226 | ALL_DEVICES = 0, // Default |
Myles Watson | 41bab61 | 2019-11-11 08:34:49 -0800 | [diff] [blame] | 2227 | WHITELISTED_SCAN = 1, |
| 2228 | WHITELISTED_CONNECT = 2, |
| 2229 | WHITELISTED_SCAN_AND_CONNECT = 3, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2230 | } |
| 2231 | |
| 2232 | enum PeerAddressType : 8 { |
| 2233 | PUBLIC_DEVICE_OR_IDENTITY_ADDRESS = 0x00, |
| 2234 | RANDOM_DEVICE_OR_IDENTITY_ADDRESS = 0x01, |
| 2235 | } |
| 2236 | |
| 2237 | enum AdvertisingEventType : 8 { |
| 2238 | ADV_IND = 0x00, |
| 2239 | ADV_DIRECT_IND = 0x01, |
| 2240 | ADV_SCAN_IND = 0x02, |
| 2241 | ADV_NONCONN_IND = 0x03, |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2242 | ADV_DIRECT_IND_LOW = 0x04, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2243 | } |
| 2244 | |
| 2245 | enum AddressType : 8 { |
| 2246 | PUBLIC_DEVICE_ADDRESS = 0x00, |
| 2247 | RANDOM_DEVICE_ADDRESS = 0x01, |
| 2248 | PUBLIC_IDENTITY_ADDRESS = 0x02, |
| 2249 | RANDOM_IDENTITY_ADDRESS = 0x03, |
| 2250 | } |
| 2251 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2252 | packet LeSetAdvertisingParameters : LeAdvertisingCommand (op_code = LE_SET_ADVERTISING_PARAMETERS) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2253 | interval_min : 16, |
| 2254 | interval_max : 16, |
| 2255 | type : AdvertisingEventType, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2256 | own_address_type : AddressType, |
| 2257 | peer_address_type : PeerAddressType, |
| 2258 | peer_address : Address, |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2259 | channel_map : 8, |
| 2260 | filter_policy : AdvertisingFilterPolicy, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2261 | _reserved_ : 6, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2262 | } |
| 2263 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2264 | packet LeSetAdvertisingParametersComplete : CommandComplete (command_op_code = LE_SET_ADVERTISING_PARAMETERS) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2265 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2266 | } |
| 2267 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2268 | packet LeReadAdvertisingChannelTxPower : LeAdvertisingCommand (op_code = LE_READ_ADVERTISING_CHANNEL_TX_POWER) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2269 | } |
| 2270 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2271 | packet LeReadAdvertisingChannelTxPowerComplete : CommandComplete (command_op_code = LE_READ_ADVERTISING_CHANNEL_TX_POWER) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2272 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2273 | transmit_power_level : 8, // (-20dBm to 10dBm) Accuracy: +/-4dB |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2274 | } |
| 2275 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2276 | packet LeSetAdvertisingData : LeAdvertisingCommand (op_code = LE_SET_ADVERTISING_DATA) { |
Myles Watson | 7a0dc39 | 2019-07-09 15:24:54 -0700 | [diff] [blame] | 2277 | _size_(advertising_data) : 8, |
| 2278 | advertising_data : GapData[], |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2279 | _padding_[31], // Zero padding to 31 bytes of advertising_data |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2280 | } |
| 2281 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2282 | packet LeSetAdvertisingDataComplete : CommandComplete (command_op_code = LE_SET_ADVERTISING_DATA) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2283 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2284 | } |
| 2285 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2286 | packet LeSetScanResponseData : LeAdvertisingCommand (op_code = LE_SET_SCAN_RESPONSE_DATA) { |
Myles Watson | 7a0dc39 | 2019-07-09 15:24:54 -0700 | [diff] [blame] | 2287 | _size_(advertising_data) : 8, |
| 2288 | advertising_data : GapData[], |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2289 | _padding_[31], // Zero padding to 31 bytes of advertising_data |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2290 | } |
| 2291 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2292 | packet LeSetScanResponseDataComplete : CommandComplete (command_op_code = LE_SET_SCAN_RESPONSE_DATA) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2293 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2294 | } |
| 2295 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2296 | packet LeSetAdvertisingEnable : LeAdvertisingCommand (op_code = LE_SET_ADVERTISING_ENABLE) { |
| 2297 | advertising_enable : Enable, // Default DISABLED |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2298 | } |
| 2299 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2300 | packet LeSetAdvertisingEnableComplete : CommandComplete (command_op_code = LE_SET_ADVERTISING_ENABLE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2301 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2302 | } |
| 2303 | |
| 2304 | enum LeScanType : 8 { |
| 2305 | PASSIVE = 0x00, // Default |
| 2306 | ACTIVE = 0x01, |
| 2307 | } |
| 2308 | |
| 2309 | enum LeSetScanningFilterPolicy : 8 { |
| 2310 | ACCEPT_ALL = 0x00, // Default |
| 2311 | WHITE_LIST_ONLY = 0x01, |
| 2312 | CHECK_INITIATORS_IDENTITY = 0x02, |
| 2313 | WHITE_LIST_AND_INITIATORS_IDENTITY = 0x03, |
| 2314 | } |
| 2315 | |
Myles Watson | 742597d | 2019-10-14 16:23:38 -0700 | [diff] [blame] | 2316 | packet LeSetScanParameters : LeScanningCommand (op_code = LE_SET_SCAN_PARAMETERS) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2317 | le_scan_type : LeScanType, |
| 2318 | le_scan_interval : 16, // 0x0004-0x4000 Default 0x10 (10ms) |
| 2319 | le_scan_window : 16, // Default 0x10 (10ms) |
| 2320 | own_address_type : AddressType, |
| 2321 | scanning_filter_policy : LeSetScanningFilterPolicy, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2322 | } |
| 2323 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2324 | packet LeSetScanParametersComplete : CommandComplete (command_op_code = LE_SET_SCAN_PARAMETERS) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2325 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2326 | } |
| 2327 | |
Myles Watson | 742597d | 2019-10-14 16:23:38 -0700 | [diff] [blame] | 2328 | packet LeSetScanEnable : LeScanningCommand (op_code = LE_SET_SCAN_ENABLE) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2329 | le_scan_enable : Enable, |
| 2330 | filter_duplicates : Enable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2331 | } |
| 2332 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2333 | packet LeSetScanEnableComplete : CommandComplete (command_op_code = LE_SET_SCAN_ENABLE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2334 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2335 | } |
| 2336 | |
| 2337 | enum InitiatorFilterPolicy : 8 { |
| 2338 | USE_PEER_ADDRESS = 0x00, |
| 2339 | USE_WHITE_LIST = 0x01, |
| 2340 | } |
| 2341 | |
| 2342 | enum OwnAddressType : 8 { |
| 2343 | PUBLIC_DEVICE_ADDRESS = 0x00, |
| 2344 | RANDOM_DEVICE_ADDRESS = 0x01, |
| 2345 | RESOLVABLE_OR_PUBLIC_ADDRESS = 0x02, |
| 2346 | RESOLVABLE_OR_RANDOM_ADDRESS = 0x03, |
| 2347 | } |
| 2348 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2349 | packet LeCreateConnection : LeConnectionManagementCommand (op_code = LE_CREATE_CONNECTION) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2350 | le_scan_interval : 16, // 0x0004-0x4000 |
| 2351 | le_scan_window : 16, // < = LeScanInterval |
| 2352 | initiator_filter_policy : InitiatorFilterPolicy, |
| 2353 | peer_address_type : AddressType, |
| 2354 | peer_address : Address, |
| 2355 | own_address_type : OwnAddressType, |
| 2356 | conn_interval_min : 16, // 0x0006-0x0C80 (7.5ms to 4s) |
| 2357 | conn_interval_max : 16, // 0x0006-0x0C80 (7.5ms to 4s) |
| 2358 | conn_latency : 16, // 0x0006-0x01F3 |
| 2359 | supervision_timeout : 16, // 0x00A to 0x0C80 (100ms to 32s) |
| 2360 | minimum_ce_length : 16, // 0.625ms |
| 2361 | maximum_ce_length : 16, // 0.625ms |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2362 | } |
| 2363 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2364 | packet LeCreateConnectionStatus : CommandStatus (command_op_code = LE_CREATE_CONNECTION) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2365 | } |
| 2366 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2367 | packet LeCreateConnectionCancel : LeConnectionManagementCommand (op_code = LE_CREATE_CONNECTION_CANCEL) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2368 | } |
| 2369 | |
Chienyuan | cefe072 | 2019-11-20 18:00:41 +0800 | [diff] [blame] | 2370 | packet LeCreateConnectionCancelStatus : CommandStatus (command_op_code = LE_CREATE_CONNECTION_CANCEL) { |
| 2371 | } |
| 2372 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2373 | packet LeCreateConnectionCancelComplete : CommandComplete (command_op_code = LE_CREATE_CONNECTION_CANCEL) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2374 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2375 | } |
| 2376 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2377 | packet LeReadWhiteListSize : LeConnectionManagementCommand (op_code = LE_READ_WHITE_LIST_SIZE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2378 | } |
| 2379 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2380 | packet LeReadWhiteListSizeComplete : CommandComplete (command_op_code = LE_READ_WHITE_LIST_SIZE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2381 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2382 | white_list_size : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2383 | } |
| 2384 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2385 | packet LeClearWhiteList : LeConnectionManagementCommand (op_code = LE_CLEAR_WHITE_LIST) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2386 | } |
| 2387 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2388 | packet LeClearWhiteListComplete : CommandComplete (command_op_code = LE_CLEAR_WHITE_LIST) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2389 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2390 | } |
| 2391 | |
| 2392 | enum WhiteListAddressType : 8 { |
| 2393 | PUBLIC = 0x00, |
| 2394 | RANDOM = 0x01, |
| 2395 | ANONYMOUS_ADVERTISERS = 0xFF, |
| 2396 | } |
| 2397 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2398 | packet LeAddDeviceToWhiteList : LeConnectionManagementCommand (op_code = LE_ADD_DEVICE_TO_WHITE_LIST) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2399 | address_type : WhiteListAddressType, |
| 2400 | address : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2401 | } |
| 2402 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2403 | packet LeAddDeviceToWhiteListComplete : CommandComplete (command_op_code = LE_ADD_DEVICE_TO_WHITE_LIST) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2404 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2405 | } |
| 2406 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2407 | packet LeRemoveDeviceFromWhiteList : LeConnectionManagementCommand (op_code = LE_REMOVE_DEVICE_FROM_WHITE_LIST) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2408 | address_type : WhiteListAddressType, |
| 2409 | address : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2410 | } |
| 2411 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2412 | packet LeRemoveDeviceFromWhiteListComplete : CommandComplete (command_op_code = LE_REMOVE_DEVICE_FROM_WHITE_LIST) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2413 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2414 | } |
| 2415 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2416 | packet LeConnectionUpdate : LeConnectionManagementCommand (op_code = LE_CONNECTION_UPDATE) { |
| 2417 | connection_handle : 12, |
| 2418 | _reserved_ : 4, |
| 2419 | conn_interval_min : 16, // 0x0006-0x0C80 (7.5ms to 4s) |
| 2420 | conn_interval_max : 16, // 0x0006-0x0C80 (7.5ms to 4s) |
| 2421 | conn_latency : 16, // 0x0006-0x01F3 |
| 2422 | supervision_timeout : 16, // 0x00A to 0x0C80 (100ms to 32s) |
| 2423 | minimum_ce_length : 16, // 0.625ms |
| 2424 | maximum_ce_length : 16, // 0.625ms |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2425 | } |
| 2426 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2427 | packet LeConnectionUpdateStatus : CommandStatus (command_op_code = LE_CONNECTION_UPDATE) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2428 | } |
| 2429 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2430 | packet LeSetHostChannelClassification : LeConnectionManagementCommand (op_code = LE_SET_HOST_CHANNEL_CLASSIFICATION) { |
| 2431 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2432 | } |
| 2433 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2434 | packet LeReadChannelMap : LeConnectionManagementCommand (op_code = LE_READ_CHANNEL_MAP) { |
| 2435 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2436 | } |
| 2437 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2438 | packet LeReadRemoteFeatures : LeConnectionManagementCommand (op_code = LE_READ_REMOTE_FEATURES) { |
| 2439 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2440 | } |
| 2441 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2442 | packet LeEncrypt : LeSecurityCommand (op_code = LE_ENCRYPT) { |
| 2443 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2444 | } |
| 2445 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2446 | packet LeRand : LeSecurityCommand (op_code = LE_RAND) { |
Myles Watson | 07c86d3 | 2019-08-20 15:17:00 -0700 | [diff] [blame] | 2447 | } |
| 2448 | |
| 2449 | packet LeRandComplete : CommandComplete (command_op_code = LE_RAND) { |
| 2450 | status : ErrorCode, |
| 2451 | random_number : 64, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2452 | } |
| 2453 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2454 | packet LeStartEncryption : LeSecurityCommand (op_code = LE_START_ENCRYPTION) { |
Jakub Pawlowski | 0dfabe1 | 2019-09-06 16:27:18 +0200 | [diff] [blame] | 2455 | connection_handle: 16, |
| 2456 | rand: 8[8], |
| 2457 | ediv: 16, |
| 2458 | ltk: 8[16], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2459 | } |
| 2460 | |
Chienyuan | cefe072 | 2019-11-20 18:00:41 +0800 | [diff] [blame] | 2461 | packet LeStartEncryptionStatus : CommandStatus (command_op_code = LE_START_ENCRYPTION) { |
| 2462 | } |
| 2463 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2464 | packet LeLongTermKeyRequestReply : LeSecurityCommand (op_code = LE_LONG_TERM_KEY_REQUEST_REPLY) { |
Jakub Pawlowski | 0dfabe1 | 2019-09-06 16:27:18 +0200 | [diff] [blame] | 2465 | connection_handle: 16, |
| 2466 | long_term_key: 8[16], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2467 | } |
| 2468 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2469 | packet LeLongTermKeyRequestNegativeReply : LeSecurityCommand (op_code = LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY) { |
| 2470 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2471 | } |
| 2472 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2473 | packet LeReadSupportedStates : CommandPacket (op_code = LE_READ_SUPPORTED_STATES) { |
Chienyuan | a7ad3fb | 2019-08-15 18:04:32 +0800 | [diff] [blame] | 2474 | } |
| 2475 | |
| 2476 | packet LeReadSupportedStatesComplete : CommandComplete (command_op_code = LE_READ_SUPPORTED_STATES) { |
| 2477 | status : ErrorCode, |
| 2478 | le_states : 64, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2479 | } |
| 2480 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2481 | packet LeReceiverTest : CommandPacket (op_code = LE_RECEIVER_TEST) { |
| 2482 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2483 | } |
| 2484 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2485 | packet LeTransmitterTest : CommandPacket (op_code = LE_TRANSMITTER_TEST) { |
| 2486 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2487 | } |
| 2488 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2489 | packet LeTestEnd : CommandPacket (op_code = LE_TEST_END) { |
| 2490 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2491 | } |
| 2492 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2493 | packet LeRemoteConnectionParameterRequestReply : LeConnectionManagementCommand (op_code = LE_REMOTE_CONNECTION_PARAMETER_REQUEST_REPLY) { |
| 2494 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2495 | } |
| 2496 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2497 | packet LeRemoteConnectionParameterRequestNegativeReply : LeConnectionManagementCommand (op_code = LE_REMOTE_CONNECTION_PARAMETER_REQUEST_NEGATIVE_REPLY) { |
| 2498 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2499 | } |
| 2500 | |
| 2501 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2502 | packet LeSetDataLength : LeConnectionManagementCommand (op_code = LE_SET_DATA_LENGTH) { |
| 2503 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2504 | } |
| 2505 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2506 | packet LeReadSuggestedDefaultDataLength : LeConnectionManagementCommand (op_code = LE_READ_SUGGESTED_DEFAULT_DATA_LENGTH) { |
| 2507 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2508 | } |
| 2509 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2510 | packet LeWriteSuggestedDefaultDataLength : LeConnectionManagementCommand (op_code = LE_WRITE_SUGGESTED_DEFAULT_DATA_LENGTH) { |
| 2511 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2512 | } |
| 2513 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2514 | packet LeReadLocalP256PublicKeyCommand : LeSecurityCommand (op_code = LE_READ_LOCAL_P_256_PUBLIC_KEY_COMMAND) { |
| 2515 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2516 | } |
| 2517 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2518 | packet LeGenerateDhkeyCommand : LeSecurityCommand (op_code = LE_GENERATE_DHKEY_COMMAND) { |
| 2519 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2520 | } |
| 2521 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2522 | packet LeAddDeviceToResolvingList : LeSecurityCommand (op_code = LE_ADD_DEVICE_TO_RESOLVING_LIST) { |
| 2523 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2524 | } |
| 2525 | |
Chienyuan | cefe072 | 2019-11-20 18:00:41 +0800 | [diff] [blame] | 2526 | packet LeAddDeviceToResolvingListComplete : CommandComplete (command_op_code = LE_ADD_DEVICE_TO_RESOLVING_LIST) { |
| 2527 | status : ErrorCode, |
| 2528 | } |
| 2529 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2530 | packet LeRemoveDeviceFromResolvingList : LeSecurityCommand (op_code = LE_REMOVE_DEVICE_FROM_RESOLVING_LIST) { |
| 2531 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2532 | } |
| 2533 | |
Chienyuan | cefe072 | 2019-11-20 18:00:41 +0800 | [diff] [blame] | 2534 | packet LeRemoveDeviceFromResolvingListComplete : CommandComplete (command_op_code = LE_REMOVE_DEVICE_FROM_RESOLVING_LIST) { |
| 2535 | status : ErrorCode, |
| 2536 | } |
| 2537 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2538 | packet LeClearResolvingList : LeSecurityCommand (op_code = LE_CLEAR_RESOLVING_LIST) { |
| 2539 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2540 | } |
| 2541 | |
Chienyuan | cefe072 | 2019-11-20 18:00:41 +0800 | [diff] [blame] | 2542 | packet LeClearResolvingListComplete : CommandComplete (command_op_code = LE_CLEAR_RESOLVING_LIST) { |
| 2543 | status : ErrorCode, |
| 2544 | } |
| 2545 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2546 | packet LeReadResolvingListSize : LeSecurityCommand (op_code = LE_READ_RESOLVING_LIST_SIZE) { |
| 2547 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2548 | } |
| 2549 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2550 | packet LeReadPeerResolvableAddress : LeSecurityCommand (op_code = LE_READ_PEER_RESOLVABLE_ADDRESS) { |
| 2551 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2552 | } |
| 2553 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2554 | packet LeReadLocalResolvableAddress : LeSecurityCommand (op_code = LE_READ_LOCAL_RESOLVABLE_ADDRESS) { |
| 2555 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2556 | } |
| 2557 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2558 | packet LeSetAddressResolutionEnable : LeSecurityCommand (op_code = LE_SET_ADDRESS_RESOLUTION_ENABLE) { |
| 2559 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2560 | } |
| 2561 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2562 | packet LeSetResolvablePrivateAddressTimeout : LeSecurityCommand (op_code = LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT) { |
| 2563 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2564 | } |
| 2565 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2566 | packet LeReadMaximumDataLength : CommandPacket (op_code = LE_READ_MAXIMUM_DATA_LENGTH) { |
Chienyuan | a7ad3fb | 2019-08-15 18:04:32 +0800 | [diff] [blame] | 2567 | } |
| 2568 | |
| 2569 | struct LeMaximumDataLength { |
| 2570 | supported_max_tx_octets : 16, |
| 2571 | supported_max_tx_time: 16, |
| 2572 | supported_max_rx_octets : 16, |
| 2573 | supported_max_rx_time: 16, |
| 2574 | } |
| 2575 | |
| 2576 | |
| 2577 | packet LeReadMaximumDataLengthComplete : CommandComplete (command_op_code = LE_READ_MAXIMUM_DATA_LENGTH) { |
| 2578 | status : ErrorCode, |
| 2579 | le_maximum_data_length : LeMaximumDataLength, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2580 | } |
| 2581 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2582 | packet LeReadPhy : LeConnectionManagementCommand (op_code = LE_READ_PHY) { |
| 2583 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2584 | } |
| 2585 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2586 | packet LeSetDefaultPhy : LeConnectionManagementCommand (op_code = LE_SET_DEFAULT_PHY) { |
| 2587 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2588 | } |
| 2589 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2590 | packet LeSetPhy : LeConnectionManagementCommand (op_code = LE_SET_PHY) { |
| 2591 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2592 | } |
| 2593 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2594 | packet LeEnhancedReceiverTest : CommandPacket (op_code = LE_ENHANCED_RECEIVER_TEST) { |
| 2595 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2596 | } |
| 2597 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2598 | packet LeEnhancedTransmitterTest : CommandPacket (op_code = LE_ENHANCED_TRANSMITTER_TEST) { |
| 2599 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2600 | } |
| 2601 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2602 | packet LeSetExtendedAdvertisingRandomAddress : LeAdvertisingCommand (op_code = LE_SET_EXTENDED_ADVERTISING_RANDOM_ADDRESS) { |
| 2603 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2604 | } |
| 2605 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2606 | packet LeSetExtendedAdvertisingParameters : LeAdvertisingCommand (op_code = LE_SET_EXTENDED_ADVERTISING_PARAMETERS) { |
| 2607 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2608 | } |
| 2609 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2610 | packet LeSetExtendedAdvertisingData : LeAdvertisingCommand (op_code = LE_SET_EXTENDED_ADVERTISING_DATA) { |
| 2611 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2612 | } |
| 2613 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2614 | packet LeSetExtendedAdvertisingScanResponse : LeAdvertisingCommand (op_code = LE_SET_EXTENDED_ADVERTISING_SCAN_RESPONSE) { |
| 2615 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2616 | } |
| 2617 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2618 | packet LeSetExtendedAdvertisingEnable : LeAdvertisingCommand (op_code = LE_SET_EXTENDED_ADVERTISING_ENABLE) { |
| 2619 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2620 | } |
| 2621 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2622 | packet LeReadMaximumAdvertisingDataLength : CommandPacket (op_code = LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH) { |
Chienyuan | a7ad3fb | 2019-08-15 18:04:32 +0800 | [diff] [blame] | 2623 | } |
| 2624 | |
| 2625 | packet LeReadMaximumAdvertisingDataLengthComplete : CommandComplete (command_op_code = LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH) { |
| 2626 | status : ErrorCode, |
| 2627 | maximum_advertising_data_length : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2628 | } |
| 2629 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2630 | packet LeReadNumberOfSupportedAdvertisingSets : CommandPacket (op_code = LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS) { |
Chienyuan | a7ad3fb | 2019-08-15 18:04:32 +0800 | [diff] [blame] | 2631 | } |
| 2632 | |
| 2633 | packet LeReadNumberOfSupportedAdvertisingSetsComplete : CommandComplete (command_op_code = LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS) { |
| 2634 | status : ErrorCode, |
| 2635 | number_supported_advertising_sets : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2636 | } |
| 2637 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2638 | packet LeRemoveAdvertisingSet : LeAdvertisingCommand (op_code = LE_REMOVE_ADVERTISING_SET) { |
| 2639 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2640 | } |
| 2641 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2642 | packet LeClearAdvertisingSets : LeAdvertisingCommand (op_code = LE_CLEAR_ADVERTISING_SETS) { |
| 2643 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2644 | } |
| 2645 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2646 | packet LeSetPeriodicAdvertisingParam : LeAdvertisingCommand (op_code = LE_SET_PERIODIC_ADVERTISING_PARAM) { |
| 2647 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2648 | } |
| 2649 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2650 | packet LeSetPeriodicAdvertisingData : LeAdvertisingCommand (op_code = LE_SET_PERIODIC_ADVERTISING_DATA) { |
| 2651 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2652 | } |
| 2653 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2654 | packet LeSetPeriodicAdvertisingEnable : LeAdvertisingCommand (op_code = LE_SET_PERIODIC_ADVERTISING_ENABLE) { |
| 2655 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2656 | } |
| 2657 | |
Myles Watson | 0494eb5 | 2019-11-06 11:08:04 -0800 | [diff] [blame] | 2658 | packet LeSetExtendedScanParameters : LeScanningCommand (op_code = LE_SET_EXTENDED_SCAN_PARAMETERS) { |
| 2659 | le_scan_type : LeScanType, |
| 2660 | le_scan_interval : 32, // 0x0004-0x00FFFFFF Default 0x10 (10ms) |
| 2661 | le_scan_window : 32, // 0x004-0xFFFF Default 0x10 (10ms) |
| 2662 | own_address_type : AddressType, |
| 2663 | scanning_filter_policy : LeSetScanningFilterPolicy, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2664 | } |
| 2665 | |
Myles Watson | 0494eb5 | 2019-11-06 11:08:04 -0800 | [diff] [blame] | 2666 | packet LeSetExtendedScanParametersComplete : CommandComplete (command_op_code = LE_SET_EXTENDED_SCAN_PARAMETERS) { |
| 2667 | status : ErrorCode, |
| 2668 | } |
| 2669 | |
| 2670 | enum FilterDuplicates : 8 { |
| 2671 | DISABLED = 0, |
| 2672 | ENABLED = 1, |
| 2673 | RESET_EACH_PERIOD = 2, |
| 2674 | } |
| 2675 | |
| 2676 | packet LeSetExtendedScanEnable : LeScanningCommand (op_code = LE_SET_EXTENDED_SCAN_ENABLE) { |
| 2677 | enable : Enable, |
| 2678 | filter_duplicates : FilterDuplicates, |
| 2679 | duration : 16, // 0 - Scan continuously, N * 10 ms |
| 2680 | period : 16, // 0 - Scan continuously, N * 1.28 sec |
| 2681 | } |
| 2682 | |
| 2683 | packet LeSetExtendedScanEnableComplete : CommandComplete (command_op_code = LE_SET_EXTENDED_SCAN_ENABLE) { |
| 2684 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2685 | } |
| 2686 | |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2687 | packet LeExtendedCreateConnection : LeConnectionManagementCommand (op_code = LE_EXTENDED_CREATE_CONNECTION) { |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2688 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2689 | } |
| 2690 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2691 | packet LePeriodicAdvertisingCreateSync : LeAdvertisingCommand (op_code = LE_PERIODIC_ADVERTISING_CREATE_SYNC) { |
| 2692 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2693 | } |
| 2694 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2695 | packet LePeriodicAdvertisingCreateSyncCancel : LeAdvertisingCommand (op_code = LE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL) { |
| 2696 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2697 | } |
| 2698 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2699 | packet LePeriodicAdvertisingTerminateSync : LeAdvertisingCommand (op_code = LE_PERIODIC_ADVERTISING_TERMINATE_SYNC) { |
| 2700 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2701 | } |
| 2702 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2703 | packet LeAddDeviceToPeriodicAdvertisingList : LeAdvertisingCommand (op_code = LE_ADD_DEVICE_TO_PERIODIC_ADVERTISING_LIST) { |
| 2704 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2705 | } |
| 2706 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2707 | packet LeRemoveDeviceFromPeriodicAdvertisingList : LeAdvertisingCommand (op_code = LE_REMOVE_DEVICE_FROM_PERIODIC_ADVERTISING_LIST) { |
| 2708 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2709 | } |
| 2710 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2711 | packet LeClearPeriodicAdvertisingList : LeAdvertisingCommand (op_code = LE_CLEAR_PERIODIC_ADVERTISING_LIST) { |
| 2712 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2713 | } |
| 2714 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2715 | packet LeReadPeriodicAdvertisingListSize : LeAdvertisingCommand (op_code = LE_READ_PERIODIC_ADVERTISING_LIST_SIZE) { |
| 2716 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2717 | } |
| 2718 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2719 | packet LeReadTransmitPower : LeAdvertisingCommand (op_code = LE_READ_TRANSMIT_POWER) { |
| 2720 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2721 | } |
| 2722 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2723 | packet LeReadRfPathCompensationPower : LeAdvertisingCommand (op_code = LE_READ_RF_PATH_COMPENSATION_POWER) { |
| 2724 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2725 | } |
| 2726 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2727 | packet LeWriteRfPathCompensationPower : LeAdvertisingCommand (op_code = LE_WRITE_RF_PATH_COMPENSATION_POWER) { |
| 2728 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2729 | } |
| 2730 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2731 | packet LeSetPrivacyMode : LeSecurityCommand (op_code = LE_SET_PRIVACY_MODE) { |
| 2732 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2733 | } |
| 2734 | |
Chienyuan | cefe072 | 2019-11-20 18:00:41 +0800 | [diff] [blame] | 2735 | packet LeSetPrivacyModeComplete : CommandComplete (command_op_code = LE_SET_PRIVACY_MODE) { |
| 2736 | status : ErrorCode, |
| 2737 | } |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2738 | |
| 2739 | // VENDOR_SPECIFIC |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2740 | packet LeGetVendorCapabilities : VendorCommand (op_code = LE_GET_VENDOR_CAPABILITIES) { |
Chienyuan | 1beb9f8 | 2019-09-03 14:24:26 +0800 | [diff] [blame] | 2741 | } |
| 2742 | |
| 2743 | struct VendorCapabilities { |
| 2744 | is_supported : 8, |
| 2745 | max_advt_instances: 8, |
| 2746 | offloaded_resolution_of_private_address : 8, |
| 2747 | total_scan_results_storage: 16, |
| 2748 | max_irk_list_sz: 8, |
| 2749 | filtering_support: 8, |
| 2750 | max_filter: 8, |
| 2751 | activity_energy_info_support: 8, |
| 2752 | version_supported: 16, |
| 2753 | total_num_of_advt_tracked: 16, |
| 2754 | extended_scan_support: 8, |
| 2755 | debug_logging_supported: 8, |
| 2756 | le_address_generation_offloading_support: 8, |
| 2757 | a2dp_source_offload_capability_mask: 32, |
| 2758 | bluetooth_quality_report_support: 8 |
| 2759 | } |
| 2760 | |
| 2761 | struct BaseVendorCapabilities { |
| 2762 | max_advt_instances: 8, |
| 2763 | offloaded_resolution_of_private_address : 8, |
| 2764 | total_scan_results_storage: 16, |
| 2765 | max_irk_list_sz: 8, |
| 2766 | filtering_support: 8, |
| 2767 | max_filter: 8, |
| 2768 | activity_energy_info_support: 8, |
| 2769 | } |
| 2770 | |
| 2771 | packet LeGetVendorCapabilitiesComplete : CommandComplete (command_op_code = LE_GET_VENDOR_CAPABILITIES) { |
| 2772 | status : ErrorCode, |
| 2773 | base_vendor_capabilities : BaseVendorCapabilities, |
| 2774 | _payload_, |
| 2775 | } |
| 2776 | packet LeGetVendorCapabilitiesComplete095 : LeGetVendorCapabilitiesComplete { |
| 2777 | version_supported: 16, |
| 2778 | total_num_of_advt_tracked: 16, |
| 2779 | extended_scan_support: 8, |
| 2780 | debug_logging_supported: 8, |
| 2781 | _payload_, |
| 2782 | } |
| 2783 | packet LeGetVendorCapabilitiesComplete096 : LeGetVendorCapabilitiesComplete095 { |
| 2784 | le_address_generation_offloading_support: 8, |
| 2785 | _payload_, |
| 2786 | } |
| 2787 | |
| 2788 | packet LeGetVendorCapabilitiesComplete098 : LeGetVendorCapabilitiesComplete096 { |
| 2789 | a2dp_source_offload_capability_mask: 32, |
| 2790 | bluetooth_quality_report_support: 8 |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2791 | } |
| 2792 | |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2793 | enum SubOcf : 8 { |
Myles Watson | 41bab61 | 2019-11-11 08:34:49 -0800 | [diff] [blame] | 2794 | SET_PARAM = 0x01, |
| 2795 | SET_DATA = 0x02, |
| 2796 | SET_SCAN_RESP = 0x03, |
| 2797 | SET_RANDOM_ADDR = 0x04, |
| 2798 | SET_ENABLE = 0x05, |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2799 | } |
| 2800 | |
| 2801 | packet LeMultiAdvt : LeAdvertisingCommand (op_code = LE_MULTI_ADVT) { |
| 2802 | sub_cmd : SubOcf, |
| 2803 | _body_, |
| 2804 | } |
| 2805 | |
Myles Watson | 41bab61 | 2019-11-11 08:34:49 -0800 | [diff] [blame] | 2806 | packet LeMultiAdvtComplete : CommandComplete (command_op_code = LE_MULTI_ADVT) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2807 | status : ErrorCode, |
| 2808 | sub_cmd : SubOcf, |
| 2809 | } |
| 2810 | |
Myles Watson | 41bab61 | 2019-11-11 08:34:49 -0800 | [diff] [blame] | 2811 | packet LeMultiAdvtParam : LeMultiAdvt (sub_cmd = SET_PARAM) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2812 | interval_min : 16, |
| 2813 | interval_max : 16, |
| 2814 | type : AdvertisingEventType, |
| 2815 | own_address_type : AddressType, |
| 2816 | peer_address_type : PeerAddressType, |
| 2817 | peer_address : Address, |
| 2818 | channel_map : 8, |
| 2819 | filter_policy : AdvertisingFilterPolicy, |
| 2820 | _reserved_ : 6, |
| 2821 | instance : 8, |
| 2822 | tx_power : 8, |
| 2823 | } |
| 2824 | |
Myles Watson | 41bab61 | 2019-11-11 08:34:49 -0800 | [diff] [blame] | 2825 | packet LeMultiAdvtParamComplete : LeMultiAdvtComplete (sub_cmd = SET_PARAM) { |
| 2826 | } |
| 2827 | |
| 2828 | packet LeMultiAdvtSetData : LeMultiAdvt (sub_cmd = SET_DATA) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2829 | _size_(advertising_data) : 8, |
| 2830 | advertising_data : GapData[], |
| 2831 | _padding_[31], // Zero padding to 31 bytes of advertising_data |
| 2832 | advertising_instance : 8, |
| 2833 | } |
| 2834 | |
Myles Watson | 41bab61 | 2019-11-11 08:34:49 -0800 | [diff] [blame] | 2835 | packet LeMultiAdvtSetDataComplete : LeMultiAdvtComplete (sub_cmd = SET_DATA) { |
| 2836 | } |
| 2837 | |
| 2838 | packet LeMultiAdvtSetScanResp : LeMultiAdvt (sub_cmd = SET_SCAN_RESP) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2839 | _size_(advertising_data) : 8, |
| 2840 | advertising_data : GapData[], |
| 2841 | _padding_[31], // Zero padding to 31 bytes of advertising_data |
| 2842 | advertising_instance : 8, |
| 2843 | } |
| 2844 | |
Myles Watson | 41bab61 | 2019-11-11 08:34:49 -0800 | [diff] [blame] | 2845 | packet LeMultiAdvtSetScanRespComplete : LeMultiAdvtComplete (sub_cmd = SET_SCAN_RESP) { |
| 2846 | } |
| 2847 | |
| 2848 | packet LeMultiAdvtSetRandomAddr : LeMultiAdvt (sub_cmd = SET_RANDOM_ADDR) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2849 | random_address : Address, |
| 2850 | advertising_instance : 8, |
| 2851 | } |
| 2852 | |
Myles Watson | 41bab61 | 2019-11-11 08:34:49 -0800 | [diff] [blame] | 2853 | packet LeMultiAdvtSetRandomAddrComplete : LeMultiAdvtComplete (sub_cmd = SET_RANDOM_ADDR) { |
| 2854 | } |
| 2855 | |
| 2856 | packet LeMultiAdvtSetEnable : LeMultiAdvt (sub_cmd = SET_ENABLE) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2857 | advertising_enable : Enable, // Default DISABLED |
| 2858 | advertising_instance : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2859 | } |
| 2860 | |
Myles Watson | 41bab61 | 2019-11-11 08:34:49 -0800 | [diff] [blame] | 2861 | packet LeMultiAdvtSetEnableComplete : LeMultiAdvtComplete (sub_cmd = SET_ENABLE) { |
| 2862 | } |
| 2863 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2864 | packet LeBatchScan : VendorCommand (op_code = LE_BATCH_SCAN) { |
| 2865 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2866 | } |
| 2867 | |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2868 | enum ApcfOpcode : 8 { |
| 2869 | ENABLE = 0x00, |
| 2870 | SET_FILTERING_PARAMETERS = 0x01, |
| 2871 | BROADCASTER_ADDRESS = 0x02, |
| 2872 | SERVICE_UUID = 0x03, |
| 2873 | SERVICE_SOLICITATION_UUID = 0x04, |
| 2874 | LOCAL_NAME = 0x05, |
| 2875 | MANUFACTURER_DATA = 0x06, |
| 2876 | SERVICE_DATA = 0x07, |
| 2877 | } |
| 2878 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2879 | packet LeAdvFilter : VendorCommand (op_code = LE_ADV_FILTER) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 2880 | apcf_opcode : ApcfOpcode, |
| 2881 | _body_, |
| 2882 | } |
| 2883 | |
| 2884 | packet LeAdvFilterComplete : CommandComplete (command_op_code = LE_ADV_FILTER) { |
| 2885 | status : ErrorCode, |
| 2886 | apcf_opcode : ApcfOpcode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2887 | } |
| 2888 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2889 | packet LeTrackAdv : VendorCommand (op_code = LE_TRACK_ADV) { |
| 2890 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2891 | } |
| 2892 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2893 | packet LeEnergyInfo : VendorCommand (op_code = LE_ENERGY_INFO) { |
| 2894 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2895 | } |
| 2896 | |
Myles Watson | 0494eb5 | 2019-11-06 11:08:04 -0800 | [diff] [blame] | 2897 | packet LeExtendedScanParams : LeScanningCommand (op_code = LE_EXTENDED_SCAN_PARAMS) { |
| 2898 | le_scan_type : LeScanType, |
| 2899 | le_scan_interval : 32, // 0x0004-0x4000 Default 0x10 (10ms) |
| 2900 | le_scan_window : 32, // Default 0x10 (10ms) |
| 2901 | own_address_type : AddressType, |
| 2902 | scanning_filter_policy : LeSetScanningFilterPolicy, |
| 2903 | } |
| 2904 | |
| 2905 | packet LeExtendedScanParamsComplete : CommandComplete (command_op_code = LE_EXTENDED_SCAN_PARAMS) { |
| 2906 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2907 | } |
| 2908 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2909 | packet ControllerDebugInfo : VendorCommand (op_code = CONTROLLER_DEBUG_INFO) { |
| 2910 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2911 | } |
| 2912 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2913 | packet ControllerA2DPOpcode : VendorCommand (op_code = CONTROLLER_A2DP_OPCODE) { |
| 2914 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2915 | } |
| 2916 | |
| 2917 | // HCI Event Packets |
| 2918 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2919 | packet InquiryComplete : EventPacket (event_code = INQUIRY_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2920 | status : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2921 | } |
| 2922 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2923 | packet InquiryResult : EventPacket (event_code = INQUIRY_RESULT){ |
| 2924 | num_responses : 8, |
| 2925 | bd_addr : Address, |
| 2926 | page_scan_repetition_mode : PageScanRepetitionMode, |
| 2927 | _reserved_ : 8, |
| 2928 | _reserved_ : 8, |
| 2929 | class_of_device : ClassOfDevice, |
| 2930 | clock_offset : 15, |
| 2931 | _reserved_ : 1, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2932 | } |
| 2933 | |
| 2934 | enum LinkType : 8 { |
| 2935 | SCO = 0x00, |
| 2936 | ACL = 0x01, |
| 2937 | } |
| 2938 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2939 | packet ConnectionComplete : EventPacket (event_code = CONNECTION_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2940 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2941 | connection_handle : 12, |
| 2942 | _reserved_ : 4, |
| 2943 | bd_addr : Address, |
| 2944 | link_type : LinkType, |
| 2945 | encryption_enabled : Enable, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2946 | } |
| 2947 | |
| 2948 | enum ConnectionRequestLinkType : 8 { |
| 2949 | SCO = 0x00, |
| 2950 | ACL = 0x01, |
| 2951 | ESCO = 0x02, |
| 2952 | } |
| 2953 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2954 | packet ConnectionRequest : EventPacket (event_code = CONNECTION_REQUEST){ |
| 2955 | bd_addr : Address, |
| 2956 | class_of_device : ClassOfDevice, |
| 2957 | link_type : ConnectionRequestLinkType, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2958 | } |
| 2959 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2960 | packet DisconnectionComplete : EventPacket (event_code = DISCONNECTION_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2961 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2962 | connection_handle : 12, |
| 2963 | _reserved_ : 4, |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2964 | reason : ErrorCode, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2965 | } |
| 2966 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2967 | packet AuthenticationComplete : EventPacket (event_code = AUTHENTICATION_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2968 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2969 | connection_handle : 12, |
| 2970 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2971 | } |
| 2972 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2973 | packet RemoteNameRequestComplete : EventPacket (event_code = REMOTE_NAME_REQUEST_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2974 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2975 | bd_addr : Address, |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 2976 | remote_name : 8[248], // UTF-8 encoded user-friendly descriptive name |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2977 | } |
| 2978 | |
| 2979 | enum EncryptionEnabled : 8 { |
| 2980 | OFF = 0x00, |
| 2981 | ON = 0x01, // E0 for BR/EDR and AES-CCM for LE |
| 2982 | BR_EDR_AES_CCM = 0x02, |
| 2983 | } |
| 2984 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2985 | packet EncryptionChange : EventPacket (event_code = ENCRYPTION_CHANGE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2986 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2987 | connection_handle : 12, |
| 2988 | _reserved_ : 4, |
| 2989 | encryption_enabled : EncryptionEnabled, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2990 | } |
| 2991 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2992 | packet ChangeConnectionLinkKeyComplete : EventPacket (event_code = CHANGE_CONNECTION_LINK_KEY_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2993 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2994 | connection_handle : 12, |
| 2995 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 2996 | } |
| 2997 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 2998 | packet MasterLinkKeyComplete : EventPacket (event_code = MASTER_LINK_KEY_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 2999 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3000 | connection_handle : 12, |
| 3001 | _reserved_ : 4, |
| 3002 | key_flag : KeyFlag, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3003 | } |
| 3004 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3005 | packet ReadRemoteSupportedFeaturesComplete : EventPacket (event_code = READ_REMOTE_SUPPORTED_FEATURES_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3006 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3007 | connection_handle : 12, |
| 3008 | _reserved_ : 4, |
| 3009 | lmp_features : 64, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3010 | } |
| 3011 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3012 | packet ReadRemoteVersionInformationComplete : EventPacket (event_code = READ_REMOTE_VERSION_INFORMATION_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3013 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3014 | connection_handle : 12, |
| 3015 | _reserved_ : 4, |
| 3016 | version : 8, |
Chienyuan | f58d511 | 2019-11-14 20:25:26 +0800 | [diff] [blame] | 3017 | manufacturer_name : 16, |
| 3018 | sub_version : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3019 | } |
| 3020 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3021 | packet QosSetupComplete : EventPacket (event_code = QOS_SETUP_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3022 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3023 | connection_handle : 12, |
| 3024 | _reserved_ : 4, |
| 3025 | _reserved_ : 8, |
| 3026 | service_type : ServiceType, |
| 3027 | token_rate : 32, // Octets/s |
| 3028 | peak_bandwidth : 32, // Octets/s |
| 3029 | latency : 32, // Octets/s |
| 3030 | delay_variation : 32, // microseconds |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3031 | } |
| 3032 | |
| 3033 | // Command Complete and Command Status Events are implemented above Commands. |
| 3034 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3035 | packet HardwareError : EventPacket (event_code = HARDWARE_ERROR){ |
| 3036 | hardware_code : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3037 | } |
| 3038 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3039 | packet FlushOccurred : EventPacket (event_code = FLUSH_OCCURRED){ |
| 3040 | connection_handle : 12, |
| 3041 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3042 | } |
| 3043 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3044 | packet RoleChange : EventPacket (event_code = ROLE_CHANGE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3045 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3046 | bd_addr : Address, |
| 3047 | new_role : Role, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3048 | } |
| 3049 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3050 | packet NumberOfCompletedPackets : EventPacket (event_code = NUMBER_OF_COMPLETED_PACKETS){ |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 3051 | _count_(completed_packets) : 8, |
| 3052 | completed_packets : CompletedPackets[], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3053 | } |
| 3054 | |
| 3055 | enum Mode : 8 { |
| 3056 | ACTIVE = 0x00, |
| 3057 | HOLD = 0x01, |
| 3058 | SNIFF = 0x02, |
| 3059 | } |
| 3060 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3061 | packet ModeChange : EventPacket (event_code = MODE_CHANGE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3062 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3063 | connection_handle : 12, |
| 3064 | _reserved_ : 4, |
| 3065 | current_mode : Mode, |
| 3066 | interval : 16, // 0x002 - 0xFFFE (1.25ms - 40.9s) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3067 | } |
| 3068 | |
Martin Brabham | 9f4120f | 2019-11-07 12:12:17 -0800 | [diff] [blame] | 3069 | struct ZeroKeyAndAddress { |
| 3070 | address : Address, |
| 3071 | _fixed_ = 0 : 64, |
| 3072 | _fixed_ = 0 : 64, |
| 3073 | } |
| 3074 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3075 | packet ReturnLinkKeys : EventPacket (event_code = RETURN_LINK_KEYS){ |
Martin Brabham | 9f4120f | 2019-11-07 12:12:17 -0800 | [diff] [blame] | 3076 | _count_(keys) : 8, |
| 3077 | keys : ZeroKeyAndAddress[], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3078 | } |
| 3079 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3080 | packet PinCodeRequest : EventPacket (event_code = PIN_CODE_REQUEST){ |
| 3081 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3082 | } |
| 3083 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3084 | packet LinkKeyRequest : EventPacket (event_code = LINK_KEY_REQUEST){ |
| 3085 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3086 | } |
| 3087 | |
Martin Brabham | 9f4120f | 2019-11-07 12:12:17 -0800 | [diff] [blame] | 3088 | enum KeyType : 8 { |
| 3089 | COMBINATION = 0x00, |
| 3090 | DEBUG_COMBINATION = 0x03, |
| 3091 | UNAUTHENTICATED_P192 = 0x04, |
| 3092 | AUTHENTICATED_P192 = 0x05, |
| 3093 | CHANGED = 0x06, |
| 3094 | UNAUTHENTICATED_P256 = 0x07, |
| 3095 | AUTHENTICATED_P256 = 0x08, |
| 3096 | } |
| 3097 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3098 | packet LinkKeyNotification : EventPacket (event_code = LINK_KEY_NOTIFICATION){ |
Martin Brabham | 9f4120f | 2019-11-07 12:12:17 -0800 | [diff] [blame] | 3099 | bd_addr : Address, |
| 3100 | link_key : 8[16], |
| 3101 | key_type : KeyType, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3102 | } |
| 3103 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3104 | packet LoopbackCommand : EventPacket (event_code = LOOPBACK_COMMAND){ |
| 3105 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3106 | } |
| 3107 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3108 | packet DataBufferOverflow : EventPacket (event_code = DATA_BUFFER_OVERFLOW){ |
| 3109 | link_type : LinkType, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3110 | } |
| 3111 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3112 | packet MaxSlotsChange : EventPacket (event_code = MAX_SLOTS_CHANGE){ |
| 3113 | connection_handle : 12, |
| 3114 | _reserved_ : 4, |
| 3115 | lmp_max_slots : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3116 | } |
| 3117 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3118 | packet ReadClockOffsetComplete : EventPacket (event_code = READ_CLOCK_OFFSET_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3119 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3120 | connection_handle : 12, |
| 3121 | _reserved_ : 4, |
| 3122 | clock_offset : 15, |
| 3123 | _reserved_ : 1, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3124 | } |
| 3125 | |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 3126 | packet ConnectionPacketTypeChanged : EventPacket (event_code = CONNECTION_PACKET_TYPE_CHANGED){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3127 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3128 | connection_handle : 12, |
| 3129 | _reserved_ : 4, |
| 3130 | packet_type : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3131 | } |
| 3132 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3133 | packet QosViolation : EventPacket (event_code = QOS_VIOLATION){ |
| 3134 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3135 | } |
| 3136 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3137 | packet PageScanRepetitionModeChange : EventPacket (event_code = PAGE_SCAN_REPETITION_MODE_CHANGE){ |
| 3138 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3139 | } |
| 3140 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3141 | packet FlowSpecificationComplete : EventPacket (event_code = FLOW_SPECIFICATION_COMPLETE){ |
Chienyuan | 7eb2365 | 2019-09-11 16:37:30 +0800 | [diff] [blame] | 3142 | status : ErrorCode, |
| 3143 | connection_handle : 12, |
| 3144 | _reserved_ : 4, |
| 3145 | _reserved_ : 8, |
| 3146 | flow_direction : FlowDirection, |
| 3147 | service_type : ServiceType, |
| 3148 | token_rate : 32, // Octets/s |
| 3149 | token_bucket_size : 32, |
| 3150 | peak_bandwidth : 32, // Octets/s |
| 3151 | access_latency : 32, // Octets/s |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3152 | } |
| 3153 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3154 | packet InquiryResultWithRssi : EventPacket (event_code = INQUIRY_RESULT_WITH_RSSI){ |
| 3155 | num_responses : 8, |
| 3156 | address : Address, |
| 3157 | page_scan_repetition_mode : PageScanRepetitionMode, |
| 3158 | _reserved_ : 8, |
| 3159 | class_of_device : ClassOfDevice, |
| 3160 | clock_offset : 15, |
| 3161 | _reserved_ : 1, |
| 3162 | rssi : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3163 | } |
| 3164 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3165 | packet ReadRemoteExtendedFeaturesComplete : EventPacket (event_code = READ_REMOTE_EXTENDED_FEATURES_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3166 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3167 | connection_handle : 12, |
| 3168 | _reserved_ : 4, |
| 3169 | page_number : 8, |
| 3170 | maximum_page_number : 8, |
| 3171 | extended_lmp_features : 64, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3172 | } |
| 3173 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3174 | packet SynchronousConnectionComplete : EventPacket (event_code = SYNCHRONOUS_CONNECTION_COMPLETE){ |
| 3175 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3176 | } |
| 3177 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3178 | packet SynchronousConnectionChanged : EventPacket (event_code = SYNCHRONOUS_CONNECTION_CHANGED){ |
| 3179 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3180 | } |
| 3181 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3182 | packet SniffSubratingEvent : EventPacket (event_code = SNIFF_SUBRATING){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3183 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3184 | connection_handle : 12, |
| 3185 | _reserved_ : 4, |
| 3186 | maximum_transmit_latency : 16, // 0x000 - 0xFFFE (0s - 40.9s) |
| 3187 | maximum_receive_latency : 16, // 0x000 - 0xFFFE (0s - 40.9s) |
| 3188 | minimum_remote_timeout : 16, // 0x000 - 0xFFFE (0s - 40.9s) |
Myles Watson | d68d6ce | 2019-05-22 10:52:49 -0700 | [diff] [blame] | 3189 | minimum_local_timeout : 16, // 0x000 - 0xFFFE (0s - 40.9s) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3190 | } |
| 3191 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3192 | packet ExtendedInquiryResult : EventPacket (event_code = EXTENDED_INQUIRY_RESULT) { |
| 3193 | _fixed_ = 0x01 : 8, |
| 3194 | address : Address, |
| 3195 | page_scan_repetition_mode : PageScanRepetitionMode, |
| 3196 | _reserved_ : 8, |
| 3197 | class_of_device : ClassOfDevice, |
| 3198 | clock_offset : 15, |
| 3199 | _reserved_ : 1, |
| 3200 | rssi : 8, |
Myles Watson | 7a0dc39 | 2019-07-09 15:24:54 -0700 | [diff] [blame] | 3201 | extended_inquiry_response : GapData[], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3202 | } |
| 3203 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3204 | packet EncryptionKeyRefreshComplete : EventPacket (event_code = ENCRYPTION_KEY_REFRESH_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3205 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3206 | connection_handle : 12, |
| 3207 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3208 | } |
| 3209 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3210 | packet IoCapabilityRequest : EventPacket (event_code = IO_CAPABILITY_REQUEST){ |
| 3211 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3212 | } |
| 3213 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3214 | packet IoCapabilityResponse : EventPacket (event_code = IO_CAPABILITY_RESPONSE){ |
| 3215 | bd_addr : Address, |
| 3216 | io_capability : IoCapability, |
| 3217 | oob_data_present : OobDataPresent, |
| 3218 | authentication_requirements : AuthenticationRequirements, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3219 | } |
| 3220 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3221 | packet UserConfirmationRequest : EventPacket (event_code = USER_CONFIRMATION_REQUEST){ |
| 3222 | bd_addr : Address, |
| 3223 | numeric_value : 20, // 0x00000-0xF423F (000000 - 999999) |
| 3224 | _reserved_ : 12, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3225 | } |
| 3226 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3227 | packet UserPasskeyRequest : EventPacket (event_code = USER_PASSKEY_REQUEST){ |
| 3228 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3229 | } |
| 3230 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3231 | packet RemoteOobDataRequest : EventPacket (event_code = REMOTE_OOB_DATA_REQUEST){ |
| 3232 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3233 | } |
| 3234 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3235 | packet SimplePairingComplete : EventPacket (event_code = SIMPLE_PAIRING_COMPLETE){ |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3236 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3237 | bd_addr : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3238 | } |
| 3239 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3240 | packet LinkSupervisionTimeoutChanged : EventPacket (event_code = LINK_SUPERVISION_TIMEOUT_CHANGED){ |
| 3241 | connection_handle : 12, |
| 3242 | _reserved_ : 4, |
| 3243 | link_supervision_timeout : 16, // 0x001-0xFFFF (0.625ms-40.9s) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3244 | } |
| 3245 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3246 | packet EnhancedFlushComplete : EventPacket (event_code = ENHANCED_FLUSH_COMPLETE){ |
| 3247 | connection_handle : 12, |
| 3248 | _reserved_ : 4, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3249 | } |
| 3250 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3251 | packet UserPasskeyNotification : EventPacket (event_code = USER_PASSKEY_NOTIFICATION){ |
| 3252 | bd_addr : Address, |
| 3253 | passkey : 20, // 0x00000-0xF423F (000000 - 999999) |
| 3254 | _reserved_ : 12, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3255 | } |
| 3256 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3257 | packet KeypressNotification : EventPacket (event_code = KEYPRESS_NOTIFICATION){ |
| 3258 | bd_addr : Address, |
| 3259 | notification_type : KeypressNotificationType, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3260 | } |
| 3261 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3262 | packet RemoteHostSupportedFeaturesNotification : EventPacket (event_code = REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION){ |
| 3263 | bd_addr : Address, |
| 3264 | host_supported_features : 64, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3265 | } |
| 3266 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3267 | packet LeMetaEvent : EventPacket (event_code = LE_META_EVENT) { |
| 3268 | subevent_code : SubeventCode, |
| 3269 | _payload_, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3270 | } |
| 3271 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3272 | packet NumberOfCompletedDataBlocks : EventPacket (event_code = NUMBER_OF_COMPLETED_DATA_BLOCKS){ |
| 3273 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3274 | } |
| 3275 | |
| 3276 | // LE Events |
| 3277 | |
| 3278 | enum MasterClockAccuracy : 8 { |
| 3279 | PPM_500 = 0x00, |
| 3280 | PPM_250 = 0x01, |
| 3281 | PPM_150 = 0x02, |
| 3282 | PPM_100 = 0x03, |
| 3283 | PPM_75 = 0x04, |
| 3284 | PPM_50 = 0x05, |
| 3285 | PPM_30 = 0x06, |
| 3286 | PPM_20 = 0x07, |
| 3287 | } |
| 3288 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3289 | packet LeConnectionComplete : LeMetaEvent (subevent_code = CONNECTION_COMPLETE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3290 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3291 | connection_handle : 12, |
| 3292 | _reserved_ : 4, |
| 3293 | role : Role, |
Chienyuan | c068961 | 2019-10-03 16:39:02 +0800 | [diff] [blame] | 3294 | peer_address_type : AddressType, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3295 | peer_address : Address, |
| 3296 | conn_interval : 16, // 0x006 - 0x0C80 (7.5ms - 4000ms) |
| 3297 | conn_latency : 16, // Number of connection events |
| 3298 | supervision_timeout : 16, // 0x000A to 0x0C80 (100ms to 32s) |
| 3299 | master_clock_accuracy : MasterClockAccuracy, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3300 | } |
| 3301 | |
Myles Watson | 7a0dc39 | 2019-07-09 15:24:54 -0700 | [diff] [blame] | 3302 | struct LeAdvertisingReport { |
| 3303 | event_type : AdvertisingEventType, |
| 3304 | address_type : AddressType, |
| 3305 | address : Address, |
| 3306 | _size_(advertising_data) : 8, |
| 3307 | advertising_data : GapData[], |
| 3308 | rssi : 8, |
| 3309 | } |
| 3310 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3311 | packet LeAdvertisingReport : LeMetaEvent (subevent_code = ADVERTISING_REPORT) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 3312 | _count_(advertising_reports) : 8, |
| 3313 | advertising_reports : LeAdvertisingReport[], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3314 | } |
| 3315 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3316 | packet LeConnectionUpdateComplete : LeMetaEvent (subevent_code = CONNECTION_UPDATE_COMPLETE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3317 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3318 | connection_handle : 12, |
| 3319 | _reserved_ : 4, |
| 3320 | conn_interval : 16, // 0x006 - 0x0C80 (7.5ms - 4000ms) |
| 3321 | conn_latency : 16, // Number of connection events |
| 3322 | supervision_timeout : 16, // 0x000A to 0x0C80 (100ms to 32s) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3323 | } |
| 3324 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3325 | packet LeReadRemoteFeaturesComplete : LeMetaEvent (subevent_code = READ_REMOTE_FEATURES_COMPLETE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3326 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3327 | connection_handle : 12, |
| 3328 | _reserved_ : 4, |
| 3329 | le_features : 64, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3330 | } |
| 3331 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3332 | packet LeLongTermKeyRequest : LeMetaEvent (subevent_code = LONG_TERM_KEY_REQUEST) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3333 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3334 | connection_handle : 12, |
| 3335 | _reserved_ : 4, |
| 3336 | random_number : 64, |
| 3337 | encrypted_diversifier : 16, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3338 | } |
| 3339 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3340 | packet LeRemoteConnectionParameterRequest : LeMetaEvent (subevent_code = REMOTE_CONNECTION_PARAMETER_REQUEST) { |
| 3341 | connection_handle : 12, |
| 3342 | _reserved_ : 4, |
| 3343 | interval_min : 16, // 0x006 - 0x0C80 (7.5ms - 4s) |
| 3344 | interval_max : 16, // 0x006 - 0x0C80 (7.5ms - 4s) |
| 3345 | latency : 16, // Number of connection events (0x0000 to 0x01f3 (499) |
| 3346 | timeout : 16, // 0x000A to 0x0C80 (100ms to 32s) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3347 | } |
| 3348 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3349 | packet LeDataLengthChange : LeMetaEvent (subevent_code = DATA_LENGTH_CHANGE) { |
| 3350 | connection_handle : 12, |
| 3351 | _reserved_ : 4, |
| 3352 | max_tx_octets : 16, // 0x001B - 0x00FB |
| 3353 | max_tx_time : 16, // 0x0148 - 0x4290 |
| 3354 | max_rx_octets : 16, // 0x001B - 0x00FB |
| 3355 | max_rx_time : 16, // 0x0148 - 0x4290 |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3356 | } |
| 3357 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3358 | packet ReadLocalP256PublicKeyComplete : LeMetaEvent (subevent_code = READ_LOCAL_P256_PUBLIC_KEY_COMPLETE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3359 | status : ErrorCode, |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 3360 | local_p_256_public_key : 8[64], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3361 | } |
| 3362 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3363 | packet GenerateDhKeyComplete : LeMetaEvent (subevent_code = GENERATE_DHKEY_COMPLETE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3364 | status : ErrorCode, |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 3365 | dh_key : 8[32], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3366 | } |
| 3367 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3368 | packet LeEnhancedConnectionComplete : LeMetaEvent (subevent_code = ENHANCED_CONNECTION_COMPLETE) { |
Myles Watson | 38ea5ac | 2019-05-08 16:15:01 -0700 | [diff] [blame] | 3369 | status : ErrorCode, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3370 | connection_handle : 12, |
| 3371 | _reserved_ : 4, |
| 3372 | role : Role, |
Chienyuan | c068961 | 2019-10-03 16:39:02 +0800 | [diff] [blame] | 3373 | peer_address_type : AddressType, |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3374 | peer_address : Address, |
| 3375 | local_resolvable_private_address : Address, |
| 3376 | peer_resolvable_private_address : Address, |
| 3377 | conn_interval : 16, // 0x006 - 0x0C80 (7.5ms - 4000ms) |
| 3378 | conn_latency : 16, // Number of connection events |
| 3379 | supervision_timeout : 16, // 0x000A to 0x0C80 (100ms to 32s) |
| 3380 | master_clock_accuracy : MasterClockAccuracy, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3381 | } |
| 3382 | |
| 3383 | enum DirectAdvertisingAddressType : 8 { |
| 3384 | PUBLIC_DEVICE_ADDRESS = 0x00, |
| 3385 | RANDOM_DEVICE_ADDRESS = 0x01, |
| 3386 | PUBLIC_IDENTITY_ADDRESS = 0x02, |
| 3387 | RANDOM_IDENTITY_ADDRESS = 0x03, |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 3388 | CONTROLLER_UNABLE_TO_RESOLVE = 0xFE, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3389 | NO_ADDRESS = 0xFF, |
| 3390 | } |
| 3391 | |
| 3392 | enum DirectAdvertisingEventType : 8 { |
| 3393 | ADV_DIRECT_IND = 0x01, |
| 3394 | } |
| 3395 | |
| 3396 | enum DirectAddressType : 8 { |
| 3397 | RANDOM_DEVICE_ADDRESS = 0x01, |
| 3398 | } |
| 3399 | |
Myles Watson | 2d23443 | 2019-08-19 13:33:27 -0700 | [diff] [blame] | 3400 | struct LeDirectedAdvertisingReport { |
| 3401 | event_type : DirectAdvertisingEventType, |
| 3402 | address_type : DirectAdvertisingAddressType, |
| 3403 | address : Address, |
| 3404 | direct_address_type : DirectAddressType, |
| 3405 | direct_address : Address, |
| 3406 | rssi : 8, |
| 3407 | } |
| 3408 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3409 | packet LeDirectedAdvertisingReport : LeMetaEvent (subevent_code = DIRECTED_ADVERTISING_REPORT) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 3410 | _count_(advertising_reports) : 8, |
| 3411 | advertising_reports : LeDirectedAdvertisingReport[], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3412 | } |
| 3413 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3414 | packet LePhyUpdateComplete : LeMetaEvent (subevent_code = PHY_UPDATE_COMPLETE) { |
| 3415 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3416 | } |
| 3417 | |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 3418 | enum DataStatus : 2 { |
| 3419 | COMPLETE = 0x0, |
| 3420 | CONTINUING = 0x1, |
| 3421 | TRUNCATED = 0x2, |
| 3422 | RESERVED = 0x3, |
| 3423 | } |
| 3424 | |
| 3425 | enum PrimaryPhyType : 8 { |
| 3426 | LE_1M = 0x01, |
| 3427 | LE_CODED = 0x03, |
| 3428 | } |
| 3429 | |
| 3430 | enum SecondaryPhyType : 8 { |
| 3431 | NO_PACKETS = 0x00, |
| 3432 | LE_1M = 0x01, |
| 3433 | LE_2M = 0x02, |
| 3434 | LE_CODED = 0x03, |
| 3435 | } |
| 3436 | |
| 3437 | |
| 3438 | struct LeExtendedAdvertisingReport { |
| 3439 | connectable : 1, |
| 3440 | scannable : 1, |
| 3441 | directed : 1, |
| 3442 | scan_response : 1, |
| 3443 | data_status : DataStatus, |
| 3444 | _reserved_ : 10, |
| 3445 | address_type : DirectAdvertisingAddressType, |
| 3446 | address : Address, |
| 3447 | primary_phy : PrimaryPhyType, |
| 3448 | secondary_phy : SecondaryPhyType, |
| 3449 | advertising_sid : 4, // SID subfield in the ADI field |
| 3450 | _reserved_ : 4, |
| 3451 | tx_power : 8, |
| 3452 | rssi : 8, // -127 to +20 (0x7F means not available) |
| 3453 | periodic_advertising_interval : 16, // 0x006 to 0xFFFF (7.5 ms to 82s) |
| 3454 | direct_address_type : DirectAdvertisingAddressType, |
| 3455 | direct_address : Address, |
| 3456 | _size_(advertising_data) : 8, |
| 3457 | advertising_data : GapData[], |
| 3458 | } |
| 3459 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3460 | packet LeExtendedAdvertisingReport : LeMetaEvent (subevent_code = EXTENDED_ADVERTISING_REPORT) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 3461 | _count_(advertising_reports) : 8, |
| 3462 | advertising_reports : LeExtendedAdvertisingReport[], |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3463 | } |
| 3464 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3465 | packet LePeriodicAdvertisingSyncEstablished : LeMetaEvent (subevent_code = PERIODIC_ADVERTISING_SYNC_ESTABLISHED) { |
| 3466 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3467 | } |
| 3468 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3469 | packet LePeriodicAdvertisingReport : LeMetaEvent (subevent_code = PERIODIC_ADVERTISING_REPORT) { |
| 3470 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3471 | } |
| 3472 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3473 | packet LePeriodicAdvertisingSyncLost : LeMetaEvent (subevent_code = PERIODIC_ADVERTISING_SYNC_LOST) { |
| 3474 | _payload_, // placeholder (unimplemented) |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3475 | } |
| 3476 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3477 | packet LeScanTimeout : LeMetaEvent (subevent_code = SCAN_TIMEOUT) { |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3478 | } |
| 3479 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3480 | packet LeAdvertisingSetTerminated : LeMetaEvent (subevent_code = ADVERTISING_SET_TERMINATED) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 3481 | status : ErrorCode, |
| 3482 | advertising_handle : 8, |
| 3483 | connection_handle : 12, |
| 3484 | _reserved_ : 4, |
| 3485 | num_completed_extended_advertising_events : 8, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3486 | } |
| 3487 | |
Myles Watson | 1d8aa28 | 2019-04-22 14:16:41 -0700 | [diff] [blame] | 3488 | packet LeScanRequestReceived : LeMetaEvent (subevent_code = SCAN_REQUEST_RECEIVED) { |
Myles Watson | fb2fec7 | 2019-10-22 16:21:44 -0700 | [diff] [blame] | 3489 | advertising_handle : 8, |
| 3490 | scanner_address_type : AddressType, |
| 3491 | scanner_address : Address, |
Myles Watson | cc57c6b | 2019-03-25 15:24:43 -0700 | [diff] [blame] | 3492 | } |