1941b3855SMatthias Ringwald /* 2941b3855SMatthias Ringwald * Copyright (C) 2015 BlueKitchen GmbH 3941b3855SMatthias Ringwald * 4941b3855SMatthias Ringwald * Redistribution and use in source and binary forms, with or without 5941b3855SMatthias Ringwald * modification, are permitted provided that the following conditions 6941b3855SMatthias Ringwald * are met: 7941b3855SMatthias Ringwald * 8941b3855SMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 9941b3855SMatthias Ringwald * notice, this list of conditions and the following disclaimer. 10941b3855SMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11941b3855SMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 12941b3855SMatthias Ringwald * documentation and/or other materials provided with the distribution. 13941b3855SMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 14941b3855SMatthias Ringwald * contributors may be used to endorse or promote products derived 15941b3855SMatthias Ringwald * from this software without specific prior written permission. 16941b3855SMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 17941b3855SMatthias Ringwald * personal benefit and not for any commercial purpose or for 18941b3855SMatthias Ringwald * monetary gain. 19941b3855SMatthias Ringwald * 20941b3855SMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21941b3855SMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22941b3855SMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23941b3855SMatthias Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24941b3855SMatthias Ringwald * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25941b3855SMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26941b3855SMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27941b3855SMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28941b3855SMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29941b3855SMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30941b3855SMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31941b3855SMatthias Ringwald * SUCH DAMAGE. 32941b3855SMatthias Ringwald * 33941b3855SMatthias Ringwald * Please inquire about commercial licensing options at 34941b3855SMatthias Ringwald * [email protected] 35941b3855SMatthias Ringwald * 36941b3855SMatthias Ringwald */ 37941b3855SMatthias Ringwald 38941b3855SMatthias Ringwald /* 39941b3855SMatthias Ringwald * btstack-defines.h 40941b3855SMatthias Ringwald * 41941b3855SMatthias Ringwald * BTstack definitions, events, and error codes */ 42941b3855SMatthias Ringwald 43941b3855SMatthias Ringwald #ifndef __BTSTACK_DEFINES_H 44941b3855SMatthias Ringwald #define __BTSTACK_DEFINES_H 45941b3855SMatthias Ringwald 46f7a05cdaSMatthias Ringwald /** 47f7a05cdaSMatthias Ringwald * Address types 48f7a05cdaSMatthias Ringwald * @note: BTstack uses a custom addr type to refer to classic ACL and SCO devices 49f7a05cdaSMatthias Ringwald */ 50f7a05cdaSMatthias Ringwald typedef enum { 51f7a05cdaSMatthias Ringwald BD_ADDR_TYPE_LE_PUBLIC = 0, 52f7a05cdaSMatthias Ringwald BD_ADDR_TYPE_LE_RANDOM = 1, 53f7a05cdaSMatthias Ringwald BD_ADDR_TYPE_SCO = 0xfe, 54f7a05cdaSMatthias Ringwald BD_ADDR_TYPE_CLASSIC = 0xff, 55f7a05cdaSMatthias Ringwald BD_ADDR_TYPE_UNKNOWN = 0xfe 56f7a05cdaSMatthias Ringwald } bd_addr_type_t; 57f7a05cdaSMatthias Ringwald 58941b3855SMatthias Ringwald // DEFINES 59941b3855SMatthias Ringwald 60941b3855SMatthias Ringwald #define DAEMON_EVENT_PACKET 0x05 61941b3855SMatthias Ringwald 62941b3855SMatthias Ringwald // L2CAP data 63941b3855SMatthias Ringwald #define L2CAP_DATA_PACKET 0x06 64941b3855SMatthias Ringwald 65941b3855SMatthias Ringwald // RFCOMM data 66941b3855SMatthias Ringwald #define RFCOMM_DATA_PACKET 0x07 67941b3855SMatthias Ringwald 68941b3855SMatthias Ringwald // Attribute protocol data 69941b3855SMatthias Ringwald #define ATT_DATA_PACKET 0x08 70941b3855SMatthias Ringwald 71941b3855SMatthias Ringwald // Security Manager protocol data 72941b3855SMatthias Ringwald #define SM_DATA_PACKET 0x09 73941b3855SMatthias Ringwald 74941b3855SMatthias Ringwald // SDP query result 75941b3855SMatthias Ringwald // format: type (8), record_id (16), attribute_id (16), attribute_length (16), attribute_value (max 1k) 76941b3855SMatthias Ringwald #define SDP_CLIENT_PACKET 0x0a 77941b3855SMatthias Ringwald 78941b3855SMatthias Ringwald // BNEP data 79941b3855SMatthias Ringwald #define BNEP_DATA_PACKET 0x0b 80941b3855SMatthias Ringwald 81941b3855SMatthias Ringwald // Unicast Connectionless Data 82941b3855SMatthias Ringwald #define UCD_DATA_PACKET 0x0c 83941b3855SMatthias Ringwald 84941b3855SMatthias Ringwald // debug log messages 85941b3855SMatthias Ringwald #define LOG_MESSAGE_PACKET 0xfc 86941b3855SMatthias Ringwald 87941b3855SMatthias Ringwald 88941b3855SMatthias Ringwald // ERRORS 89941b3855SMatthias Ringwald 90941b3855SMatthias Ringwald // last error code in 2.1 is 0x38 - we start with 0x50 for BTstack errors 91941b3855SMatthias Ringwald #define BTSTACK_CONNECTION_TO_BTDAEMON_FAILED 0x50 92941b3855SMatthias Ringwald #define BTSTACK_ACTIVATION_FAILED_SYSTEM_BLUETOOTH 0x51 93941b3855SMatthias Ringwald #define BTSTACK_ACTIVATION_POWERON_FAILED 0x52 94941b3855SMatthias Ringwald #define BTSTACK_ACTIVATION_FAILED_UNKNOWN 0x53 95941b3855SMatthias Ringwald #define BTSTACK_NOT_ACTIVATED 0x54 96941b3855SMatthias Ringwald #define BTSTACK_BUSY 0x55 97941b3855SMatthias Ringwald #define BTSTACK_MEMORY_ALLOC_FAILED 0x56 98941b3855SMatthias Ringwald #define BTSTACK_ACL_BUFFERS_FULL 0x57 99941b3855SMatthias Ringwald 100941b3855SMatthias Ringwald // l2cap errors - enumeration by the command that created them 101941b3855SMatthias Ringwald #define L2CAP_COMMAND_REJECT_REASON_COMMAND_NOT_UNDERSTOOD 0x60 102941b3855SMatthias Ringwald #define L2CAP_COMMAND_REJECT_REASON_SIGNALING_MTU_EXCEEDED 0x61 103941b3855SMatthias Ringwald #define L2CAP_COMMAND_REJECT_REASON_INVALID_CID_IN_REQUEST 0x62 104941b3855SMatthias Ringwald 105941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_SUCCESSFUL 0x63 106941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_PENDING 0x64 107941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_PSM 0x65 108941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_SECURITY 0x66 109941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_RESOURCES 0x67 110941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_RTX_TIMEOUT 0x68 111941b3855SMatthias Ringwald 112941b3855SMatthias Ringwald #define L2CAP_SERVICE_ALREADY_REGISTERED 0x69 113941b3855SMatthias Ringwald #define L2CAP_DATA_LEN_EXCEEDS_REMOTE_MTU 0x6A 114941b3855SMatthias Ringwald 115941b3855SMatthias Ringwald #define RFCOMM_MULTIPLEXER_STOPPED 0x70 116941b3855SMatthias Ringwald #define RFCOMM_CHANNEL_ALREADY_REGISTERED 0x71 117941b3855SMatthias Ringwald #define RFCOMM_NO_OUTGOING_CREDITS 0x72 118941b3855SMatthias Ringwald #define RFCOMM_AGGREGATE_FLOW_OFF 0x73 119941b3855SMatthias Ringwald #define RFCOMM_DATA_LEN_EXCEEDS_MTU 0x74 120941b3855SMatthias Ringwald 121941b3855SMatthias Ringwald #define SDP_HANDLE_ALREADY_REGISTERED 0x80 122941b3855SMatthias Ringwald #define SDP_QUERY_INCOMPLETE 0x81 123941b3855SMatthias Ringwald #define SDP_SERVICE_NOT_FOUND 0x82 124941b3855SMatthias Ringwald #define SDP_HANDLE_INVALID 0x83 125941b3855SMatthias Ringwald 126941b3855SMatthias Ringwald #define ATT_HANDLE_VALUE_INDICATION_IN_PORGRESS 0x90 127941b3855SMatthias Ringwald #define ATT_HANDLE_VALUE_INDICATION_TIMEOUT 0x91 128941b3855SMatthias Ringwald 129941b3855SMatthias Ringwald #define GATT_CLIENT_NOT_CONNECTED 0x93 130941b3855SMatthias Ringwald #define GATT_CLIENT_BUSY 0x94 131616edd56SMatthias Ringwald #define GATT_CLIENT_IN_WRONG_STATE 0x95 132616edd56SMatthias Ringwald #define GATT_CLIENT_DIFFERENT_CONTEXT_FOR_ADDRESS_ALREADY_EXISTS 0x96 133616edd56SMatthias Ringwald #define GATT_CLIENT_VALUE_TOO_LONG 0x97 134616edd56SMatthias Ringwald #define GATT_CLIENT_CHARACTERISTIC_NOTIFICATION_NOT_SUPPORTED 0x98 135616edd56SMatthias Ringwald #define GATT_CLIENT_CHARACTERISTIC_INDICATION_NOT_SUPPORTED 0x99 136941b3855SMatthias Ringwald 137941b3855SMatthias Ringwald #define BNEP_SERVICE_ALREADY_REGISTERED 0xA0 138941b3855SMatthias Ringwald #define BNEP_CHANNEL_NOT_CONNECTED 0xA1 139941b3855SMatthias Ringwald #define BNEP_DATA_LEN_EXCEEDS_MTU 0xA2 140941b3855SMatthias Ringwald 141b3f90e25SMatthias Ringwald // COMMANDS 142b3f90e25SMatthias Ringwald 143b3f90e25SMatthias Ringwald #define OGF_BTSTACK 0x3d 144b3f90e25SMatthias Ringwald 145b3f90e25SMatthias Ringwald // cmds for BTstack 146b3f90e25SMatthias Ringwald // get state: @returns HCI_STATE 147b3f90e25SMatthias Ringwald #define BTSTACK_GET_STATE 0x01 148b3f90e25SMatthias Ringwald 149b3f90e25SMatthias Ringwald // set power mode: @param HCI_POWER_MODE 150b3f90e25SMatthias Ringwald #define BTSTACK_SET_POWER_MODE 0x02 151b3f90e25SMatthias Ringwald 152b3f90e25SMatthias Ringwald // set capture mode: @param on 153b3f90e25SMatthias Ringwald #define BTSTACK_SET_ACL_CAPTURE_MODE 0x03 154b3f90e25SMatthias Ringwald 155b3f90e25SMatthias Ringwald // get BTstack version 156b3f90e25SMatthias Ringwald #define BTSTACK_GET_VERSION 0x04 157b3f90e25SMatthias Ringwald 158b3f90e25SMatthias Ringwald // get system Bluetooth state 159b3f90e25SMatthias Ringwald #define BTSTACK_GET_SYSTEM_BLUETOOTH_ENABLED 0x05 160b3f90e25SMatthias Ringwald 161b3f90e25SMatthias Ringwald // set system Bluetooth state 162b3f90e25SMatthias Ringwald #define BTSTACK_SET_SYSTEM_BLUETOOTH_ENABLED 0x06 163b3f90e25SMatthias Ringwald 164b3f90e25SMatthias Ringwald // enable inquiry scan for this client 165b3f90e25SMatthias Ringwald #define BTSTACK_SET_DISCOVERABLE 0x07 166b3f90e25SMatthias Ringwald 167b3f90e25SMatthias Ringwald // set global Bluetooth state 168b3f90e25SMatthias Ringwald #define BTSTACK_SET_BLUETOOTH_ENABLED 0x08 169b3f90e25SMatthias Ringwald 170b3f90e25SMatthias Ringwald // create l2cap channel: @param bd_addr(48), psm (16) 171b3f90e25SMatthias Ringwald #define L2CAP_CREATE_CHANNEL 0x20 172b3f90e25SMatthias Ringwald 173b3f90e25SMatthias Ringwald // disconnect l2cap disconnect, @param channel(16), reason(8) 174b3f90e25SMatthias Ringwald #define L2CAP_DISCONNECT 0x21 175b3f90e25SMatthias Ringwald 176b3f90e25SMatthias Ringwald // register l2cap service: @param psm(16), mtu (16) 177b3f90e25SMatthias Ringwald #define L2CAP_REGISTER_SERVICE 0x22 178b3f90e25SMatthias Ringwald 179b3f90e25SMatthias Ringwald // unregister l2cap disconnect, @param psm(16) 180b3f90e25SMatthias Ringwald #define L2CAP_UNREGISTER_SERVICE 0x23 181b3f90e25SMatthias Ringwald 182b3f90e25SMatthias Ringwald // accept connection @param bd_addr(48), dest cid (16) 183b3f90e25SMatthias Ringwald #define L2CAP_ACCEPT_CONNECTION 0x24 184b3f90e25SMatthias Ringwald 185b3f90e25SMatthias Ringwald // decline l2cap disconnect,@param bd_addr(48), dest cid (16), reason(8) 186b3f90e25SMatthias Ringwald #define L2CAP_DECLINE_CONNECTION 0x25 187b3f90e25SMatthias Ringwald 188b3f90e25SMatthias Ringwald // create l2cap channel: @param bd_addr(48), psm (16), mtu (16) 189b3f90e25SMatthias Ringwald #define L2CAP_CREATE_CHANNEL_MTU 0x26 190b3f90e25SMatthias Ringwald 191b3f90e25SMatthias Ringwald // register SDP Service Record: service record (size) 192b3f90e25SMatthias Ringwald #define SDP_REGISTER_SERVICE_RECORD 0x30 193b3f90e25SMatthias Ringwald 194b3f90e25SMatthias Ringwald // unregister SDP Service Record 195b3f90e25SMatthias Ringwald #define SDP_UNREGISTER_SERVICE_RECORD 0x31 196b3f90e25SMatthias Ringwald 197b3f90e25SMatthias Ringwald // Get remote RFCOMM services 198b3f90e25SMatthias Ringwald #define SDP_CLIENT_QUERY_RFCOMM_SERVICES 0x32 199b3f90e25SMatthias Ringwald 200b3f90e25SMatthias Ringwald // Get remote SDP services 201b3f90e25SMatthias Ringwald #define SDP_CLIENT_QUERY_SERVICES 0x33 202b3f90e25SMatthias Ringwald 203b3f90e25SMatthias Ringwald // RFCOMM "HCI" Commands 204b3f90e25SMatthias Ringwald #define RFCOMM_CREATE_CHANNEL 0x40 205b3f90e25SMatthias Ringwald #define RFCOMM_DISCONNECT 0x41 206b3f90e25SMatthias Ringwald #define RFCOMM_REGISTER_SERVICE 0x42 207b3f90e25SMatthias Ringwald #define RFCOMM_UNREGISTER_SERVICE 0x43 208b3f90e25SMatthias Ringwald #define RFCOMM_ACCEPT_CONNECTION 0x44 209b3f90e25SMatthias Ringwald #define RFCOMM_DECLINE_CONNECTION 0x45 210b3f90e25SMatthias Ringwald #define RFCOMM_PERSISTENT_CHANNEL 0x46 211b3f90e25SMatthias Ringwald #define RFCOMM_CREATE_CHANNEL_WITH_CREDITS 0x47 212b3f90e25SMatthias Ringwald #define RFCOMM_REGISTER_SERVICE_WITH_CREDITS 0x48 213b3f90e25SMatthias Ringwald #define RFCOMM_GRANT_CREDITS 0x49 214b3f90e25SMatthias Ringwald 215b3f90e25SMatthias Ringwald // GAP Classic 0x50 216b3f90e25SMatthias Ringwald #define GAP_DISCONNECT 0x50 217b3f90e25SMatthias Ringwald 218b3f90e25SMatthias Ringwald // GAP LE 0x60 219b3f90e25SMatthias Ringwald #define GAP_LE_SCAN_START 0x60 220b3f90e25SMatthias Ringwald #define GAP_LE_SCAN_STOP 0x61 221b3f90e25SMatthias Ringwald #define GAP_LE_CONNECT 0x62 222b3f90e25SMatthias Ringwald #define GAP_LE_CONNECT_CANCEL 0x63 223b3f90e25SMatthias Ringwald #define GAP_LE_SET_SCAN_PARAMETERS 0x64 224b3f90e25SMatthias Ringwald 225b3f90e25SMatthias Ringwald // GATT (Client) 0x70 226b3f90e25SMatthias Ringwald #define GATT_DISCOVER_ALL_PRIMARY_SERVICES 0x70 227b3f90e25SMatthias Ringwald #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID16 0x71 228b3f90e25SMatthias Ringwald #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID128 0x72 229b3f90e25SMatthias Ringwald #define GATT_FIND_INCLUDED_SERVICES_FOR_SERVICE 0x73 230b3f90e25SMatthias Ringwald #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE 0x74 231b3f90e25SMatthias Ringwald #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE_BY_UUID128 0x75 232b3f90e25SMatthias Ringwald #define GATT_DISCOVER_CHARACTERISTIC_DESCRIPTORS 0x76 233b3f90e25SMatthias Ringwald #define GATT_READ_VALUE_OF_CHARACTERISTIC 0x77 234b3f90e25SMatthias Ringwald #define GATT_READ_LONG_VALUE_OF_CHARACTERISTIC 0x78 235b3f90e25SMatthias Ringwald #define GATT_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE 0x79 236b3f90e25SMatthias Ringwald #define GATT_WRITE_VALUE_OF_CHARACTERISTIC 0x7A 237b3f90e25SMatthias Ringwald #define GATT_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7B 238b3f90e25SMatthias Ringwald #define GATT_RELIABLE_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7C 239b3f90e25SMatthias Ringwald #define GATT_READ_CHARACTERISTIC_DESCRIPTOR 0X7D 240b3f90e25SMatthias Ringwald #define GATT_READ_LONG_CHARACTERISTIC_DESCRIPTOR 0X7E 241b3f90e25SMatthias Ringwald #define GATT_WRITE_CHARACTERISTIC_DESCRIPTOR 0X7F 242b3f90e25SMatthias Ringwald #define GATT_WRITE_LONG_CHARACTERISTIC_DESCRIPTOR 0X80 243b3f90e25SMatthias Ringwald #define GATT_WRITE_CLIENT_CHARACTERISTIC_CONFIGURATION 0X81 244b3f90e25SMatthias Ringwald #define GATT_GET_MTU 0x82 245b3f90e25SMatthias Ringwald 246941b3855SMatthias Ringwald 247941b3855SMatthias Ringwald // EVENTS 248941b3855SMatthias Ringwald 249941b3855SMatthias Ringwald /** 250941b3855SMatthias Ringwald * @format 1 251941b3855SMatthias Ringwald * @param state 252941b3855SMatthias Ringwald */ 253941b3855SMatthias Ringwald #define BTSTACK_EVENT_STATE 0x60 254941b3855SMatthias Ringwald 255941b3855SMatthias Ringwald // data: event(8), len(8), nr hci connections 256941b3855SMatthias Ringwald #define BTSTACK_EVENT_NR_CONNECTIONS_CHANGED 0x61 257941b3855SMatthias Ringwald 258941b3855SMatthias Ringwald /** 259941b3855SMatthias Ringwald * @format 260941b3855SMatthias Ringwald */ 261941b3855SMatthias Ringwald #define BTSTACK_EVENT_POWERON_FAILED 0x62 262941b3855SMatthias Ringwald 263941b3855SMatthias Ringwald /** 264941b3855SMatthias Ringwald * @format 112 265941b3855SMatthias Ringwald * @param major 266941b3855SMatthias Ringwald * @param minor 267941b3855SMatthias Ringwald @ @param revision 268941b3855SMatthias Ringwald */ 269941b3855SMatthias Ringwald #define BTSTACK_EVENT_VERSION 0x63 270941b3855SMatthias Ringwald 271941b3855SMatthias Ringwald // data: system bluetooth on/off (bool) 272941b3855SMatthias Ringwald #define BTSTACK_EVENT_SYSTEM_BLUETOOTH_ENABLED 0x64 273941b3855SMatthias Ringwald 274941b3855SMatthias Ringwald // data: event (8), len(8), status (8) == 0, address (48), name (1984 bits = 248 bytes) 275941b3855SMatthias Ringwald #define BTSTACK_EVENT_REMOTE_NAME_CACHED 0x65 276941b3855SMatthias Ringwald 277941b3855SMatthias Ringwald // data: discoverable enabled (bool) 278941b3855SMatthias Ringwald #define BTSTACK_EVENT_DISCOVERABLE_ENABLED 0x66 279941b3855SMatthias Ringwald 280941b3855SMatthias Ringwald // Daemon Events used internally 281941b3855SMatthias Ringwald 282941b3855SMatthias Ringwald // data: event(8) 283941b3855SMatthias Ringwald #define DAEMON_EVENT_CONNECTION_OPENED 0x68 284941b3855SMatthias Ringwald 285941b3855SMatthias Ringwald // data: event(8) 286941b3855SMatthias Ringwald #define DAEMON_EVENT_CONNECTION_CLOSED 0x69 287941b3855SMatthias Ringwald 288941b3855SMatthias Ringwald // data: event(8), nr_connections(8) 289941b3855SMatthias Ringwald #define DAEMON_NR_CONNECTIONS_CHANGED 0x6A 290941b3855SMatthias Ringwald 291941b3855SMatthias Ringwald // data: event(8) 292941b3855SMatthias Ringwald #define DAEMON_EVENT_NEW_RFCOMM_CREDITS 0x6B 293941b3855SMatthias Ringwald 294941b3855SMatthias Ringwald // data: event(8) 295941b3855SMatthias Ringwald #define DAEMON_EVENT_HCI_PACKET_SENT 0x6C 296941b3855SMatthias Ringwald 297*3bc639ceSMatthias Ringwald // additional HCI events 298*3bc639ceSMatthias Ringwald /** 299*3bc639ceSMatthias Ringwald * @format B 300*3bc639ceSMatthias Ringwald * @param handle 301*3bc639ceSMatthias Ringwald */ 302*3bc639ceSMatthias Ringwald #define HCI_EVENT_SCO_CAN_SEND_NOW 0x6F 303*3bc639ceSMatthias Ringwald 304941b3855SMatthias Ringwald // L2CAP EVENTS 305941b3855SMatthias Ringwald 306b072ba33SMatthias Ringwald /** 307b072ba33SMatthias Ringwald * @format 1BH222222 308b072ba33SMatthias Ringwald * @param status 309b072ba33SMatthias Ringwald * @param address 310b072ba33SMatthias Ringwald * @param handle 311b072ba33SMatthias Ringwald * @param psm 312b072ba33SMatthias Ringwald * @param local_cid 313b072ba33SMatthias Ringwald * @param remote_cid 314b072ba33SMatthias Ringwald * @param local_mtu 315b072ba33SMatthias Ringwald * @param remote_mtu 316b072ba33SMatthias Ringwald * @param flush_timeout 317b072ba33SMatthias Ringwald */ 318941b3855SMatthias Ringwald #define L2CAP_EVENT_CHANNEL_OPENED 0x70 319941b3855SMatthias Ringwald 320b072ba33SMatthias Ringwald /* 321b072ba33SMatthias Ringwald * @format 2 322b072ba33SMatthias Ringwald * @param local_cid 323b072ba33SMatthias Ringwald */ 324941b3855SMatthias Ringwald #define L2CAP_EVENT_CHANNEL_CLOSED 0x71 325941b3855SMatthias Ringwald 326b072ba33SMatthias Ringwald /** 327b072ba33SMatthias Ringwald * @format 1BH222 328b072ba33SMatthias Ringwald * @param status 329b072ba33SMatthias Ringwald * @param address 330b072ba33SMatthias Ringwald * @param handle 331b072ba33SMatthias Ringwald * @param psm 332b072ba33SMatthias Ringwald * @param local_cid 333b072ba33SMatthias Ringwald * @param remote_cid 334b072ba33SMatthias Ringwald */ 335941b3855SMatthias Ringwald #define L2CAP_EVENT_INCOMING_CONNECTION 0x72 336941b3855SMatthias Ringwald 337b072ba33SMatthias Ringwald // ?? 338941b3855SMatthias Ringwald // data: event(8), len(8), handle(16) 339941b3855SMatthias Ringwald #define L2CAP_EVENT_TIMEOUT_CHECK 0x73 340941b3855SMatthias Ringwald 341b072ba33SMatthias Ringwald // ?? 342941b3855SMatthias Ringwald // data: event(8), len(8), local_cid(16), credits(8) 343941b3855SMatthias Ringwald #define L2CAP_EVENT_CREDITS 0x74 344941b3855SMatthias Ringwald 345b072ba33SMatthias Ringwald /** 346b072ba33SMatthias Ringwald * @format 12 347b072ba33SMatthias Ringwald * @param status 348b072ba33SMatthias Ringwald * @param psm 349b072ba33SMatthias Ringwald */ 350941b3855SMatthias Ringwald #define L2CAP_EVENT_SERVICE_REGISTERED 0x75 351941b3855SMatthias Ringwald 352b072ba33SMatthias Ringwald /** 353b072ba33SMatthias Ringwald * @format H2222 354b072ba33SMatthias Ringwald * @param handle 355b072ba33SMatthias Ringwald * @param interval_min 356b072ba33SMatthias Ringwald * @param interval_max 357b072ba33SMatthias Ringwald * @param latencey 358b072ba33SMatthias Ringwald * @param timeout_multiplier 359b072ba33SMatthias Ringwald */ 360941b3855SMatthias Ringwald #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 0x76 361941b3855SMatthias Ringwald 362941b3855SMatthias Ringwald // data: event(8), len(8), handle(16), result (16) (0 == ok, 1 == fail) 363b072ba33SMatthias Ringwald /** 364b072ba33SMatthias Ringwald * @format H2 365b072ba33SMatthias Ringwald * @param handle 366b072ba33SMatthias Ringwald * @result 367b072ba33SMatthias Ringwald */ 368941b3855SMatthias Ringwald #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 0x77 369941b3855SMatthias Ringwald 370b072ba33SMatthias Ringwald /** 371b072ba33SMatthias Ringwald * @format 2 372b072ba33SMatthias Ringwald * @param local_cid 373b072ba33SMatthias Ringwald */ 374b072ba33SMatthias Ringwald #define L2CAP_EVENT_CAN_SEND_NOW 0x78 375b072ba33SMatthias Ringwald 376941b3855SMatthias Ringwald // RFCOMM EVENTS 377b072ba33SMatthias Ringwald 378941b3855SMatthias Ringwald /** 379941b3855SMatthias Ringwald * @format 1B2122 380941b3855SMatthias Ringwald * @param status 381941b3855SMatthias Ringwald * @param bd_addr 382941b3855SMatthias Ringwald * @param con_handle 383941b3855SMatthias Ringwald * @param server_channel 384941b3855SMatthias Ringwald * @param rfcomm_cid 385941b3855SMatthias Ringwald * @param max_frame_size 386941b3855SMatthias Ringwald */ 387941b3855SMatthias Ringwald #define RFCOMM_EVENT_OPEN_CHANNEL_COMPLETE 0x80 388941b3855SMatthias Ringwald 389941b3855SMatthias Ringwald /** 390941b3855SMatthias Ringwald * @format 2 391941b3855SMatthias Ringwald * @param rfcomm_cid 392941b3855SMatthias Ringwald */ 393941b3855SMatthias Ringwald #define RFCOMM_EVENT_CHANNEL_CLOSED 0x81 394941b3855SMatthias Ringwald 395941b3855SMatthias Ringwald /** 396941b3855SMatthias Ringwald * @format B12 397941b3855SMatthias Ringwald * @param bd_addr 398941b3855SMatthias Ringwald * @param server_channel 399941b3855SMatthias Ringwald * @param rfcomm_cid 400941b3855SMatthias Ringwald */ 401941b3855SMatthias Ringwald #define RFCOMM_EVENT_INCOMING_CONNECTION 0x82 402941b3855SMatthias Ringwald 403941b3855SMatthias Ringwald /** 404941b3855SMatthias Ringwald * @format 21 405941b3855SMatthias Ringwald * @param rfcomm_cid 406941b3855SMatthias Ringwald * @param line_status 407941b3855SMatthias Ringwald */ 408941b3855SMatthias Ringwald #define RFCOMM_EVENT_REMOTE_LINE_STATUS 0x83 409941b3855SMatthias Ringwald 410941b3855SMatthias Ringwald /** 411941b3855SMatthias Ringwald * @format 21 412941b3855SMatthias Ringwald * @param rfcomm_cid 413941b3855SMatthias Ringwald * @param credits 414941b3855SMatthias Ringwald */ 415941b3855SMatthias Ringwald #define RFCOMM_EVENT_CREDITS 0x84 416941b3855SMatthias Ringwald 417941b3855SMatthias Ringwald /** 418941b3855SMatthias Ringwald * @format 11 419941b3855SMatthias Ringwald * @param status 420941b3855SMatthias Ringwald * @param channel_id 421941b3855SMatthias Ringwald */ 422941b3855SMatthias Ringwald #define RFCOMM_EVENT_SERVICE_REGISTERED 0x85 423941b3855SMatthias Ringwald 424941b3855SMatthias Ringwald /** 425941b3855SMatthias Ringwald * @format 11 426941b3855SMatthias Ringwald * @param status 427941b3855SMatthias Ringwald * @param server_channel_id 428941b3855SMatthias Ringwald */ 429941b3855SMatthias Ringwald #define RFCOMM_EVENT_PERSISTENT_CHANNEL 0x86 430941b3855SMatthias Ringwald 431941b3855SMatthias Ringwald /** 432941b3855SMatthias Ringwald * @format 21 433941b3855SMatthias Ringwald * @param rfcomm_cid 434941b3855SMatthias Ringwald * @param modem_status 435941b3855SMatthias Ringwald */ 436941b3855SMatthias Ringwald #define RFCOMM_EVENT_REMOTE_MODEM_STATUS 0x87 437941b3855SMatthias Ringwald 438941b3855SMatthias Ringwald /** 4397bd8e93bSMatthias Ringwald * TODO: format for variable data 2? 440941b3855SMatthias Ringwald * @param rfcomm_cid 441941b3855SMatthias Ringwald * @param rpn_data 442941b3855SMatthias Ringwald */ 443941b3855SMatthias Ringwald #define RFCOMM_EVENT_PORT_CONFIGURATION 0x88 444941b3855SMatthias Ringwald 445941b3855SMatthias Ringwald /** 446b072ba33SMatthias Ringwald * @format 2 447b072ba33SMatthias Ringwald * @param local_cid 448b072ba33SMatthias Ringwald */ 449b072ba33SMatthias Ringwald #define RFCOMM_EVENT_CAN_SEND_NOW 0x89 450b072ba33SMatthias Ringwald 451b072ba33SMatthias Ringwald 452b072ba33SMatthias Ringwald /** 453941b3855SMatthias Ringwald * @format 14 454941b3855SMatthias Ringwald * @param status 455941b3855SMatthias Ringwald * @param service_record_handle 456941b3855SMatthias Ringwald */ 4575611a760SMatthias Ringwald #define SDP_EVENT_SERVICE_REGISTERED 0x90 458941b3855SMatthias Ringwald 459941b3855SMatthias Ringwald /** 460941b3855SMatthias Ringwald * @format 1 461941b3855SMatthias Ringwald * @param status 462941b3855SMatthias Ringwald */ 4635611a760SMatthias Ringwald #define SDP_EVENT_QUERY_COMPLETE 0x91 464941b3855SMatthias Ringwald 465941b3855SMatthias Ringwald /** 466941b3855SMatthias Ringwald * @format 1T 467941b3855SMatthias Ringwald * @param rfcomm_channel 468941b3855SMatthias Ringwald * @param name 469941b3855SMatthias Ringwald */ 4705611a760SMatthias Ringwald #define SDP_EVENT_QUERY_RFCOMM_SERVICE 0x92 471941b3855SMatthias Ringwald 472941b3855SMatthias Ringwald /** 4734225393cSMatthias Ringwald * @format 22221 4744225393cSMatthias Ringwald * @param record_id 475941b3855SMatthias Ringwald * @param attribute_id 4764225393cSMatthias Ringwald * @param attribute_length 4774225393cSMatthias Ringwald * @param data_offset 4784225393cSMatthias Ringwald * @param data 479941b3855SMatthias Ringwald */ 4805611a760SMatthias Ringwald #define SDP_EVENT_QUERY_ATTRIBUTE_BYTE 0x93 481941b3855SMatthias Ringwald 4824de250b4SMatthias Ringwald /** 4834de250b4SMatthias Ringwald * @format 22LV 4844de250b4SMatthias Ringwald * @param record_id 4854de250b4SMatthias Ringwald * @param attribute_id 4864de250b4SMatthias Ringwald * @param attribute_length 4874de250b4SMatthias Ringwald * @param attribute_value 4884de250b4SMatthias Ringwald */ 4895611a760SMatthias Ringwald #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE 0x94 4904225393cSMatthias Ringwald 4914225393cSMatthias Ringwald /** 4924225393cSMatthias Ringwald * @format 224 4934225393cSMatthias Ringwald * @param total_count 4944225393cSMatthias Ringwald * @param record_index 4954225393cSMatthias Ringwald * @param record_handle 4964225393cSMatthias Ringwald * @note Not provided by daemon, only used for internal testing 4974225393cSMatthias Ringwald */ 4985611a760SMatthias Ringwald #define SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 0x95 499941b3855SMatthias Ringwald 500941b3855SMatthias Ringwald /** 501941b3855SMatthias Ringwald * @format H1 502941b3855SMatthias Ringwald * @param handle 503941b3855SMatthias Ringwald * @param status 504941b3855SMatthias Ringwald */ 5055611a760SMatthias Ringwald #define GATT_EVENT_QUERY_COMPLETE 0xA0 506941b3855SMatthias Ringwald 507941b3855SMatthias Ringwald /** 508941b3855SMatthias Ringwald * @format HX 509941b3855SMatthias Ringwald * @param handle 510941b3855SMatthias Ringwald * @param service 511941b3855SMatthias Ringwald */ 5125611a760SMatthias Ringwald #define GATT_EVENT_SERVICE_QUERY_RESULT 0xA1 513941b3855SMatthias Ringwald 514941b3855SMatthias Ringwald /** 515941b3855SMatthias Ringwald * @format HY 516941b3855SMatthias Ringwald * @param handle 517941b3855SMatthias Ringwald * @param characteristic 518941b3855SMatthias Ringwald */ 5195611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 0xA2 520941b3855SMatthias Ringwald 521941b3855SMatthias Ringwald /** 522941b3855SMatthias Ringwald * @format H2X 523941b3855SMatthias Ringwald * @param handle 524941b3855SMatthias Ringwald * @param include_handle 525941b3855SMatthias Ringwald * @param service 526941b3855SMatthias Ringwald */ 5275611a760SMatthias Ringwald #define GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 0xA3 528941b3855SMatthias Ringwald 529941b3855SMatthias Ringwald /** 530941b3855SMatthias Ringwald * @format HZ 531941b3855SMatthias Ringwald * @param handle 532941b3855SMatthias Ringwald * @param characteristic_descriptor 533941b3855SMatthias Ringwald */ 5345611a760SMatthias Ringwald #define GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 0xA4 535941b3855SMatthias Ringwald 536941b3855SMatthias Ringwald /** 537941b3855SMatthias Ringwald * @format H2LV 538941b3855SMatthias Ringwald * @param handle 539941b3855SMatthias Ringwald * @param value_handle 540941b3855SMatthias Ringwald * @param value_length 541941b3855SMatthias Ringwald * @param value 542941b3855SMatthias Ringwald */ 5435611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA5 544941b3855SMatthias Ringwald 545941b3855SMatthias Ringwald /** 546941b3855SMatthias Ringwald * @format H22LV 547941b3855SMatthias Ringwald * @param handle 548941b3855SMatthias Ringwald * @param value_handle 549941b3855SMatthias Ringwald * @param value_offset 550941b3855SMatthias Ringwald * @param value_length 551941b3855SMatthias Ringwald * @param value 552941b3855SMatthias Ringwald */ 5535611a760SMatthias Ringwald #define GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA6 554941b3855SMatthias Ringwald 555941b3855SMatthias Ringwald /** 556941b3855SMatthias Ringwald * @format H2LV 557941b3855SMatthias Ringwald * @param handle 558941b3855SMatthias Ringwald * @param value_handle 559941b3855SMatthias Ringwald * @param value_length 560941b3855SMatthias Ringwald * @param value 561941b3855SMatthias Ringwald */ 5625611a760SMatthias Ringwald #define GATT_EVENT_NOTIFICATION 0xA7 563941b3855SMatthias Ringwald 564941b3855SMatthias Ringwald /** 565941b3855SMatthias Ringwald * @format H2LV 566941b3855SMatthias Ringwald * @param handle 567941b3855SMatthias Ringwald * @param value_handle 568941b3855SMatthias Ringwald * @param value_length 569941b3855SMatthias Ringwald * @param value 570941b3855SMatthias Ringwald */ 5715611a760SMatthias Ringwald #define GATT_EVENT_INDICATION 0xA8 572941b3855SMatthias Ringwald 573941b3855SMatthias Ringwald /** 574941b3855SMatthias Ringwald * @format H2LV 575941b3855SMatthias Ringwald * @param descriptor_handle 576941b3855SMatthias Ringwald * @param descriptor_length 577941b3855SMatthias Ringwald * @param descriptor 578941b3855SMatthias Ringwald */ 5795611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xA9 580941b3855SMatthias Ringwald 581941b3855SMatthias Ringwald /** 582941b3855SMatthias Ringwald * @format H2LV 583941b3855SMatthias Ringwald * @param handle 584941b3855SMatthias Ringwald * @param descriptor_offset 585941b3855SMatthias Ringwald * @param descriptor_length 586941b3855SMatthias Ringwald * @param descriptor 587941b3855SMatthias Ringwald */ 5885611a760SMatthias Ringwald #define GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xAA 589941b3855SMatthias Ringwald 590941b3855SMatthias Ringwald /** 591941b3855SMatthias Ringwald * @format H2 592941b3855SMatthias Ringwald * @param handle 593941b3855SMatthias Ringwald * @param MTU 594941b3855SMatthias Ringwald */ 5955611a760SMatthias Ringwald #define GATT_EVENT_MTU 0xAB 596941b3855SMatthias Ringwald 597941b3855SMatthias Ringwald /** 598941b3855SMatthias Ringwald * @format H2 599941b3855SMatthias Ringwald * @param handle 600941b3855SMatthias Ringwald * @param MTU 601941b3855SMatthias Ringwald */ 6025611a760SMatthias Ringwald #define ATT_EVENT_MTU_EXCHANGE_COMPLETE 0xB5 603941b3855SMatthias Ringwald 604941b3855SMatthias Ringwald // data: event(8), len(8), status (8), hci_handle (16), attribute_handle (16) 6055611a760SMatthias Ringwald #define ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 0xB6 606941b3855SMatthias Ringwald 607941b3855SMatthias Ringwald 608941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bnep service uuid (16) 609941b3855SMatthias Ringwald #define BNEP_EVENT_SERVICE_REGISTERED 0xC0 610941b3855SMatthias Ringwald 611941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bnep source uuid (16), bnep destination uuid (16), mtu (16), remote_address (48) 612941b3855SMatthias Ringwald #define BNEP_EVENT_OPEN_CHANNEL_COMPLETE 0xC1 613941b3855SMatthias Ringwald 614941b3855SMatthias Ringwald // data: event(8), len(8), bnep source uuid (16), bnep destination uuid (16), remote_address (48) 615941b3855SMatthias Ringwald #define BNEP_EVENT_CHANNEL_CLOSED 0xC2 616941b3855SMatthias Ringwald 617941b3855SMatthias Ringwald // data: event(8), len(8), bnep source uuid (16), bnep destination uuid (16), remote_address (48), channel state (8) 618941b3855SMatthias Ringwald #define BNEP_EVENT_CHANNEL_TIMEOUT 0xC3 619941b3855SMatthias Ringwald 620941b3855SMatthias Ringwald // data: event(8), len(8) 621941b3855SMatthias Ringwald #define BNEP_EVENT_READY_TO_SEND 0xC4 622941b3855SMatthias Ringwald 623941b3855SMatthias Ringwald /** 624941b3855SMatthias Ringwald * @format H1B 625941b3855SMatthias Ringwald * @param handle 626941b3855SMatthias Ringwald * @param addr_type 627941b3855SMatthias Ringwald * @param address 628941b3855SMatthias Ringwald */ 6295611a760SMatthias Ringwald #define SM_EVENT_JUST_WORKS_REQUEST 0xD0 630941b3855SMatthias Ringwald 631941b3855SMatthias Ringwald /** 632941b3855SMatthias Ringwald * @format H1B 633941b3855SMatthias Ringwald * @param handle 634941b3855SMatthias Ringwald * @param addr_type 635941b3855SMatthias Ringwald * @param address 636941b3855SMatthias Ringwald */ 6375611a760SMatthias Ringwald #define SM_EVENT_JUST_WORKS_CANCEL 0xD1 638941b3855SMatthias Ringwald 639941b3855SMatthias Ringwald /** 640941b3855SMatthias Ringwald * @format H1B4 641941b3855SMatthias Ringwald * @param handle 642941b3855SMatthias Ringwald * @param addr_type 643941b3855SMatthias Ringwald * @param address 644941b3855SMatthias Ringwald * @param passkey 645941b3855SMatthias Ringwald */ 6465611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_DISPLAY_NUMBER 0xD2 647941b3855SMatthias Ringwald 648941b3855SMatthias Ringwald /** 649941b3855SMatthias Ringwald * @format H1B 650941b3855SMatthias Ringwald * @param handle 651941b3855SMatthias Ringwald * @param addr_type 652941b3855SMatthias Ringwald * @param address 653941b3855SMatthias Ringwald */ 6545611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_DISPLAY_CANCEL 0xD3 655941b3855SMatthias Ringwald 656941b3855SMatthias Ringwald /** 657941b3855SMatthias Ringwald * @format H1B421 658941b3855SMatthias Ringwald * @param handle 659941b3855SMatthias Ringwald * @param addr_type 660941b3855SMatthias Ringwald * @param address 661941b3855SMatthias Ringwald */ 6625611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_INPUT_NUMBER 0xD4 663941b3855SMatthias Ringwald 664941b3855SMatthias Ringwald /** 665941b3855SMatthias Ringwald * @format H1B 666941b3855SMatthias Ringwald * @param handle 667941b3855SMatthias Ringwald * @param addr_type 668941b3855SMatthias Ringwald * @param address 669941b3855SMatthias Ringwald */ 6705611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_INPUT_CANCEL 0xD5 671941b3855SMatthias Ringwald 672941b3855SMatthias Ringwald /** 673941b3855SMatthias Ringwald * @format H1B 674941b3855SMatthias Ringwald * @param handle 675941b3855SMatthias Ringwald * @param addr_type 676941b3855SMatthias Ringwald * @param address 677941b3855SMatthias Ringwald */ 6785611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_STARTED 0xD6 679941b3855SMatthias Ringwald 680941b3855SMatthias Ringwald /** 681941b3855SMatthias Ringwald * @format H1B 682941b3855SMatthias Ringwald * @param handle 683941b3855SMatthias Ringwald * @param addr_type 684941b3855SMatthias Ringwald * @param address 685941b3855SMatthias Ringwald */ 6865611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_FAILED 0xD7 687941b3855SMatthias Ringwald 688941b3855SMatthias Ringwald /** 689941b3855SMatthias Ringwald * @format H1B2 690941b3855SMatthias Ringwald * @param handle 691941b3855SMatthias Ringwald * @param addr_type 692941b3855SMatthias Ringwald * @param address 693941b3855SMatthias Ringwald * @param le_device_db_index 694941b3855SMatthias Ringwald */ 6955611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 0xD8 696941b3855SMatthias Ringwald 697941b3855SMatthias Ringwald /** 698941b3855SMatthias Ringwald * @format H1B 699941b3855SMatthias Ringwald * @param handle 700941b3855SMatthias Ringwald * @param addr_type 701941b3855SMatthias Ringwald * @param address 702941b3855SMatthias Ringwald */ 7035611a760SMatthias Ringwald #define SM_EVENT_AUTHORIZATION_REQUEST 0xD9 704941b3855SMatthias Ringwald 705941b3855SMatthias Ringwald /** 706941b3855SMatthias Ringwald * @format H1B1 707941b3855SMatthias Ringwald * @param handle 708941b3855SMatthias Ringwald * @param addr_type 709941b3855SMatthias Ringwald * @param address 710941b3855SMatthias Ringwald * @param authorization_result 711941b3855SMatthias Ringwald */ 7125611a760SMatthias Ringwald #define SM_EVENT_AUTHORIZATION_RESULT 0xDA 713941b3855SMatthias Ringwald 714941b3855SMatthias Ringwald // GAP 715941b3855SMatthias Ringwald 716941b3855SMatthias Ringwald // data: event(8), len(8), hci_handle (16), security_level (8) 7175611a760SMatthias Ringwald #define GAP_EVENT_SECURITY_LEVEL 0xE0 718941b3855SMatthias Ringwald 719941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bd_addr(48) 7205611a760SMatthias Ringwald #define GAP_EVENT_DEDICATED_BONDING_COMPLETED 0xE1 721941b3855SMatthias Ringwald 722941b3855SMatthias Ringwald /** 723941b3855SMatthias Ringwald * @format 11B1JV 724941b3855SMatthias Ringwald * @param advertising_event_type 725941b3855SMatthias Ringwald * @param address_type 726941b3855SMatthias Ringwald * @param address 727941b3855SMatthias Ringwald * @param rssi 728941b3855SMatthias Ringwald * @param data_length 729941b3855SMatthias Ringwald * @param data 730941b3855SMatthias Ringwald */ 7315611a760SMatthias Ringwald #define GAP_LE_EVENT_ADVERTISING_REPORT 0xE2 732941b3855SMatthias Ringwald 733941b3855SMatthias Ringwald #define HCI_EVENT_HSP_META 0xE8 734941b3855SMatthias Ringwald 735f5054c00SMatthias Ringwald #define HSP_SUBEVENT_ERROR 0x01 736f5054c00SMatthias Ringwald #define HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 0x02 737f5054c00SMatthias Ringwald #define HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 0x03 738f5054c00SMatthias Ringwald #define HSP_SUBEVENT_RING 0x04 739f5054c00SMatthias Ringwald #define HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 0x05 740f5054c00SMatthias Ringwald #define HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 0x06 741f5054c00SMatthias Ringwald #define HSP_SUBEVENT_HS_COMMAND 0x07 742f5054c00SMatthias Ringwald #define HSP_SUBEVENT_AG_INDICATION 0x08 743941b3855SMatthias Ringwald 744941b3855SMatthias Ringwald #define HCI_EVENT_HFP_META 0xE9 745941b3855SMatthias Ringwald 746941b3855SMatthias Ringwald #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 0x01 747941b3855SMatthias Ringwald #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED 0x02 748941b3855SMatthias Ringwald #define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 0x03 749941b3855SMatthias Ringwald #define HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED 0x04 750941b3855SMatthias Ringwald #define HFP_SUBEVENT_COMPLETE 0x05 751941b3855SMatthias Ringwald #define HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 0x06 752941b3855SMatthias Ringwald #define HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 0x07 753941b3855SMatthias Ringwald #define HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 0x08 754941b3855SMatthias Ringwald #define HFP_SUBEVENT_CODECS_CONNECTION_COMPLETE 0x09 755aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_START_RINGINIG 0x0A 756aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_STOP_RINGINIG 0x0B 757aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_CALL_TERMINATED 0x0C 758aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 0x0D 759aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_REDIAL_LAST_NUMBER 0x0E 760aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG 0x0F 761ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 0x10 762ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_TRANSMIT_DTMF_CODES 0x11 763ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_TRANSMIT_STATUS_OF_CURRENT_CALL 0x12 764ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_CALL_ANSWERED 0x13 765ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_CONFERENCE_CALL 0x14 766ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_RING 0x15 767ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_SPEAKER_VOLUME 0x16 768ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_MICROPHONE_VOLUME 0x17 769941b3855SMatthias Ringwald 770941b3855SMatthias Ringwald // ANCS Client 771a4815874SMatthias Ringwald 772a4815874SMatthias Ringwald /** 773a4815874SMatthias Ringwald * @format H 774a4815874SMatthias Ringwald * @param handle 775a4815874SMatthias Ringwald */ 7765611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_CONNECTED 0xF0 777a4815874SMatthias Ringwald 778a4815874SMatthias Ringwald /** 779a4815874SMatthias Ringwald * @format H2T 780a4815874SMatthias Ringwald * @param handle 781a4815874SMatthias Ringwald * @param attribute_id 782a4815874SMatthias Ringwald * @param text 783a4815874SMatthias Ringwald */ 7845611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_NOTIFICATION 0xF1 785a4815874SMatthias Ringwald 786a4815874SMatthias Ringwald /** 787a4815874SMatthias Ringwald * @format H 788a4815874SMatthias Ringwald * @param handle 789a4815874SMatthias Ringwald */ 7905611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_DISCONNECTED 0xF2 791941b3855SMatthias Ringwald 792941b3855SMatthias Ringwald // #define HCI_EVENT_HFP_META 0xxx 793941b3855SMatthias Ringwald // #define HCI_EVENT_GATT_META 0xxx 794941b3855SMatthias Ringwald // #define HCI_EVENT_SDP_META 0xxx 795941b3855SMatthias Ringwald // #define HCI_EVENT_ANCS_META 0xxx 796941b3855SMatthias Ringwald // #define HCI_EVENT_SM_META 0xxx 797941b3855SMatthias Ringwald // #define HCI_EVENT_GAP_META 0xxx 798941b3855SMatthias Ringwald // #define HCI_EVENT_BNEP_META 0xxx 799941b3855SMatthias Ringwald // #define HCI_EVENT_PAN_META 0xxx 800941b3855SMatthias Ringwald 801941b3855SMatthias Ringwald #endif 802