1 /* 2 * Copyright (C) 2015 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. Neither the name of the copyright holders nor the names of 14 * contributors may be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * 4. Any redistribution, use, or modification is done solely for 17 * personal benefit and not for any commercial purpose or for 18 * monetary gain. 19 * 20 * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24 * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * Please inquire about commercial licensing options at 34 * [email protected] 35 * 36 */ 37 38 /* 39 * btstack-defines.h 40 * 41 * BTstack definitions, events, and error codes */ 42 43 #ifndef __BTSTACK_DEFINES_H 44 #define __BTSTACK_DEFINES_H 45 46 #include <stdint.h> 47 #include "btstack_linked_list.h" 48 49 50 // UNUSED macro 51 #ifndef UNUSED 52 #define UNUSED(x) (void)(sizeof(x)) 53 #endif 54 55 // TYPES 56 57 // packet handler 58 typedef void (*btstack_packet_handler_t) (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size); 59 60 // packet callback supporting multiple registrations 61 typedef struct { 62 btstack_linked_item_t item; 63 btstack_packet_handler_t callback; 64 } btstack_packet_callback_registration_t; 65 66 // context callback supporting multiple registrations 67 typedef struct { 68 btstack_linked_item_t * item; 69 void (*callback)(void * context); 70 void * context; 71 } btstack_context_callback_registration_t; 72 73 /** 74 * @brief 128 bit key used with AES128 in Security Manager 75 */ 76 typedef uint8_t sm_key_t[16]; 77 78 // DEFINES 79 80 // hci con handles (12 bit): 0x0000..0x0fff 81 #define HCI_CON_HANDLE_INVALID 0xffff 82 83 84 #define DAEMON_EVENT_PACKET 0x05 85 86 // L2CAP data 87 #define L2CAP_DATA_PACKET 0x06 88 89 // RFCOMM data 90 #define RFCOMM_DATA_PACKET 0x07 91 92 // Attribute protocol data 93 #define ATT_DATA_PACKET 0x08 94 95 // Security Manager protocol data 96 #define SM_DATA_PACKET 0x09 97 98 // SDP query result - only used by daemon 99 // format: type (8), record_id (16), attribute_id (16), attribute_length (16), attribute_value (max 1k) 100 #define SDP_CLIENT_PACKET 0x0a 101 102 // BNEP data 103 #define BNEP_DATA_PACKET 0x0b 104 105 // Unicast Connectionless Data 106 #define UCD_DATA_PACKET 0x0c 107 108 // GOEP data 109 #define GOEP_DATA_PACKET 0x0d 110 111 // PBAP data 112 #define PBAP_DATA_PACKET 0x0e 113 114 // debug log messages 115 #define LOG_MESSAGE_PACKET 0xfc 116 117 118 // ERRORS 119 120 // last error code in 2.1 is 0x38 - we start with 0x50 for BTstack errors 121 #define BTSTACK_CONNECTION_TO_BTDAEMON_FAILED 0x50 122 #define BTSTACK_ACTIVATION_FAILED_SYSTEM_BLUETOOTH 0x51 123 #define BTSTACK_ACTIVATION_POWERON_FAILED 0x52 124 #define BTSTACK_ACTIVATION_FAILED_UNKNOWN 0x53 125 #define BTSTACK_NOT_ACTIVATED 0x54 126 #define BTSTACK_BUSY 0x55 127 #define BTSTACK_MEMORY_ALLOC_FAILED 0x56 128 #define BTSTACK_ACL_BUFFERS_FULL 0x57 129 130 // l2cap errors - enumeration by the command that created them 131 #define L2CAP_COMMAND_REJECT_REASON_COMMAND_NOT_UNDERSTOOD 0x60 132 #define L2CAP_COMMAND_REJECT_REASON_SIGNALING_MTU_EXCEEDED 0x61 133 #define L2CAP_COMMAND_REJECT_REASON_INVALID_CID_IN_REQUEST 0x62 134 135 #define L2CAP_CONNECTION_RESPONSE_RESULT_SUCCESSFUL 0x63 136 #define L2CAP_CONNECTION_RESPONSE_RESULT_PENDING 0x64 137 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_PSM 0x65 138 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_SECURITY 0x66 139 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_RESOURCES 0x67 140 #define L2CAP_CONNECTION_RESPONSE_RESULT_RTX_TIMEOUT 0x68 141 142 #define L2CAP_SERVICE_ALREADY_REGISTERED 0x69 143 #define L2CAP_DATA_LEN_EXCEEDS_REMOTE_MTU 0x6A 144 #define L2CAP_SERVICE_DOES_NOT_EXIST 0x6B 145 #define L2CAP_LOCAL_CID_DOES_NOT_EXIST 0x6C 146 147 #define RFCOMM_MULTIPLEXER_STOPPED 0x70 148 #define RFCOMM_CHANNEL_ALREADY_REGISTERED 0x71 149 #define RFCOMM_NO_OUTGOING_CREDITS 0x72 150 #define RFCOMM_AGGREGATE_FLOW_OFF 0x73 151 #define RFCOMM_DATA_LEN_EXCEEDS_MTU 0x74 152 153 #define SDP_HANDLE_ALREADY_REGISTERED 0x80 154 #define SDP_QUERY_INCOMPLETE 0x81 155 #define SDP_SERVICE_NOT_FOUND 0x82 156 #define SDP_HANDLE_INVALID 0x83 157 #define SDP_QUERY_BUSY 0x84 158 159 #define ATT_HANDLE_VALUE_INDICATION_IN_PORGRESS 0x90 160 #define ATT_HANDLE_VALUE_INDICATION_TIMEOUT 0x91 161 162 #define GATT_CLIENT_NOT_CONNECTED 0x93 163 #define GATT_CLIENT_BUSY 0x94 164 #define GATT_CLIENT_IN_WRONG_STATE 0x95 165 #define GATT_CLIENT_DIFFERENT_CONTEXT_FOR_ADDRESS_ALREADY_EXISTS 0x96 166 #define GATT_CLIENT_VALUE_TOO_LONG 0x97 167 #define GATT_CLIENT_CHARACTERISTIC_NOTIFICATION_NOT_SUPPORTED 0x98 168 #define GATT_CLIENT_CHARACTERISTIC_INDICATION_NOT_SUPPORTED 0x99 169 170 #define BNEP_SERVICE_ALREADY_REGISTERED 0xA0 171 #define BNEP_CHANNEL_NOT_CONNECTED 0xA1 172 #define BNEP_DATA_LEN_EXCEEDS_MTU 0xA2 173 174 // DAEMON COMMANDS 175 176 #define OGF_BTSTACK 0x3d 177 178 // cmds for BTstack 179 // get state: @returns HCI_STATE 180 #define BTSTACK_GET_STATE 0x01 181 182 // set power mode: param HCI_POWER_MODE 183 #define BTSTACK_SET_POWER_MODE 0x02 184 185 // set capture mode: param on 186 #define BTSTACK_SET_ACL_CAPTURE_MODE 0x03 187 188 // get BTstack version 189 #define BTSTACK_GET_VERSION 0x04 190 191 // get system Bluetooth state 192 #define BTSTACK_GET_SYSTEM_BLUETOOTH_ENABLED 0x05 193 194 // set system Bluetooth state 195 #define BTSTACK_SET_SYSTEM_BLUETOOTH_ENABLED 0x06 196 197 // enable inquiry scan for this client 198 #define BTSTACK_SET_DISCOVERABLE 0x07 199 200 // set global Bluetooth state 201 #define BTSTACK_SET_BLUETOOTH_ENABLED 0x08 202 203 // create l2cap channel: param bd_addr(48), psm (16) 204 #define L2CAP_CREATE_CHANNEL 0x20 205 206 // disconnect l2cap disconnect, param channel(16), reason(8) 207 #define L2CAP_DISCONNECT 0x21 208 209 // register l2cap service: param psm(16), mtu (16) 210 #define L2CAP_REGISTER_SERVICE 0x22 211 212 // unregister l2cap disconnect, param psm(16) 213 #define L2CAP_UNREGISTER_SERVICE 0x23 214 215 // accept connection param bd_addr(48), dest cid (16) 216 #define L2CAP_ACCEPT_CONNECTION 0x24 217 218 // decline l2cap disconnect,param bd_addr(48), dest cid (16), reason(8) 219 #define L2CAP_DECLINE_CONNECTION 0x25 220 221 // create l2cap channel: param bd_addr(48), psm (16), mtu (16) 222 #define L2CAP_CREATE_CHANNEL_MTU 0x26 223 224 // register SDP Service Record: service record (size) 225 #define SDP_REGISTER_SERVICE_RECORD 0x30 226 227 // unregister SDP Service Record 228 #define SDP_UNREGISTER_SERVICE_RECORD 0x31 229 230 // Get remote RFCOMM services 231 #define SDP_CLIENT_QUERY_RFCOMM_SERVICES 0x32 232 233 // Get remote SDP services 234 #define SDP_CLIENT_QUERY_SERVICES 0x33 235 236 // RFCOMM "HCI" Commands 237 #define RFCOMM_CREATE_CHANNEL 0x40 238 #define RFCOMM_DISCONNECT 0x41 239 #define RFCOMM_REGISTER_SERVICE 0x42 240 #define RFCOMM_UNREGISTER_SERVICE 0x43 241 #define RFCOMM_ACCEPT_CONNECTION 0x44 242 #define RFCOMM_DECLINE_CONNECTION 0x45 243 #define RFCOMM_PERSISTENT_CHANNEL 0x46 244 #define RFCOMM_CREATE_CHANNEL_WITH_CREDITS 0x47 245 #define RFCOMM_REGISTER_SERVICE_WITH_CREDITS 0x48 246 #define RFCOMM_GRANT_CREDITS 0x49 247 248 // GAP Classic 0x50 249 #define GAP_DISCONNECT 0x50 250 251 // GAP LE 0x60 252 #define GAP_LE_SCAN_START 0x60 253 #define GAP_LE_SCAN_STOP 0x61 254 #define GAP_LE_CONNECT 0x62 255 #define GAP_LE_CONNECT_CANCEL 0x63 256 #define GAP_LE_SET_SCAN_PARAMETERS 0x64 257 258 // GATT (Client) 0x70 259 #define GATT_DISCOVER_ALL_PRIMARY_SERVICES 0x70 260 #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID16 0x71 261 #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID128 0x72 262 #define GATT_FIND_INCLUDED_SERVICES_FOR_SERVICE 0x73 263 #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE 0x74 264 #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE_BY_UUID128 0x75 265 #define GATT_DISCOVER_CHARACTERISTIC_DESCRIPTORS 0x76 266 #define GATT_READ_VALUE_OF_CHARACTERISTIC 0x77 267 #define GATT_READ_LONG_VALUE_OF_CHARACTERISTIC 0x78 268 #define GATT_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE 0x79 269 #define GATT_WRITE_VALUE_OF_CHARACTERISTIC 0x7A 270 #define GATT_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7B 271 #define GATT_RELIABLE_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7C 272 #define GATT_READ_CHARACTERISTIC_DESCRIPTOR 0X7D 273 #define GATT_READ_LONG_CHARACTERISTIC_DESCRIPTOR 0X7E 274 #define GATT_WRITE_CHARACTERISTIC_DESCRIPTOR 0X7F 275 #define GATT_WRITE_LONG_CHARACTERISTIC_DESCRIPTOR 0X80 276 #define GATT_WRITE_CLIENT_CHARACTERISTIC_CONFIGURATION 0X81 277 #define GATT_GET_MTU 0x82 278 279 // OBEX ERRORS 280 #define OBEX_UNKNOWN_ERROR 0x90 281 #define OBEX_CONNECT_FAILED 0x91 282 #define OBEX_DISCONNECTED 0x92 283 #define OBEX_NOT_FOUND 0x93 284 285 // EVENTS 286 287 /** 288 * @format 1 289 * @param state 290 */ 291 #define BTSTACK_EVENT_STATE 0x60 292 293 /** 294 * @format 1 295 * @param number_connections 296 */ 297 #define BTSTACK_EVENT_NR_CONNECTIONS_CHANGED 0x61 298 299 /** 300 * @format 301 */ 302 #define BTSTACK_EVENT_POWERON_FAILED 0x62 303 304 /** 305 * @format 1 306 * @param discoverable 307 */ 308 #define BTSTACK_EVENT_DISCOVERABLE_ENABLED 0x66 309 310 // Daemon Events 311 312 /** 313 * @format 112 314 * @param major 315 * @param minor 316 @ @param revision 317 */ 318 #define DAEMON_EVENT_VERSION 0x63 319 320 // data: system bluetooth on/off (bool) 321 /** 322 * @format 1 323 * param system_bluetooth_enabled 324 */ 325 #define DAEMON_EVENT_SYSTEM_BLUETOOTH_ENABLED 0x64 326 327 // data: event (8), len(8), status (8) == 0, address (48), name (1984 bits = 248 bytes) 328 329 /* 330 * @format 1BT 331 * @param status == 0 to match read_remote_name_request 332 * @param address 333 * @param name 334 */ 335 #define DAEMON_EVENT_REMOTE_NAME_CACHED 0x65 336 337 // internal - data: event(8) 338 #define DAEMON_EVENT_CONNECTION_OPENED 0x67 339 340 // internal - data: event(8) 341 #define DAEMON_EVENT_CONNECTION_CLOSED 0x68 342 343 // data: event(8), len(8), local_cid(16), credits(8) 344 #define DAEMON_EVENT_L2CAP_CREDITS 0x74 345 346 /** 347 * @format 12 348 * @param status 349 * @param psm 350 */ 351 #define DAEMON_EVENT_L2CAP_SERVICE_REGISTERED 0x75 352 353 /** 354 * @format 21 355 * @param rfcomm_cid 356 * @param credits 357 */ 358 #define DAEMON_EVENT_RFCOMM_CREDITS 0x84 359 360 /** 361 * @format 11 362 * @param status 363 * @param channel_id 364 */ 365 #define DAEMON_EVENT_RFCOMM_SERVICE_REGISTERED 0x85 366 367 /** 368 * @format 11 369 * @param status 370 * @param server_channel_id 371 */ 372 #define DAEMON_EVENT_RFCOMM_PERSISTENT_CHANNEL 0x86 373 374 /** 375 * @format 14 376 * @param status 377 * @param service_record_handle 378 */ 379 #define DAEMON_EVENT_SDP_SERVICE_REGISTERED 0x90 380 381 382 383 // additional HCI events 384 385 /** 386 * @brief Indicates HCI transport enters/exits Sleep mode 387 * @format 1 388 * @param active 389 */ 390 #define HCI_EVENT_TRANSPORT_SLEEP_MODE 0x69 391 392 /** 393 * @brief Outgoing packet 394 */ 395 #define HCI_EVENT_TRANSPORT_PACKET_SENT 0x6E 396 397 /** 398 * @format B 399 * @param handle 400 */ 401 #define HCI_EVENT_SCO_CAN_SEND_NOW 0x6F 402 403 404 // L2CAP EVENTS 405 406 /** 407 * @format 1BH2222221 408 * @param status 409 * @param address 410 * @param handle 411 * @param psm 412 * @param local_cid 413 * @param remote_cid 414 * @param local_mtu 415 * @param remote_mtu 416 * @param flush_timeout 417 * @param incoming 418 */ 419 #define L2CAP_EVENT_CHANNEL_OPENED 0x70 420 421 /* 422 * @format 2 423 * @param local_cid 424 */ 425 #define L2CAP_EVENT_CHANNEL_CLOSED 0x71 426 427 /** 428 * @format BH222 429 * @param address 430 * @param handle 431 * @param psm 432 * @param local_cid 433 * @param remote_cid 434 */ 435 #define L2CAP_EVENT_INCOMING_CONNECTION 0x72 436 437 // ?? 438 // data: event(8), len(8), handle(16) 439 #define L2CAP_EVENT_TIMEOUT_CHECK 0x73 440 441 /** 442 * @format H2222 443 * @param handle 444 * @param interval_min 445 * @param interval_max 446 * @param latencey 447 * @param timeout_multiplier 448 */ 449 #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 0x76 450 451 // data: event(8), len(8), handle(16), result (16) (0 == ok, 1 == fail) 452 /** 453 * @format H2 454 * @param handle 455 * @param result 456 */ 457 #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 0x77 458 459 /** 460 * @format 2 461 * @param local_cid 462 */ 463 #define L2CAP_EVENT_CAN_SEND_NOW 0x78 464 465 // LE Data Channels 466 467 /** 468 * @format 1BH2222 469 * @param address_type 470 * @param address 471 * @param handle 472 * @param psm 473 * @param local_cid 474 * @param remote_cid 475 * @param remote_mtu 476 */ 477 #define L2CAP_EVENT_LE_INCOMING_CONNECTION 0x79 478 479 /** 480 * @format 11BH122222 481 * @param status 482 * @param address_type 483 * @param address 484 * @param handle 485 * @param incoming 486 * @param psm 487 * @param local_cid 488 * @param remote_cid 489 * @param local_mtu 490 * @param remote_mtu 491 */ 492 #define L2CAP_EVENT_LE_CHANNEL_OPENED 0x7a 493 494 /* 495 * @format 2 496 * @param local_cid 497 */ 498 #define L2CAP_EVENT_LE_CHANNEL_CLOSED 0x7b 499 500 /* 501 * @format 2 502 * @param local_cid 503 */ 504 #define L2CAP_EVENT_LE_CAN_SEND_NOW 0x7c 505 506 /* 507 * @format 2 508 * @param local_cid 509 */ 510 #define L2CAP_EVENT_LE_PACKET_SENT 0x7d 511 512 513 // RFCOMM EVENTS 514 515 /** 516 * @format 1B21221 517 * @param status 518 * @param bd_addr 519 * @param con_handle 520 * @param server_channel 521 * @param rfcomm_cid 522 * @param max_frame_size 523 * @param incoming 524 */ 525 #define RFCOMM_EVENT_CHANNEL_OPENED 0x80 526 527 /** 528 * @format 2 529 * @param rfcomm_cid 530 */ 531 #define RFCOMM_EVENT_CHANNEL_CLOSED 0x81 532 533 /** 534 * @format B12 535 * @param bd_addr 536 * @param server_channel 537 * @param rfcomm_cid 538 */ 539 #define RFCOMM_EVENT_INCOMING_CONNECTION 0x82 540 541 /** 542 * @format 21 543 * @param rfcomm_cid 544 * @param line_status 545 */ 546 #define RFCOMM_EVENT_REMOTE_LINE_STATUS 0x83 547 548 /** 549 * @format 21 550 * @param rfcomm_cid 551 * @param modem_status 552 */ 553 #define RFCOMM_EVENT_REMOTE_MODEM_STATUS 0x87 554 555 /** 556 * TODO: format for variable data 2? 557 * param rfcomm_cid 558 * param rpn_data 559 */ 560 #define RFCOMM_EVENT_PORT_CONFIGURATION 0x88 561 562 /** 563 * @format 2 564 * @param rfcomm_cid 565 */ 566 #define RFCOMM_EVENT_CAN_SEND_NOW 0x89 567 568 569 /** 570 * @format 1 571 * @param status 572 */ 573 #define SDP_EVENT_QUERY_COMPLETE 0x91 574 575 /** 576 * @format 1T 577 * @param rfcomm_channel 578 * @param name 579 */ 580 #define SDP_EVENT_QUERY_RFCOMM_SERVICE 0x92 581 582 /** 583 * @format 22221 584 * @param record_id 585 * @param attribute_id 586 * @param attribute_length 587 * @param data_offset 588 * @param data 589 */ 590 #define SDP_EVENT_QUERY_ATTRIBUTE_BYTE 0x93 591 592 /** 593 * @format 22LV 594 * @param record_id 595 * @param attribute_id 596 * @param attribute_length 597 * @param attribute_value 598 */ 599 #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE 0x94 600 601 /** 602 * @format 224 603 * @param total_count 604 * @param record_index 605 * @param record_handle 606 * @note Not provided by daemon, only used for internal testing 607 */ 608 #define SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 0x95 609 610 /** 611 * @format H1 612 * @param handle 613 * @param status 614 */ 615 #define GATT_EVENT_QUERY_COMPLETE 0xA0 616 617 /** 618 * @format HX 619 * @param handle 620 * @param service 621 */ 622 #define GATT_EVENT_SERVICE_QUERY_RESULT 0xA1 623 624 /** 625 * @format HY 626 * @param handle 627 * @param characteristic 628 */ 629 #define GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 0xA2 630 631 /** 632 * @format H2X 633 * @param handle 634 * @param include_handle 635 * @param service 636 */ 637 #define GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 0xA3 638 639 /** 640 * @format HZ 641 * @param handle 642 * @param characteristic_descriptor 643 */ 644 #define GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 0xA4 645 646 /** 647 * @format H2LV 648 * @param handle 649 * @param value_handle 650 * @param value_length 651 * @param value 652 */ 653 #define GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA5 654 655 /** 656 * @format H22LV 657 * @param handle 658 * @param value_handle 659 * @param value_offset 660 * @param value_length 661 * @param value 662 */ 663 #define GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA6 664 665 /** 666 * @format H2LV 667 * @param handle 668 * @param value_handle 669 * @param value_length 670 * @param value 671 */ 672 #define GATT_EVENT_NOTIFICATION 0xA7 673 674 /** 675 * @format H2LV 676 * @param handle 677 * @param value_handle 678 * @param value_length 679 * @param value 680 */ 681 #define GATT_EVENT_INDICATION 0xA8 682 683 /** 684 * @format H2LV 685 * @param handle 686 * @param descriptor_handle 687 * @param descriptor_length 688 * @param descriptor 689 */ 690 #define GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xA9 691 692 /** 693 * @format H2LV 694 * @param handle 695 * @param descriptor_offset 696 * @param descriptor_length 697 * @param descriptor 698 */ 699 #define GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xAA 700 701 /** 702 * @format H2 703 * @param handle 704 * @param MTU 705 */ 706 #define GATT_EVENT_MTU 0xAB 707 708 /** 709 * @format H2 710 * @param handle 711 * @param MTU 712 */ 713 #define ATT_EVENT_MTU_EXCHANGE_COMPLETE 0xB5 714 715 /** 716 * @format 1H2 717 * @param status 718 * @param conn_handle 719 * @param attribute_handle 720 */ 721 #define ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 0xB6 722 723 /** 724 * @format 725 */ 726 #define ATT_EVENT_CAN_SEND_NOW 0xB7 727 728 // TODO: daemon only event 729 730 /** 731 * @format 12 732 * @param status 733 * @param service_uuid 734 */ 735 #define BNEP_EVENT_SERVICE_REGISTERED 0xC0 736 737 /** 738 * @format 12222B 739 * @param status 740 * @param bnep_cid 741 * @param source_uuid 742 * @param destination_uuid 743 * @param mtu 744 * @param remote_address 745 */ 746 #define BNEP_EVENT_CHANNEL_OPENED 0xC1 747 748 /** 749 * @format 222B 750 * @param bnep_cid 751 * @param source_uuid 752 * @param destination_uuid 753 * @param remote_address 754 */ 755 #define BNEP_EVENT_CHANNEL_CLOSED 0xC2 756 757 /** 758 * @format 222B1 759 * @param bnep_cid 760 * @param source_uuid 761 * @param destination_uuid 762 * @param remote_address 763 * @param channel_state 764 */ 765 #define BNEP_EVENT_CHANNEL_TIMEOUT 0xC3 766 767 /** 768 * @format 222B 769 * @param bnep_cid 770 * @param source_uuid 771 * @param destination_uuid 772 * @param remote_address 773 */ 774 #define BNEP_EVENT_CAN_SEND_NOW 0xC4 775 776 /** 777 * @format H1B 778 * @param handle 779 * @param addr_type 780 * @param address 781 */ 782 #define SM_EVENT_JUST_WORKS_REQUEST 0xD0 783 784 /** 785 * @format H1B 786 * @param handle 787 * @param addr_type 788 * @param address 789 */ 790 #define SM_EVENT_JUST_WORKS_CANCEL 0xD1 791 792 /** 793 * @format H1B4 794 * @param handle 795 * @param addr_type 796 * @param address 797 * @param passkey 798 */ 799 #define SM_EVENT_PASSKEY_DISPLAY_NUMBER 0xD2 800 801 /** 802 * @format H1B 803 * @param handle 804 * @param addr_type 805 * @param address 806 */ 807 #define SM_EVENT_PASSKEY_DISPLAY_CANCEL 0xD3 808 809 /** 810 * @format H1B 811 * @param handle 812 * @param addr_type 813 * @param address 814 */ 815 #define SM_EVENT_PASSKEY_INPUT_NUMBER 0xD4 816 817 /** 818 * @format H1B 819 * @param handle 820 * @param addr_type 821 * @param address 822 */ 823 #define SM_EVENT_PASSKEY_INPUT_CANCEL 0xD5 824 825 /** 826 * @format H1B4 827 * @param handle 828 * @param addr_type 829 * @param address 830 * @param passkey 831 */ 832 #define SM_EVENT_NUMERIC_COMPARISON_REQUEST 0xD6 833 834 /** 835 * @format H1B 836 * @param handle 837 * @param addr_type 838 * @param address 839 */ 840 #define SM_EVENT_NUMERIC_COMPARISON_CANCEL 0xD7 841 842 /** 843 * @format H1B 844 * @param handle 845 * @param addr_type 846 * @param address 847 */ 848 #define SM_EVENT_IDENTITY_RESOLVING_STARTED 0xD8 849 850 /** 851 * @format H1B 852 * @param handle 853 * @param addr_type 854 * @param address 855 */ 856 #define SM_EVENT_IDENTITY_RESOLVING_FAILED 0xD9 857 858 /** 859 * @brief Identify resolving succeeded 860 * 861 * @format H1B1B2 862 * @param handle 863 * @param addr_type 864 * @param address 865 * @param identity_addr_type 866 * @param identity_address 867 * @param index_internal 868 * 869 */ 870 #define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 0xDA 871 872 /** 873 * @format H1B 874 * @param handle 875 * @param addr_type 876 * @param address 877 */ 878 #define SM_EVENT_AUTHORIZATION_REQUEST 0xDB 879 880 /** 881 * @format H1B1 882 * @param handle 883 * @param addr_type 884 * @param address 885 * @param authorization_result 886 */ 887 #define SM_EVENT_AUTHORIZATION_RESULT 0xDC 888 889 /** 890 * @format H1 891 * @param handle 892 * @param action see SM_KEYPRESS_* 893 */ 894 #define SM_EVENT_KEYPRESS_NOTIFICATION 0xDD 895 896 /** 897 * @brief Emitted during pairing to inform app about address used as identity 898 * 899 * @format H1B1B 900 * @param handle 901 * @param addr_type 902 * @param address 903 * @param identity_addr_type 904 * @param identity_address 905 */ 906 #define SM_EVENT_IDENTITY_CREATED 0xDE 907 908 // GAP 909 910 /** 911 * @format H1 912 * @param handle 913 * @param security_level 914 */ 915 #define GAP_EVENT_SECURITY_LEVEL 0xE0 916 917 /** 918 * @format 1B 919 * @param status 920 * @param address 921 */ 922 #define GAP_EVENT_DEDICATED_BONDING_COMPLETED 0xE1 923 924 /** 925 * @format 11B1JV 926 * @param advertising_event_type 927 * @param address_type 928 * @param address 929 * @param rssi 930 * @param data_length 931 * @param data 932 */ 933 #define GAP_EVENT_ADVERTISING_REPORT 0xE2 934 935 /** 936 * @format B132111JV 937 * @param bd_addr 938 * @param page_scan_repetition_mode 939 * @param class_of_device 940 * @param clock_offset 941 * @param rssi_availabe 942 * @param rssi 943 * @param name_available 944 * @param name_len 945 * @param name 946 */ 947 #define GAP_EVENT_INQUIRY_RESULT 0xE3 948 949 /** 950 * @format 1 951 * @param status 952 */ 953 #define GAP_EVENT_INQUIRY_COMPLETE 0xE4 954 955 956 // Meta Events, see below for sub events 957 #define HCI_EVENT_HSP_META 0xE8 958 #define HCI_EVENT_HFP_META 0xE9 959 #define HCI_EVENT_ANCS_META 0xEA 960 #define HCI_EVENT_AVDTP_META 0xEB 961 #define HCI_EVENT_AVRCP_META 0xEC 962 #define HCI_EVENT_GOEP_META 0xED 963 #define HCI_EVENT_PBAP_META 0xEE 964 #define HCI_EVENT_HID_META 0xEF 965 #define HCI_EVENT_A2DP_META 0xF0 966 967 // Potential other meta groups 968 // #define HCI_EVENT_BNEP_META 0xxx 969 // #define HCI_EVENT_GAP_META 0xxx 970 // #define HCI_EVENT_GATT_META 0xxx 971 // #define HCI_EVENT_PAN_META 0xxx 972 // #define HCI_EVENT_SDP_META 0xxx 973 // #define HCI_EVENT_SM_META 0xxx 974 975 976 /** HSP Subevent */ 977 978 /** 979 * @format 11 980 * @param subevent_code 981 * @param status 0 == OK 982 */ 983 #define HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE 0x01 984 985 /** 986 * @format 11 987 * @param subevent_code 988 * @param status 0 == OK 989 */ 990 #define HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE 0x02 991 992 993 /** 994 * @format 11H 995 * @param subevent_code 996 * @param status 0 == OK 997 * @param handle 998 */ 999 #define HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 0x03 1000 1001 /** 1002 * @format 11 1003 * @param subevent_code 1004 * @param status 0 == OK 1005 */ 1006 #define HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 0x04 1007 1008 /** 1009 * @format 1 1010 * @param subevent_code 1011 */ 1012 #define HSP_SUBEVENT_RING 0x05 1013 1014 /** 1015 * @format 11 1016 * @param subevent_code 1017 * @param gain Valid range: [0,15] 1018 */ 1019 #define HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 0x06 1020 1021 /** 1022 * @format 11 1023 * @param subevent_code 1024 * @param gain Valid range: [0,15] 1025 */ 1026 #define HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 0x07 1027 1028 /** 1029 * @format 1JV 1030 * @param subevent_code 1031 * @param value_length 1032 * @param value 1033 */ 1034 #define HSP_SUBEVENT_HS_COMMAND 0x08 1035 1036 /** 1037 * @format 1JV 1038 * @param subevent_code 1039 * @param value_length 1040 * @param value 1041 */ 1042 #define HSP_SUBEVENT_AG_INDICATION 0x09 1043 1044 1045 /** HFP Subevent */ 1046 1047 /** 1048 * @format 11HB 1049 * @param subevent_code 1050 * @param status 0 == OK 1051 * @param con_handle 1052 * @param bd_addr 1053 */ 1054 #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 0x01 1055 1056 /** 1057 * @format 1 1058 * @param subevent_code 1059 */ 1060 #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED 0x02 1061 1062 /** 1063 * @format 11HB1 1064 * @param subevent_code 1065 * @param status 0 == OK 1066 * @param handle 1067 * @param bd_addr 1068 * @param negotiated_codec 1069 */ 1070 #define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 0x03 1071 1072 /** 1073 * @format 1 1074 * @param subevent_code 1075 */ 1076 #define HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED 0x04 1077 1078 /** 1079 * @format 11 1080 * @param subevent_code 1081 * @param status 0 == OK 1082 */ 1083 #define HFP_SUBEVENT_COMPLETE 0x05 1084 1085 /** 1086 * @format 111T 1087 * @param subevent_code 1088 * @param indicator_index 1089 * @param indicator_status 1090 * @param indicator_name 1091 */ 1092 #define HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 0x06 1093 1094 /** 1095 * @format 111T 1096 * @param subevent_code 1097 * @param network_operator_mode 1098 * @param network_operator_format 1099 * @param network_operator_name 1100 */ 1101 #define HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 0x07 1102 1103 /** 1104 * @format 11 1105 * @param subevent_code 1106 * @param error 1107 */ 1108 #define HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 0x08 1109 1110 /** 1111 * @format 1 1112 * @param subevent_code 1113 */ 1114 #define HFP_SUBEVENT_START_RINGINIG 0x0A 1115 1116 /** 1117 * @format 1 1118 * @param subevent_code 1119 */ 1120 #define HFP_SUBEVENT_STOP_RINGINIG 0x0B 1121 1122 /** 1123 * @format 1 1124 * @param subevent_code 1125 */ 1126 #define HFP_SUBEVENT_CALL_TERMINATED 0x0C 1127 1128 /** 1129 * @format 1T 1130 * @param subevent_code 1131 * @param number 1132 */ 1133 #define HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 0x0D 1134 1135 /** 1136 * @format 1 1137 * @param subevent_code 1138 */ 1139 #define HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG 0x0E 1140 1141 /** 1142 * @format 1T 1143 * @param subevent_code 1144 * @param number 1145 */ 1146 #define HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 0x0F 1147 1148 /** 1149 * @format 1T 1150 * @param subevent_code 1151 * @param dtmf code 1152 */ 1153 #define HFP_SUBEVENT_TRANSMIT_DTMF_CODES 0x10 1154 1155 /** 1156 * @format 1 1157 * @param subevent_code 1158 */ 1159 #define HFP_SUBEVENT_CALL_ANSWERED 0x11 1160 1161 /** 1162 * @format 1 1163 * @param subevent_code 1164 */ 1165 #define HFP_SUBEVENT_CONFERENCE_CALL 0x12 1166 1167 /** 1168 * @format 1 1169 * @param subevent_code 1170 */ 1171 #define HFP_SUBEVENT_RING 0x13 1172 1173 /** 1174 * @format 111 1175 * @param subevent_code 1176 * @param status 1177 * @param gain 1178 */ 1179 #define HFP_SUBEVENT_SPEAKER_VOLUME 0x14 1180 1181 /** 1182 * @format 111 1183 * @param subevent_code 1184 * @param status 1185 * @param gain 1186 */ 1187 #define HFP_SUBEVENT_MICROPHONE_VOLUME 0x15 1188 1189 /** 1190 * @format 11T 1191 * @param subevent_code 1192 * @param type 1193 * @param number 1194 */ 1195 #define HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 0x16 1196 1197 /** 1198 * @format 11T 1199 * @param subevent_code 1200 * @param type 1201 * @param number 1202 */ 1203 #define HFP_SUBEVENT_CALLING_LINE_INDETIFICATION_NOTIFICATION 0x17 1204 1205 /** 1206 * @format 111111T 1207 * @param subevent_code 1208 * @param clcc_idx 1209 * @param clcc_dir 1210 * @param clcc_status 1211 * @param clcc_mpty 1212 * @param bnip_type 1213 * @param bnip_number 1214 */ 1215 #define HFP_SUBEVENT_ENHANCED_CALL_STATUS 0x18 1216 1217 /** 1218 * @format 111T 1219 * @param subevent_code 1220 * @param status 1221 * @param bnip_type 1222 * @param bnip_number 1223 */ 1224 #define HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 0x19 1225 1226 /** 1227 * @format 1T 1228 * @param subevent_code 1229 * @param value 1230 */ 1231 #define HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS 0x1A 1232 1233 // ANCS Client 1234 1235 /** 1236 * @format 1H 1237 * @param subevent_code 1238 * @param handle 1239 */ 1240 #define ANCS_SUBEVENT_CLIENT_CONNECTED 0xF0 1241 1242 /** 1243 * @format 1H2T 1244 * @param subevent_code 1245 * @param handle 1246 * @param attribute_id 1247 * @param text 1248 */ 1249 #define ANCS_SUBEVENT_CLIENT_NOTIFICATION 0xF1 1250 1251 /** 1252 * @format 1H 1253 * @param subevent_code 1254 * @param handle 1255 */ 1256 #define ANCS_SUBEVENT_CLIENT_DISCONNECTED 0xF2 1257 1258 1259 /** AVDTP Subevent */ 1260 1261 /** 1262 * @format 1H111 1263 * @param subevent_code 1264 * @param avdtp_cid 1265 * @param int_seid 1266 * @param signal_identifier 1267 * @param status 0 == OK 1268 */ 1269 #define AVDTP_SUBEVENT_SIGNALING_ACCEPT 0x01 1270 1271 /** 1272 * @format 1H11 1273 * @param subevent_code 1274 * @param avdtp_cid 1275 * @param int_seid 1276 * @param signal_identifier 1277 */ 1278 #define AVDTP_SUBEVENT_SIGNALING_REJECT 0x02 1279 1280 /** 1281 * @format 1H11 1282 * @param subevent_code 1283 * @param avdtp_cid 1284 * @param int_seid 1285 * @param signal_identifier 1286 */ 1287 #define AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 0x03 1288 1289 /** 1290 * @format 1HB1 1291 * @param subevent_code 1292 * @param avdtp_cid 1293 * @param bd_addr 1294 * @param status 0 == OK 1295 */ 1296 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 0x04 1297 1298 /** 1299 * @format 1H 1300 * @param subevent_code 1301 * @param avdtp_cid 1302 */ 1303 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 0x05 1304 1305 /** 1306 * @format 1H1111 1307 * @param subevent_code 1308 * @param avdtp_cid 1309 * @param seid 0x01 – 0x3E 1310 * @param in_use 0-not in use, 1-in use 1311 * @param media_type 0-audio, 1-video, 2-multimedia 1312 * @param sep_type 0-source, 1-sink 1313 */ 1314 #define AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 0x06 1315 1316 /** 1317 * @format 1H1111111111 1318 * @param subevent_code 1319 * @param avdtp_cid 1320 * @param int_seid 1321 * @param acp_seid 1322 * @param media_type 1323 * @param sampling_frequency_bitmap 1324 * @param channel_mode_bitmap 1325 * @param block_length_bitmap 1326 * @param subbands_bitmap 1327 * @param allocation_method_bitmap 1328 * @param min_bitpool_value 1329 * @param max_bitpool_value 1330 */ 1331 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 0x07 1332 1333 /** 1334 * @format 1H1112LV 1335 * @param subevent_code 1336 * @param avdtp_cid 1337 * @param int_seid 1338 * @param acp_seid 1339 * @param media_type 1340 * @param media_codec_type 1341 * @param media_codec_information_len 1342 * @param media_codec_information 1343 */ 1344 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 0x08 1345 1346 /** 1347 * @format 1H111121111111 1348 * @param subevent_code 1349 * @param avdtp_cid 1350 * @param int_seid 1351 * @param acp_seid 1352 * @param reconfigure 1353 * @param media_type 1354 * @param sampling_frequency 1355 * @param channel_mode 1356 * @param num_channels 1357 * @param block_length 1358 * @param subbands 1359 * @param allocation_method 1360 * @param min_bitpool_value 1361 * @param max_bitpool_value 1362 */ 1363 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 0x09 1364 1365 /** 1366 * @format 1H11112LV 1367 * @param subevent_code 1368 * @param avdtp_cid 1369 * @param int_seid 1370 * @param acp_seid 1371 * @param reconfigure 1372 * @param media_type 1373 * @param media_codec_type 1374 * @param media_codec_information_len 1375 * @param media_codec_information 1376 */ 1377 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 0x0A 1378 1379 /** 1380 * @format 1H111 1381 * @param subevent_code 1382 * @param avdtp_cid 1383 * @param int_seid 1384 * @param acp_seid 1385 * @param status 0 == OK 1386 */ 1387 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 0x0B 1388 1389 /** 1390 * @format 1H 1391 * @param subevent_code 1392 * @param avdtp_cid 1393 */ 1394 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 0x0C 1395 1396 /** 1397 * @format 1H12 1398 * @param subevent_code 1399 * @param avdtp_cid 1400 * @param int_seid 1401 * @param sequence_number 1402 */ 1403 #define AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 0x0D 1404 1405 1406 /** A2DP Subevent */ 1407 1408 /** 1409 * @format 1H111 1410 * @param subevent_code 1411 * @param a2dp_cid 1412 * @param local_seid 1413 * @param remote_seid 1414 * @param status 1415 */ 1416 #define A2DP_SUBEVENT_STREAM_ESTABLISHED 0x01 1417 1418 /** 1419 * @format 1H1 1420 * @param subevent_code 1421 * @param a2dp_cid 1422 * @param local_seid 1423 */ 1424 #define A2DP_SUBEVENT_STREAM_START_ACCEPTED 0x02 1425 1426 /** 1427 * @format 1H1 1428 * @param subevent_code 1429 * @param a2dp_cid 1430 * @param local_seid 1431 */ 1432 #define A2DP_SUBEVENT_STREAM_SUSPENDED 0x03 1433 1434 /** 1435 * @format 1H1 1436 * @param subevent_code 1437 * @param avdtp_cid 1438 * @param local_seid 1439 */ 1440 #define A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 0x04 1441 1442 /** 1443 * @format 1H1 1444 * @param subevent_code 1445 * @param avdtp_cid 1446 * @param local_seid 1447 */ 1448 #define A2DP_SUBEVENT_STREAM_RELEASED 0x05 1449 1450 /** AVRCP Subevent */ 1451 1452 /** 1453 * @format 1H12B 1454 * @param subevent_code 1455 * @param con_handle 1456 * @param status 0 == OK 1457 * @param local_cid 1458 * @param bd_addr 1459 */ 1460 #define AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 0x01 1461 1462 /** 1463 * @format 1H 1464 * @param subevent_code 1465 * @param con_handle 1466 */ 1467 #define AVRCP_SUBEVENT_CONNECTION_RELEASED 0x02 1468 1469 /** 1470 * @format 1H1114JVJVJVJV 1471 * @param subevent_code 1472 * @param con_handle 1473 * @param status 1474 * @param track 1475 * @param total_tracks 1476 * @param song_length in ms 1477 * @param title_len 1478 * @param title 1479 * @param artist_len 1480 * @param artist 1481 * @param album_len 1482 * @param album 1483 * @param genre_len 1484 * @param genre 1485 */ 1486 #define AVRCP_SUBEVENT_NOW_PLAYING_INFO 0x03 1487 1488 /** 1489 * @format 1H111 1490 * @param subevent_code 1491 * @param con_handle 1492 * @param status 1493 * @param repeat_mode 1494 * @param shuffle_mode 1495 */ 1496 #define AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 0x04 1497 1498 /** 1499 * @format 1H1441 1500 * @param subevent_code 1501 * @param con_handle 1502 * @param status 1503 * @param song_length 1504 * @param song_position 1505 * @param play_status 1506 */ 1507 #define AVRCP_SUBEVENT_PLAY_STATUS 0x05 1508 1509 /** 1510 * @format 1H11 1511 * @param subevent_code 1512 * @param con_handle 1513 * @param status 1514 * @param playback_status 1515 */ 1516 #define AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 0x06 1517 1518 /** 1519 * @format 1H11 1520 * @param subevent_code 1521 * @param con_handle 1522 * @param status 1523 * @param track_status 1524 */ 1525 #define AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 0x07 1526 1527 /** 1528 * @format 1H1 1529 * @param subevent_code 1530 * @param con_handle 1531 * @param status 1532 */ 1533 #define AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 0x08 1534 1535 /** 1536 * @format 1H1 1537 * @param subevent_code 1538 * @param con_handle 1539 * @param status 1540 */ 1541 #define AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 0x09 1542 1543 /** 1544 * @format 1H11 1545 * @param subevent_code 1546 * @param con_handle 1547 * @param status 1548 * @param absolute_volume 1549 */ 1550 #define AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 0x0A 1551 1552 /** 1553 * @format 1H11 1554 * @param subevent_code 1555 * @param con_handle 1556 * @param status 1557 * @param absolute_volume 1558 */ 1559 #define AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 0x0B 1560 1561 /** 1562 * @format 1H11 1563 * @param subevent_code 1564 * @param con_handle 1565 * @param status 1566 * @param notification_id 1567 */ 1568 #define AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 0x0C 1569 1570 /** 1571 * @format 1H11 1572 * @param subevent_code 1573 * @param con_handle 1574 * @param status 1575 * @param operation_id 1576 */ 1577 #define AVRCP_SUBEVENT_OPERATION_START 0x0D 1578 1579 /** 1580 * @format 1H11 1581 * @param subevent_code 1582 * @param con_handle 1583 * @param status 1584 * @param operation_id 1585 */ 1586 #define AVRCP_SUBEVENT_OPERATION_COMPLETE 0x0E 1587 1588 /** 1589 * @format 1H1 1590 * @param subevent_code 1591 * @param con_handle 1592 * @param status 1593 */ 1594 #define AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 0x0F 1595 1596 /** 1597 * @format 121BH1 1598 * @param subevent_code 1599 * @param goep_cid 1600 * @param status 1601 * @param bd_addr 1602 * @param con_handle 1603 * @param incoming 1604 */ 1605 #define GOEP_SUBEVENT_CONNECTION_OPENED 0x01 1606 1607 /** 1608 * @format 12 1609 * @param subevent_code 1610 * @param goep_cid 1611 */ 1612 #define GOEP_SUBEVENT_CONNECTION_CLOSED 0x02 1613 1614 /** 1615 * @format 12 1616 * @param subevent_code 1617 * @param goep_cid 1618 */ 1619 #define GOEP_SUBEVENT_CAN_SEND_NOW 0x03 1620 1621 /** 1622 * @format 121BH1 1623 * @param subevent_code 1624 * @param pbap_cid 1625 * @param status 1626 * @param bd_addr 1627 * @param con_handle 1628 * @param incoming 1629 */ 1630 #define PBAP_SUBEVENT_CONNECTION_OPENED 0x01 1631 1632 /** 1633 * @format 12 1634 * @param subevent_code 1635 * @param goep_cid 1636 */ 1637 #define PBAP_SUBEVENT_CONNECTION_CLOSED 0x02 1638 1639 /** 1640 * @format 121 1641 * @param subevent_code 1642 * @param goep_cid 1643 * @param status 1644 */ 1645 #define PBAP_SUBEVENT_OPERATION_COMPLETED 0x03 1646 1647 /** 1648 * @format 121BH1 1649 * @param subevent_code 1650 * @param hid_cid 1651 * @param status 1652 * @param bd_addr 1653 * @param con_handle 1654 * @param incoming 1655 */ 1656 #define HID_SUBEVENT_CONNECTION_OPENED 0x01 1657 1658 /** 1659 * @format 12 1660 * @param subevent_code 1661 * @param hid_cid 1662 */ 1663 #define HID_SUBEVENT_CONNECTION_CLOSED 0x02 1664 1665 /** 1666 * @format 12 1667 * @param subevent_code 1668 * @param hid_cid 1669 */ 1670 #define HID_SUBEVENT_CAN_SEND_NOW 0x03 1671 1672 #endif 1673