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) 288827b1c43SMatthias Ringwald #define DAEMON_EVENT_SYSTEM_BLUETOOTH_ENABLED 0x64 289941b3855SMatthias Ringwald 290941b3855SMatthias Ringwald // data: event (8), len(8), status (8) == 0, address (48), name (1984 bits = 248 bytes) 291827b1c43SMatthias Ringwald #define DAEMON_EVENT_REMOTE_NAME_CACHED 0x65 292941b3855SMatthias Ringwald 293941b3855SMatthias Ringwald // data: event(8) 294941b3855SMatthias Ringwald #define DAEMON_EVENT_CONNECTION_OPENED 0x68 295941b3855SMatthias Ringwald 296941b3855SMatthias Ringwald // data: event(8) 297941b3855SMatthias Ringwald #define DAEMON_EVENT_CONNECTION_CLOSED 0x69 298941b3855SMatthias Ringwald 299941b3855SMatthias Ringwald // data: event(8), nr_connections(8) 300941b3855SMatthias Ringwald #define DAEMON_NR_CONNECTIONS_CHANGED 0x6A 301941b3855SMatthias Ringwald 302941b3855SMatthias Ringwald // data: event(8) 303941b3855SMatthias Ringwald #define DAEMON_EVENT_NEW_RFCOMM_CREDITS 0x6B 304941b3855SMatthias Ringwald 305827b1c43SMatthias Ringwald 3063bc639ceSMatthias Ringwald // additional HCI events 307*63fa3374SMatthias Ringwald 308*63fa3374SMatthias Ringwald /** 309*63fa3374SMatthias Ringwald * @brief Outgoing packet 310*63fa3374SMatthias Ringwald */ 311*63fa3374SMatthias Ringwald #define HCI_EVENT_TRANSPORT_PACKET_SENT 0x6E 312*63fa3374SMatthias Ringwald 3133bc639ceSMatthias Ringwald /** 3143bc639ceSMatthias Ringwald * @format B 3153bc639ceSMatthias Ringwald * @param handle 3163bc639ceSMatthias Ringwald */ 3173bc639ceSMatthias Ringwald #define HCI_EVENT_SCO_CAN_SEND_NOW 0x6F 3183bc639ceSMatthias Ringwald 319941b3855SMatthias Ringwald // L2CAP EVENTS 320941b3855SMatthias Ringwald 321b072ba33SMatthias Ringwald /** 322b072ba33SMatthias Ringwald * @format 1BH222222 323b072ba33SMatthias Ringwald * @param status 324b072ba33SMatthias Ringwald * @param address 325b072ba33SMatthias Ringwald * @param handle 326b072ba33SMatthias Ringwald * @param psm 327b072ba33SMatthias Ringwald * @param local_cid 328b072ba33SMatthias Ringwald * @param remote_cid 329b072ba33SMatthias Ringwald * @param local_mtu 330b072ba33SMatthias Ringwald * @param remote_mtu 331b072ba33SMatthias Ringwald * @param flush_timeout 332b072ba33SMatthias Ringwald */ 333941b3855SMatthias Ringwald #define L2CAP_EVENT_CHANNEL_OPENED 0x70 334941b3855SMatthias Ringwald 335b072ba33SMatthias Ringwald /* 336b072ba33SMatthias Ringwald * @format 2 337b072ba33SMatthias Ringwald * @param local_cid 338b072ba33SMatthias Ringwald */ 339941b3855SMatthias Ringwald #define L2CAP_EVENT_CHANNEL_CLOSED 0x71 340941b3855SMatthias Ringwald 341b072ba33SMatthias Ringwald /** 342b072ba33SMatthias Ringwald * @format 1BH222 343b072ba33SMatthias Ringwald * @param status 344b072ba33SMatthias Ringwald * @param address 345b072ba33SMatthias Ringwald * @param handle 346b072ba33SMatthias Ringwald * @param psm 347b072ba33SMatthias Ringwald * @param local_cid 348b072ba33SMatthias Ringwald * @param remote_cid 349b072ba33SMatthias Ringwald */ 350941b3855SMatthias Ringwald #define L2CAP_EVENT_INCOMING_CONNECTION 0x72 351941b3855SMatthias Ringwald 352b072ba33SMatthias Ringwald // ?? 353941b3855SMatthias Ringwald // data: event(8), len(8), handle(16) 354941b3855SMatthias Ringwald #define L2CAP_EVENT_TIMEOUT_CHECK 0x73 355941b3855SMatthias Ringwald 356b072ba33SMatthias Ringwald // ?? 357941b3855SMatthias Ringwald // data: event(8), len(8), local_cid(16), credits(8) 358941b3855SMatthias Ringwald #define L2CAP_EVENT_CREDITS 0x74 359941b3855SMatthias Ringwald 360b072ba33SMatthias Ringwald /** 361b072ba33SMatthias Ringwald * @format 12 362b072ba33SMatthias Ringwald * @param status 363b072ba33SMatthias Ringwald * @param psm 364b072ba33SMatthias Ringwald */ 365941b3855SMatthias Ringwald #define L2CAP_EVENT_SERVICE_REGISTERED 0x75 366941b3855SMatthias Ringwald 367b072ba33SMatthias Ringwald /** 368b072ba33SMatthias Ringwald * @format H2222 369b072ba33SMatthias Ringwald * @param handle 370b072ba33SMatthias Ringwald * @param interval_min 371b072ba33SMatthias Ringwald * @param interval_max 372b072ba33SMatthias Ringwald * @param latencey 373b072ba33SMatthias Ringwald * @param timeout_multiplier 374b072ba33SMatthias Ringwald */ 375941b3855SMatthias Ringwald #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 0x76 376941b3855SMatthias Ringwald 377941b3855SMatthias Ringwald // data: event(8), len(8), handle(16), result (16) (0 == ok, 1 == fail) 378b072ba33SMatthias Ringwald /** 379b072ba33SMatthias Ringwald * @format H2 380b072ba33SMatthias Ringwald * @param handle 381b072ba33SMatthias Ringwald * @result 382b072ba33SMatthias Ringwald */ 383941b3855SMatthias Ringwald #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 0x77 384941b3855SMatthias Ringwald 385b072ba33SMatthias Ringwald /** 386b072ba33SMatthias Ringwald * @format 2 387b072ba33SMatthias Ringwald * @param local_cid 388b072ba33SMatthias Ringwald */ 389b072ba33SMatthias Ringwald #define L2CAP_EVENT_CAN_SEND_NOW 0x78 390b072ba33SMatthias Ringwald 391941b3855SMatthias Ringwald // RFCOMM EVENTS 392b072ba33SMatthias Ringwald 393941b3855SMatthias Ringwald /** 394941b3855SMatthias Ringwald * @format 1B2122 395941b3855SMatthias Ringwald * @param status 396941b3855SMatthias Ringwald * @param bd_addr 397941b3855SMatthias Ringwald * @param con_handle 398941b3855SMatthias Ringwald * @param server_channel 399941b3855SMatthias Ringwald * @param rfcomm_cid 400941b3855SMatthias Ringwald * @param max_frame_size 401941b3855SMatthias Ringwald */ 402941b3855SMatthias Ringwald #define RFCOMM_EVENT_OPEN_CHANNEL_COMPLETE 0x80 403941b3855SMatthias Ringwald 404941b3855SMatthias Ringwald /** 405941b3855SMatthias Ringwald * @format 2 406941b3855SMatthias Ringwald * @param rfcomm_cid 407941b3855SMatthias Ringwald */ 408941b3855SMatthias Ringwald #define RFCOMM_EVENT_CHANNEL_CLOSED 0x81 409941b3855SMatthias Ringwald 410941b3855SMatthias Ringwald /** 411941b3855SMatthias Ringwald * @format B12 412941b3855SMatthias Ringwald * @param bd_addr 413941b3855SMatthias Ringwald * @param server_channel 414941b3855SMatthias Ringwald * @param rfcomm_cid 415941b3855SMatthias Ringwald */ 416941b3855SMatthias Ringwald #define RFCOMM_EVENT_INCOMING_CONNECTION 0x82 417941b3855SMatthias Ringwald 418941b3855SMatthias Ringwald /** 419941b3855SMatthias Ringwald * @format 21 420941b3855SMatthias Ringwald * @param rfcomm_cid 421941b3855SMatthias Ringwald * @param line_status 422941b3855SMatthias Ringwald */ 423941b3855SMatthias Ringwald #define RFCOMM_EVENT_REMOTE_LINE_STATUS 0x83 424941b3855SMatthias Ringwald 425941b3855SMatthias Ringwald /** 426941b3855SMatthias Ringwald * @format 21 427941b3855SMatthias Ringwald * @param rfcomm_cid 428941b3855SMatthias Ringwald * @param credits 429941b3855SMatthias Ringwald */ 430941b3855SMatthias Ringwald #define RFCOMM_EVENT_CREDITS 0x84 431941b3855SMatthias Ringwald 432941b3855SMatthias Ringwald /** 433941b3855SMatthias Ringwald * @format 11 434941b3855SMatthias Ringwald * @param status 435941b3855SMatthias Ringwald * @param channel_id 436941b3855SMatthias Ringwald */ 437941b3855SMatthias Ringwald #define RFCOMM_EVENT_SERVICE_REGISTERED 0x85 438941b3855SMatthias Ringwald 439941b3855SMatthias Ringwald /** 440941b3855SMatthias Ringwald * @format 11 441941b3855SMatthias Ringwald * @param status 442941b3855SMatthias Ringwald * @param server_channel_id 443941b3855SMatthias Ringwald */ 444941b3855SMatthias Ringwald #define RFCOMM_EVENT_PERSISTENT_CHANNEL 0x86 445941b3855SMatthias Ringwald 446941b3855SMatthias Ringwald /** 447941b3855SMatthias Ringwald * @format 21 448941b3855SMatthias Ringwald * @param rfcomm_cid 449941b3855SMatthias Ringwald * @param modem_status 450941b3855SMatthias Ringwald */ 451941b3855SMatthias Ringwald #define RFCOMM_EVENT_REMOTE_MODEM_STATUS 0x87 452941b3855SMatthias Ringwald 453941b3855SMatthias Ringwald /** 4547bd8e93bSMatthias Ringwald * TODO: format for variable data 2? 455941b3855SMatthias Ringwald * @param rfcomm_cid 456941b3855SMatthias Ringwald * @param rpn_data 457941b3855SMatthias Ringwald */ 458941b3855SMatthias Ringwald #define RFCOMM_EVENT_PORT_CONFIGURATION 0x88 459941b3855SMatthias Ringwald 460941b3855SMatthias Ringwald /** 461b072ba33SMatthias Ringwald * @format 2 462b072ba33SMatthias Ringwald * @param local_cid 463b072ba33SMatthias Ringwald */ 464b072ba33SMatthias Ringwald #define RFCOMM_EVENT_CAN_SEND_NOW 0x89 465b072ba33SMatthias Ringwald 466b072ba33SMatthias Ringwald 467b072ba33SMatthias Ringwald /** 468941b3855SMatthias Ringwald * @format 14 469941b3855SMatthias Ringwald * @param status 470941b3855SMatthias Ringwald * @param service_record_handle 471941b3855SMatthias Ringwald */ 4725611a760SMatthias Ringwald #define SDP_EVENT_SERVICE_REGISTERED 0x90 473941b3855SMatthias Ringwald 474941b3855SMatthias Ringwald /** 475941b3855SMatthias Ringwald * @format 1 476941b3855SMatthias Ringwald * @param status 477941b3855SMatthias Ringwald */ 4785611a760SMatthias Ringwald #define SDP_EVENT_QUERY_COMPLETE 0x91 479941b3855SMatthias Ringwald 480941b3855SMatthias Ringwald /** 481941b3855SMatthias Ringwald * @format 1T 482941b3855SMatthias Ringwald * @param rfcomm_channel 483941b3855SMatthias Ringwald * @param name 484941b3855SMatthias Ringwald */ 4855611a760SMatthias Ringwald #define SDP_EVENT_QUERY_RFCOMM_SERVICE 0x92 486941b3855SMatthias Ringwald 487941b3855SMatthias Ringwald /** 4884225393cSMatthias Ringwald * @format 22221 4894225393cSMatthias Ringwald * @param record_id 490941b3855SMatthias Ringwald * @param attribute_id 4914225393cSMatthias Ringwald * @param attribute_length 4924225393cSMatthias Ringwald * @param data_offset 4934225393cSMatthias Ringwald * @param data 494941b3855SMatthias Ringwald */ 4955611a760SMatthias Ringwald #define SDP_EVENT_QUERY_ATTRIBUTE_BYTE 0x93 496941b3855SMatthias Ringwald 4974de250b4SMatthias Ringwald /** 4984de250b4SMatthias Ringwald * @format 22LV 4994de250b4SMatthias Ringwald * @param record_id 5004de250b4SMatthias Ringwald * @param attribute_id 5014de250b4SMatthias Ringwald * @param attribute_length 5024de250b4SMatthias Ringwald * @param attribute_value 5034de250b4SMatthias Ringwald */ 5045611a760SMatthias Ringwald #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE 0x94 5054225393cSMatthias Ringwald 5064225393cSMatthias Ringwald /** 5074225393cSMatthias Ringwald * @format 224 5084225393cSMatthias Ringwald * @param total_count 5094225393cSMatthias Ringwald * @param record_index 5104225393cSMatthias Ringwald * @param record_handle 5114225393cSMatthias Ringwald * @note Not provided by daemon, only used for internal testing 5124225393cSMatthias Ringwald */ 5135611a760SMatthias Ringwald #define SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 0x95 514941b3855SMatthias Ringwald 515941b3855SMatthias Ringwald /** 516941b3855SMatthias Ringwald * @format H1 517941b3855SMatthias Ringwald * @param handle 518941b3855SMatthias Ringwald * @param status 519941b3855SMatthias Ringwald */ 5205611a760SMatthias Ringwald #define GATT_EVENT_QUERY_COMPLETE 0xA0 521941b3855SMatthias Ringwald 522941b3855SMatthias Ringwald /** 523941b3855SMatthias Ringwald * @format HX 524941b3855SMatthias Ringwald * @param handle 525941b3855SMatthias Ringwald * @param service 526941b3855SMatthias Ringwald */ 5275611a760SMatthias Ringwald #define GATT_EVENT_SERVICE_QUERY_RESULT 0xA1 528941b3855SMatthias Ringwald 529941b3855SMatthias Ringwald /** 530941b3855SMatthias Ringwald * @format HY 531941b3855SMatthias Ringwald * @param handle 532941b3855SMatthias Ringwald * @param characteristic 533941b3855SMatthias Ringwald */ 5345611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 0xA2 535941b3855SMatthias Ringwald 536941b3855SMatthias Ringwald /** 537941b3855SMatthias Ringwald * @format H2X 538941b3855SMatthias Ringwald * @param handle 539941b3855SMatthias Ringwald * @param include_handle 540941b3855SMatthias Ringwald * @param service 541941b3855SMatthias Ringwald */ 5425611a760SMatthias Ringwald #define GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 0xA3 543941b3855SMatthias Ringwald 544941b3855SMatthias Ringwald /** 545941b3855SMatthias Ringwald * @format HZ 546941b3855SMatthias Ringwald * @param handle 547941b3855SMatthias Ringwald * @param characteristic_descriptor 548941b3855SMatthias Ringwald */ 5495611a760SMatthias Ringwald #define GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 0xA4 550941b3855SMatthias Ringwald 551941b3855SMatthias Ringwald /** 552941b3855SMatthias Ringwald * @format H2LV 553941b3855SMatthias Ringwald * @param handle 554941b3855SMatthias Ringwald * @param value_handle 555941b3855SMatthias Ringwald * @param value_length 556941b3855SMatthias Ringwald * @param value 557941b3855SMatthias Ringwald */ 5585611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA5 559941b3855SMatthias Ringwald 560941b3855SMatthias Ringwald /** 561941b3855SMatthias Ringwald * @format H22LV 562941b3855SMatthias Ringwald * @param handle 563941b3855SMatthias Ringwald * @param value_handle 564941b3855SMatthias Ringwald * @param value_offset 565941b3855SMatthias Ringwald * @param value_length 566941b3855SMatthias Ringwald * @param value 567941b3855SMatthias Ringwald */ 5685611a760SMatthias Ringwald #define GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA6 569941b3855SMatthias Ringwald 570941b3855SMatthias Ringwald /** 571941b3855SMatthias Ringwald * @format H2LV 572941b3855SMatthias Ringwald * @param handle 573941b3855SMatthias Ringwald * @param value_handle 574941b3855SMatthias Ringwald * @param value_length 575941b3855SMatthias Ringwald * @param value 576941b3855SMatthias Ringwald */ 5775611a760SMatthias Ringwald #define GATT_EVENT_NOTIFICATION 0xA7 578941b3855SMatthias Ringwald 579941b3855SMatthias Ringwald /** 580941b3855SMatthias Ringwald * @format H2LV 581941b3855SMatthias Ringwald * @param handle 582941b3855SMatthias Ringwald * @param value_handle 583941b3855SMatthias Ringwald * @param value_length 584941b3855SMatthias Ringwald * @param value 585941b3855SMatthias Ringwald */ 5865611a760SMatthias Ringwald #define GATT_EVENT_INDICATION 0xA8 587941b3855SMatthias Ringwald 588941b3855SMatthias Ringwald /** 589941b3855SMatthias Ringwald * @format H2LV 590941b3855SMatthias Ringwald * @param descriptor_handle 591941b3855SMatthias Ringwald * @param descriptor_length 592941b3855SMatthias Ringwald * @param descriptor 593941b3855SMatthias Ringwald */ 5945611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xA9 595941b3855SMatthias Ringwald 596941b3855SMatthias Ringwald /** 597941b3855SMatthias Ringwald * @format H2LV 598941b3855SMatthias Ringwald * @param handle 599941b3855SMatthias Ringwald * @param descriptor_offset 600941b3855SMatthias Ringwald * @param descriptor_length 601941b3855SMatthias Ringwald * @param descriptor 602941b3855SMatthias Ringwald */ 6035611a760SMatthias Ringwald #define GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xAA 604941b3855SMatthias Ringwald 605941b3855SMatthias Ringwald /** 606941b3855SMatthias Ringwald * @format H2 607941b3855SMatthias Ringwald * @param handle 608941b3855SMatthias Ringwald * @param MTU 609941b3855SMatthias Ringwald */ 6105611a760SMatthias Ringwald #define GATT_EVENT_MTU 0xAB 611941b3855SMatthias Ringwald 612941b3855SMatthias Ringwald /** 613941b3855SMatthias Ringwald * @format H2 614941b3855SMatthias Ringwald * @param handle 615941b3855SMatthias Ringwald * @param MTU 616941b3855SMatthias Ringwald */ 6175611a760SMatthias Ringwald #define ATT_EVENT_MTU_EXCHANGE_COMPLETE 0xB5 618941b3855SMatthias Ringwald 619941b3855SMatthias Ringwald // data: event(8), len(8), status (8), hci_handle (16), attribute_handle (16) 6205611a760SMatthias Ringwald #define ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 0xB6 621941b3855SMatthias Ringwald 622941b3855SMatthias Ringwald 623941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bnep service uuid (16) 624941b3855SMatthias Ringwald #define BNEP_EVENT_SERVICE_REGISTERED 0xC0 625941b3855SMatthias Ringwald 626941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bnep source uuid (16), bnep destination uuid (16), mtu (16), remote_address (48) 627941b3855SMatthias Ringwald #define BNEP_EVENT_OPEN_CHANNEL_COMPLETE 0xC1 628941b3855SMatthias Ringwald 629941b3855SMatthias Ringwald // data: event(8), len(8), bnep source uuid (16), bnep destination uuid (16), remote_address (48) 630941b3855SMatthias Ringwald #define BNEP_EVENT_CHANNEL_CLOSED 0xC2 631941b3855SMatthias Ringwald 632941b3855SMatthias Ringwald // data: event(8), len(8), bnep source uuid (16), bnep destination uuid (16), remote_address (48), channel state (8) 633941b3855SMatthias Ringwald #define BNEP_EVENT_CHANNEL_TIMEOUT 0xC3 634941b3855SMatthias Ringwald 635941b3855SMatthias Ringwald // data: event(8), len(8) 636941b3855SMatthias Ringwald #define BNEP_EVENT_READY_TO_SEND 0xC4 637941b3855SMatthias Ringwald 638941b3855SMatthias Ringwald /** 639941b3855SMatthias Ringwald * @format H1B 640941b3855SMatthias Ringwald * @param handle 641941b3855SMatthias Ringwald * @param addr_type 642941b3855SMatthias Ringwald * @param address 643941b3855SMatthias Ringwald */ 6445611a760SMatthias Ringwald #define SM_EVENT_JUST_WORKS_REQUEST 0xD0 645941b3855SMatthias Ringwald 646941b3855SMatthias Ringwald /** 647941b3855SMatthias Ringwald * @format H1B 648941b3855SMatthias Ringwald * @param handle 649941b3855SMatthias Ringwald * @param addr_type 650941b3855SMatthias Ringwald * @param address 651941b3855SMatthias Ringwald */ 6525611a760SMatthias Ringwald #define SM_EVENT_JUST_WORKS_CANCEL 0xD1 653941b3855SMatthias Ringwald 654941b3855SMatthias Ringwald /** 655941b3855SMatthias Ringwald * @format H1B4 656941b3855SMatthias Ringwald * @param handle 657941b3855SMatthias Ringwald * @param addr_type 658941b3855SMatthias Ringwald * @param address 659941b3855SMatthias Ringwald * @param passkey 660941b3855SMatthias Ringwald */ 6615611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_DISPLAY_NUMBER 0xD2 662941b3855SMatthias Ringwald 663941b3855SMatthias Ringwald /** 664941b3855SMatthias Ringwald * @format H1B 665941b3855SMatthias Ringwald * @param handle 666941b3855SMatthias Ringwald * @param addr_type 667941b3855SMatthias Ringwald * @param address 668941b3855SMatthias Ringwald */ 6695611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_DISPLAY_CANCEL 0xD3 670941b3855SMatthias Ringwald 671941b3855SMatthias Ringwald /** 672941b3855SMatthias Ringwald * @format H1B421 673941b3855SMatthias Ringwald * @param handle 674941b3855SMatthias Ringwald * @param addr_type 675941b3855SMatthias Ringwald * @param address 676941b3855SMatthias Ringwald */ 6775611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_INPUT_NUMBER 0xD4 678941b3855SMatthias Ringwald 679941b3855SMatthias Ringwald /** 680941b3855SMatthias Ringwald * @format H1B 681941b3855SMatthias Ringwald * @param handle 682941b3855SMatthias Ringwald * @param addr_type 683941b3855SMatthias Ringwald * @param address 684941b3855SMatthias Ringwald */ 6855611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_INPUT_CANCEL 0xD5 686941b3855SMatthias Ringwald 687941b3855SMatthias Ringwald /** 688941b3855SMatthias Ringwald * @format H1B 689941b3855SMatthias Ringwald * @param handle 690941b3855SMatthias Ringwald * @param addr_type 691941b3855SMatthias Ringwald * @param address 692941b3855SMatthias Ringwald */ 6935611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_STARTED 0xD6 694941b3855SMatthias Ringwald 695941b3855SMatthias Ringwald /** 696941b3855SMatthias Ringwald * @format H1B 697941b3855SMatthias Ringwald * @param handle 698941b3855SMatthias Ringwald * @param addr_type 699941b3855SMatthias Ringwald * @param address 700941b3855SMatthias Ringwald */ 7015611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_FAILED 0xD7 702941b3855SMatthias Ringwald 703941b3855SMatthias Ringwald /** 704941b3855SMatthias Ringwald * @format H1B2 705941b3855SMatthias Ringwald * @param handle 706941b3855SMatthias Ringwald * @param addr_type 707941b3855SMatthias Ringwald * @param address 708941b3855SMatthias Ringwald * @param le_device_db_index 709941b3855SMatthias Ringwald */ 7105611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 0xD8 711941b3855SMatthias Ringwald 712941b3855SMatthias Ringwald /** 713941b3855SMatthias Ringwald * @format H1B 714941b3855SMatthias Ringwald * @param handle 715941b3855SMatthias Ringwald * @param addr_type 716941b3855SMatthias Ringwald * @param address 717941b3855SMatthias Ringwald */ 7185611a760SMatthias Ringwald #define SM_EVENT_AUTHORIZATION_REQUEST 0xD9 719941b3855SMatthias Ringwald 720941b3855SMatthias Ringwald /** 721941b3855SMatthias Ringwald * @format H1B1 722941b3855SMatthias Ringwald * @param handle 723941b3855SMatthias Ringwald * @param addr_type 724941b3855SMatthias Ringwald * @param address 725941b3855SMatthias Ringwald * @param authorization_result 726941b3855SMatthias Ringwald */ 7275611a760SMatthias Ringwald #define SM_EVENT_AUTHORIZATION_RESULT 0xDA 728941b3855SMatthias Ringwald 729941b3855SMatthias Ringwald // GAP 730941b3855SMatthias Ringwald 731941b3855SMatthias Ringwald // data: event(8), len(8), hci_handle (16), security_level (8) 7325611a760SMatthias Ringwald #define GAP_EVENT_SECURITY_LEVEL 0xE0 733941b3855SMatthias Ringwald 734941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bd_addr(48) 7355611a760SMatthias Ringwald #define GAP_EVENT_DEDICATED_BONDING_COMPLETED 0xE1 736941b3855SMatthias Ringwald 737941b3855SMatthias Ringwald /** 738941b3855SMatthias Ringwald * @format 11B1JV 739941b3855SMatthias Ringwald * @param advertising_event_type 740941b3855SMatthias Ringwald * @param address_type 741941b3855SMatthias Ringwald * @param address 742941b3855SMatthias Ringwald * @param rssi 743941b3855SMatthias Ringwald * @param data_length 744941b3855SMatthias Ringwald * @param data 745941b3855SMatthias Ringwald */ 7465611a760SMatthias Ringwald #define GAP_LE_EVENT_ADVERTISING_REPORT 0xE2 747941b3855SMatthias Ringwald 748827b1c43SMatthias Ringwald 749941b3855SMatthias Ringwald #define HCI_EVENT_HSP_META 0xE8 750941b3855SMatthias Ringwald 751827b1c43SMatthias Ringwald /** 752827b1c43SMatthias Ringwald * @format 11 753827b1c43SMatthias Ringwald * @param subevent_code 754827b1c43SMatthias Ringwald * @param status 0 == OK 755827b1c43SMatthias Ringwald */ 756827b1c43SMatthias Ringwald #define HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 0x01 757827b1c43SMatthias Ringwald 758827b1c43SMatthias Ringwald /** 759827b1c43SMatthias Ringwald * @format 11 760827b1c43SMatthias Ringwald * @param subevent_code 761827b1c43SMatthias Ringwald * @param status 0 == OK 762827b1c43SMatthias Ringwald */ 763827b1c43SMatthias Ringwald #define HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 0x02 764827b1c43SMatthias Ringwald 765827b1c43SMatthias Ringwald /** 766827b1c43SMatthias Ringwald * @format 1 767827b1c43SMatthias Ringwald * @param subevent_code 768827b1c43SMatthias Ringwald */ 769827b1c43SMatthias Ringwald #define HSP_SUBEVENT_RING 0x03 770827b1c43SMatthias Ringwald 771827b1c43SMatthias Ringwald /** 772827b1c43SMatthias Ringwald * @format 11 773827b1c43SMatthias Ringwald * @param subevent_code 774827b1c43SMatthias Ringwald * @param gain Valid range: [0,15] 775827b1c43SMatthias Ringwald */ 776827b1c43SMatthias Ringwald #define HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 0x04 777827b1c43SMatthias Ringwald 778827b1c43SMatthias Ringwald /** 779827b1c43SMatthias Ringwald * @format 11 780827b1c43SMatthias Ringwald * @param subevent_code 781827b1c43SMatthias Ringwald * @param gain Valid range: [0,15] 782827b1c43SMatthias Ringwald */ 783827b1c43SMatthias Ringwald #define HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 0x05 784827b1c43SMatthias Ringwald 785827b1c43SMatthias Ringwald /** 786827b1c43SMatthias Ringwald * @format 1JV 787827b1c43SMatthias Ringwald * @param subevent_code 788827b1c43SMatthias Ringwald * @param value_length 789827b1c43SMatthias Ringwald * @param value 790827b1c43SMatthias Ringwald */ 791827b1c43SMatthias Ringwald #define HSP_SUBEVENT_HS_COMMAND 0x06 792827b1c43SMatthias Ringwald 793827b1c43SMatthias Ringwald /** 794827b1c43SMatthias Ringwald * @format 1JV 795827b1c43SMatthias Ringwald * @param subevent_code 796827b1c43SMatthias Ringwald * @param value_length 797827b1c43SMatthias Ringwald * @param value 798827b1c43SMatthias Ringwald */ 799827b1c43SMatthias Ringwald #define HSP_SUBEVENT_AG_INDICATION 0x07 800827b1c43SMatthias Ringwald 801941b3855SMatthias Ringwald 802941b3855SMatthias Ringwald #define HCI_EVENT_HFP_META 0xE9 803941b3855SMatthias Ringwald 804941b3855SMatthias Ringwald #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 0x01 805941b3855SMatthias Ringwald #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED 0x02 806941b3855SMatthias Ringwald #define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 0x03 807941b3855SMatthias Ringwald #define HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED 0x04 808941b3855SMatthias Ringwald #define HFP_SUBEVENT_COMPLETE 0x05 809941b3855SMatthias Ringwald #define HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 0x06 810941b3855SMatthias Ringwald #define HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 0x07 811941b3855SMatthias Ringwald #define HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 0x08 812941b3855SMatthias Ringwald #define HFP_SUBEVENT_CODECS_CONNECTION_COMPLETE 0x09 813aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_START_RINGINIG 0x0A 814aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_STOP_RINGINIG 0x0B 815aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_CALL_TERMINATED 0x0C 816aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 0x0D 817aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_REDIAL_LAST_NUMBER 0x0E 818aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG 0x0F 819ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 0x10 820ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_TRANSMIT_DTMF_CODES 0x11 821ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_TRANSMIT_STATUS_OF_CURRENT_CALL 0x12 822ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_CALL_ANSWERED 0x13 823ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_CONFERENCE_CALL 0x14 824ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_RING 0x15 825ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_SPEAKER_VOLUME 0x16 826ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_MICROPHONE_VOLUME 0x17 827941b3855SMatthias Ringwald 828941b3855SMatthias Ringwald // ANCS Client 829a4815874SMatthias Ringwald 830a4815874SMatthias Ringwald /** 831a4815874SMatthias Ringwald * @format H 832a4815874SMatthias Ringwald * @param handle 833a4815874SMatthias Ringwald */ 8345611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_CONNECTED 0xF0 835a4815874SMatthias Ringwald 836a4815874SMatthias Ringwald /** 837a4815874SMatthias Ringwald * @format H2T 838a4815874SMatthias Ringwald * @param handle 839a4815874SMatthias Ringwald * @param attribute_id 840a4815874SMatthias Ringwald * @param text 841a4815874SMatthias Ringwald */ 8425611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_NOTIFICATION 0xF1 843a4815874SMatthias Ringwald 844a4815874SMatthias Ringwald /** 845a4815874SMatthias Ringwald * @format H 846a4815874SMatthias Ringwald * @param handle 847a4815874SMatthias Ringwald */ 8485611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_DISCONNECTED 0xF2 849941b3855SMatthias Ringwald 850941b3855SMatthias Ringwald // #define HCI_EVENT_HFP_META 0xxx 851941b3855SMatthias Ringwald // #define HCI_EVENT_GATT_META 0xxx 852941b3855SMatthias Ringwald // #define HCI_EVENT_SDP_META 0xxx 853941b3855SMatthias Ringwald // #define HCI_EVENT_ANCS_META 0xxx 854941b3855SMatthias Ringwald // #define HCI_EVENT_SM_META 0xxx 855941b3855SMatthias Ringwald // #define HCI_EVENT_GAP_META 0xxx 856941b3855SMatthias Ringwald // #define HCI_EVENT_BNEP_META 0xxx 857941b3855SMatthias Ringwald // #define HCI_EVENT_PAN_META 0xxx 858941b3855SMatthias Ringwald 859941b3855SMatthias Ringwald #endif 860