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 46*8974fcd6SMatthias Ringwald #include <stdint.h> 47*8974fcd6SMatthias Ringwald #include "btstack_linked_list.h" 48*8974fcd6SMatthias Ringwald 49*8974fcd6SMatthias Ringwald // TYPES 50*8974fcd6SMatthias Ringwald 51*8974fcd6SMatthias Ringwald // packet handler 52*8974fcd6SMatthias Ringwald typedef void (*btstack_packet_handler_t) (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size); 53*8974fcd6SMatthias Ringwald 54*8974fcd6SMatthias Ringwald // packet callback supporting multiple registrations 55*8974fcd6SMatthias Ringwald typedef struct { 56*8974fcd6SMatthias Ringwald btstack_linked_item_t item; 57*8974fcd6SMatthias Ringwald btstack_packet_handler_t callback; 58*8974fcd6SMatthias Ringwald } btstack_packet_callback_registration_t; 59*8974fcd6SMatthias Ringwald 60f7a05cdaSMatthias Ringwald /** 61*8974fcd6SMatthias Ringwald * @brief 128 bit key used with AES128 in Security Manager 62f7a05cdaSMatthias Ringwald */ 63*8974fcd6SMatthias 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 132941b3855SMatthias Ringwald 133941b3855SMatthias Ringwald #define ATT_HANDLE_VALUE_INDICATION_IN_PORGRESS 0x90 134941b3855SMatthias Ringwald #define ATT_HANDLE_VALUE_INDICATION_TIMEOUT 0x91 135941b3855SMatthias Ringwald 136941b3855SMatthias Ringwald #define GATT_CLIENT_NOT_CONNECTED 0x93 137941b3855SMatthias Ringwald #define GATT_CLIENT_BUSY 0x94 138616edd56SMatthias Ringwald #define GATT_CLIENT_IN_WRONG_STATE 0x95 139616edd56SMatthias Ringwald #define GATT_CLIENT_DIFFERENT_CONTEXT_FOR_ADDRESS_ALREADY_EXISTS 0x96 140616edd56SMatthias Ringwald #define GATT_CLIENT_VALUE_TOO_LONG 0x97 141616edd56SMatthias Ringwald #define GATT_CLIENT_CHARACTERISTIC_NOTIFICATION_NOT_SUPPORTED 0x98 142616edd56SMatthias Ringwald #define GATT_CLIENT_CHARACTERISTIC_INDICATION_NOT_SUPPORTED 0x99 143941b3855SMatthias Ringwald 144941b3855SMatthias Ringwald #define BNEP_SERVICE_ALREADY_REGISTERED 0xA0 145941b3855SMatthias Ringwald #define BNEP_CHANNEL_NOT_CONNECTED 0xA1 146941b3855SMatthias Ringwald #define BNEP_DATA_LEN_EXCEEDS_MTU 0xA2 147941b3855SMatthias Ringwald 148b3f90e25SMatthias Ringwald // COMMANDS 149b3f90e25SMatthias Ringwald 150b3f90e25SMatthias Ringwald #define OGF_BTSTACK 0x3d 151b3f90e25SMatthias Ringwald 152b3f90e25SMatthias Ringwald // cmds for BTstack 153b3f90e25SMatthias Ringwald // get state: @returns HCI_STATE 154b3f90e25SMatthias Ringwald #define BTSTACK_GET_STATE 0x01 155b3f90e25SMatthias Ringwald 156b3f90e25SMatthias Ringwald // set power mode: @param HCI_POWER_MODE 157b3f90e25SMatthias Ringwald #define BTSTACK_SET_POWER_MODE 0x02 158b3f90e25SMatthias Ringwald 159b3f90e25SMatthias Ringwald // set capture mode: @param on 160b3f90e25SMatthias Ringwald #define BTSTACK_SET_ACL_CAPTURE_MODE 0x03 161b3f90e25SMatthias Ringwald 162b3f90e25SMatthias Ringwald // get BTstack version 163b3f90e25SMatthias Ringwald #define BTSTACK_GET_VERSION 0x04 164b3f90e25SMatthias Ringwald 165b3f90e25SMatthias Ringwald // get system Bluetooth state 166b3f90e25SMatthias Ringwald #define BTSTACK_GET_SYSTEM_BLUETOOTH_ENABLED 0x05 167b3f90e25SMatthias Ringwald 168b3f90e25SMatthias Ringwald // set system Bluetooth state 169b3f90e25SMatthias Ringwald #define BTSTACK_SET_SYSTEM_BLUETOOTH_ENABLED 0x06 170b3f90e25SMatthias Ringwald 171b3f90e25SMatthias Ringwald // enable inquiry scan for this client 172b3f90e25SMatthias Ringwald #define BTSTACK_SET_DISCOVERABLE 0x07 173b3f90e25SMatthias Ringwald 174b3f90e25SMatthias Ringwald // set global Bluetooth state 175b3f90e25SMatthias Ringwald #define BTSTACK_SET_BLUETOOTH_ENABLED 0x08 176b3f90e25SMatthias Ringwald 177b3f90e25SMatthias Ringwald // create l2cap channel: @param bd_addr(48), psm (16) 178b3f90e25SMatthias Ringwald #define L2CAP_CREATE_CHANNEL 0x20 179b3f90e25SMatthias Ringwald 180b3f90e25SMatthias Ringwald // disconnect l2cap disconnect, @param channel(16), reason(8) 181b3f90e25SMatthias Ringwald #define L2CAP_DISCONNECT 0x21 182b3f90e25SMatthias Ringwald 183b3f90e25SMatthias Ringwald // register l2cap service: @param psm(16), mtu (16) 184b3f90e25SMatthias Ringwald #define L2CAP_REGISTER_SERVICE 0x22 185b3f90e25SMatthias Ringwald 186b3f90e25SMatthias Ringwald // unregister l2cap disconnect, @param psm(16) 187b3f90e25SMatthias Ringwald #define L2CAP_UNREGISTER_SERVICE 0x23 188b3f90e25SMatthias Ringwald 189b3f90e25SMatthias Ringwald // accept connection @param bd_addr(48), dest cid (16) 190b3f90e25SMatthias Ringwald #define L2CAP_ACCEPT_CONNECTION 0x24 191b3f90e25SMatthias Ringwald 192b3f90e25SMatthias Ringwald // decline l2cap disconnect,@param bd_addr(48), dest cid (16), reason(8) 193b3f90e25SMatthias Ringwald #define L2CAP_DECLINE_CONNECTION 0x25 194b3f90e25SMatthias Ringwald 195b3f90e25SMatthias Ringwald // create l2cap channel: @param bd_addr(48), psm (16), mtu (16) 196b3f90e25SMatthias Ringwald #define L2CAP_CREATE_CHANNEL_MTU 0x26 197b3f90e25SMatthias Ringwald 198b3f90e25SMatthias Ringwald // register SDP Service Record: service record (size) 199b3f90e25SMatthias Ringwald #define SDP_REGISTER_SERVICE_RECORD 0x30 200b3f90e25SMatthias Ringwald 201b3f90e25SMatthias Ringwald // unregister SDP Service Record 202b3f90e25SMatthias Ringwald #define SDP_UNREGISTER_SERVICE_RECORD 0x31 203b3f90e25SMatthias Ringwald 204b3f90e25SMatthias Ringwald // Get remote RFCOMM services 205b3f90e25SMatthias Ringwald #define SDP_CLIENT_QUERY_RFCOMM_SERVICES 0x32 206b3f90e25SMatthias Ringwald 207b3f90e25SMatthias Ringwald // Get remote SDP services 208b3f90e25SMatthias Ringwald #define SDP_CLIENT_QUERY_SERVICES 0x33 209b3f90e25SMatthias Ringwald 210b3f90e25SMatthias Ringwald // RFCOMM "HCI" Commands 211b3f90e25SMatthias Ringwald #define RFCOMM_CREATE_CHANNEL 0x40 212b3f90e25SMatthias Ringwald #define RFCOMM_DISCONNECT 0x41 213b3f90e25SMatthias Ringwald #define RFCOMM_REGISTER_SERVICE 0x42 214b3f90e25SMatthias Ringwald #define RFCOMM_UNREGISTER_SERVICE 0x43 215b3f90e25SMatthias Ringwald #define RFCOMM_ACCEPT_CONNECTION 0x44 216b3f90e25SMatthias Ringwald #define RFCOMM_DECLINE_CONNECTION 0x45 217b3f90e25SMatthias Ringwald #define RFCOMM_PERSISTENT_CHANNEL 0x46 218b3f90e25SMatthias Ringwald #define RFCOMM_CREATE_CHANNEL_WITH_CREDITS 0x47 219b3f90e25SMatthias Ringwald #define RFCOMM_REGISTER_SERVICE_WITH_CREDITS 0x48 220b3f90e25SMatthias Ringwald #define RFCOMM_GRANT_CREDITS 0x49 221b3f90e25SMatthias Ringwald 222b3f90e25SMatthias Ringwald // GAP Classic 0x50 223b3f90e25SMatthias Ringwald #define GAP_DISCONNECT 0x50 224b3f90e25SMatthias Ringwald 225b3f90e25SMatthias Ringwald // GAP LE 0x60 226b3f90e25SMatthias Ringwald #define GAP_LE_SCAN_START 0x60 227b3f90e25SMatthias Ringwald #define GAP_LE_SCAN_STOP 0x61 228b3f90e25SMatthias Ringwald #define GAP_LE_CONNECT 0x62 229b3f90e25SMatthias Ringwald #define GAP_LE_CONNECT_CANCEL 0x63 230b3f90e25SMatthias Ringwald #define GAP_LE_SET_SCAN_PARAMETERS 0x64 231b3f90e25SMatthias Ringwald 232b3f90e25SMatthias Ringwald // GATT (Client) 0x70 233b3f90e25SMatthias Ringwald #define GATT_DISCOVER_ALL_PRIMARY_SERVICES 0x70 234b3f90e25SMatthias Ringwald #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID16 0x71 235b3f90e25SMatthias Ringwald #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID128 0x72 236b3f90e25SMatthias Ringwald #define GATT_FIND_INCLUDED_SERVICES_FOR_SERVICE 0x73 237b3f90e25SMatthias Ringwald #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE 0x74 238b3f90e25SMatthias Ringwald #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE_BY_UUID128 0x75 239b3f90e25SMatthias Ringwald #define GATT_DISCOVER_CHARACTERISTIC_DESCRIPTORS 0x76 240b3f90e25SMatthias Ringwald #define GATT_READ_VALUE_OF_CHARACTERISTIC 0x77 241b3f90e25SMatthias Ringwald #define GATT_READ_LONG_VALUE_OF_CHARACTERISTIC 0x78 242b3f90e25SMatthias Ringwald #define GATT_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE 0x79 243b3f90e25SMatthias Ringwald #define GATT_WRITE_VALUE_OF_CHARACTERISTIC 0x7A 244b3f90e25SMatthias Ringwald #define GATT_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7B 245b3f90e25SMatthias Ringwald #define GATT_RELIABLE_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7C 246b3f90e25SMatthias Ringwald #define GATT_READ_CHARACTERISTIC_DESCRIPTOR 0X7D 247b3f90e25SMatthias Ringwald #define GATT_READ_LONG_CHARACTERISTIC_DESCRIPTOR 0X7E 248b3f90e25SMatthias Ringwald #define GATT_WRITE_CHARACTERISTIC_DESCRIPTOR 0X7F 249b3f90e25SMatthias Ringwald #define GATT_WRITE_LONG_CHARACTERISTIC_DESCRIPTOR 0X80 250b3f90e25SMatthias Ringwald #define GATT_WRITE_CLIENT_CHARACTERISTIC_CONFIGURATION 0X81 251b3f90e25SMatthias Ringwald #define GATT_GET_MTU 0x82 252b3f90e25SMatthias Ringwald 253941b3855SMatthias Ringwald 254941b3855SMatthias Ringwald // EVENTS 255941b3855SMatthias Ringwald 256941b3855SMatthias Ringwald /** 257941b3855SMatthias Ringwald * @format 1 258941b3855SMatthias Ringwald * @param state 259941b3855SMatthias Ringwald */ 260941b3855SMatthias Ringwald #define BTSTACK_EVENT_STATE 0x60 261941b3855SMatthias Ringwald 262941b3855SMatthias Ringwald // data: event(8), len(8), nr hci connections 263941b3855SMatthias Ringwald #define BTSTACK_EVENT_NR_CONNECTIONS_CHANGED 0x61 264941b3855SMatthias Ringwald 265941b3855SMatthias Ringwald /** 266941b3855SMatthias Ringwald * @format 267941b3855SMatthias Ringwald */ 268941b3855SMatthias Ringwald #define BTSTACK_EVENT_POWERON_FAILED 0x62 269941b3855SMatthias Ringwald 270941b3855SMatthias Ringwald /** 271941b3855SMatthias Ringwald * @format 112 272941b3855SMatthias Ringwald * @param major 273941b3855SMatthias Ringwald * @param minor 274941b3855SMatthias Ringwald @ @param revision 275941b3855SMatthias Ringwald */ 276941b3855SMatthias Ringwald #define BTSTACK_EVENT_VERSION 0x63 277941b3855SMatthias Ringwald 278941b3855SMatthias Ringwald // data: system bluetooth on/off (bool) 279941b3855SMatthias Ringwald #define BTSTACK_EVENT_SYSTEM_BLUETOOTH_ENABLED 0x64 280941b3855SMatthias Ringwald 281941b3855SMatthias Ringwald // data: event (8), len(8), status (8) == 0, address (48), name (1984 bits = 248 bytes) 282941b3855SMatthias Ringwald #define BTSTACK_EVENT_REMOTE_NAME_CACHED 0x65 283941b3855SMatthias Ringwald 284941b3855SMatthias Ringwald // data: discoverable enabled (bool) 285941b3855SMatthias Ringwald #define BTSTACK_EVENT_DISCOVERABLE_ENABLED 0x66 286941b3855SMatthias Ringwald 287941b3855SMatthias Ringwald // Daemon Events used internally 288941b3855SMatthias Ringwald 289941b3855SMatthias Ringwald // data: event(8) 290941b3855SMatthias Ringwald #define DAEMON_EVENT_CONNECTION_OPENED 0x68 291941b3855SMatthias Ringwald 292941b3855SMatthias Ringwald // data: event(8) 293941b3855SMatthias Ringwald #define DAEMON_EVENT_CONNECTION_CLOSED 0x69 294941b3855SMatthias Ringwald 295941b3855SMatthias Ringwald // data: event(8), nr_connections(8) 296941b3855SMatthias Ringwald #define DAEMON_NR_CONNECTIONS_CHANGED 0x6A 297941b3855SMatthias Ringwald 298941b3855SMatthias Ringwald // data: event(8) 299941b3855SMatthias Ringwald #define DAEMON_EVENT_NEW_RFCOMM_CREDITS 0x6B 300941b3855SMatthias Ringwald 301941b3855SMatthias Ringwald // data: event(8) 302941b3855SMatthias Ringwald #define DAEMON_EVENT_HCI_PACKET_SENT 0x6C 303941b3855SMatthias Ringwald 3043bc639ceSMatthias Ringwald // additional HCI events 3053bc639ceSMatthias Ringwald /** 3063bc639ceSMatthias Ringwald * @format B 3073bc639ceSMatthias Ringwald * @param handle 3083bc639ceSMatthias Ringwald */ 3093bc639ceSMatthias Ringwald #define HCI_EVENT_SCO_CAN_SEND_NOW 0x6F 3103bc639ceSMatthias Ringwald 311941b3855SMatthias Ringwald // L2CAP EVENTS 312941b3855SMatthias Ringwald 313b072ba33SMatthias Ringwald /** 314b072ba33SMatthias Ringwald * @format 1BH222222 315b072ba33SMatthias Ringwald * @param status 316b072ba33SMatthias Ringwald * @param address 317b072ba33SMatthias Ringwald * @param handle 318b072ba33SMatthias Ringwald * @param psm 319b072ba33SMatthias Ringwald * @param local_cid 320b072ba33SMatthias Ringwald * @param remote_cid 321b072ba33SMatthias Ringwald * @param local_mtu 322b072ba33SMatthias Ringwald * @param remote_mtu 323b072ba33SMatthias Ringwald * @param flush_timeout 324b072ba33SMatthias Ringwald */ 325941b3855SMatthias Ringwald #define L2CAP_EVENT_CHANNEL_OPENED 0x70 326941b3855SMatthias Ringwald 327b072ba33SMatthias Ringwald /* 328b072ba33SMatthias Ringwald * @format 2 329b072ba33SMatthias Ringwald * @param local_cid 330b072ba33SMatthias Ringwald */ 331941b3855SMatthias Ringwald #define L2CAP_EVENT_CHANNEL_CLOSED 0x71 332941b3855SMatthias Ringwald 333b072ba33SMatthias Ringwald /** 334b072ba33SMatthias Ringwald * @format 1BH222 335b072ba33SMatthias Ringwald * @param status 336b072ba33SMatthias Ringwald * @param address 337b072ba33SMatthias Ringwald * @param handle 338b072ba33SMatthias Ringwald * @param psm 339b072ba33SMatthias Ringwald * @param local_cid 340b072ba33SMatthias Ringwald * @param remote_cid 341b072ba33SMatthias Ringwald */ 342941b3855SMatthias Ringwald #define L2CAP_EVENT_INCOMING_CONNECTION 0x72 343941b3855SMatthias Ringwald 344b072ba33SMatthias Ringwald // ?? 345941b3855SMatthias Ringwald // data: event(8), len(8), handle(16) 346941b3855SMatthias Ringwald #define L2CAP_EVENT_TIMEOUT_CHECK 0x73 347941b3855SMatthias Ringwald 348b072ba33SMatthias Ringwald // ?? 349941b3855SMatthias Ringwald // data: event(8), len(8), local_cid(16), credits(8) 350941b3855SMatthias Ringwald #define L2CAP_EVENT_CREDITS 0x74 351941b3855SMatthias Ringwald 352b072ba33SMatthias Ringwald /** 353b072ba33SMatthias Ringwald * @format 12 354b072ba33SMatthias Ringwald * @param status 355b072ba33SMatthias Ringwald * @param psm 356b072ba33SMatthias Ringwald */ 357941b3855SMatthias Ringwald #define L2CAP_EVENT_SERVICE_REGISTERED 0x75 358941b3855SMatthias Ringwald 359b072ba33SMatthias Ringwald /** 360b072ba33SMatthias Ringwald * @format H2222 361b072ba33SMatthias Ringwald * @param handle 362b072ba33SMatthias Ringwald * @param interval_min 363b072ba33SMatthias Ringwald * @param interval_max 364b072ba33SMatthias Ringwald * @param latencey 365b072ba33SMatthias Ringwald * @param timeout_multiplier 366b072ba33SMatthias Ringwald */ 367941b3855SMatthias Ringwald #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 0x76 368941b3855SMatthias Ringwald 369941b3855SMatthias Ringwald // data: event(8), len(8), handle(16), result (16) (0 == ok, 1 == fail) 370b072ba33SMatthias Ringwald /** 371b072ba33SMatthias Ringwald * @format H2 372b072ba33SMatthias Ringwald * @param handle 373b072ba33SMatthias Ringwald * @result 374b072ba33SMatthias Ringwald */ 375941b3855SMatthias Ringwald #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 0x77 376941b3855SMatthias Ringwald 377b072ba33SMatthias Ringwald /** 378b072ba33SMatthias Ringwald * @format 2 379b072ba33SMatthias Ringwald * @param local_cid 380b072ba33SMatthias Ringwald */ 381b072ba33SMatthias Ringwald #define L2CAP_EVENT_CAN_SEND_NOW 0x78 382b072ba33SMatthias Ringwald 383941b3855SMatthias Ringwald // RFCOMM EVENTS 384b072ba33SMatthias Ringwald 385941b3855SMatthias Ringwald /** 386941b3855SMatthias Ringwald * @format 1B2122 387941b3855SMatthias Ringwald * @param status 388941b3855SMatthias Ringwald * @param bd_addr 389941b3855SMatthias Ringwald * @param con_handle 390941b3855SMatthias Ringwald * @param server_channel 391941b3855SMatthias Ringwald * @param rfcomm_cid 392941b3855SMatthias Ringwald * @param max_frame_size 393941b3855SMatthias Ringwald */ 394941b3855SMatthias Ringwald #define RFCOMM_EVENT_OPEN_CHANNEL_COMPLETE 0x80 395941b3855SMatthias Ringwald 396941b3855SMatthias Ringwald /** 397941b3855SMatthias Ringwald * @format 2 398941b3855SMatthias Ringwald * @param rfcomm_cid 399941b3855SMatthias Ringwald */ 400941b3855SMatthias Ringwald #define RFCOMM_EVENT_CHANNEL_CLOSED 0x81 401941b3855SMatthias Ringwald 402941b3855SMatthias Ringwald /** 403941b3855SMatthias Ringwald * @format B12 404941b3855SMatthias Ringwald * @param bd_addr 405941b3855SMatthias Ringwald * @param server_channel 406941b3855SMatthias Ringwald * @param rfcomm_cid 407941b3855SMatthias Ringwald */ 408941b3855SMatthias Ringwald #define RFCOMM_EVENT_INCOMING_CONNECTION 0x82 409941b3855SMatthias Ringwald 410941b3855SMatthias Ringwald /** 411941b3855SMatthias Ringwald * @format 21 412941b3855SMatthias Ringwald * @param rfcomm_cid 413941b3855SMatthias Ringwald * @param line_status 414941b3855SMatthias Ringwald */ 415941b3855SMatthias Ringwald #define RFCOMM_EVENT_REMOTE_LINE_STATUS 0x83 416941b3855SMatthias Ringwald 417941b3855SMatthias Ringwald /** 418941b3855SMatthias Ringwald * @format 21 419941b3855SMatthias Ringwald * @param rfcomm_cid 420941b3855SMatthias Ringwald * @param credits 421941b3855SMatthias Ringwald */ 422941b3855SMatthias Ringwald #define RFCOMM_EVENT_CREDITS 0x84 423941b3855SMatthias Ringwald 424941b3855SMatthias Ringwald /** 425941b3855SMatthias Ringwald * @format 11 426941b3855SMatthias Ringwald * @param status 427941b3855SMatthias Ringwald * @param channel_id 428941b3855SMatthias Ringwald */ 429941b3855SMatthias Ringwald #define RFCOMM_EVENT_SERVICE_REGISTERED 0x85 430941b3855SMatthias Ringwald 431941b3855SMatthias Ringwald /** 432941b3855SMatthias Ringwald * @format 11 433941b3855SMatthias Ringwald * @param status 434941b3855SMatthias Ringwald * @param server_channel_id 435941b3855SMatthias Ringwald */ 436941b3855SMatthias Ringwald #define RFCOMM_EVENT_PERSISTENT_CHANNEL 0x86 437941b3855SMatthias Ringwald 438941b3855SMatthias Ringwald /** 439941b3855SMatthias Ringwald * @format 21 440941b3855SMatthias Ringwald * @param rfcomm_cid 441941b3855SMatthias Ringwald * @param modem_status 442941b3855SMatthias Ringwald */ 443941b3855SMatthias Ringwald #define RFCOMM_EVENT_REMOTE_MODEM_STATUS 0x87 444941b3855SMatthias Ringwald 445941b3855SMatthias Ringwald /** 4467bd8e93bSMatthias Ringwald * TODO: format for variable data 2? 447941b3855SMatthias Ringwald * @param rfcomm_cid 448941b3855SMatthias Ringwald * @param rpn_data 449941b3855SMatthias Ringwald */ 450941b3855SMatthias Ringwald #define RFCOMM_EVENT_PORT_CONFIGURATION 0x88 451941b3855SMatthias Ringwald 452941b3855SMatthias Ringwald /** 453b072ba33SMatthias Ringwald * @format 2 454b072ba33SMatthias Ringwald * @param local_cid 455b072ba33SMatthias Ringwald */ 456b072ba33SMatthias Ringwald #define RFCOMM_EVENT_CAN_SEND_NOW 0x89 457b072ba33SMatthias Ringwald 458b072ba33SMatthias Ringwald 459b072ba33SMatthias Ringwald /** 460941b3855SMatthias Ringwald * @format 14 461941b3855SMatthias Ringwald * @param status 462941b3855SMatthias Ringwald * @param service_record_handle 463941b3855SMatthias Ringwald */ 4645611a760SMatthias Ringwald #define SDP_EVENT_SERVICE_REGISTERED 0x90 465941b3855SMatthias Ringwald 466941b3855SMatthias Ringwald /** 467941b3855SMatthias Ringwald * @format 1 468941b3855SMatthias Ringwald * @param status 469941b3855SMatthias Ringwald */ 4705611a760SMatthias Ringwald #define SDP_EVENT_QUERY_COMPLETE 0x91 471941b3855SMatthias Ringwald 472941b3855SMatthias Ringwald /** 473941b3855SMatthias Ringwald * @format 1T 474941b3855SMatthias Ringwald * @param rfcomm_channel 475941b3855SMatthias Ringwald * @param name 476941b3855SMatthias Ringwald */ 4775611a760SMatthias Ringwald #define SDP_EVENT_QUERY_RFCOMM_SERVICE 0x92 478941b3855SMatthias Ringwald 479941b3855SMatthias Ringwald /** 4804225393cSMatthias Ringwald * @format 22221 4814225393cSMatthias Ringwald * @param record_id 482941b3855SMatthias Ringwald * @param attribute_id 4834225393cSMatthias Ringwald * @param attribute_length 4844225393cSMatthias Ringwald * @param data_offset 4854225393cSMatthias Ringwald * @param data 486941b3855SMatthias Ringwald */ 4875611a760SMatthias Ringwald #define SDP_EVENT_QUERY_ATTRIBUTE_BYTE 0x93 488941b3855SMatthias Ringwald 4894de250b4SMatthias Ringwald /** 4904de250b4SMatthias Ringwald * @format 22LV 4914de250b4SMatthias Ringwald * @param record_id 4924de250b4SMatthias Ringwald * @param attribute_id 4934de250b4SMatthias Ringwald * @param attribute_length 4944de250b4SMatthias Ringwald * @param attribute_value 4954de250b4SMatthias Ringwald */ 4965611a760SMatthias Ringwald #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE 0x94 4974225393cSMatthias Ringwald 4984225393cSMatthias Ringwald /** 4994225393cSMatthias Ringwald * @format 224 5004225393cSMatthias Ringwald * @param total_count 5014225393cSMatthias Ringwald * @param record_index 5024225393cSMatthias Ringwald * @param record_handle 5034225393cSMatthias Ringwald * @note Not provided by daemon, only used for internal testing 5044225393cSMatthias Ringwald */ 5055611a760SMatthias Ringwald #define SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 0x95 506941b3855SMatthias Ringwald 507941b3855SMatthias Ringwald /** 508941b3855SMatthias Ringwald * @format H1 509941b3855SMatthias Ringwald * @param handle 510941b3855SMatthias Ringwald * @param status 511941b3855SMatthias Ringwald */ 5125611a760SMatthias Ringwald #define GATT_EVENT_QUERY_COMPLETE 0xA0 513941b3855SMatthias Ringwald 514941b3855SMatthias Ringwald /** 515941b3855SMatthias Ringwald * @format HX 516941b3855SMatthias Ringwald * @param handle 517941b3855SMatthias Ringwald * @param service 518941b3855SMatthias Ringwald */ 5195611a760SMatthias Ringwald #define GATT_EVENT_SERVICE_QUERY_RESULT 0xA1 520941b3855SMatthias Ringwald 521941b3855SMatthias Ringwald /** 522941b3855SMatthias Ringwald * @format HY 523941b3855SMatthias Ringwald * @param handle 524941b3855SMatthias Ringwald * @param characteristic 525941b3855SMatthias Ringwald */ 5265611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 0xA2 527941b3855SMatthias Ringwald 528941b3855SMatthias Ringwald /** 529941b3855SMatthias Ringwald * @format H2X 530941b3855SMatthias Ringwald * @param handle 531941b3855SMatthias Ringwald * @param include_handle 532941b3855SMatthias Ringwald * @param service 533941b3855SMatthias Ringwald */ 5345611a760SMatthias Ringwald #define GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 0xA3 535941b3855SMatthias Ringwald 536941b3855SMatthias Ringwald /** 537941b3855SMatthias Ringwald * @format HZ 538941b3855SMatthias Ringwald * @param handle 539941b3855SMatthias Ringwald * @param characteristic_descriptor 540941b3855SMatthias Ringwald */ 5415611a760SMatthias Ringwald #define GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 0xA4 542941b3855SMatthias Ringwald 543941b3855SMatthias Ringwald /** 544941b3855SMatthias Ringwald * @format H2LV 545941b3855SMatthias Ringwald * @param handle 546941b3855SMatthias Ringwald * @param value_handle 547941b3855SMatthias Ringwald * @param value_length 548941b3855SMatthias Ringwald * @param value 549941b3855SMatthias Ringwald */ 5505611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA5 551941b3855SMatthias Ringwald 552941b3855SMatthias Ringwald /** 553941b3855SMatthias Ringwald * @format H22LV 554941b3855SMatthias Ringwald * @param handle 555941b3855SMatthias Ringwald * @param value_handle 556941b3855SMatthias Ringwald * @param value_offset 557941b3855SMatthias Ringwald * @param value_length 558941b3855SMatthias Ringwald * @param value 559941b3855SMatthias Ringwald */ 5605611a760SMatthias Ringwald #define GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA6 561941b3855SMatthias Ringwald 562941b3855SMatthias Ringwald /** 563941b3855SMatthias Ringwald * @format H2LV 564941b3855SMatthias Ringwald * @param handle 565941b3855SMatthias Ringwald * @param value_handle 566941b3855SMatthias Ringwald * @param value_length 567941b3855SMatthias Ringwald * @param value 568941b3855SMatthias Ringwald */ 5695611a760SMatthias Ringwald #define GATT_EVENT_NOTIFICATION 0xA7 570941b3855SMatthias Ringwald 571941b3855SMatthias Ringwald /** 572941b3855SMatthias Ringwald * @format H2LV 573941b3855SMatthias Ringwald * @param handle 574941b3855SMatthias Ringwald * @param value_handle 575941b3855SMatthias Ringwald * @param value_length 576941b3855SMatthias Ringwald * @param value 577941b3855SMatthias Ringwald */ 5785611a760SMatthias Ringwald #define GATT_EVENT_INDICATION 0xA8 579941b3855SMatthias Ringwald 580941b3855SMatthias Ringwald /** 581941b3855SMatthias Ringwald * @format H2LV 582941b3855SMatthias Ringwald * @param descriptor_handle 583941b3855SMatthias Ringwald * @param descriptor_length 584941b3855SMatthias Ringwald * @param descriptor 585941b3855SMatthias Ringwald */ 5865611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xA9 587941b3855SMatthias Ringwald 588941b3855SMatthias Ringwald /** 589941b3855SMatthias Ringwald * @format H2LV 590941b3855SMatthias Ringwald * @param handle 591941b3855SMatthias Ringwald * @param descriptor_offset 592941b3855SMatthias Ringwald * @param descriptor_length 593941b3855SMatthias Ringwald * @param descriptor 594941b3855SMatthias Ringwald */ 5955611a760SMatthias Ringwald #define GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xAA 596941b3855SMatthias Ringwald 597941b3855SMatthias Ringwald /** 598941b3855SMatthias Ringwald * @format H2 599941b3855SMatthias Ringwald * @param handle 600941b3855SMatthias Ringwald * @param MTU 601941b3855SMatthias Ringwald */ 6025611a760SMatthias Ringwald #define GATT_EVENT_MTU 0xAB 603941b3855SMatthias Ringwald 604941b3855SMatthias Ringwald /** 605941b3855SMatthias Ringwald * @format H2 606941b3855SMatthias Ringwald * @param handle 607941b3855SMatthias Ringwald * @param MTU 608941b3855SMatthias Ringwald */ 6095611a760SMatthias Ringwald #define ATT_EVENT_MTU_EXCHANGE_COMPLETE 0xB5 610941b3855SMatthias Ringwald 611941b3855SMatthias Ringwald // data: event(8), len(8), status (8), hci_handle (16), attribute_handle (16) 6125611a760SMatthias Ringwald #define ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 0xB6 613941b3855SMatthias Ringwald 614941b3855SMatthias Ringwald 615941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bnep service uuid (16) 616941b3855SMatthias Ringwald #define BNEP_EVENT_SERVICE_REGISTERED 0xC0 617941b3855SMatthias Ringwald 618941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bnep source uuid (16), bnep destination uuid (16), mtu (16), remote_address (48) 619941b3855SMatthias Ringwald #define BNEP_EVENT_OPEN_CHANNEL_COMPLETE 0xC1 620941b3855SMatthias Ringwald 621941b3855SMatthias Ringwald // data: event(8), len(8), bnep source uuid (16), bnep destination uuid (16), remote_address (48) 622941b3855SMatthias Ringwald #define BNEP_EVENT_CHANNEL_CLOSED 0xC2 623941b3855SMatthias Ringwald 624941b3855SMatthias Ringwald // data: event(8), len(8), bnep source uuid (16), bnep destination uuid (16), remote_address (48), channel state (8) 625941b3855SMatthias Ringwald #define BNEP_EVENT_CHANNEL_TIMEOUT 0xC3 626941b3855SMatthias Ringwald 627941b3855SMatthias Ringwald // data: event(8), len(8) 628941b3855SMatthias Ringwald #define BNEP_EVENT_READY_TO_SEND 0xC4 629941b3855SMatthias Ringwald 630941b3855SMatthias Ringwald /** 631941b3855SMatthias Ringwald * @format H1B 632941b3855SMatthias Ringwald * @param handle 633941b3855SMatthias Ringwald * @param addr_type 634941b3855SMatthias Ringwald * @param address 635941b3855SMatthias Ringwald */ 6365611a760SMatthias Ringwald #define SM_EVENT_JUST_WORKS_REQUEST 0xD0 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_CANCEL 0xD1 645941b3855SMatthias Ringwald 646941b3855SMatthias Ringwald /** 647941b3855SMatthias Ringwald * @format H1B4 648941b3855SMatthias Ringwald * @param handle 649941b3855SMatthias Ringwald * @param addr_type 650941b3855SMatthias Ringwald * @param address 651941b3855SMatthias Ringwald * @param passkey 652941b3855SMatthias Ringwald */ 6535611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_DISPLAY_NUMBER 0xD2 654941b3855SMatthias Ringwald 655941b3855SMatthias Ringwald /** 656941b3855SMatthias Ringwald * @format H1B 657941b3855SMatthias Ringwald * @param handle 658941b3855SMatthias Ringwald * @param addr_type 659941b3855SMatthias Ringwald * @param address 660941b3855SMatthias Ringwald */ 6615611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_DISPLAY_CANCEL 0xD3 662941b3855SMatthias Ringwald 663941b3855SMatthias Ringwald /** 664941b3855SMatthias Ringwald * @format H1B421 665941b3855SMatthias Ringwald * @param handle 666941b3855SMatthias Ringwald * @param addr_type 667941b3855SMatthias Ringwald * @param address 668941b3855SMatthias Ringwald */ 6695611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_INPUT_NUMBER 0xD4 670941b3855SMatthias Ringwald 671941b3855SMatthias Ringwald /** 672941b3855SMatthias Ringwald * @format H1B 673941b3855SMatthias Ringwald * @param handle 674941b3855SMatthias Ringwald * @param addr_type 675941b3855SMatthias Ringwald * @param address 676941b3855SMatthias Ringwald */ 6775611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_INPUT_CANCEL 0xD5 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_IDENTITY_RESOLVING_STARTED 0xD6 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_FAILED 0xD7 694941b3855SMatthias Ringwald 695941b3855SMatthias Ringwald /** 696941b3855SMatthias Ringwald * @format H1B2 697941b3855SMatthias Ringwald * @param handle 698941b3855SMatthias Ringwald * @param addr_type 699941b3855SMatthias Ringwald * @param address 700941b3855SMatthias Ringwald * @param le_device_db_index 701941b3855SMatthias Ringwald */ 7025611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 0xD8 703941b3855SMatthias Ringwald 704941b3855SMatthias Ringwald /** 705941b3855SMatthias Ringwald * @format H1B 706941b3855SMatthias Ringwald * @param handle 707941b3855SMatthias Ringwald * @param addr_type 708941b3855SMatthias Ringwald * @param address 709941b3855SMatthias Ringwald */ 7105611a760SMatthias Ringwald #define SM_EVENT_AUTHORIZATION_REQUEST 0xD9 711941b3855SMatthias Ringwald 712941b3855SMatthias Ringwald /** 713941b3855SMatthias Ringwald * @format H1B1 714941b3855SMatthias Ringwald * @param handle 715941b3855SMatthias Ringwald * @param addr_type 716941b3855SMatthias Ringwald * @param address 717941b3855SMatthias Ringwald * @param authorization_result 718941b3855SMatthias Ringwald */ 7195611a760SMatthias Ringwald #define SM_EVENT_AUTHORIZATION_RESULT 0xDA 720941b3855SMatthias Ringwald 721941b3855SMatthias Ringwald // GAP 722941b3855SMatthias Ringwald 723941b3855SMatthias Ringwald // data: event(8), len(8), hci_handle (16), security_level (8) 7245611a760SMatthias Ringwald #define GAP_EVENT_SECURITY_LEVEL 0xE0 725941b3855SMatthias Ringwald 726941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bd_addr(48) 7275611a760SMatthias Ringwald #define GAP_EVENT_DEDICATED_BONDING_COMPLETED 0xE1 728941b3855SMatthias Ringwald 729941b3855SMatthias Ringwald /** 730941b3855SMatthias Ringwald * @format 11B1JV 731941b3855SMatthias Ringwald * @param advertising_event_type 732941b3855SMatthias Ringwald * @param address_type 733941b3855SMatthias Ringwald * @param address 734941b3855SMatthias Ringwald * @param rssi 735941b3855SMatthias Ringwald * @param data_length 736941b3855SMatthias Ringwald * @param data 737941b3855SMatthias Ringwald */ 7385611a760SMatthias Ringwald #define GAP_LE_EVENT_ADVERTISING_REPORT 0xE2 739941b3855SMatthias Ringwald 740941b3855SMatthias Ringwald #define HCI_EVENT_HSP_META 0xE8 741941b3855SMatthias Ringwald 742f5054c00SMatthias Ringwald #define HSP_SUBEVENT_ERROR 0x01 743f5054c00SMatthias Ringwald #define HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 0x02 744f5054c00SMatthias Ringwald #define HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 0x03 745f5054c00SMatthias Ringwald #define HSP_SUBEVENT_RING 0x04 746f5054c00SMatthias Ringwald #define HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 0x05 747f5054c00SMatthias Ringwald #define HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 0x06 748f5054c00SMatthias Ringwald #define HSP_SUBEVENT_HS_COMMAND 0x07 749f5054c00SMatthias Ringwald #define HSP_SUBEVENT_AG_INDICATION 0x08 750941b3855SMatthias Ringwald 751941b3855SMatthias Ringwald #define HCI_EVENT_HFP_META 0xE9 752941b3855SMatthias Ringwald 753941b3855SMatthias Ringwald #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 0x01 754941b3855SMatthias Ringwald #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED 0x02 755941b3855SMatthias Ringwald #define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 0x03 756941b3855SMatthias Ringwald #define HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED 0x04 757941b3855SMatthias Ringwald #define HFP_SUBEVENT_COMPLETE 0x05 758941b3855SMatthias Ringwald #define HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 0x06 759941b3855SMatthias Ringwald #define HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 0x07 760941b3855SMatthias Ringwald #define HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 0x08 761941b3855SMatthias Ringwald #define HFP_SUBEVENT_CODECS_CONNECTION_COMPLETE 0x09 762aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_START_RINGINIG 0x0A 763aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_STOP_RINGINIG 0x0B 764aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_CALL_TERMINATED 0x0C 765aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 0x0D 766aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_REDIAL_LAST_NUMBER 0x0E 767aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG 0x0F 768ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 0x10 769ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_TRANSMIT_DTMF_CODES 0x11 770ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_TRANSMIT_STATUS_OF_CURRENT_CALL 0x12 771ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_CALL_ANSWERED 0x13 772ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_CONFERENCE_CALL 0x14 773ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_RING 0x15 774ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_SPEAKER_VOLUME 0x16 775ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_MICROPHONE_VOLUME 0x17 776941b3855SMatthias Ringwald 777941b3855SMatthias Ringwald // ANCS Client 778a4815874SMatthias Ringwald 779a4815874SMatthias Ringwald /** 780a4815874SMatthias Ringwald * @format H 781a4815874SMatthias Ringwald * @param handle 782a4815874SMatthias Ringwald */ 7835611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_CONNECTED 0xF0 784a4815874SMatthias Ringwald 785a4815874SMatthias Ringwald /** 786a4815874SMatthias Ringwald * @format H2T 787a4815874SMatthias Ringwald * @param handle 788a4815874SMatthias Ringwald * @param attribute_id 789a4815874SMatthias Ringwald * @param text 790a4815874SMatthias Ringwald */ 7915611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_NOTIFICATION 0xF1 792a4815874SMatthias Ringwald 793a4815874SMatthias Ringwald /** 794a4815874SMatthias Ringwald * @format H 795a4815874SMatthias Ringwald * @param handle 796a4815874SMatthias Ringwald */ 7975611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_DISCONNECTED 0xF2 798941b3855SMatthias Ringwald 799941b3855SMatthias Ringwald // #define HCI_EVENT_HFP_META 0xxx 800941b3855SMatthias Ringwald // #define HCI_EVENT_GATT_META 0xxx 801941b3855SMatthias Ringwald // #define HCI_EVENT_SDP_META 0xxx 802941b3855SMatthias Ringwald // #define HCI_EVENT_ANCS_META 0xxx 803941b3855SMatthias Ringwald // #define HCI_EVENT_SM_META 0xxx 804941b3855SMatthias Ringwald // #define HCI_EVENT_GAP_META 0xxx 805941b3855SMatthias Ringwald // #define HCI_EVENT_BNEP_META 0xxx 806941b3855SMatthias Ringwald // #define HCI_EVENT_PAN_META 0xxx 807941b3855SMatthias Ringwald 808941b3855SMatthias Ringwald #endif 809