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 468974fcd6SMatthias Ringwald #include <stdint.h> 478974fcd6SMatthias Ringwald #include "btstack_linked_list.h" 488974fcd6SMatthias Ringwald 498974fcd6SMatthias Ringwald // TYPES 508974fcd6SMatthias Ringwald 518974fcd6SMatthias Ringwald // packet handler 528974fcd6SMatthias Ringwald typedef void (*btstack_packet_handler_t) (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size); 538974fcd6SMatthias Ringwald 548974fcd6SMatthias Ringwald // packet callback supporting multiple registrations 558974fcd6SMatthias Ringwald typedef struct { 568974fcd6SMatthias Ringwald btstack_linked_item_t item; 578974fcd6SMatthias Ringwald btstack_packet_handler_t callback; 588974fcd6SMatthias Ringwald } btstack_packet_callback_registration_t; 598974fcd6SMatthias Ringwald 60f7a05cdaSMatthias Ringwald /** 618974fcd6SMatthias Ringwald * @brief 128 bit key used with AES128 in Security Manager 62f7a05cdaSMatthias Ringwald */ 638974fcd6SMatthias Ringwald typedef uint8_t sm_key_t[16]; 64f7a05cdaSMatthias Ringwald 65941b3855SMatthias Ringwald // DEFINES 66941b3855SMatthias Ringwald 67941b3855SMatthias Ringwald #define DAEMON_EVENT_PACKET 0x05 68941b3855SMatthias Ringwald 69941b3855SMatthias Ringwald // L2CAP data 70941b3855SMatthias Ringwald #define L2CAP_DATA_PACKET 0x06 71941b3855SMatthias Ringwald 72941b3855SMatthias Ringwald // RFCOMM data 73941b3855SMatthias Ringwald #define RFCOMM_DATA_PACKET 0x07 74941b3855SMatthias Ringwald 75941b3855SMatthias Ringwald // Attribute protocol data 76941b3855SMatthias Ringwald #define ATT_DATA_PACKET 0x08 77941b3855SMatthias Ringwald 78941b3855SMatthias Ringwald // Security Manager protocol data 79941b3855SMatthias Ringwald #define SM_DATA_PACKET 0x09 80941b3855SMatthias Ringwald 81941b3855SMatthias Ringwald // SDP query result 82941b3855SMatthias Ringwald // format: type (8), record_id (16), attribute_id (16), attribute_length (16), attribute_value (max 1k) 83941b3855SMatthias Ringwald #define SDP_CLIENT_PACKET 0x0a 84941b3855SMatthias Ringwald 85941b3855SMatthias Ringwald // BNEP data 86941b3855SMatthias Ringwald #define BNEP_DATA_PACKET 0x0b 87941b3855SMatthias Ringwald 88941b3855SMatthias Ringwald // Unicast Connectionless Data 89941b3855SMatthias Ringwald #define UCD_DATA_PACKET 0x0c 90941b3855SMatthias Ringwald 91941b3855SMatthias Ringwald // debug log messages 92941b3855SMatthias Ringwald #define LOG_MESSAGE_PACKET 0xfc 93941b3855SMatthias Ringwald 94941b3855SMatthias Ringwald 95941b3855SMatthias Ringwald // ERRORS 96941b3855SMatthias Ringwald 97941b3855SMatthias Ringwald // last error code in 2.1 is 0x38 - we start with 0x50 for BTstack errors 98941b3855SMatthias Ringwald #define BTSTACK_CONNECTION_TO_BTDAEMON_FAILED 0x50 99941b3855SMatthias Ringwald #define BTSTACK_ACTIVATION_FAILED_SYSTEM_BLUETOOTH 0x51 100941b3855SMatthias Ringwald #define BTSTACK_ACTIVATION_POWERON_FAILED 0x52 101941b3855SMatthias Ringwald #define BTSTACK_ACTIVATION_FAILED_UNKNOWN 0x53 102941b3855SMatthias Ringwald #define BTSTACK_NOT_ACTIVATED 0x54 103941b3855SMatthias Ringwald #define BTSTACK_BUSY 0x55 104941b3855SMatthias Ringwald #define BTSTACK_MEMORY_ALLOC_FAILED 0x56 105941b3855SMatthias Ringwald #define BTSTACK_ACL_BUFFERS_FULL 0x57 106941b3855SMatthias Ringwald 107941b3855SMatthias Ringwald // l2cap errors - enumeration by the command that created them 108941b3855SMatthias Ringwald #define L2CAP_COMMAND_REJECT_REASON_COMMAND_NOT_UNDERSTOOD 0x60 109941b3855SMatthias Ringwald #define L2CAP_COMMAND_REJECT_REASON_SIGNALING_MTU_EXCEEDED 0x61 110941b3855SMatthias Ringwald #define L2CAP_COMMAND_REJECT_REASON_INVALID_CID_IN_REQUEST 0x62 111941b3855SMatthias Ringwald 112941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_SUCCESSFUL 0x63 113941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_PENDING 0x64 114941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_PSM 0x65 115941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_SECURITY 0x66 116941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_RESOURCES 0x67 117941b3855SMatthias Ringwald #define L2CAP_CONNECTION_RESPONSE_RESULT_RTX_TIMEOUT 0x68 118941b3855SMatthias Ringwald 119941b3855SMatthias Ringwald #define L2CAP_SERVICE_ALREADY_REGISTERED 0x69 120941b3855SMatthias Ringwald #define L2CAP_DATA_LEN_EXCEEDS_REMOTE_MTU 0x6A 121941b3855SMatthias Ringwald 122941b3855SMatthias Ringwald #define RFCOMM_MULTIPLEXER_STOPPED 0x70 123941b3855SMatthias Ringwald #define RFCOMM_CHANNEL_ALREADY_REGISTERED 0x71 124941b3855SMatthias Ringwald #define RFCOMM_NO_OUTGOING_CREDITS 0x72 125941b3855SMatthias Ringwald #define RFCOMM_AGGREGATE_FLOW_OFF 0x73 126941b3855SMatthias Ringwald #define RFCOMM_DATA_LEN_EXCEEDS_MTU 0x74 127941b3855SMatthias Ringwald 128941b3855SMatthias Ringwald #define SDP_HANDLE_ALREADY_REGISTERED 0x80 129941b3855SMatthias Ringwald #define SDP_QUERY_INCOMPLETE 0x81 130941b3855SMatthias Ringwald #define SDP_SERVICE_NOT_FOUND 0x82 131941b3855SMatthias Ringwald #define SDP_HANDLE_INVALID 0x83 132e5057641SMatthias Ringwald #define SDP_QUERY_BUSY 0x84 133941b3855SMatthias Ringwald 134941b3855SMatthias Ringwald #define ATT_HANDLE_VALUE_INDICATION_IN_PORGRESS 0x90 135941b3855SMatthias Ringwald #define ATT_HANDLE_VALUE_INDICATION_TIMEOUT 0x91 136941b3855SMatthias Ringwald 137941b3855SMatthias Ringwald #define GATT_CLIENT_NOT_CONNECTED 0x93 138941b3855SMatthias Ringwald #define GATT_CLIENT_BUSY 0x94 139616edd56SMatthias Ringwald #define GATT_CLIENT_IN_WRONG_STATE 0x95 140616edd56SMatthias Ringwald #define GATT_CLIENT_DIFFERENT_CONTEXT_FOR_ADDRESS_ALREADY_EXISTS 0x96 141616edd56SMatthias Ringwald #define GATT_CLIENT_VALUE_TOO_LONG 0x97 142616edd56SMatthias Ringwald #define GATT_CLIENT_CHARACTERISTIC_NOTIFICATION_NOT_SUPPORTED 0x98 143616edd56SMatthias Ringwald #define GATT_CLIENT_CHARACTERISTIC_INDICATION_NOT_SUPPORTED 0x99 144941b3855SMatthias Ringwald 145941b3855SMatthias Ringwald #define BNEP_SERVICE_ALREADY_REGISTERED 0xA0 146941b3855SMatthias Ringwald #define BNEP_CHANNEL_NOT_CONNECTED 0xA1 147941b3855SMatthias Ringwald #define BNEP_DATA_LEN_EXCEEDS_MTU 0xA2 148941b3855SMatthias Ringwald 149b3f90e25SMatthias Ringwald // COMMANDS 150b3f90e25SMatthias Ringwald 151b3f90e25SMatthias Ringwald #define OGF_BTSTACK 0x3d 152b3f90e25SMatthias Ringwald 153b3f90e25SMatthias Ringwald // cmds for BTstack 154b3f90e25SMatthias Ringwald // get state: @returns HCI_STATE 155b3f90e25SMatthias Ringwald #define BTSTACK_GET_STATE 0x01 156b3f90e25SMatthias Ringwald 157b3f90e25SMatthias Ringwald // set power mode: @param HCI_POWER_MODE 158b3f90e25SMatthias Ringwald #define BTSTACK_SET_POWER_MODE 0x02 159b3f90e25SMatthias Ringwald 160b3f90e25SMatthias Ringwald // set capture mode: @param on 161b3f90e25SMatthias Ringwald #define BTSTACK_SET_ACL_CAPTURE_MODE 0x03 162b3f90e25SMatthias Ringwald 163b3f90e25SMatthias Ringwald // get BTstack version 164b3f90e25SMatthias Ringwald #define BTSTACK_GET_VERSION 0x04 165b3f90e25SMatthias Ringwald 166b3f90e25SMatthias Ringwald // get system Bluetooth state 167b3f90e25SMatthias Ringwald #define BTSTACK_GET_SYSTEM_BLUETOOTH_ENABLED 0x05 168b3f90e25SMatthias Ringwald 169b3f90e25SMatthias Ringwald // set system Bluetooth state 170b3f90e25SMatthias Ringwald #define BTSTACK_SET_SYSTEM_BLUETOOTH_ENABLED 0x06 171b3f90e25SMatthias Ringwald 172b3f90e25SMatthias Ringwald // enable inquiry scan for this client 173b3f90e25SMatthias Ringwald #define BTSTACK_SET_DISCOVERABLE 0x07 174b3f90e25SMatthias Ringwald 175b3f90e25SMatthias Ringwald // set global Bluetooth state 176b3f90e25SMatthias Ringwald #define BTSTACK_SET_BLUETOOTH_ENABLED 0x08 177b3f90e25SMatthias Ringwald 178b3f90e25SMatthias Ringwald // create l2cap channel: @param bd_addr(48), psm (16) 179b3f90e25SMatthias Ringwald #define L2CAP_CREATE_CHANNEL 0x20 180b3f90e25SMatthias Ringwald 181b3f90e25SMatthias Ringwald // disconnect l2cap disconnect, @param channel(16), reason(8) 182b3f90e25SMatthias Ringwald #define L2CAP_DISCONNECT 0x21 183b3f90e25SMatthias Ringwald 184b3f90e25SMatthias Ringwald // register l2cap service: @param psm(16), mtu (16) 185b3f90e25SMatthias Ringwald #define L2CAP_REGISTER_SERVICE 0x22 186b3f90e25SMatthias Ringwald 187b3f90e25SMatthias Ringwald // unregister l2cap disconnect, @param psm(16) 188b3f90e25SMatthias Ringwald #define L2CAP_UNREGISTER_SERVICE 0x23 189b3f90e25SMatthias Ringwald 190b3f90e25SMatthias Ringwald // accept connection @param bd_addr(48), dest cid (16) 191b3f90e25SMatthias Ringwald #define L2CAP_ACCEPT_CONNECTION 0x24 192b3f90e25SMatthias Ringwald 193b3f90e25SMatthias Ringwald // decline l2cap disconnect,@param bd_addr(48), dest cid (16), reason(8) 194b3f90e25SMatthias Ringwald #define L2CAP_DECLINE_CONNECTION 0x25 195b3f90e25SMatthias Ringwald 196b3f90e25SMatthias Ringwald // create l2cap channel: @param bd_addr(48), psm (16), mtu (16) 197b3f90e25SMatthias Ringwald #define L2CAP_CREATE_CHANNEL_MTU 0x26 198b3f90e25SMatthias Ringwald 199b3f90e25SMatthias Ringwald // register SDP Service Record: service record (size) 200b3f90e25SMatthias Ringwald #define SDP_REGISTER_SERVICE_RECORD 0x30 201b3f90e25SMatthias Ringwald 202b3f90e25SMatthias Ringwald // unregister SDP Service Record 203b3f90e25SMatthias Ringwald #define SDP_UNREGISTER_SERVICE_RECORD 0x31 204b3f90e25SMatthias Ringwald 205b3f90e25SMatthias Ringwald // Get remote RFCOMM services 206b3f90e25SMatthias Ringwald #define SDP_CLIENT_QUERY_RFCOMM_SERVICES 0x32 207b3f90e25SMatthias Ringwald 208b3f90e25SMatthias Ringwald // Get remote SDP services 209b3f90e25SMatthias Ringwald #define SDP_CLIENT_QUERY_SERVICES 0x33 210b3f90e25SMatthias Ringwald 211b3f90e25SMatthias Ringwald // RFCOMM "HCI" Commands 212b3f90e25SMatthias Ringwald #define RFCOMM_CREATE_CHANNEL 0x40 213b3f90e25SMatthias Ringwald #define RFCOMM_DISCONNECT 0x41 214b3f90e25SMatthias Ringwald #define RFCOMM_REGISTER_SERVICE 0x42 215b3f90e25SMatthias Ringwald #define RFCOMM_UNREGISTER_SERVICE 0x43 216b3f90e25SMatthias Ringwald #define RFCOMM_ACCEPT_CONNECTION 0x44 217b3f90e25SMatthias Ringwald #define RFCOMM_DECLINE_CONNECTION 0x45 218b3f90e25SMatthias Ringwald #define RFCOMM_PERSISTENT_CHANNEL 0x46 219b3f90e25SMatthias Ringwald #define RFCOMM_CREATE_CHANNEL_WITH_CREDITS 0x47 220b3f90e25SMatthias Ringwald #define RFCOMM_REGISTER_SERVICE_WITH_CREDITS 0x48 221b3f90e25SMatthias Ringwald #define RFCOMM_GRANT_CREDITS 0x49 222b3f90e25SMatthias Ringwald 223b3f90e25SMatthias Ringwald // GAP Classic 0x50 224b3f90e25SMatthias Ringwald #define GAP_DISCONNECT 0x50 225b3f90e25SMatthias Ringwald 226b3f90e25SMatthias Ringwald // GAP LE 0x60 227b3f90e25SMatthias Ringwald #define GAP_LE_SCAN_START 0x60 228b3f90e25SMatthias Ringwald #define GAP_LE_SCAN_STOP 0x61 229b3f90e25SMatthias Ringwald #define GAP_LE_CONNECT 0x62 230b3f90e25SMatthias Ringwald #define GAP_LE_CONNECT_CANCEL 0x63 231b3f90e25SMatthias Ringwald #define GAP_LE_SET_SCAN_PARAMETERS 0x64 232b3f90e25SMatthias Ringwald 233b3f90e25SMatthias Ringwald // GATT (Client) 0x70 234b3f90e25SMatthias Ringwald #define GATT_DISCOVER_ALL_PRIMARY_SERVICES 0x70 235b3f90e25SMatthias Ringwald #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID16 0x71 236b3f90e25SMatthias Ringwald #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID128 0x72 237b3f90e25SMatthias Ringwald #define GATT_FIND_INCLUDED_SERVICES_FOR_SERVICE 0x73 238b3f90e25SMatthias Ringwald #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE 0x74 239b3f90e25SMatthias Ringwald #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE_BY_UUID128 0x75 240b3f90e25SMatthias Ringwald #define GATT_DISCOVER_CHARACTERISTIC_DESCRIPTORS 0x76 241b3f90e25SMatthias Ringwald #define GATT_READ_VALUE_OF_CHARACTERISTIC 0x77 242b3f90e25SMatthias Ringwald #define GATT_READ_LONG_VALUE_OF_CHARACTERISTIC 0x78 243b3f90e25SMatthias Ringwald #define GATT_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE 0x79 244b3f90e25SMatthias Ringwald #define GATT_WRITE_VALUE_OF_CHARACTERISTIC 0x7A 245b3f90e25SMatthias Ringwald #define GATT_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7B 246b3f90e25SMatthias Ringwald #define GATT_RELIABLE_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7C 247b3f90e25SMatthias Ringwald #define GATT_READ_CHARACTERISTIC_DESCRIPTOR 0X7D 248b3f90e25SMatthias Ringwald #define GATT_READ_LONG_CHARACTERISTIC_DESCRIPTOR 0X7E 249b3f90e25SMatthias Ringwald #define GATT_WRITE_CHARACTERISTIC_DESCRIPTOR 0X7F 250b3f90e25SMatthias Ringwald #define GATT_WRITE_LONG_CHARACTERISTIC_DESCRIPTOR 0X80 251b3f90e25SMatthias Ringwald #define GATT_WRITE_CLIENT_CHARACTERISTIC_CONFIGURATION 0X81 252b3f90e25SMatthias Ringwald #define GATT_GET_MTU 0x82 253b3f90e25SMatthias Ringwald 254941b3855SMatthias Ringwald 255941b3855SMatthias Ringwald // EVENTS 256941b3855SMatthias Ringwald 257941b3855SMatthias Ringwald /** 258941b3855SMatthias Ringwald * @format 1 259941b3855SMatthias Ringwald * @param state 260941b3855SMatthias Ringwald */ 261941b3855SMatthias Ringwald #define BTSTACK_EVENT_STATE 0x60 262941b3855SMatthias Ringwald 263941b3855SMatthias Ringwald // data: event(8), len(8), nr hci connections 264941b3855SMatthias Ringwald #define BTSTACK_EVENT_NR_CONNECTIONS_CHANGED 0x61 265941b3855SMatthias Ringwald 266941b3855SMatthias Ringwald /** 267941b3855SMatthias Ringwald * @format 268941b3855SMatthias Ringwald */ 269941b3855SMatthias Ringwald #define BTSTACK_EVENT_POWERON_FAILED 0x62 270941b3855SMatthias Ringwald 271941b3855SMatthias Ringwald /** 272827b1c43SMatthias Ringwald * @format 1 273827b1c43SMatthias Ringwald * @param discoverable 274827b1c43SMatthias Ringwald */ 275827b1c43SMatthias Ringwald #define BTSTACK_EVENT_DISCOVERABLE_ENABLED 0x66 276827b1c43SMatthias Ringwald 277827b1c43SMatthias Ringwald // Daemon Events 278827b1c43SMatthias Ringwald 279827b1c43SMatthias Ringwald /** 280941b3855SMatthias Ringwald * @format 112 281941b3855SMatthias Ringwald * @param major 282941b3855SMatthias Ringwald * @param minor 283941b3855SMatthias Ringwald @ @param revision 284941b3855SMatthias Ringwald */ 285827b1c43SMatthias Ringwald #define DAEMON_EVENT_VERSION 0x63 286941b3855SMatthias Ringwald 287941b3855SMatthias Ringwald // data: system bluetooth on/off (bool) 288e2334cdcSMatthias Ringwald /** 289e2334cdcSMatthias Ringwald * @format 1 290e2334cdcSMatthias Ringwald * param system_bluetooth_enabled 291e2334cdcSMatthias Ringwald */ 292827b1c43SMatthias Ringwald #define DAEMON_EVENT_SYSTEM_BLUETOOTH_ENABLED 0x64 293941b3855SMatthias Ringwald 294941b3855SMatthias Ringwald // data: event (8), len(8), status (8) == 0, address (48), name (1984 bits = 248 bytes) 295e2334cdcSMatthias Ringwald 296e2334cdcSMatthias Ringwald /* 297e2334cdcSMatthias Ringwald * @format 1BT 298e2334cdcSMatthias Ringwald * @param status == 0 to match read_remote_name_request 299e2334cdcSMatthias Ringwald * @param address 300e2334cdcSMatthias Ringwald * @param name 301e2334cdcSMatthias Ringwald */ 302827b1c43SMatthias Ringwald #define DAEMON_EVENT_REMOTE_NAME_CACHED 0x65 303941b3855SMatthias Ringwald 304e2334cdcSMatthias Ringwald // internal daemon events 305941b3855SMatthias Ringwald 306941b3855SMatthias Ringwald // data: event(8) 307e2334cdcSMatthias Ringwald #define DAEMON_EVENT_CONNECTION_OPENED 0x67 308941b3855SMatthias Ringwald 309941b3855SMatthias Ringwald // data: event(8) 310e2334cdcSMatthias Ringwald #define DAEMON_EVENT_CONNECTION_CLOSED 0x68 311941b3855SMatthias Ringwald 312827b1c43SMatthias Ringwald 3133bc639ceSMatthias Ringwald // additional HCI events 31463fa3374SMatthias Ringwald 31563fa3374SMatthias Ringwald /** 31663fa3374SMatthias Ringwald * @brief Outgoing packet 31763fa3374SMatthias Ringwald */ 31863fa3374SMatthias Ringwald #define HCI_EVENT_TRANSPORT_PACKET_SENT 0x6E 31963fa3374SMatthias Ringwald 3203bc639ceSMatthias Ringwald /** 3213bc639ceSMatthias Ringwald * @format B 3223bc639ceSMatthias Ringwald * @param handle 3233bc639ceSMatthias Ringwald */ 3243bc639ceSMatthias Ringwald #define HCI_EVENT_SCO_CAN_SEND_NOW 0x6F 3253bc639ceSMatthias Ringwald 326941b3855SMatthias Ringwald // L2CAP EVENTS 327941b3855SMatthias Ringwald 328b072ba33SMatthias Ringwald /** 329b072ba33SMatthias Ringwald * @format 1BH222222 330b072ba33SMatthias Ringwald * @param status 331b072ba33SMatthias Ringwald * @param address 332b072ba33SMatthias Ringwald * @param handle 333b072ba33SMatthias Ringwald * @param psm 334b072ba33SMatthias Ringwald * @param local_cid 335b072ba33SMatthias Ringwald * @param remote_cid 336b072ba33SMatthias Ringwald * @param local_mtu 337b072ba33SMatthias Ringwald * @param remote_mtu 338b072ba33SMatthias Ringwald * @param flush_timeout 339b072ba33SMatthias Ringwald */ 340941b3855SMatthias Ringwald #define L2CAP_EVENT_CHANNEL_OPENED 0x70 341941b3855SMatthias Ringwald 342b072ba33SMatthias Ringwald /* 343b072ba33SMatthias Ringwald * @format 2 344b072ba33SMatthias Ringwald * @param local_cid 345b072ba33SMatthias Ringwald */ 346941b3855SMatthias Ringwald #define L2CAP_EVENT_CHANNEL_CLOSED 0x71 347941b3855SMatthias Ringwald 348b072ba33SMatthias Ringwald /** 349b072ba33SMatthias Ringwald * @format 1BH222 350b072ba33SMatthias Ringwald * @param status 351b072ba33SMatthias Ringwald * @param address 352b072ba33SMatthias Ringwald * @param handle 353b072ba33SMatthias Ringwald * @param psm 354b072ba33SMatthias Ringwald * @param local_cid 355b072ba33SMatthias Ringwald * @param remote_cid 356b072ba33SMatthias Ringwald */ 357941b3855SMatthias Ringwald #define L2CAP_EVENT_INCOMING_CONNECTION 0x72 358941b3855SMatthias Ringwald 359b072ba33SMatthias Ringwald // ?? 360941b3855SMatthias Ringwald // data: event(8), len(8), handle(16) 361941b3855SMatthias Ringwald #define L2CAP_EVENT_TIMEOUT_CHECK 0x73 362941b3855SMatthias Ringwald 363b072ba33SMatthias Ringwald // ?? 364941b3855SMatthias Ringwald // data: event(8), len(8), local_cid(16), credits(8) 365941b3855SMatthias Ringwald #define L2CAP_EVENT_CREDITS 0x74 366941b3855SMatthias Ringwald 367b072ba33SMatthias Ringwald /** 368b072ba33SMatthias Ringwald * @format 12 369b072ba33SMatthias Ringwald * @param status 370b072ba33SMatthias Ringwald * @param psm 371b072ba33SMatthias Ringwald */ 372941b3855SMatthias Ringwald #define L2CAP_EVENT_SERVICE_REGISTERED 0x75 373941b3855SMatthias Ringwald 374b072ba33SMatthias Ringwald /** 375b072ba33SMatthias Ringwald * @format H2222 376b072ba33SMatthias Ringwald * @param handle 377b072ba33SMatthias Ringwald * @param interval_min 378b072ba33SMatthias Ringwald * @param interval_max 379b072ba33SMatthias Ringwald * @param latencey 380b072ba33SMatthias Ringwald * @param timeout_multiplier 381b072ba33SMatthias Ringwald */ 382941b3855SMatthias Ringwald #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 0x76 383941b3855SMatthias Ringwald 384941b3855SMatthias Ringwald // data: event(8), len(8), handle(16), result (16) (0 == ok, 1 == fail) 385b072ba33SMatthias Ringwald /** 386b072ba33SMatthias Ringwald * @format H2 387b072ba33SMatthias Ringwald * @param handle 388b072ba33SMatthias Ringwald * @result 389b072ba33SMatthias Ringwald */ 390941b3855SMatthias Ringwald #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 0x77 391941b3855SMatthias Ringwald 392b072ba33SMatthias Ringwald /** 393b072ba33SMatthias Ringwald * @format 2 394b072ba33SMatthias Ringwald * @param local_cid 395b072ba33SMatthias Ringwald */ 396b072ba33SMatthias Ringwald #define L2CAP_EVENT_CAN_SEND_NOW 0x78 397b072ba33SMatthias Ringwald 398941b3855SMatthias Ringwald // RFCOMM EVENTS 399b072ba33SMatthias Ringwald 400941b3855SMatthias Ringwald /** 401941b3855SMatthias Ringwald * @format 1B2122 402941b3855SMatthias Ringwald * @param status 403941b3855SMatthias Ringwald * @param bd_addr 404941b3855SMatthias Ringwald * @param con_handle 405941b3855SMatthias Ringwald * @param server_channel 406941b3855SMatthias Ringwald * @param rfcomm_cid 407941b3855SMatthias Ringwald * @param max_frame_size 408941b3855SMatthias Ringwald */ 409941b3855SMatthias Ringwald #define RFCOMM_EVENT_OPEN_CHANNEL_COMPLETE 0x80 410941b3855SMatthias Ringwald 411941b3855SMatthias Ringwald /** 412941b3855SMatthias Ringwald * @format 2 413941b3855SMatthias Ringwald * @param rfcomm_cid 414941b3855SMatthias Ringwald */ 415941b3855SMatthias Ringwald #define RFCOMM_EVENT_CHANNEL_CLOSED 0x81 416941b3855SMatthias Ringwald 417941b3855SMatthias Ringwald /** 418941b3855SMatthias Ringwald * @format B12 419941b3855SMatthias Ringwald * @param bd_addr 420941b3855SMatthias Ringwald * @param server_channel 421941b3855SMatthias Ringwald * @param rfcomm_cid 422941b3855SMatthias Ringwald */ 423941b3855SMatthias Ringwald #define RFCOMM_EVENT_INCOMING_CONNECTION 0x82 424941b3855SMatthias Ringwald 425941b3855SMatthias Ringwald /** 426941b3855SMatthias Ringwald * @format 21 427941b3855SMatthias Ringwald * @param rfcomm_cid 428941b3855SMatthias Ringwald * @param line_status 429941b3855SMatthias Ringwald */ 430941b3855SMatthias Ringwald #define RFCOMM_EVENT_REMOTE_LINE_STATUS 0x83 431941b3855SMatthias Ringwald 432941b3855SMatthias Ringwald /** 433941b3855SMatthias Ringwald * @format 21 434941b3855SMatthias Ringwald * @param rfcomm_cid 435941b3855SMatthias Ringwald * @param credits 436941b3855SMatthias Ringwald */ 437941b3855SMatthias Ringwald #define RFCOMM_EVENT_CREDITS 0x84 438941b3855SMatthias Ringwald 439941b3855SMatthias Ringwald /** 440941b3855SMatthias Ringwald * @format 11 441941b3855SMatthias Ringwald * @param status 442941b3855SMatthias Ringwald * @param channel_id 443941b3855SMatthias Ringwald */ 444941b3855SMatthias Ringwald #define RFCOMM_EVENT_SERVICE_REGISTERED 0x85 445941b3855SMatthias Ringwald 446941b3855SMatthias Ringwald /** 447941b3855SMatthias Ringwald * @format 11 448941b3855SMatthias Ringwald * @param status 449941b3855SMatthias Ringwald * @param server_channel_id 450941b3855SMatthias Ringwald */ 451941b3855SMatthias Ringwald #define RFCOMM_EVENT_PERSISTENT_CHANNEL 0x86 452941b3855SMatthias Ringwald 453941b3855SMatthias Ringwald /** 454941b3855SMatthias Ringwald * @format 21 455941b3855SMatthias Ringwald * @param rfcomm_cid 456941b3855SMatthias Ringwald * @param modem_status 457941b3855SMatthias Ringwald */ 458941b3855SMatthias Ringwald #define RFCOMM_EVENT_REMOTE_MODEM_STATUS 0x87 459941b3855SMatthias Ringwald 460941b3855SMatthias Ringwald /** 4617bd8e93bSMatthias Ringwald * TODO: format for variable data 2? 462941b3855SMatthias Ringwald * @param rfcomm_cid 463941b3855SMatthias Ringwald * @param rpn_data 464941b3855SMatthias Ringwald */ 465941b3855SMatthias Ringwald #define RFCOMM_EVENT_PORT_CONFIGURATION 0x88 466941b3855SMatthias Ringwald 467941b3855SMatthias Ringwald /** 468b072ba33SMatthias Ringwald * @format 2 469b072ba33SMatthias Ringwald * @param local_cid 470b072ba33SMatthias Ringwald */ 471b072ba33SMatthias Ringwald #define RFCOMM_EVENT_CAN_SEND_NOW 0x89 472b072ba33SMatthias Ringwald 473b072ba33SMatthias Ringwald 474b072ba33SMatthias Ringwald /** 475941b3855SMatthias Ringwald * @format 14 476941b3855SMatthias Ringwald * @param status 477941b3855SMatthias Ringwald * @param service_record_handle 478941b3855SMatthias Ringwald */ 4795611a760SMatthias Ringwald #define SDP_EVENT_SERVICE_REGISTERED 0x90 480941b3855SMatthias Ringwald 481941b3855SMatthias Ringwald /** 482941b3855SMatthias Ringwald * @format 1 483941b3855SMatthias Ringwald * @param status 484941b3855SMatthias Ringwald */ 4855611a760SMatthias Ringwald #define SDP_EVENT_QUERY_COMPLETE 0x91 486941b3855SMatthias Ringwald 487941b3855SMatthias Ringwald /** 488941b3855SMatthias Ringwald * @format 1T 489941b3855SMatthias Ringwald * @param rfcomm_channel 490941b3855SMatthias Ringwald * @param name 491941b3855SMatthias Ringwald */ 4925611a760SMatthias Ringwald #define SDP_EVENT_QUERY_RFCOMM_SERVICE 0x92 493941b3855SMatthias Ringwald 494941b3855SMatthias Ringwald /** 4954225393cSMatthias Ringwald * @format 22221 4964225393cSMatthias Ringwald * @param record_id 497941b3855SMatthias Ringwald * @param attribute_id 4984225393cSMatthias Ringwald * @param attribute_length 4994225393cSMatthias Ringwald * @param data_offset 5004225393cSMatthias Ringwald * @param data 501941b3855SMatthias Ringwald */ 5025611a760SMatthias Ringwald #define SDP_EVENT_QUERY_ATTRIBUTE_BYTE 0x93 503941b3855SMatthias Ringwald 5044de250b4SMatthias Ringwald /** 5054de250b4SMatthias Ringwald * @format 22LV 5064de250b4SMatthias Ringwald * @param record_id 5074de250b4SMatthias Ringwald * @param attribute_id 5084de250b4SMatthias Ringwald * @param attribute_length 5094de250b4SMatthias Ringwald * @param attribute_value 5104de250b4SMatthias Ringwald */ 5115611a760SMatthias Ringwald #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE 0x94 5124225393cSMatthias Ringwald 5134225393cSMatthias Ringwald /** 5144225393cSMatthias Ringwald * @format 224 5154225393cSMatthias Ringwald * @param total_count 5164225393cSMatthias Ringwald * @param record_index 5174225393cSMatthias Ringwald * @param record_handle 5184225393cSMatthias Ringwald * @note Not provided by daemon, only used for internal testing 5194225393cSMatthias Ringwald */ 5205611a760SMatthias Ringwald #define SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 0x95 521941b3855SMatthias Ringwald 522941b3855SMatthias Ringwald /** 523941b3855SMatthias Ringwald * @format H1 524941b3855SMatthias Ringwald * @param handle 525941b3855SMatthias Ringwald * @param status 526941b3855SMatthias Ringwald */ 5275611a760SMatthias Ringwald #define GATT_EVENT_QUERY_COMPLETE 0xA0 528941b3855SMatthias Ringwald 529941b3855SMatthias Ringwald /** 530941b3855SMatthias Ringwald * @format HX 531941b3855SMatthias Ringwald * @param handle 532941b3855SMatthias Ringwald * @param service 533941b3855SMatthias Ringwald */ 5345611a760SMatthias Ringwald #define GATT_EVENT_SERVICE_QUERY_RESULT 0xA1 535941b3855SMatthias Ringwald 536941b3855SMatthias Ringwald /** 537941b3855SMatthias Ringwald * @format HY 538941b3855SMatthias Ringwald * @param handle 539941b3855SMatthias Ringwald * @param characteristic 540941b3855SMatthias Ringwald */ 5415611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 0xA2 542941b3855SMatthias Ringwald 543941b3855SMatthias Ringwald /** 544941b3855SMatthias Ringwald * @format H2X 545941b3855SMatthias Ringwald * @param handle 546941b3855SMatthias Ringwald * @param include_handle 547941b3855SMatthias Ringwald * @param service 548941b3855SMatthias Ringwald */ 5495611a760SMatthias Ringwald #define GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 0xA3 550941b3855SMatthias Ringwald 551941b3855SMatthias Ringwald /** 552941b3855SMatthias Ringwald * @format HZ 553941b3855SMatthias Ringwald * @param handle 554941b3855SMatthias Ringwald * @param characteristic_descriptor 555941b3855SMatthias Ringwald */ 5565611a760SMatthias Ringwald #define GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 0xA4 557941b3855SMatthias Ringwald 558941b3855SMatthias Ringwald /** 559941b3855SMatthias Ringwald * @format H2LV 560941b3855SMatthias Ringwald * @param handle 561941b3855SMatthias Ringwald * @param value_handle 562941b3855SMatthias Ringwald * @param value_length 563941b3855SMatthias Ringwald * @param value 564941b3855SMatthias Ringwald */ 5655611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA5 566941b3855SMatthias Ringwald 567941b3855SMatthias Ringwald /** 568941b3855SMatthias Ringwald * @format H22LV 569941b3855SMatthias Ringwald * @param handle 570941b3855SMatthias Ringwald * @param value_handle 571941b3855SMatthias Ringwald * @param value_offset 572941b3855SMatthias Ringwald * @param value_length 573941b3855SMatthias Ringwald * @param value 574941b3855SMatthias Ringwald */ 5755611a760SMatthias Ringwald #define GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA6 576941b3855SMatthias Ringwald 577941b3855SMatthias Ringwald /** 578941b3855SMatthias Ringwald * @format H2LV 579941b3855SMatthias Ringwald * @param handle 580941b3855SMatthias Ringwald * @param value_handle 581941b3855SMatthias Ringwald * @param value_length 582941b3855SMatthias Ringwald * @param value 583941b3855SMatthias Ringwald */ 5845611a760SMatthias Ringwald #define GATT_EVENT_NOTIFICATION 0xA7 585941b3855SMatthias Ringwald 586941b3855SMatthias Ringwald /** 587941b3855SMatthias Ringwald * @format H2LV 588941b3855SMatthias Ringwald * @param handle 589941b3855SMatthias Ringwald * @param value_handle 590941b3855SMatthias Ringwald * @param value_length 591941b3855SMatthias Ringwald * @param value 592941b3855SMatthias Ringwald */ 5935611a760SMatthias Ringwald #define GATT_EVENT_INDICATION 0xA8 594941b3855SMatthias Ringwald 595941b3855SMatthias Ringwald /** 596941b3855SMatthias Ringwald * @format H2LV 597941b3855SMatthias Ringwald * @param descriptor_handle 598941b3855SMatthias Ringwald * @param descriptor_length 599941b3855SMatthias Ringwald * @param descriptor 600941b3855SMatthias Ringwald */ 6015611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xA9 602941b3855SMatthias Ringwald 603941b3855SMatthias Ringwald /** 604941b3855SMatthias Ringwald * @format H2LV 605941b3855SMatthias Ringwald * @param handle 606941b3855SMatthias Ringwald * @param descriptor_offset 607941b3855SMatthias Ringwald * @param descriptor_length 608941b3855SMatthias Ringwald * @param descriptor 609941b3855SMatthias Ringwald */ 6105611a760SMatthias Ringwald #define GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xAA 611941b3855SMatthias Ringwald 612941b3855SMatthias Ringwald /** 613941b3855SMatthias Ringwald * @format H2 614941b3855SMatthias Ringwald * @param handle 615941b3855SMatthias Ringwald * @param MTU 616941b3855SMatthias Ringwald */ 6175611a760SMatthias Ringwald #define GATT_EVENT_MTU 0xAB 618941b3855SMatthias Ringwald 619941b3855SMatthias Ringwald /** 620941b3855SMatthias Ringwald * @format H2 621941b3855SMatthias Ringwald * @param handle 622941b3855SMatthias Ringwald * @param MTU 623941b3855SMatthias Ringwald */ 6245611a760SMatthias Ringwald #define ATT_EVENT_MTU_EXCHANGE_COMPLETE 0xB5 625941b3855SMatthias Ringwald 626941b3855SMatthias Ringwald // data: event(8), len(8), status (8), hci_handle (16), attribute_handle (16) 6275611a760SMatthias Ringwald #define ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 0xB6 628941b3855SMatthias Ringwald 629941b3855SMatthias Ringwald 630941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bnep service uuid (16) 631941b3855SMatthias Ringwald #define BNEP_EVENT_SERVICE_REGISTERED 0xC0 632941b3855SMatthias Ringwald 633941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bnep source uuid (16), bnep destination uuid (16), mtu (16), remote_address (48) 634941b3855SMatthias Ringwald #define BNEP_EVENT_OPEN_CHANNEL_COMPLETE 0xC1 635941b3855SMatthias Ringwald 636941b3855SMatthias Ringwald // data: event(8), len(8), bnep source uuid (16), bnep destination uuid (16), remote_address (48) 637941b3855SMatthias Ringwald #define BNEP_EVENT_CHANNEL_CLOSED 0xC2 638941b3855SMatthias Ringwald 639941b3855SMatthias Ringwald // data: event(8), len(8), bnep source uuid (16), bnep destination uuid (16), remote_address (48), channel state (8) 640941b3855SMatthias Ringwald #define BNEP_EVENT_CHANNEL_TIMEOUT 0xC3 641941b3855SMatthias Ringwald 642941b3855SMatthias Ringwald // data: event(8), len(8) 643941b3855SMatthias Ringwald #define BNEP_EVENT_READY_TO_SEND 0xC4 644941b3855SMatthias Ringwald 645941b3855SMatthias Ringwald /** 646941b3855SMatthias Ringwald * @format H1B 647941b3855SMatthias Ringwald * @param handle 648941b3855SMatthias Ringwald * @param addr_type 649941b3855SMatthias Ringwald * @param address 650941b3855SMatthias Ringwald */ 6515611a760SMatthias Ringwald #define SM_EVENT_JUST_WORKS_REQUEST 0xD0 652941b3855SMatthias Ringwald 653941b3855SMatthias Ringwald /** 654941b3855SMatthias Ringwald * @format H1B 655941b3855SMatthias Ringwald * @param handle 656941b3855SMatthias Ringwald * @param addr_type 657941b3855SMatthias Ringwald * @param address 658941b3855SMatthias Ringwald */ 6595611a760SMatthias Ringwald #define SM_EVENT_JUST_WORKS_CANCEL 0xD1 660941b3855SMatthias Ringwald 661941b3855SMatthias Ringwald /** 662941b3855SMatthias Ringwald * @format H1B4 663941b3855SMatthias Ringwald * @param handle 664941b3855SMatthias Ringwald * @param addr_type 665941b3855SMatthias Ringwald * @param address 666941b3855SMatthias Ringwald * @param passkey 667941b3855SMatthias Ringwald */ 6685611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_DISPLAY_NUMBER 0xD2 669941b3855SMatthias Ringwald 670941b3855SMatthias Ringwald /** 671941b3855SMatthias Ringwald * @format H1B 672941b3855SMatthias Ringwald * @param handle 673941b3855SMatthias Ringwald * @param addr_type 674941b3855SMatthias Ringwald * @param address 675941b3855SMatthias Ringwald */ 6765611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_DISPLAY_CANCEL 0xD3 677941b3855SMatthias Ringwald 678941b3855SMatthias Ringwald /** 679941b3855SMatthias Ringwald * @format H1B421 680941b3855SMatthias Ringwald * @param handle 681941b3855SMatthias Ringwald * @param addr_type 682941b3855SMatthias Ringwald * @param address 683941b3855SMatthias Ringwald */ 6845611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_INPUT_NUMBER 0xD4 685941b3855SMatthias Ringwald 686941b3855SMatthias Ringwald /** 687941b3855SMatthias Ringwald * @format H1B 688941b3855SMatthias Ringwald * @param handle 689941b3855SMatthias Ringwald * @param addr_type 690941b3855SMatthias Ringwald * @param address 691941b3855SMatthias Ringwald */ 6925611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_INPUT_CANCEL 0xD5 693941b3855SMatthias Ringwald 694941b3855SMatthias Ringwald /** 695941b3855SMatthias Ringwald * @format H1B 696941b3855SMatthias Ringwald * @param handle 697941b3855SMatthias Ringwald * @param addr_type 698941b3855SMatthias Ringwald * @param address 699941b3855SMatthias Ringwald */ 7005611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_STARTED 0xD6 701941b3855SMatthias Ringwald 702941b3855SMatthias Ringwald /** 703941b3855SMatthias Ringwald * @format H1B 704941b3855SMatthias Ringwald * @param handle 705941b3855SMatthias Ringwald * @param addr_type 706941b3855SMatthias Ringwald * @param address 707941b3855SMatthias Ringwald */ 7085611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_FAILED 0xD7 709941b3855SMatthias Ringwald 710941b3855SMatthias Ringwald /** 711941b3855SMatthias Ringwald * @format H1B2 712941b3855SMatthias Ringwald * @param handle 713941b3855SMatthias Ringwald * @param addr_type 714941b3855SMatthias Ringwald * @param address 715941b3855SMatthias Ringwald * @param le_device_db_index 716941b3855SMatthias Ringwald */ 7175611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 0xD8 718941b3855SMatthias Ringwald 719941b3855SMatthias Ringwald /** 720941b3855SMatthias Ringwald * @format H1B 721941b3855SMatthias Ringwald * @param handle 722941b3855SMatthias Ringwald * @param addr_type 723941b3855SMatthias Ringwald * @param address 724941b3855SMatthias Ringwald */ 7255611a760SMatthias Ringwald #define SM_EVENT_AUTHORIZATION_REQUEST 0xD9 726941b3855SMatthias Ringwald 727941b3855SMatthias Ringwald /** 728941b3855SMatthias Ringwald * @format H1B1 729941b3855SMatthias Ringwald * @param handle 730941b3855SMatthias Ringwald * @param addr_type 731941b3855SMatthias Ringwald * @param address 732941b3855SMatthias Ringwald * @param authorization_result 733941b3855SMatthias Ringwald */ 7345611a760SMatthias Ringwald #define SM_EVENT_AUTHORIZATION_RESULT 0xDA 735941b3855SMatthias Ringwald 736941b3855SMatthias Ringwald // GAP 737941b3855SMatthias Ringwald 738941b3855SMatthias Ringwald // data: event(8), len(8), hci_handle (16), security_level (8) 7395611a760SMatthias Ringwald #define GAP_EVENT_SECURITY_LEVEL 0xE0 740941b3855SMatthias Ringwald 741941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bd_addr(48) 7425611a760SMatthias Ringwald #define GAP_EVENT_DEDICATED_BONDING_COMPLETED 0xE1 743941b3855SMatthias Ringwald 744941b3855SMatthias Ringwald /** 745941b3855SMatthias Ringwald * @format 11B1JV 746941b3855SMatthias Ringwald * @param advertising_event_type 747941b3855SMatthias Ringwald * @param address_type 748941b3855SMatthias Ringwald * @param address 749941b3855SMatthias Ringwald * @param rssi 750941b3855SMatthias Ringwald * @param data_length 751941b3855SMatthias Ringwald * @param data 752941b3855SMatthias Ringwald */ 7535611a760SMatthias Ringwald #define GAP_LE_EVENT_ADVERTISING_REPORT 0xE2 754941b3855SMatthias Ringwald 755827b1c43SMatthias Ringwald 756941b3855SMatthias Ringwald #define HCI_EVENT_HSP_META 0xE8 757941b3855SMatthias Ringwald 758*39d235cbSMatthias Ringwald #define HCI_EVENT_HFP_META 0xE9 759*39d235cbSMatthias Ringwald 760*39d235cbSMatthias Ringwald 761*39d235cbSMatthias Ringwald // HSP Subevents 762*39d235cbSMatthias Ringwald 763827b1c43SMatthias Ringwald /** 764827b1c43SMatthias Ringwald * @format 11 765827b1c43SMatthias Ringwald * @param subevent_code 766827b1c43SMatthias Ringwald * @param status 0 == OK 767827b1c43SMatthias Ringwald */ 768827b1c43SMatthias Ringwald #define HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 0x01 769827b1c43SMatthias Ringwald 770827b1c43SMatthias Ringwald /** 771827b1c43SMatthias Ringwald * @format 11 772827b1c43SMatthias Ringwald * @param subevent_code 773827b1c43SMatthias Ringwald * @param status 0 == OK 774827b1c43SMatthias Ringwald */ 775827b1c43SMatthias Ringwald #define HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 0x02 776827b1c43SMatthias Ringwald 777827b1c43SMatthias Ringwald /** 778827b1c43SMatthias Ringwald * @format 1 779827b1c43SMatthias Ringwald * @param subevent_code 780827b1c43SMatthias Ringwald */ 781827b1c43SMatthias Ringwald #define HSP_SUBEVENT_RING 0x03 782827b1c43SMatthias Ringwald 783827b1c43SMatthias Ringwald /** 784827b1c43SMatthias Ringwald * @format 11 785827b1c43SMatthias Ringwald * @param subevent_code 786827b1c43SMatthias Ringwald * @param gain Valid range: [0,15] 787827b1c43SMatthias Ringwald */ 788827b1c43SMatthias Ringwald #define HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 0x04 789827b1c43SMatthias Ringwald 790827b1c43SMatthias Ringwald /** 791827b1c43SMatthias Ringwald * @format 11 792827b1c43SMatthias Ringwald * @param subevent_code 793827b1c43SMatthias Ringwald * @param gain Valid range: [0,15] 794827b1c43SMatthias Ringwald */ 795827b1c43SMatthias Ringwald #define HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 0x05 796827b1c43SMatthias Ringwald 797827b1c43SMatthias Ringwald /** 798827b1c43SMatthias Ringwald * @format 1JV 799827b1c43SMatthias Ringwald * @param subevent_code 800827b1c43SMatthias Ringwald * @param value_length 801827b1c43SMatthias Ringwald * @param value 802827b1c43SMatthias Ringwald */ 803827b1c43SMatthias Ringwald #define HSP_SUBEVENT_HS_COMMAND 0x06 804827b1c43SMatthias Ringwald 805827b1c43SMatthias Ringwald /** 806827b1c43SMatthias Ringwald * @format 1JV 807827b1c43SMatthias Ringwald * @param subevent_code 808827b1c43SMatthias Ringwald * @param value_length 809827b1c43SMatthias Ringwald * @param value 810827b1c43SMatthias Ringwald */ 811827b1c43SMatthias Ringwald #define HSP_SUBEVENT_AG_INDICATION 0x07 812827b1c43SMatthias Ringwald 813941b3855SMatthias Ringwald 814*39d235cbSMatthias Ringwald // HFP Subevents 815941b3855SMatthias Ringwald 816941b3855SMatthias Ringwald #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 0x01 817941b3855SMatthias Ringwald #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED 0x02 818941b3855SMatthias Ringwald #define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 0x03 819941b3855SMatthias Ringwald #define HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED 0x04 820941b3855SMatthias Ringwald #define HFP_SUBEVENT_COMPLETE 0x05 821941b3855SMatthias Ringwald #define HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 0x06 822941b3855SMatthias Ringwald #define HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 0x07 823941b3855SMatthias Ringwald #define HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 0x08 824941b3855SMatthias Ringwald #define HFP_SUBEVENT_CODECS_CONNECTION_COMPLETE 0x09 825aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_START_RINGINIG 0x0A 826aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_STOP_RINGINIG 0x0B 827aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_CALL_TERMINATED 0x0C 828aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 0x0D 829aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_REDIAL_LAST_NUMBER 0x0E 830aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG 0x0F 831ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 0x10 832ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_TRANSMIT_DTMF_CODES 0x11 833ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_TRANSMIT_STATUS_OF_CURRENT_CALL 0x12 834ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_CALL_ANSWERED 0x13 835ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_CONFERENCE_CALL 0x14 836ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_RING 0x15 837ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_SPEAKER_VOLUME 0x16 838ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_MICROPHONE_VOLUME 0x17 839941b3855SMatthias Ringwald 840941b3855SMatthias Ringwald // ANCS Client 841a4815874SMatthias Ringwald 842a4815874SMatthias Ringwald /** 843a4815874SMatthias Ringwald * @format H 844a4815874SMatthias Ringwald * @param handle 845a4815874SMatthias Ringwald */ 8465611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_CONNECTED 0xF0 847a4815874SMatthias Ringwald 848a4815874SMatthias Ringwald /** 849a4815874SMatthias Ringwald * @format H2T 850a4815874SMatthias Ringwald * @param handle 851a4815874SMatthias Ringwald * @param attribute_id 852a4815874SMatthias Ringwald * @param text 853a4815874SMatthias Ringwald */ 8545611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_NOTIFICATION 0xF1 855a4815874SMatthias Ringwald 856a4815874SMatthias Ringwald /** 857a4815874SMatthias Ringwald * @format H 858a4815874SMatthias Ringwald * @param handle 859a4815874SMatthias Ringwald */ 8605611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_DISCONNECTED 0xF2 861941b3855SMatthias Ringwald 862941b3855SMatthias Ringwald // #define HCI_EVENT_HFP_META 0xxx 863941b3855SMatthias Ringwald // #define HCI_EVENT_GATT_META 0xxx 864941b3855SMatthias Ringwald // #define HCI_EVENT_SDP_META 0xxx 865941b3855SMatthias Ringwald // #define HCI_EVENT_ANCS_META 0xxx 866941b3855SMatthias Ringwald // #define HCI_EVENT_SM_META 0xxx 867941b3855SMatthias Ringwald // #define HCI_EVENT_GAP_META 0xxx 868941b3855SMatthias Ringwald // #define HCI_EVENT_BNEP_META 0xxx 869941b3855SMatthias Ringwald // #define HCI_EVENT_PAN_META 0xxx 870941b3855SMatthias Ringwald 871941b3855SMatthias Ringwald #endif 872