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 /** 272*827b1c43SMatthias Ringwald * @format 1 273*827b1c43SMatthias Ringwald * @param discoverable 274*827b1c43SMatthias Ringwald */ 275*827b1c43SMatthias Ringwald #define BTSTACK_EVENT_DISCOVERABLE_ENABLED 0x66 276*827b1c43SMatthias Ringwald 277*827b1c43SMatthias Ringwald // Daemon Events 278*827b1c43SMatthias Ringwald 279*827b1c43SMatthias Ringwald /** 280941b3855SMatthias Ringwald * @format 112 281941b3855SMatthias Ringwald * @param major 282941b3855SMatthias Ringwald * @param minor 283941b3855SMatthias Ringwald @ @param revision 284941b3855SMatthias Ringwald */ 285*827b1c43SMatthias Ringwald #define DAEMON_EVENT_VERSION 0x63 286941b3855SMatthias Ringwald 287941b3855SMatthias Ringwald // data: system bluetooth on/off (bool) 288*827b1c43SMatthias 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) 291*827b1c43SMatthias 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 305941b3855SMatthias Ringwald // data: event(8) 306941b3855SMatthias Ringwald #define DAEMON_EVENT_HCI_PACKET_SENT 0x6C 307941b3855SMatthias Ringwald 308*827b1c43SMatthias Ringwald 3093bc639ceSMatthias Ringwald // additional HCI events 3103bc639ceSMatthias Ringwald /** 3113bc639ceSMatthias Ringwald * @format B 3123bc639ceSMatthias Ringwald * @param handle 3133bc639ceSMatthias Ringwald */ 3143bc639ceSMatthias Ringwald #define HCI_EVENT_SCO_CAN_SEND_NOW 0x6F 3153bc639ceSMatthias Ringwald 316941b3855SMatthias Ringwald // L2CAP EVENTS 317941b3855SMatthias Ringwald 318b072ba33SMatthias Ringwald /** 319b072ba33SMatthias Ringwald * @format 1BH222222 320b072ba33SMatthias Ringwald * @param status 321b072ba33SMatthias Ringwald * @param address 322b072ba33SMatthias Ringwald * @param handle 323b072ba33SMatthias Ringwald * @param psm 324b072ba33SMatthias Ringwald * @param local_cid 325b072ba33SMatthias Ringwald * @param remote_cid 326b072ba33SMatthias Ringwald * @param local_mtu 327b072ba33SMatthias Ringwald * @param remote_mtu 328b072ba33SMatthias Ringwald * @param flush_timeout 329b072ba33SMatthias Ringwald */ 330941b3855SMatthias Ringwald #define L2CAP_EVENT_CHANNEL_OPENED 0x70 331941b3855SMatthias Ringwald 332b072ba33SMatthias Ringwald /* 333b072ba33SMatthias Ringwald * @format 2 334b072ba33SMatthias Ringwald * @param local_cid 335b072ba33SMatthias Ringwald */ 336941b3855SMatthias Ringwald #define L2CAP_EVENT_CHANNEL_CLOSED 0x71 337941b3855SMatthias Ringwald 338b072ba33SMatthias Ringwald /** 339b072ba33SMatthias Ringwald * @format 1BH222 340b072ba33SMatthias Ringwald * @param status 341b072ba33SMatthias Ringwald * @param address 342b072ba33SMatthias Ringwald * @param handle 343b072ba33SMatthias Ringwald * @param psm 344b072ba33SMatthias Ringwald * @param local_cid 345b072ba33SMatthias Ringwald * @param remote_cid 346b072ba33SMatthias Ringwald */ 347941b3855SMatthias Ringwald #define L2CAP_EVENT_INCOMING_CONNECTION 0x72 348941b3855SMatthias Ringwald 349b072ba33SMatthias Ringwald // ?? 350941b3855SMatthias Ringwald // data: event(8), len(8), handle(16) 351941b3855SMatthias Ringwald #define L2CAP_EVENT_TIMEOUT_CHECK 0x73 352941b3855SMatthias Ringwald 353b072ba33SMatthias Ringwald // ?? 354941b3855SMatthias Ringwald // data: event(8), len(8), local_cid(16), credits(8) 355941b3855SMatthias Ringwald #define L2CAP_EVENT_CREDITS 0x74 356941b3855SMatthias Ringwald 357b072ba33SMatthias Ringwald /** 358b072ba33SMatthias Ringwald * @format 12 359b072ba33SMatthias Ringwald * @param status 360b072ba33SMatthias Ringwald * @param psm 361b072ba33SMatthias Ringwald */ 362941b3855SMatthias Ringwald #define L2CAP_EVENT_SERVICE_REGISTERED 0x75 363941b3855SMatthias Ringwald 364b072ba33SMatthias Ringwald /** 365b072ba33SMatthias Ringwald * @format H2222 366b072ba33SMatthias Ringwald * @param handle 367b072ba33SMatthias Ringwald * @param interval_min 368b072ba33SMatthias Ringwald * @param interval_max 369b072ba33SMatthias Ringwald * @param latencey 370b072ba33SMatthias Ringwald * @param timeout_multiplier 371b072ba33SMatthias Ringwald */ 372941b3855SMatthias Ringwald #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 0x76 373941b3855SMatthias Ringwald 374941b3855SMatthias Ringwald // data: event(8), len(8), handle(16), result (16) (0 == ok, 1 == fail) 375b072ba33SMatthias Ringwald /** 376b072ba33SMatthias Ringwald * @format H2 377b072ba33SMatthias Ringwald * @param handle 378b072ba33SMatthias Ringwald * @result 379b072ba33SMatthias Ringwald */ 380941b3855SMatthias Ringwald #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 0x77 381941b3855SMatthias Ringwald 382b072ba33SMatthias Ringwald /** 383b072ba33SMatthias Ringwald * @format 2 384b072ba33SMatthias Ringwald * @param local_cid 385b072ba33SMatthias Ringwald */ 386b072ba33SMatthias Ringwald #define L2CAP_EVENT_CAN_SEND_NOW 0x78 387b072ba33SMatthias Ringwald 388941b3855SMatthias Ringwald // RFCOMM EVENTS 389b072ba33SMatthias Ringwald 390941b3855SMatthias Ringwald /** 391941b3855SMatthias Ringwald * @format 1B2122 392941b3855SMatthias Ringwald * @param status 393941b3855SMatthias Ringwald * @param bd_addr 394941b3855SMatthias Ringwald * @param con_handle 395941b3855SMatthias Ringwald * @param server_channel 396941b3855SMatthias Ringwald * @param rfcomm_cid 397941b3855SMatthias Ringwald * @param max_frame_size 398941b3855SMatthias Ringwald */ 399941b3855SMatthias Ringwald #define RFCOMM_EVENT_OPEN_CHANNEL_COMPLETE 0x80 400941b3855SMatthias Ringwald 401941b3855SMatthias Ringwald /** 402941b3855SMatthias Ringwald * @format 2 403941b3855SMatthias Ringwald * @param rfcomm_cid 404941b3855SMatthias Ringwald */ 405941b3855SMatthias Ringwald #define RFCOMM_EVENT_CHANNEL_CLOSED 0x81 406941b3855SMatthias Ringwald 407941b3855SMatthias Ringwald /** 408941b3855SMatthias Ringwald * @format B12 409941b3855SMatthias Ringwald * @param bd_addr 410941b3855SMatthias Ringwald * @param server_channel 411941b3855SMatthias Ringwald * @param rfcomm_cid 412941b3855SMatthias Ringwald */ 413941b3855SMatthias Ringwald #define RFCOMM_EVENT_INCOMING_CONNECTION 0x82 414941b3855SMatthias Ringwald 415941b3855SMatthias Ringwald /** 416941b3855SMatthias Ringwald * @format 21 417941b3855SMatthias Ringwald * @param rfcomm_cid 418941b3855SMatthias Ringwald * @param line_status 419941b3855SMatthias Ringwald */ 420941b3855SMatthias Ringwald #define RFCOMM_EVENT_REMOTE_LINE_STATUS 0x83 421941b3855SMatthias Ringwald 422941b3855SMatthias Ringwald /** 423941b3855SMatthias Ringwald * @format 21 424941b3855SMatthias Ringwald * @param rfcomm_cid 425941b3855SMatthias Ringwald * @param credits 426941b3855SMatthias Ringwald */ 427941b3855SMatthias Ringwald #define RFCOMM_EVENT_CREDITS 0x84 428941b3855SMatthias Ringwald 429941b3855SMatthias Ringwald /** 430941b3855SMatthias Ringwald * @format 11 431941b3855SMatthias Ringwald * @param status 432941b3855SMatthias Ringwald * @param channel_id 433941b3855SMatthias Ringwald */ 434941b3855SMatthias Ringwald #define RFCOMM_EVENT_SERVICE_REGISTERED 0x85 435941b3855SMatthias Ringwald 436941b3855SMatthias Ringwald /** 437941b3855SMatthias Ringwald * @format 11 438941b3855SMatthias Ringwald * @param status 439941b3855SMatthias Ringwald * @param server_channel_id 440941b3855SMatthias Ringwald */ 441941b3855SMatthias Ringwald #define RFCOMM_EVENT_PERSISTENT_CHANNEL 0x86 442941b3855SMatthias Ringwald 443941b3855SMatthias Ringwald /** 444941b3855SMatthias Ringwald * @format 21 445941b3855SMatthias Ringwald * @param rfcomm_cid 446941b3855SMatthias Ringwald * @param modem_status 447941b3855SMatthias Ringwald */ 448941b3855SMatthias Ringwald #define RFCOMM_EVENT_REMOTE_MODEM_STATUS 0x87 449941b3855SMatthias Ringwald 450941b3855SMatthias Ringwald /** 4517bd8e93bSMatthias Ringwald * TODO: format for variable data 2? 452941b3855SMatthias Ringwald * @param rfcomm_cid 453941b3855SMatthias Ringwald * @param rpn_data 454941b3855SMatthias Ringwald */ 455941b3855SMatthias Ringwald #define RFCOMM_EVENT_PORT_CONFIGURATION 0x88 456941b3855SMatthias Ringwald 457941b3855SMatthias Ringwald /** 458b072ba33SMatthias Ringwald * @format 2 459b072ba33SMatthias Ringwald * @param local_cid 460b072ba33SMatthias Ringwald */ 461b072ba33SMatthias Ringwald #define RFCOMM_EVENT_CAN_SEND_NOW 0x89 462b072ba33SMatthias Ringwald 463b072ba33SMatthias Ringwald 464b072ba33SMatthias Ringwald /** 465941b3855SMatthias Ringwald * @format 14 466941b3855SMatthias Ringwald * @param status 467941b3855SMatthias Ringwald * @param service_record_handle 468941b3855SMatthias Ringwald */ 4695611a760SMatthias Ringwald #define SDP_EVENT_SERVICE_REGISTERED 0x90 470941b3855SMatthias Ringwald 471941b3855SMatthias Ringwald /** 472941b3855SMatthias Ringwald * @format 1 473941b3855SMatthias Ringwald * @param status 474941b3855SMatthias Ringwald */ 4755611a760SMatthias Ringwald #define SDP_EVENT_QUERY_COMPLETE 0x91 476941b3855SMatthias Ringwald 477941b3855SMatthias Ringwald /** 478941b3855SMatthias Ringwald * @format 1T 479941b3855SMatthias Ringwald * @param rfcomm_channel 480941b3855SMatthias Ringwald * @param name 481941b3855SMatthias Ringwald */ 4825611a760SMatthias Ringwald #define SDP_EVENT_QUERY_RFCOMM_SERVICE 0x92 483941b3855SMatthias Ringwald 484941b3855SMatthias Ringwald /** 4854225393cSMatthias Ringwald * @format 22221 4864225393cSMatthias Ringwald * @param record_id 487941b3855SMatthias Ringwald * @param attribute_id 4884225393cSMatthias Ringwald * @param attribute_length 4894225393cSMatthias Ringwald * @param data_offset 4904225393cSMatthias Ringwald * @param data 491941b3855SMatthias Ringwald */ 4925611a760SMatthias Ringwald #define SDP_EVENT_QUERY_ATTRIBUTE_BYTE 0x93 493941b3855SMatthias Ringwald 4944de250b4SMatthias Ringwald /** 4954de250b4SMatthias Ringwald * @format 22LV 4964de250b4SMatthias Ringwald * @param record_id 4974de250b4SMatthias Ringwald * @param attribute_id 4984de250b4SMatthias Ringwald * @param attribute_length 4994de250b4SMatthias Ringwald * @param attribute_value 5004de250b4SMatthias Ringwald */ 5015611a760SMatthias Ringwald #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE 0x94 5024225393cSMatthias Ringwald 5034225393cSMatthias Ringwald /** 5044225393cSMatthias Ringwald * @format 224 5054225393cSMatthias Ringwald * @param total_count 5064225393cSMatthias Ringwald * @param record_index 5074225393cSMatthias Ringwald * @param record_handle 5084225393cSMatthias Ringwald * @note Not provided by daemon, only used for internal testing 5094225393cSMatthias Ringwald */ 5105611a760SMatthias Ringwald #define SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 0x95 511941b3855SMatthias Ringwald 512941b3855SMatthias Ringwald /** 513941b3855SMatthias Ringwald * @format H1 514941b3855SMatthias Ringwald * @param handle 515941b3855SMatthias Ringwald * @param status 516941b3855SMatthias Ringwald */ 5175611a760SMatthias Ringwald #define GATT_EVENT_QUERY_COMPLETE 0xA0 518941b3855SMatthias Ringwald 519941b3855SMatthias Ringwald /** 520941b3855SMatthias Ringwald * @format HX 521941b3855SMatthias Ringwald * @param handle 522941b3855SMatthias Ringwald * @param service 523941b3855SMatthias Ringwald */ 5245611a760SMatthias Ringwald #define GATT_EVENT_SERVICE_QUERY_RESULT 0xA1 525941b3855SMatthias Ringwald 526941b3855SMatthias Ringwald /** 527941b3855SMatthias Ringwald * @format HY 528941b3855SMatthias Ringwald * @param handle 529941b3855SMatthias Ringwald * @param characteristic 530941b3855SMatthias Ringwald */ 5315611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 0xA2 532941b3855SMatthias Ringwald 533941b3855SMatthias Ringwald /** 534941b3855SMatthias Ringwald * @format H2X 535941b3855SMatthias Ringwald * @param handle 536941b3855SMatthias Ringwald * @param include_handle 537941b3855SMatthias Ringwald * @param service 538941b3855SMatthias Ringwald */ 5395611a760SMatthias Ringwald #define GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 0xA3 540941b3855SMatthias Ringwald 541941b3855SMatthias Ringwald /** 542941b3855SMatthias Ringwald * @format HZ 543941b3855SMatthias Ringwald * @param handle 544941b3855SMatthias Ringwald * @param characteristic_descriptor 545941b3855SMatthias Ringwald */ 5465611a760SMatthias Ringwald #define GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 0xA4 547941b3855SMatthias Ringwald 548941b3855SMatthias Ringwald /** 549941b3855SMatthias Ringwald * @format H2LV 550941b3855SMatthias Ringwald * @param handle 551941b3855SMatthias Ringwald * @param value_handle 552941b3855SMatthias Ringwald * @param value_length 553941b3855SMatthias Ringwald * @param value 554941b3855SMatthias Ringwald */ 5555611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA5 556941b3855SMatthias Ringwald 557941b3855SMatthias Ringwald /** 558941b3855SMatthias Ringwald * @format H22LV 559941b3855SMatthias Ringwald * @param handle 560941b3855SMatthias Ringwald * @param value_handle 561941b3855SMatthias Ringwald * @param value_offset 562941b3855SMatthias Ringwald * @param value_length 563941b3855SMatthias Ringwald * @param value 564941b3855SMatthias Ringwald */ 5655611a760SMatthias Ringwald #define GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA6 566941b3855SMatthias Ringwald 567941b3855SMatthias Ringwald /** 568941b3855SMatthias Ringwald * @format H2LV 569941b3855SMatthias Ringwald * @param handle 570941b3855SMatthias Ringwald * @param value_handle 571941b3855SMatthias Ringwald * @param value_length 572941b3855SMatthias Ringwald * @param value 573941b3855SMatthias Ringwald */ 5745611a760SMatthias Ringwald #define GATT_EVENT_NOTIFICATION 0xA7 575941b3855SMatthias Ringwald 576941b3855SMatthias Ringwald /** 577941b3855SMatthias Ringwald * @format H2LV 578941b3855SMatthias Ringwald * @param handle 579941b3855SMatthias Ringwald * @param value_handle 580941b3855SMatthias Ringwald * @param value_length 581941b3855SMatthias Ringwald * @param value 582941b3855SMatthias Ringwald */ 5835611a760SMatthias Ringwald #define GATT_EVENT_INDICATION 0xA8 584941b3855SMatthias Ringwald 585941b3855SMatthias Ringwald /** 586941b3855SMatthias Ringwald * @format H2LV 587941b3855SMatthias Ringwald * @param descriptor_handle 588941b3855SMatthias Ringwald * @param descriptor_length 589941b3855SMatthias Ringwald * @param descriptor 590941b3855SMatthias Ringwald */ 5915611a760SMatthias Ringwald #define GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xA9 592941b3855SMatthias Ringwald 593941b3855SMatthias Ringwald /** 594941b3855SMatthias Ringwald * @format H2LV 595941b3855SMatthias Ringwald * @param handle 596941b3855SMatthias Ringwald * @param descriptor_offset 597941b3855SMatthias Ringwald * @param descriptor_length 598941b3855SMatthias Ringwald * @param descriptor 599941b3855SMatthias Ringwald */ 6005611a760SMatthias Ringwald #define GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xAA 601941b3855SMatthias Ringwald 602941b3855SMatthias Ringwald /** 603941b3855SMatthias Ringwald * @format H2 604941b3855SMatthias Ringwald * @param handle 605941b3855SMatthias Ringwald * @param MTU 606941b3855SMatthias Ringwald */ 6075611a760SMatthias Ringwald #define GATT_EVENT_MTU 0xAB 608941b3855SMatthias Ringwald 609941b3855SMatthias Ringwald /** 610941b3855SMatthias Ringwald * @format H2 611941b3855SMatthias Ringwald * @param handle 612941b3855SMatthias Ringwald * @param MTU 613941b3855SMatthias Ringwald */ 6145611a760SMatthias Ringwald #define ATT_EVENT_MTU_EXCHANGE_COMPLETE 0xB5 615941b3855SMatthias Ringwald 616941b3855SMatthias Ringwald // data: event(8), len(8), status (8), hci_handle (16), attribute_handle (16) 6175611a760SMatthias Ringwald #define ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 0xB6 618941b3855SMatthias Ringwald 619941b3855SMatthias Ringwald 620941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bnep service uuid (16) 621941b3855SMatthias Ringwald #define BNEP_EVENT_SERVICE_REGISTERED 0xC0 622941b3855SMatthias Ringwald 623941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bnep source uuid (16), bnep destination uuid (16), mtu (16), remote_address (48) 624941b3855SMatthias Ringwald #define BNEP_EVENT_OPEN_CHANNEL_COMPLETE 0xC1 625941b3855SMatthias Ringwald 626941b3855SMatthias Ringwald // data: event(8), len(8), bnep source uuid (16), bnep destination uuid (16), remote_address (48) 627941b3855SMatthias Ringwald #define BNEP_EVENT_CHANNEL_CLOSED 0xC2 628941b3855SMatthias Ringwald 629941b3855SMatthias Ringwald // data: event(8), len(8), bnep source uuid (16), bnep destination uuid (16), remote_address (48), channel state (8) 630941b3855SMatthias Ringwald #define BNEP_EVENT_CHANNEL_TIMEOUT 0xC3 631941b3855SMatthias Ringwald 632941b3855SMatthias Ringwald // data: event(8), len(8) 633941b3855SMatthias Ringwald #define BNEP_EVENT_READY_TO_SEND 0xC4 634941b3855SMatthias Ringwald 635941b3855SMatthias Ringwald /** 636941b3855SMatthias Ringwald * @format H1B 637941b3855SMatthias Ringwald * @param handle 638941b3855SMatthias Ringwald * @param addr_type 639941b3855SMatthias Ringwald * @param address 640941b3855SMatthias Ringwald */ 6415611a760SMatthias Ringwald #define SM_EVENT_JUST_WORKS_REQUEST 0xD0 642941b3855SMatthias Ringwald 643941b3855SMatthias Ringwald /** 644941b3855SMatthias Ringwald * @format H1B 645941b3855SMatthias Ringwald * @param handle 646941b3855SMatthias Ringwald * @param addr_type 647941b3855SMatthias Ringwald * @param address 648941b3855SMatthias Ringwald */ 6495611a760SMatthias Ringwald #define SM_EVENT_JUST_WORKS_CANCEL 0xD1 650941b3855SMatthias Ringwald 651941b3855SMatthias Ringwald /** 652941b3855SMatthias Ringwald * @format H1B4 653941b3855SMatthias Ringwald * @param handle 654941b3855SMatthias Ringwald * @param addr_type 655941b3855SMatthias Ringwald * @param address 656941b3855SMatthias Ringwald * @param passkey 657941b3855SMatthias Ringwald */ 6585611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_DISPLAY_NUMBER 0xD2 659941b3855SMatthias Ringwald 660941b3855SMatthias Ringwald /** 661941b3855SMatthias Ringwald * @format H1B 662941b3855SMatthias Ringwald * @param handle 663941b3855SMatthias Ringwald * @param addr_type 664941b3855SMatthias Ringwald * @param address 665941b3855SMatthias Ringwald */ 6665611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_DISPLAY_CANCEL 0xD3 667941b3855SMatthias Ringwald 668941b3855SMatthias Ringwald /** 669941b3855SMatthias Ringwald * @format H1B421 670941b3855SMatthias Ringwald * @param handle 671941b3855SMatthias Ringwald * @param addr_type 672941b3855SMatthias Ringwald * @param address 673941b3855SMatthias Ringwald */ 6745611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_INPUT_NUMBER 0xD4 675941b3855SMatthias Ringwald 676941b3855SMatthias Ringwald /** 677941b3855SMatthias Ringwald * @format H1B 678941b3855SMatthias Ringwald * @param handle 679941b3855SMatthias Ringwald * @param addr_type 680941b3855SMatthias Ringwald * @param address 681941b3855SMatthias Ringwald */ 6825611a760SMatthias Ringwald #define SM_EVENT_PASSKEY_INPUT_CANCEL 0xD5 683941b3855SMatthias Ringwald 684941b3855SMatthias Ringwald /** 685941b3855SMatthias Ringwald * @format H1B 686941b3855SMatthias Ringwald * @param handle 687941b3855SMatthias Ringwald * @param addr_type 688941b3855SMatthias Ringwald * @param address 689941b3855SMatthias Ringwald */ 6905611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_STARTED 0xD6 691941b3855SMatthias Ringwald 692941b3855SMatthias Ringwald /** 693941b3855SMatthias Ringwald * @format H1B 694941b3855SMatthias Ringwald * @param handle 695941b3855SMatthias Ringwald * @param addr_type 696941b3855SMatthias Ringwald * @param address 697941b3855SMatthias Ringwald */ 6985611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_FAILED 0xD7 699941b3855SMatthias Ringwald 700941b3855SMatthias Ringwald /** 701941b3855SMatthias Ringwald * @format H1B2 702941b3855SMatthias Ringwald * @param handle 703941b3855SMatthias Ringwald * @param addr_type 704941b3855SMatthias Ringwald * @param address 705941b3855SMatthias Ringwald * @param le_device_db_index 706941b3855SMatthias Ringwald */ 7075611a760SMatthias Ringwald #define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 0xD8 708941b3855SMatthias Ringwald 709941b3855SMatthias Ringwald /** 710941b3855SMatthias Ringwald * @format H1B 711941b3855SMatthias Ringwald * @param handle 712941b3855SMatthias Ringwald * @param addr_type 713941b3855SMatthias Ringwald * @param address 714941b3855SMatthias Ringwald */ 7155611a760SMatthias Ringwald #define SM_EVENT_AUTHORIZATION_REQUEST 0xD9 716941b3855SMatthias Ringwald 717941b3855SMatthias Ringwald /** 718941b3855SMatthias Ringwald * @format H1B1 719941b3855SMatthias Ringwald * @param handle 720941b3855SMatthias Ringwald * @param addr_type 721941b3855SMatthias Ringwald * @param address 722941b3855SMatthias Ringwald * @param authorization_result 723941b3855SMatthias Ringwald */ 7245611a760SMatthias Ringwald #define SM_EVENT_AUTHORIZATION_RESULT 0xDA 725941b3855SMatthias Ringwald 726941b3855SMatthias Ringwald // GAP 727941b3855SMatthias Ringwald 728941b3855SMatthias Ringwald // data: event(8), len(8), hci_handle (16), security_level (8) 7295611a760SMatthias Ringwald #define GAP_EVENT_SECURITY_LEVEL 0xE0 730941b3855SMatthias Ringwald 731941b3855SMatthias Ringwald // data: event(8), len(8), status (8), bd_addr(48) 7325611a760SMatthias Ringwald #define GAP_EVENT_DEDICATED_BONDING_COMPLETED 0xE1 733941b3855SMatthias Ringwald 734941b3855SMatthias Ringwald /** 735941b3855SMatthias Ringwald * @format 11B1JV 736941b3855SMatthias Ringwald * @param advertising_event_type 737941b3855SMatthias Ringwald * @param address_type 738941b3855SMatthias Ringwald * @param address 739941b3855SMatthias Ringwald * @param rssi 740941b3855SMatthias Ringwald * @param data_length 741941b3855SMatthias Ringwald * @param data 742941b3855SMatthias Ringwald */ 7435611a760SMatthias Ringwald #define GAP_LE_EVENT_ADVERTISING_REPORT 0xE2 744941b3855SMatthias Ringwald 745*827b1c43SMatthias Ringwald 746941b3855SMatthias Ringwald #define HCI_EVENT_HSP_META 0xE8 747941b3855SMatthias Ringwald 748*827b1c43SMatthias Ringwald /** 749*827b1c43SMatthias Ringwald * @format 11 750*827b1c43SMatthias Ringwald * @param subevent_code 751*827b1c43SMatthias Ringwald * @param status 0 == OK 752*827b1c43SMatthias Ringwald */ 753*827b1c43SMatthias Ringwald #define HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 0x01 754*827b1c43SMatthias Ringwald 755*827b1c43SMatthias Ringwald /** 756*827b1c43SMatthias Ringwald * @format 11 757*827b1c43SMatthias Ringwald * @param subevent_code 758*827b1c43SMatthias Ringwald * @param status 0 == OK 759*827b1c43SMatthias Ringwald */ 760*827b1c43SMatthias Ringwald #define HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 0x02 761*827b1c43SMatthias Ringwald 762*827b1c43SMatthias Ringwald /** 763*827b1c43SMatthias Ringwald * @format 1 764*827b1c43SMatthias Ringwald * @param subevent_code 765*827b1c43SMatthias Ringwald */ 766*827b1c43SMatthias Ringwald #define HSP_SUBEVENT_RING 0x03 767*827b1c43SMatthias Ringwald 768*827b1c43SMatthias Ringwald /** 769*827b1c43SMatthias Ringwald * @format 11 770*827b1c43SMatthias Ringwald * @param subevent_code 771*827b1c43SMatthias Ringwald * @param gain Valid range: [0,15] 772*827b1c43SMatthias Ringwald */ 773*827b1c43SMatthias Ringwald #define HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 0x04 774*827b1c43SMatthias Ringwald 775*827b1c43SMatthias Ringwald /** 776*827b1c43SMatthias Ringwald * @format 11 777*827b1c43SMatthias Ringwald * @param subevent_code 778*827b1c43SMatthias Ringwald * @param gain Valid range: [0,15] 779*827b1c43SMatthias Ringwald */ 780*827b1c43SMatthias Ringwald #define HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 0x05 781*827b1c43SMatthias Ringwald 782*827b1c43SMatthias Ringwald /** 783*827b1c43SMatthias Ringwald * @format 1JV 784*827b1c43SMatthias Ringwald * @param subevent_code 785*827b1c43SMatthias Ringwald * @param value_length 786*827b1c43SMatthias Ringwald * @param value 787*827b1c43SMatthias Ringwald */ 788*827b1c43SMatthias Ringwald #define HSP_SUBEVENT_HS_COMMAND 0x06 789*827b1c43SMatthias Ringwald 790*827b1c43SMatthias Ringwald /** 791*827b1c43SMatthias Ringwald * @format 1JV 792*827b1c43SMatthias Ringwald * @param subevent_code 793*827b1c43SMatthias Ringwald * @param value_length 794*827b1c43SMatthias Ringwald * @param value 795*827b1c43SMatthias Ringwald */ 796*827b1c43SMatthias Ringwald #define HSP_SUBEVENT_AG_INDICATION 0x07 797*827b1c43SMatthias Ringwald 798941b3855SMatthias Ringwald 799941b3855SMatthias Ringwald #define HCI_EVENT_HFP_META 0xE9 800941b3855SMatthias Ringwald 801941b3855SMatthias Ringwald #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 0x01 802941b3855SMatthias Ringwald #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED 0x02 803941b3855SMatthias Ringwald #define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 0x03 804941b3855SMatthias Ringwald #define HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED 0x04 805941b3855SMatthias Ringwald #define HFP_SUBEVENT_COMPLETE 0x05 806941b3855SMatthias Ringwald #define HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 0x06 807941b3855SMatthias Ringwald #define HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 0x07 808941b3855SMatthias Ringwald #define HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 0x08 809941b3855SMatthias Ringwald #define HFP_SUBEVENT_CODECS_CONNECTION_COMPLETE 0x09 810aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_START_RINGINIG 0x0A 811aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_STOP_RINGINIG 0x0B 812aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_CALL_TERMINATED 0x0C 813aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 0x0D 814aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_REDIAL_LAST_NUMBER 0x0E 815aa4dd815SMatthias Ringwald #define HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG 0x0F 816ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 0x10 817ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_TRANSMIT_DTMF_CODES 0x11 818ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_TRANSMIT_STATUS_OF_CURRENT_CALL 0x12 819ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_CALL_ANSWERED 0x13 820ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_CONFERENCE_CALL 0x14 821ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_RING 0x15 822ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_SPEAKER_VOLUME 0x16 823ce263fc8SMatthias Ringwald #define HFP_SUBEVENT_MICROPHONE_VOLUME 0x17 824941b3855SMatthias Ringwald 825941b3855SMatthias Ringwald // ANCS Client 826a4815874SMatthias Ringwald 827a4815874SMatthias Ringwald /** 828a4815874SMatthias Ringwald * @format H 829a4815874SMatthias Ringwald * @param handle 830a4815874SMatthias Ringwald */ 8315611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_CONNECTED 0xF0 832a4815874SMatthias Ringwald 833a4815874SMatthias Ringwald /** 834a4815874SMatthias Ringwald * @format H2T 835a4815874SMatthias Ringwald * @param handle 836a4815874SMatthias Ringwald * @param attribute_id 837a4815874SMatthias Ringwald * @param text 838a4815874SMatthias Ringwald */ 8395611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_NOTIFICATION 0xF1 840a4815874SMatthias Ringwald 841a4815874SMatthias Ringwald /** 842a4815874SMatthias Ringwald * @format H 843a4815874SMatthias Ringwald * @param handle 844a4815874SMatthias Ringwald */ 8455611a760SMatthias Ringwald #define ANCS_EVENT_CLIENT_DISCONNECTED 0xF2 846941b3855SMatthias Ringwald 847941b3855SMatthias Ringwald // #define HCI_EVENT_HFP_META 0xxx 848941b3855SMatthias Ringwald // #define HCI_EVENT_GATT_META 0xxx 849941b3855SMatthias Ringwald // #define HCI_EVENT_SDP_META 0xxx 850941b3855SMatthias Ringwald // #define HCI_EVENT_ANCS_META 0xxx 851941b3855SMatthias Ringwald // #define HCI_EVENT_SM_META 0xxx 852941b3855SMatthias Ringwald // #define HCI_EVENT_GAP_META 0xxx 853941b3855SMatthias Ringwald // #define HCI_EVENT_BNEP_META 0xxx 854941b3855SMatthias Ringwald // #define HCI_EVENT_PAN_META 0xxx 855941b3855SMatthias Ringwald 856941b3855SMatthias Ringwald #endif 857