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 // AVRCP browsing data 115 #define AVRCP_BROWSING_DATA_PACKET 0x0f 116 117 // MAP data 118 #define MAP_DATA_PACKET 0x10 119 120 // Mesh Provisioning PDU 121 #define PROVISIONING_DATA_PACKET 0x11 122 123 // debug log messages 124 #define LOG_MESSAGE_PACKET 0xfc 125 126 127 // ERRORS 128 // last error code in 2.1 is 0x38 - we start with 0x50 for BTstack errors 129 130 /* ENUM_START: BTSTACK_ERROR_CODE */ 131 #define BTSTACK_CONNECTION_TO_BTDAEMON_FAILED 0x50 132 #define BTSTACK_ACTIVATION_FAILED_SYSTEM_BLUETOOTH 0x51 133 #define BTSTACK_ACTIVATION_POWERON_FAILED 0x52 134 #define BTSTACK_ACTIVATION_FAILED_UNKNOWN 0x53 135 #define BTSTACK_NOT_ACTIVATED 0x54 136 #define BTSTACK_BUSY 0x55 137 #define BTSTACK_MEMORY_ALLOC_FAILED 0x56 138 #define BTSTACK_ACL_BUFFERS_FULL 0x57 139 140 // l2cap errors - enumeration by the command that created them 141 #define L2CAP_COMMAND_REJECT_REASON_COMMAND_NOT_UNDERSTOOD 0x60 142 #define L2CAP_COMMAND_REJECT_REASON_SIGNALING_MTU_EXCEEDED 0x61 143 #define L2CAP_COMMAND_REJECT_REASON_INVALID_CID_IN_REQUEST 0x62 144 145 #define L2CAP_CONNECTION_RESPONSE_RESULT_SUCCESSFUL 0x63 146 #define L2CAP_CONNECTION_RESPONSE_RESULT_PENDING 0x64 147 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_PSM 0x65 148 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_SECURITY 0x66 149 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_RESOURCES 0x67 150 #define L2CAP_CONNECTION_RESPONSE_RESULT_ERTM_NOT_SUPPORTED 0x68 151 // should be L2CAP_CONNECTION_RTX_TIMEOUT 152 #define L2CAP_CONNECTION_RESPONSE_RESULT_RTX_TIMEOUT 0x69 153 #define L2CAP_CONNECTION_BASEBAND_DISCONNECT 0x6A 154 #define L2CAP_SERVICE_ALREADY_REGISTERED 0x6B 155 #define L2CAP_DATA_LEN_EXCEEDS_REMOTE_MTU 0x6C 156 #define L2CAP_SERVICE_DOES_NOT_EXIST 0x6D 157 #define L2CAP_LOCAL_CID_DOES_NOT_EXIST 0x6E 158 159 #define RFCOMM_MULTIPLEXER_STOPPED 0x70 160 #define RFCOMM_CHANNEL_ALREADY_REGISTERED 0x71 161 #define RFCOMM_NO_OUTGOING_CREDITS 0x72 162 #define RFCOMM_AGGREGATE_FLOW_OFF 0x73 163 #define RFCOMM_DATA_LEN_EXCEEDS_MTU 0x74 164 165 #define SDP_HANDLE_ALREADY_REGISTERED 0x80 166 #define SDP_QUERY_INCOMPLETE 0x81 167 #define SDP_SERVICE_NOT_FOUND 0x82 168 #define SDP_HANDLE_INVALID 0x83 169 #define SDP_QUERY_BUSY 0x84 170 171 #define ATT_HANDLE_VALUE_INDICATION_IN_PROGRESS 0x90 172 #define ATT_HANDLE_VALUE_INDICATION_TIMEOUT 0x91 173 #define ATT_HANDLE_VALUE_INDICATION_DISCONNECT 0x92 174 175 #define GATT_CLIENT_NOT_CONNECTED 0x93 176 #define GATT_CLIENT_BUSY 0x94 177 #define GATT_CLIENT_IN_WRONG_STATE 0x95 178 #define GATT_CLIENT_DIFFERENT_CONTEXT_FOR_ADDRESS_ALREADY_EXISTS 0x96 179 #define GATT_CLIENT_VALUE_TOO_LONG 0x97 180 #define GATT_CLIENT_CHARACTERISTIC_NOTIFICATION_NOT_SUPPORTED 0x98 181 #define GATT_CLIENT_CHARACTERISTIC_INDICATION_NOT_SUPPORTED 0x99 182 183 #define BNEP_SERVICE_ALREADY_REGISTERED 0xA0 184 #define BNEP_CHANNEL_NOT_CONNECTED 0xA1 185 #define BNEP_DATA_LEN_EXCEEDS_MTU 0xA2 186 187 // OBEX ERRORS 188 #define OBEX_UNKNOWN_ERROR 0xB0 189 #define OBEX_CONNECT_FAILED 0xB1 190 #define OBEX_DISCONNECTED 0xB2 191 #define OBEX_NOT_FOUND 0xB3 192 #define OBEX_NOT_ACCEPTABLE 0xB4 193 194 #define AVDTP_SEID_DOES_NOT_EXIST 0xC0 195 #define AVDTP_CONNECTION_DOES_NOT_EXIST 0xC1 196 #define AVDTP_CONNECTION_IN_WRONG_STATE 0xC2 197 #define AVDTP_STREAM_ENDPOINT_IN_WRONG_STATE 0xC3 198 #define AVDTP_STREAM_ENDPOINT_DOES_NOT_EXIST 0xC4 199 #define AVDTP_MEDIA_CONNECTION_DOES_NOT_EXIST 0xC5 200 /* ENUM_END */ 201 202 // DAEMON COMMANDS 203 204 #define OGF_BTSTACK 0x3d 205 206 // cmds for BTstack 207 // get state: @returns HCI_STATE 208 #define BTSTACK_GET_STATE 0x01 209 210 // set power mode: param HCI_POWER_MODE 211 #define BTSTACK_SET_POWER_MODE 0x02 212 213 // set capture mode: param on 214 #define BTSTACK_SET_ACL_CAPTURE_MODE 0x03 215 216 // get BTstack version 217 #define BTSTACK_GET_VERSION 0x04 218 219 // get system Bluetooth state 220 #define BTSTACK_GET_SYSTEM_BLUETOOTH_ENABLED 0x05 221 222 // set system Bluetooth state 223 #define BTSTACK_SET_SYSTEM_BLUETOOTH_ENABLED 0x06 224 225 // enable inquiry scan for this client 226 #define BTSTACK_SET_DISCOVERABLE 0x07 227 228 // set global Bluetooth state 229 #define BTSTACK_SET_BLUETOOTH_ENABLED 0x08 230 231 // create l2cap channel: param bd_addr(48), psm (16) 232 #define L2CAP_CREATE_CHANNEL 0x20 233 234 // disconnect l2cap disconnect, param channel(16), reason(8) 235 #define L2CAP_DISCONNECT 0x21 236 237 // register l2cap service: param psm(16), mtu (16) 238 #define L2CAP_REGISTER_SERVICE 0x22 239 240 // unregister l2cap disconnect, param psm(16) 241 #define L2CAP_UNREGISTER_SERVICE 0x23 242 243 // accept connection param bd_addr(48), dest cid (16) 244 #define L2CAP_ACCEPT_CONNECTION 0x24 245 246 // decline l2cap disconnect,param bd_addr(48), dest cid (16), reason(8) 247 #define L2CAP_DECLINE_CONNECTION 0x25 248 249 // create l2cap channel: param bd_addr(48), psm (16), mtu (16) 250 #define L2CAP_CREATE_CHANNEL_MTU 0x26 251 252 // register SDP Service Record: service record (size) 253 #define SDP_REGISTER_SERVICE_RECORD 0x30 254 255 // unregister SDP Service Record 256 #define SDP_UNREGISTER_SERVICE_RECORD 0x31 257 258 // Get remote RFCOMM services 259 #define SDP_CLIENT_QUERY_RFCOMM_SERVICES 0x32 260 261 // Get remote SDP services 262 #define SDP_CLIENT_QUERY_SERVICES 0x33 263 264 // RFCOMM "HCI" Commands 265 #define RFCOMM_CREATE_CHANNEL 0x40 266 #define RFCOMM_DISCONNECT 0x41 267 #define RFCOMM_REGISTER_SERVICE 0x42 268 #define RFCOMM_UNREGISTER_SERVICE 0x43 269 #define RFCOMM_ACCEPT_CONNECTION 0x44 270 #define RFCOMM_DECLINE_CONNECTION 0x45 271 #define RFCOMM_PERSISTENT_CHANNEL 0x46 272 #define RFCOMM_CREATE_CHANNEL_WITH_CREDITS 0x47 273 #define RFCOMM_REGISTER_SERVICE_WITH_CREDITS 0x48 274 #define RFCOMM_GRANT_CREDITS 0x49 275 276 // GAP Classic 0x50 277 #define GAP_DISCONNECT 0x50 278 279 // GAP LE 0x60 280 #define GAP_LE_SCAN_START 0x60 281 #define GAP_LE_SCAN_STOP 0x61 282 #define GAP_LE_CONNECT 0x62 283 #define GAP_LE_CONNECT_CANCEL 0x63 284 #define GAP_LE_SET_SCAN_PARAMETERS 0x64 285 286 // GATT (Client) 0x70 287 #define GATT_DISCOVER_ALL_PRIMARY_SERVICES 0x70 288 #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID16 0x71 289 #define GATT_DISCOVER_PRIMARY_SERVICES_BY_UUID128 0x72 290 #define GATT_FIND_INCLUDED_SERVICES_FOR_SERVICE 0x73 291 #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE 0x74 292 #define GATT_DISCOVER_CHARACTERISTICS_FOR_SERVICE_BY_UUID128 0x75 293 #define GATT_DISCOVER_CHARACTERISTIC_DESCRIPTORS 0x76 294 #define GATT_READ_VALUE_OF_CHARACTERISTIC 0x77 295 #define GATT_READ_LONG_VALUE_OF_CHARACTERISTIC 0x78 296 #define GATT_WRITE_VALUE_OF_CHARACTERISTIC_WITHOUT_RESPONSE 0x79 297 #define GATT_WRITE_VALUE_OF_CHARACTERISTIC 0x7A 298 #define GATT_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7B 299 #define GATT_RELIABLE_WRITE_LONG_VALUE_OF_CHARACTERISTIC 0x7C 300 #define GATT_READ_CHARACTERISTIC_DESCRIPTOR 0X7D 301 #define GATT_READ_LONG_CHARACTERISTIC_DESCRIPTOR 0X7E 302 #define GATT_WRITE_CHARACTERISTIC_DESCRIPTOR 0X7F 303 #define GATT_WRITE_LONG_CHARACTERISTIC_DESCRIPTOR 0X80 304 #define GATT_WRITE_CLIENT_CHARACTERISTIC_CONFIGURATION 0X81 305 #define GATT_GET_MTU 0x82 306 307 // SM 0x90 308 #define SM_SET_AUTHENTICATION_REQUIREMENTS 0x90 309 #define SM_SET_IO_CAPABILITIES 0x92 310 #define SM_BONDING_DECLINE 0x93 311 #define SM_JUST_WORKS_CONFIRM 0x94 312 #define SM_NUMERIC_COMPARISON_CONFIRM 0x95 313 #define SM_PASSKEY_INPUT 0x96 314 315 // ATT 316 317 // .. 318 // Internal properties reuse some GATT Characteristic Properties fields 319 #define ATT_DB_VERSION 0x01 320 321 // EVENTS 322 323 /** 324 * @format 1 325 * @param state 326 */ 327 #define BTSTACK_EVENT_STATE 0x60 328 329 /** 330 * @format 1 331 * @param number_connections 332 */ 333 #define BTSTACK_EVENT_NR_CONNECTIONS_CHANGED 0x61 334 335 /** 336 * @format 337 */ 338 #define BTSTACK_EVENT_POWERON_FAILED 0x62 339 340 /** 341 * @format 1 342 * @param discoverable 343 */ 344 #define BTSTACK_EVENT_DISCOVERABLE_ENABLED 0x66 345 346 // Daemon Events 347 348 /** 349 * @format 112 350 * @param major 351 * @param minor 352 @ @param revision 353 */ 354 #define DAEMON_EVENT_VERSION 0x63 355 356 // data: system bluetooth on/off (bool) 357 /** 358 * @format 1 359 * param system_bluetooth_enabled 360 */ 361 #define DAEMON_EVENT_SYSTEM_BLUETOOTH_ENABLED 0x64 362 363 // data: event (8), len(8), status (8) == 0, address (48), name (1984 bits = 248 bytes) 364 365 /* 366 * @format 1BT 367 * @param status == 0 to match read_remote_name_request 368 * @param address 369 * @param name 370 */ 371 #define DAEMON_EVENT_REMOTE_NAME_CACHED 0x65 372 373 // internal - data: event(8) 374 #define DAEMON_EVENT_CONNECTION_OPENED 0x67 375 376 // internal - data: event(8) 377 #define DAEMON_EVENT_CONNECTION_CLOSED 0x68 378 379 // data: event(8), len(8), local_cid(16), credits(8) 380 #define DAEMON_EVENT_L2CAP_CREDITS 0x74 381 382 /** 383 * @format 12 384 * @param status 385 * @param psm 386 */ 387 #define DAEMON_EVENT_L2CAP_SERVICE_REGISTERED 0x75 388 389 /** 390 * @format 21 391 * @param rfcomm_cid 392 * @param credits 393 */ 394 #define DAEMON_EVENT_RFCOMM_CREDITS 0x84 395 396 /** 397 * @format 11 398 * @param status 399 * @param channel_id 400 */ 401 #define DAEMON_EVENT_RFCOMM_SERVICE_REGISTERED 0x85 402 403 /** 404 * @format 11 405 * @param status 406 * @param server_channel_id 407 */ 408 #define DAEMON_EVENT_RFCOMM_PERSISTENT_CHANNEL 0x86 409 410 /** 411 * @format 14 412 * @param status 413 * @param service_record_handle 414 */ 415 #define DAEMON_EVENT_SDP_SERVICE_REGISTERED 0x90 416 417 418 419 // additional HCI events 420 421 /** 422 * @brief Indicates HCI transport enters/exits Sleep mode 423 * @format 1 424 * @param active 425 */ 426 #define HCI_EVENT_TRANSPORT_SLEEP_MODE 0x69 427 428 /** 429 * @brief Outgoing packet 430 */ 431 #define HCI_EVENT_TRANSPORT_PACKET_SENT 0x6E 432 433 /** 434 * @format B 435 * @param handle 436 */ 437 #define HCI_EVENT_SCO_CAN_SEND_NOW 0x6F 438 439 440 // L2CAP EVENTS 441 442 /** 443 * @format 1BH222222111 444 * @param status 445 * @param address 446 * @param handle 447 * @param psm 448 * @param local_cid 449 * @param remote_cid 450 * @param local_mtu 451 * @param remote_mtu 452 * @param flush_timeout 453 * @param incoming 454 * @param mode 455 * @param fcs 456 */ 457 #define L2CAP_EVENT_CHANNEL_OPENED 0x70 458 459 /* 460 * @format 2 461 * @param local_cid 462 */ 463 #define L2CAP_EVENT_CHANNEL_CLOSED 0x71 464 465 /** 466 * @format BH222 467 * @param address 468 * @param handle 469 * @param psm 470 * @param local_cid 471 * @param remote_cid 472 */ 473 #define L2CAP_EVENT_INCOMING_CONNECTION 0x72 474 475 // ?? 476 // data: event(8), len(8), handle(16) 477 #define L2CAP_EVENT_TIMEOUT_CHECK 0x73 478 479 /** 480 * @format H2222 481 * @param handle 482 * @param interval_min 483 * @param interval_max 484 * @param latencey 485 * @param timeout_multiplier 486 */ 487 #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_REQUEST 0x76 488 489 // data: event(8), len(8), handle(16), result (16) (0 == ok, 1 == fail) 490 /** 491 * @format H2 492 * @param handle 493 * @param result 494 */ 495 #define L2CAP_EVENT_CONNECTION_PARAMETER_UPDATE_RESPONSE 0x77 496 497 /** 498 * @format 2 499 * @param local_cid 500 */ 501 #define L2CAP_EVENT_CAN_SEND_NOW 0x78 502 503 // LE Data Channels 504 505 /** 506 * @format 1BH2222 507 * @param address_type 508 * @param address 509 * @param handle 510 * @param psm 511 * @param local_cid 512 * @param remote_cid 513 * @param remote_mtu 514 */ 515 #define L2CAP_EVENT_LE_INCOMING_CONNECTION 0x79 516 517 /** 518 * @format 11BH122222 519 * @param status 520 * @param address_type 521 * @param address 522 * @param handle 523 * @param incoming 524 * @param psm 525 * @param local_cid 526 * @param remote_cid 527 * @param local_mtu 528 * @param remote_mtu 529 */ 530 #define L2CAP_EVENT_LE_CHANNEL_OPENED 0x7a 531 532 /* 533 * @format 2 534 * @param local_cid 535 */ 536 #define L2CAP_EVENT_LE_CHANNEL_CLOSED 0x7b 537 538 /* 539 * @format 2 540 * @param local_cid 541 */ 542 #define L2CAP_EVENT_LE_CAN_SEND_NOW 0x7c 543 544 /* 545 * @format 2 546 * @param local_cid 547 */ 548 #define L2CAP_EVENT_LE_PACKET_SENT 0x7d 549 550 /* 551 * @format 2 552 * @param local_cid 553 */ 554 #define L2CAP_EVENT_ERTM_BUFFER_RELEASED 0x7e 555 556 557 // RFCOMM EVENTS 558 559 /** 560 * @format 1B21221 561 * @param status 562 * @param bd_addr 563 * @param con_handle 564 * @param server_channel 565 * @param rfcomm_cid 566 * @param max_frame_size 567 * @param incoming 568 */ 569 #define RFCOMM_EVENT_CHANNEL_OPENED 0x80 570 571 /** 572 * @format 2 573 * @param rfcomm_cid 574 */ 575 #define RFCOMM_EVENT_CHANNEL_CLOSED 0x81 576 577 /** 578 * @format B12 579 * @param bd_addr 580 * @param server_channel 581 * @param rfcomm_cid 582 */ 583 #define RFCOMM_EVENT_INCOMING_CONNECTION 0x82 584 585 /** 586 * @format 21 587 * @param rfcomm_cid 588 * @param line_status 589 */ 590 #define RFCOMM_EVENT_REMOTE_LINE_STATUS 0x83 591 592 /** 593 * @format 21 594 * @param rfcomm_cid 595 * @param modem_status 596 */ 597 #define RFCOMM_EVENT_REMOTE_MODEM_STATUS 0x87 598 599 /** 600 * TODO: format for variable data 2? 601 * param rfcomm_cid 602 * param rpn_data 603 */ 604 #define RFCOMM_EVENT_PORT_CONFIGURATION 0x88 605 606 /** 607 * @format 2 608 * @param rfcomm_cid 609 */ 610 #define RFCOMM_EVENT_CAN_SEND_NOW 0x89 611 612 613 /** 614 * @format 1 615 * @param status 616 */ 617 #define SDP_EVENT_QUERY_COMPLETE 0x91 618 619 /** 620 * @format 1T 621 * @param rfcomm_channel 622 * @param name 623 */ 624 #define SDP_EVENT_QUERY_RFCOMM_SERVICE 0x92 625 626 /** 627 * @format 22221 628 * @param record_id 629 * @param attribute_id 630 * @param attribute_length 631 * @param data_offset 632 * @param data 633 */ 634 #define SDP_EVENT_QUERY_ATTRIBUTE_BYTE 0x93 635 636 /** 637 * @format 22LV 638 * @param record_id 639 * @param attribute_id 640 * @param attribute_length 641 * @param attribute_value 642 */ 643 #define SDP_EVENT_QUERY_ATTRIBUTE_VALUE 0x94 644 645 /** 646 * @format 224 647 * @param total_count 648 * @param record_index 649 * @param record_handle 650 * @note Not provided by daemon, only used for internal testing 651 */ 652 #define SDP_EVENT_QUERY_SERVICE_RECORD_HANDLE 0x95 653 654 /** 655 * @format H1 656 * @param handle 657 * @param status 658 */ 659 #define GATT_EVENT_QUERY_COMPLETE 0xA0 660 661 /** 662 * @format HX 663 * @param handle 664 * @param service 665 */ 666 #define GATT_EVENT_SERVICE_QUERY_RESULT 0xA1 667 668 /** 669 * @format HY 670 * @param handle 671 * @param characteristic 672 */ 673 #define GATT_EVENT_CHARACTERISTIC_QUERY_RESULT 0xA2 674 675 /** 676 * @format H2X 677 * @param handle 678 * @param include_handle 679 * @param service 680 */ 681 #define GATT_EVENT_INCLUDED_SERVICE_QUERY_RESULT 0xA3 682 683 /** 684 * @format HZ 685 * @param handle 686 * @param characteristic_descriptor 687 */ 688 #define GATT_EVENT_ALL_CHARACTERISTIC_DESCRIPTORS_QUERY_RESULT 0xA4 689 690 /** 691 * @format H2LV 692 * @param handle 693 * @param value_handle 694 * @param value_length 695 * @param value 696 */ 697 #define GATT_EVENT_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA5 698 699 /** 700 * @format H22LV 701 * @param handle 702 * @param value_handle 703 * @param value_offset 704 * @param value_length 705 * @param value 706 */ 707 #define GATT_EVENT_LONG_CHARACTERISTIC_VALUE_QUERY_RESULT 0xA6 708 709 /** 710 * @format H2LV 711 * @param handle 712 * @param value_handle 713 * @param value_length 714 * @param value 715 */ 716 #define GATT_EVENT_NOTIFICATION 0xA7 717 718 /** 719 * @format H2LV 720 * @param handle 721 * @param value_handle 722 * @param value_length 723 * @param value 724 */ 725 #define GATT_EVENT_INDICATION 0xA8 726 727 /** 728 * @format H2LV 729 * @param handle 730 * @param descriptor_handle 731 * @param descriptor_length 732 * @param descriptor 733 */ 734 #define GATT_EVENT_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xA9 735 736 /** 737 * @format H2LV 738 * @param handle 739 * @param descriptor_offset 740 * @param descriptor_length 741 * @param descriptor 742 */ 743 #define GATT_EVENT_LONG_CHARACTERISTIC_DESCRIPTOR_QUERY_RESULT 0xAA 744 745 /** 746 * @format H2 747 * @param handle 748 * @param MTU 749 */ 750 #define GATT_EVENT_MTU 0xAB 751 752 /** 753 * @format H 754 * @param handle 755 */ 756 #define GATT_EVENT_CAN_WRITE_WITHOUT_RESPONSE 0xAC 757 758 /** 759 * @format 1BH 760 * @param address_type 761 * @param address 762 * @param handle 763 */ 764 #define ATT_EVENT_CONNECTED 0xB3 765 766 /** 767 * @format H 768 * @param handle 769 */ 770 #define ATT_EVENT_DISCONNECTED 0xB4 771 772 /** 773 * @format H2 774 * @param handle 775 * @param MTU 776 */ 777 #define ATT_EVENT_MTU_EXCHANGE_COMPLETE 0xB5 778 779 /** 780 * @format 1H2 781 * @param status 782 * @param conn_handle 783 * @param attribute_handle 784 */ 785 #define ATT_EVENT_HANDLE_VALUE_INDICATION_COMPLETE 0xB6 786 787 /** 788 * @format 789 */ 790 #define ATT_EVENT_CAN_SEND_NOW 0xB7 791 792 // TODO: daemon only event 793 794 /** 795 * @format 12 796 * @param status 797 * @param service_uuid 798 */ 799 #define BNEP_EVENT_SERVICE_REGISTERED 0xC0 800 801 /** 802 * @format 12222BH 803 * @param status 804 * @param bnep_cid 805 * @param source_uuid 806 * @param destination_uuid 807 * @param mtu 808 * @param remote_address 809 * @param con_handle 810 */ 811 #define BNEP_EVENT_CHANNEL_OPENED 0xC1 812 813 /** 814 * @format 222B 815 * @param bnep_cid 816 * @param source_uuid 817 * @param destination_uuid 818 * @param remote_address 819 */ 820 #define BNEP_EVENT_CHANNEL_CLOSED 0xC2 821 822 /** 823 * @format 222B1 824 * @param bnep_cid 825 * @param source_uuid 826 * @param destination_uuid 827 * @param remote_address 828 * @param channel_state 829 */ 830 #define BNEP_EVENT_CHANNEL_TIMEOUT 0xC3 831 832 /** 833 * @format 222B 834 * @param bnep_cid 835 * @param source_uuid 836 * @param destination_uuid 837 * @param remote_address 838 */ 839 #define BNEP_EVENT_CAN_SEND_NOW 0xC4 840 841 /** 842 * @format H1B 843 * @param handle 844 * @param addr_type 845 * @param address 846 */ 847 #define SM_EVENT_JUST_WORKS_REQUEST 0xD0 848 849 /** 850 * @format H1B 851 * @param handle 852 * @param addr_type 853 * @param address 854 */ 855 #define SM_EVENT_JUST_WORKS_CANCEL 0xD1 856 857 /** 858 * @format H1B4 859 * @param handle 860 * @param addr_type 861 * @param address 862 * @param passkey 863 */ 864 #define SM_EVENT_PASSKEY_DISPLAY_NUMBER 0xD2 865 866 /** 867 * @format H1B 868 * @param handle 869 * @param addr_type 870 * @param address 871 */ 872 #define SM_EVENT_PASSKEY_DISPLAY_CANCEL 0xD3 873 874 /** 875 * @format H1B 876 * @param handle 877 * @param addr_type 878 * @param address 879 */ 880 #define SM_EVENT_PASSKEY_INPUT_NUMBER 0xD4 881 882 /** 883 * @format H1B 884 * @param handle 885 * @param addr_type 886 * @param address 887 */ 888 #define SM_EVENT_PASSKEY_INPUT_CANCEL 0xD5 889 890 /** 891 * @format H1B4 892 * @param handle 893 * @param addr_type 894 * @param address 895 * @param passkey 896 */ 897 #define SM_EVENT_NUMERIC_COMPARISON_REQUEST 0xD6 898 899 /** 900 * @format H1B 901 * @param handle 902 * @param addr_type 903 * @param address 904 */ 905 #define SM_EVENT_NUMERIC_COMPARISON_CANCEL 0xD7 906 907 /** 908 * @format H1B 909 * @param handle 910 * @param addr_type 911 * @param address 912 */ 913 #define SM_EVENT_IDENTITY_RESOLVING_STARTED 0xD8 914 915 /** 916 * @format H1B 917 * @param handle 918 * @param addr_type 919 * @param address 920 */ 921 #define SM_EVENT_IDENTITY_RESOLVING_FAILED 0xD9 922 923 /** 924 * @brief Identify resolving succeeded 925 * 926 * @format H1B1B2 927 * @param handle 928 * @param addr_type 929 * @param address 930 * @param identity_addr_type 931 * @param identity_address 932 * @param index 933 * 934 */ 935 #define SM_EVENT_IDENTITY_RESOLVING_SUCCEEDED 0xDA 936 937 /** 938 * @format H1B 939 * @param handle 940 * @param addr_type 941 * @param address 942 */ 943 #define SM_EVENT_AUTHORIZATION_REQUEST 0xDB 944 945 /** 946 * @format H1B1 947 * @param handle 948 * @param addr_type 949 * @param address 950 * @param authorization_result 951 */ 952 #define SM_EVENT_AUTHORIZATION_RESULT 0xDC 953 954 /** 955 * @format H1 956 * @param handle 957 * @param action see SM_KEYPRESS_* 958 */ 959 #define SM_EVENT_KEYPRESS_NOTIFICATION 0xDD 960 961 /** 962 * @brief Emitted during pairing to inform app about address used as identity 963 * 964 * @format H1B1B2 965 * @param handle 966 * @param addr_type 967 * @param address 968 * @param identity_addr_type 969 * @param identity_address 970 * @param index 971 */ 972 #define SM_EVENT_IDENTITY_CREATED 0xDE 973 974 /** 975 * @brief Emitted to inform app that pairing is complete. Possible status values: 976 * ERROR_CODE_SUCCESS -> pairing success 977 * ERROR_CODE_CONNECTION_TIMEOUT -> timeout 978 * ERROR_CODE_REMOTE_USER_TERMINATED_CONNECTION -> disconnect 979 * ERROR_CODE_AUTHENTICATION_FAILURE -> SM protocol error, see reason field with SM_REASON_* from bluetooth.h 980 * 981 * @format H1B11 982 * @param handle 983 * @param addr_type 984 * @param address 985 * @param status 986 * @param reason if status == ERROR_CODE_AUTHENTICATION_FAILURE 987 */ 988 #define SM_EVENT_PAIRING_COMPLETE 0xDF 989 990 991 // GAP 992 993 /** 994 * @format H1 995 * @param handle 996 * @param security_level 997 */ 998 #define GAP_EVENT_SECURITY_LEVEL 0xE0 999 1000 /** 1001 * @format 1B 1002 * @param status 1003 * @param address 1004 */ 1005 #define GAP_EVENT_DEDICATED_BONDING_COMPLETED 0xE1 1006 1007 /** 1008 * @format 11B1JV 1009 * @param advertising_event_type 1010 * @param address_type 1011 * @param address 1012 * @param rssi 1013 * @param data_length 1014 * @param data 1015 */ 1016 #define GAP_EVENT_ADVERTISING_REPORT 0xE2 1017 1018 /** 1019 * @format B132111JV 1020 * @param bd_addr 1021 * @param page_scan_repetition_mode 1022 * @param class_of_device 1023 * @param clock_offset 1024 * @param rssi_available 1025 * @param rssi 1026 * @param name_available 1027 * @param name_len 1028 * @param name 1029 */ 1030 #define GAP_EVENT_INQUIRY_RESULT 0xE3 1031 1032 /** 1033 * @format 1 1034 * @param status 1035 */ 1036 #define GAP_EVENT_INQUIRY_COMPLETE 0xE4 1037 1038 1039 // Meta Events, see below for sub events 1040 #define HCI_EVENT_HSP_META 0xE8 1041 #define HCI_EVENT_HFP_META 0xE9 1042 #define HCI_EVENT_ANCS_META 0xEA 1043 #define HCI_EVENT_AVDTP_META 0xEB 1044 #define HCI_EVENT_AVRCP_META 0xEC 1045 #define HCI_EVENT_GOEP_META 0xED 1046 #define HCI_EVENT_PBAP_META 0xEE 1047 #define HCI_EVENT_HID_META 0xEF 1048 #define HCI_EVENT_A2DP_META 0xF0 1049 #define HCI_EVENT_HIDS_META 0xF1 1050 #define HCI_EVENT_GATTSERVICE_META 0xF2 1051 #define HCI_EVENT_BIP_META 0xF3 1052 #define HCI_EVENT_MAP_META 0xF4 1053 #define HCI_EVENT_MESH_META 0xF5 1054 1055 // Potential other meta groups 1056 // #define HCI_EVENT_BNEP_META 0xxx 1057 // #define HCI_EVENT_GAP_META 0xxx 1058 // #define HCI_EVENT_GATT_META 0xxx 1059 // #define HCI_EVENT_PAN_META 0xxx 1060 // #define HCI_EVENT_SDP_META 0xxx 1061 // #define HCI_EVENT_SM_META 0xxx 1062 1063 1064 /** HSP Subevent */ 1065 1066 /** 1067 * @format 11 1068 * @param subevent_code 1069 * @param status 0 == OK 1070 */ 1071 #define HSP_SUBEVENT_RFCOMM_CONNECTION_COMPLETE 0x01 1072 1073 /** 1074 * @format 11 1075 * @param subevent_code 1076 * @param status 0 == OK 1077 */ 1078 #define HSP_SUBEVENT_RFCOMM_DISCONNECTION_COMPLETE 0x02 1079 1080 1081 /** 1082 * @format 11H 1083 * @param subevent_code 1084 * @param status 0 == OK 1085 * @param handle 1086 */ 1087 #define HSP_SUBEVENT_AUDIO_CONNECTION_COMPLETE 0x03 1088 1089 /** 1090 * @format 11 1091 * @param subevent_code 1092 * @param status 0 == OK 1093 */ 1094 #define HSP_SUBEVENT_AUDIO_DISCONNECTION_COMPLETE 0x04 1095 1096 /** 1097 * @format 1 1098 * @param subevent_code 1099 */ 1100 #define HSP_SUBEVENT_RING 0x05 1101 1102 /** 1103 * @format 11 1104 * @param subevent_code 1105 * @param gain Valid range: [0,15] 1106 */ 1107 #define HSP_SUBEVENT_MICROPHONE_GAIN_CHANGED 0x06 1108 1109 /** 1110 * @format 11 1111 * @param subevent_code 1112 * @param gain Valid range: [0,15] 1113 */ 1114 #define HSP_SUBEVENT_SPEAKER_GAIN_CHANGED 0x07 1115 1116 /** 1117 * @format 1JV 1118 * @param subevent_code 1119 * @param value_length 1120 * @param value 1121 */ 1122 #define HSP_SUBEVENT_HS_COMMAND 0x08 1123 1124 /** 1125 * @format 1JV 1126 * @param subevent_code 1127 * @param value_length 1128 * @param value 1129 */ 1130 #define HSP_SUBEVENT_AG_INDICATION 0x09 1131 1132 1133 /** HFP Subevent */ 1134 1135 /** 1136 * @format 11HB 1137 * @param subevent_code 1138 * @param status 0 == OK 1139 * @param con_handle 1140 * @param bd_addr 1141 */ 1142 #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_ESTABLISHED 0x01 1143 1144 /** 1145 * @format 1 1146 * @param subevent_code 1147 */ 1148 #define HFP_SUBEVENT_SERVICE_LEVEL_CONNECTION_RELEASED 0x02 1149 1150 /** 1151 * @format 11HB1 1152 * @param subevent_code 1153 * @param status 0 == OK 1154 * @param handle 1155 * @param bd_addr 1156 * @param negotiated_codec 1157 */ 1158 #define HFP_SUBEVENT_AUDIO_CONNECTION_ESTABLISHED 0x03 1159 1160 /** 1161 * @format 1 1162 * @param subevent_code 1163 */ 1164 #define HFP_SUBEVENT_AUDIO_CONNECTION_RELEASED 0x04 1165 1166 /** 1167 * @format 11 1168 * @param subevent_code 1169 * @param status 0 == OK 1170 */ 1171 #define HFP_SUBEVENT_COMPLETE 0x05 1172 1173 /** 1174 * @format 11111111T 1175 * @param subevent_code 1176 * @param indicator_index 1177 * @param indicator_status 1178 * @param indicator_min_range 1179 * @param indicator_max_range 1180 * @param indicator_mandatory 1181 * @param indicator_enabled 1182 * @param indicator_status_changed 1183 * @param indicator_name 1184 */ 1185 #define HFP_SUBEVENT_AG_INDICATOR_STATUS_CHANGED 0x06 1186 1187 /** 1188 * @format 111T 1189 * @param subevent_code 1190 * @param network_operator_mode 1191 * @param network_operator_format 1192 * @param network_operator_name 1193 */ 1194 #define HFP_SUBEVENT_NETWORK_OPERATOR_CHANGED 0x07 1195 1196 /** 1197 * @format 11 1198 * @param subevent_code 1199 * @param error 1200 */ 1201 #define HFP_SUBEVENT_EXTENDED_AUDIO_GATEWAY_ERROR 0x08 1202 1203 /** 1204 * @format 1 1205 * @param subevent_code 1206 */ 1207 #define HFP_SUBEVENT_START_RINGINIG 0x0A 1208 1209 /** 1210 * @format 1 1211 * @param subevent_code 1212 */ 1213 #define HFP_SUBEVENT_STOP_RINGINIG 0x0B 1214 1215 /** 1216 * @format 1 1217 * @param subevent_code 1218 */ 1219 #define HFP_SUBEVENT_CALL_TERMINATED 0x0C 1220 1221 /** 1222 * @format 1T 1223 * @param subevent_code 1224 * @param number 1225 */ 1226 #define HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER 0x0D 1227 1228 /** 1229 * @format 1 1230 * @param subevent_code 1231 */ 1232 #define HFP_SUBEVENT_ATTACH_NUMBER_TO_VOICE_TAG 0x0E 1233 1234 /** 1235 * @format 1T 1236 * @param subevent_code 1237 * @param number 1238 */ 1239 #define HFP_SUBEVENT_NUMBER_FOR_VOICE_TAG 0x0F 1240 1241 /** 1242 * @format 1T 1243 * @param subevent_code 1244 * @param dtmf code 1245 */ 1246 #define HFP_SUBEVENT_TRANSMIT_DTMF_CODES 0x10 1247 1248 /** 1249 * @format 1 1250 * @param subevent_code 1251 */ 1252 #define HFP_SUBEVENT_CALL_ANSWERED 0x11 1253 1254 /** 1255 * @format 1 1256 * @param subevent_code 1257 */ 1258 #define HFP_SUBEVENT_CONFERENCE_CALL 0x12 1259 1260 /** 1261 * @format 1 1262 * @param subevent_code 1263 */ 1264 #define HFP_SUBEVENT_RING 0x13 1265 1266 /** 1267 * @format 111 1268 * @param subevent_code 1269 * @param status 1270 * @param gain 1271 */ 1272 #define HFP_SUBEVENT_SPEAKER_VOLUME 0x14 1273 1274 /** 1275 * @format 111 1276 * @param subevent_code 1277 * @param status 1278 * @param gain 1279 */ 1280 #define HFP_SUBEVENT_MICROPHONE_VOLUME 0x15 1281 1282 /** 1283 * @format 11T 1284 * @param subevent_code 1285 * @param type 1286 * @param number 1287 */ 1288 #define HFP_SUBEVENT_CALL_WAITING_NOTIFICATION 0x16 1289 1290 /** 1291 * @format 11T 1292 * @param subevent_code 1293 * @param type 1294 * @param number 1295 */ 1296 #define HFP_SUBEVENT_CALLING_LINE_IDENTIFICATION_NOTIFICATION 0x17 1297 1298 /** 1299 * @format 1111111T 1300 * @param subevent_code 1301 * @param clcc_idx 1302 * @param clcc_dir 1303 * @param clcc_status 1304 * @param clcc_mode 1305 * @param clcc_mpty 1306 * @param bnip_type 1307 * @param bnip_number 1308 */ 1309 #define HFP_SUBEVENT_ENHANCED_CALL_STATUS 0x18 1310 1311 /** 1312 * @format 111T 1313 * @param subevent_code 1314 * @param status 1315 * @param bnip_type 1316 * @param bnip_number 1317 */ 1318 #define HFP_SUBEVENT_SUBSCRIBER_NUMBER_INFORMATION 0x19 1319 1320 /** 1321 * @format 1T 1322 * @param subevent_code 1323 * @param value 1324 */ 1325 #define HFP_SUBEVENT_RESPONSE_AND_HOLD_STATUS 0x1A 1326 1327 // ANCS Client 1328 1329 /** 1330 * @format 1H 1331 * @param subevent_code 1332 * @param handle 1333 */ 1334 #define ANCS_SUBEVENT_CLIENT_CONNECTED 0xF0 1335 1336 /** 1337 * @format 1H2T 1338 * @param subevent_code 1339 * @param handle 1340 * @param attribute_id 1341 * @param text 1342 */ 1343 #define ANCS_SUBEVENT_CLIENT_NOTIFICATION 0xF1 1344 1345 /** 1346 * @format 1H 1347 * @param subevent_code 1348 * @param handle 1349 */ 1350 #define ANCS_SUBEVENT_CLIENT_DISCONNECTED 0xF2 1351 1352 1353 /** AVDTP Subevent */ 1354 1355 /** 1356 * @format 1211 1357 * @param subevent_code 1358 * @param avdtp_cid 1359 * @param local_seid 1360 * @param signal_identifier 1361 */ 1362 #define AVDTP_SUBEVENT_SIGNALING_ACCEPT 0x01 1363 1364 /** 1365 * @format 1211 1366 * @param subevent_code 1367 * @param avdtp_cid 1368 * @param local_seid 1369 * @param signal_identifier 1370 */ 1371 #define AVDTP_SUBEVENT_SIGNALING_REJECT 0x02 1372 1373 /** 1374 * @format 1211 1375 * @param subevent_code 1376 * @param avdtp_cid 1377 * @param local_seid 1378 * @param signal_identifier 1379 */ 1380 #define AVDTP_SUBEVENT_SIGNALING_GENERAL_REJECT 0x03 1381 1382 /** 1383 * @format 12B1 1384 * @param subevent_code 1385 * @param avdtp_cid 1386 * @param bd_addr 1387 * @param status 0 == OK 1388 */ 1389 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 0x04 1390 1391 /** 1392 * @format 12 1393 * @param subevent_code 1394 * @param avdtp_cid 1395 */ 1396 #define AVDTP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 0x05 1397 1398 /** 1399 * @format 121111 1400 * @param subevent_code 1401 * @param avdtp_cid 1402 * @param remote_seid 0x01 – 0x3E 1403 * @param in_use 0-not in use, 1-in use 1404 * @param media_type 0-audio, 1-video, 2-multimedia 1405 * @param sep_type 0-source, 1-sink 1406 */ 1407 #define AVDTP_SUBEVENT_SIGNALING_SEP_FOUND 0x06 1408 1409 /** 1410 * @format 121111111111 1411 * @param subevent_code 1412 * @param avdtp_cid 1413 * @param local_seid 1414 * @param remote_seid 1415 * @param media_type 1416 * @param sampling_frequency_bitmap 1417 * @param channel_mode_bitmap 1418 * @param block_length_bitmap 1419 * @param subbands_bitmap 1420 * @param allocation_method_bitmap 1421 * @param min_bitpool_value 1422 * @param max_bitpool_value 1423 */ 1424 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CAPABILITY 0x07 1425 1426 /** 1427 * @format 121112LV 1428 * @param subevent_code 1429 * @param avdtp_cid 1430 * @param local_seid 1431 * @param remote_seid 1432 * @param media_type 1433 * @param media_codec_type 1434 * @param media_codec_information_len 1435 * @param media_codec_information 1436 */ 1437 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CAPABILITY 0x08 1438 1439 1440 /** 1441 * @format 1211 1442 * @param subevent_code 1443 * @param avdtp_cid 1444 * @param local_seid 1445 * @param remote_seid 1446 */ 1447 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_TRANSPORT_CAPABILITY 0x09 1448 1449 1450 /** 1451 * @format 1211 1452 * @param subevent_code 1453 * @param avdtp_cid 1454 * @param local_seid 1455 * @param remote_seid 1456 */ 1457 #define AVDTP_SUBEVENT_SIGNALING_REPORTING_CAPABILITY 0x0A 1458 1459 1460 /** 1461 * @format 1211111 1462 * @param subevent_code 1463 * @param avdtp_cid 1464 * @param local_seid 1465 * @param remote_seid 1466 * @param recovery_type 1467 * @param maximum_recovery_window_size 1468 * @param maximum_number_media_packets 1469 */ 1470 #define AVDTP_SUBEVENT_SIGNALING_RECOVERY_CAPABILITY 0x0B 1471 1472 1473 /** 1474 * @format 12112LV 1475 * @param subevent_code 1476 * @param avdtp_cid 1477 * @param local_seid 1478 * @param remote_seid 1479 * @param cp_type 1480 * @param cp_type_value_len 1481 * @param cp_type_value 1482 */ 1483 #define AVDTP_SUBEVENT_SIGNALING_CONTENT_PROTECTION_CAPABILITY 0x0C 1484 1485 1486 /** 1487 * @format 121111111111 1488 * @param subevent_code 1489 * @param avdtp_cid 1490 * @param local_seid 1491 * @param remote_seid 1492 * @param fragmentation 1493 * @param transport_identifiers_num 1494 * @param transport_session_identifier_1 1495 * @param transport_session_identifier_2 1496 * @param transport_session_identifier_3 1497 * @param tcid_1 1498 * @param tcid_2 1499 * @param tcid_3 1500 */ 1501 #define AVDTP_SUBEVENT_SIGNALING_MULTIPLEXING_CAPABILITY 0x0D 1502 1503 1504 /** 1505 * @format 1211 1506 * @param subevent_code 1507 * @param avdtp_cid 1508 * @param local_seid 1509 * @param remote_seid 1510 */ 1511 #define AVDTP_SUBEVENT_SIGNALING_DELAY_REPORTING_CAPABILITY 0x0E 1512 1513 1514 /** 1515 * @format 1211111 1516 * @param subevent_code 1517 * @param avdtp_cid 1518 * @param local_seid 1519 * @param remote_seid 1520 * @param back_ch 1521 * @param media 1522 * @param recovery 1523 */ 1524 #define AVDTP_SUBEVENT_SIGNALING_HEADER_COMPRESSION_CAPABILITY 0x0F 1525 1526 1527 /** 1528 * @format 12111121111111 1529 * @param subevent_code 1530 * @param avdtp_cid 1531 * @param local_seid 1532 * @param remote_seid 1533 * @param reconfigure 1534 * @param media_type 1535 * @param sampling_frequency 1536 * @param channel_mode 1537 * @param num_channels 1538 * @param block_length 1539 * @param subbands 1540 * @param allocation_method 1541 * @param min_bitpool_value 1542 * @param max_bitpool_value 1543 */ 1544 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 0x10 1545 1546 /** 1547 * @format 1211112LV 1548 * @param subevent_code 1549 * @param avdtp_cid 1550 * @param local_seid 1551 * @param remote_seid 1552 * @param reconfigure 1553 * @param media_type 1554 * @param media_codec_type 1555 * @param media_codec_information_len 1556 * @param media_codec_information 1557 */ 1558 #define AVDTP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 0x11 1559 1560 /** 1561 * @format 12B111 1562 * @param subevent_code 1563 * @param avdtp_cid 1564 * @param bd_addr 1565 * @param local_seid 1566 * @param remote_seid 1567 * @param status 0 == OK 1568 */ 1569 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_ESTABLISHED 0x12 1570 1571 /** 1572 * @format 121 1573 * @param subevent_code 1574 * @param avdtp_cid 1575 * @param local_seid 1576 */ 1577 #define AVDTP_SUBEVENT_STREAMING_CONNECTION_RELEASED 0x13 1578 1579 /** 1580 * @format 1212 1581 * @param subevent_code 1582 * @param avdtp_cid 1583 * @param local_seid 1584 * @param sequence_number 1585 */ 1586 #define AVDTP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 0x14 1587 1588 /** 1589 * @format 1211 1590 * @param subevent_code 1591 * @param avdtp_cid 1592 * @param local_seid 1593 * @param remote_seid 1594 */ 1595 #define AVDTP_SUBEVENT_SIGNALING_CAPABILITY_DONE 0x15 1596 1597 1598 /** 1599 * @format 12 1600 * @param subevent_code 1601 * @param avdtp_cid 1602 */ 1603 #define AVDTP_SUBEVENT_SIGNALING_SEP_DICOVERY_DONE 0x16 1604 1605 1606 /** A2DP Subevent */ 1607 /* Stream goes through following states: 1608 * - OPEN - indicated with A2DP_SUBEVENT_STREAM_ESTABLISHED event 1609 * - START - indicated with A2DP_SUBEVENT_STREAM_STARTED event 1610 * - SUSPEND - indicated with A2DP_SUBEVENT_STREAM_SUSPENDED event 1611 * - ABORT/STOP - indicated with A2DP_SUBEVENT_STREAM_RELEASED event 1612 1613 OPEN state will be followed by ABORT/STOP. Stream is ready but media transfer is not started. 1614 START can come only after the stream is OPENED, and indicates that media transfer is started. 1615 SUSPEND is optional, it pauses the stream. 1616 */ 1617 1618 /** 1619 * @format 121 Sent only by A2DP source. 1620 * @param subevent_code 1621 * @param a2dp_cid 1622 * @param local_seid 1623 */ 1624 #define A2DP_SUBEVENT_STREAMING_CAN_SEND_MEDIA_PACKET_NOW 0x01 1625 1626 /** 1627 * @format 12111121111111 1628 * @param subevent_code 1629 * @param a2dp_cid 1630 * @param int_seid 1631 * @param acp_seid 1632 * @param reconfigure 1633 * @param media_type 1634 * @param sampling_frequency 1635 * @param channel_mode 1636 * @param num_channels 1637 * @param block_length 1638 * @param subbands 1639 * @param allocation_method 1640 * @param min_bitpool_value 1641 * @param max_bitpool_value 1642 */ 1643 #define A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_SBC_CONFIGURATION 0x02 1644 1645 /** 1646 * @format 1211112LV 1647 * @param subevent_code 1648 * @param a2dp_cid 1649 * @param int_seid 1650 * @param acp_seid 1651 * @param reconfigure 1652 * @param media_type 1653 * @param media_codec_type 1654 * @param media_codec_information_len 1655 * @param media_codec_information 1656 */ 1657 #define A2DP_SUBEVENT_SIGNALING_MEDIA_CODEC_OTHER_CONFIGURATION 0x03 1658 1659 /** 1660 * @format 12B111 Stream is opened byt not started. 1661 * @param subevent_code 1662 * @param a2dp_cid 1663 * @param bd_addr 1664 * @param local_seid 1665 * @param remote_seid 1666 * @param status 1667 */ 1668 #define A2DP_SUBEVENT_STREAM_ESTABLISHED 0x04 1669 1670 /** 1671 * @format 121 Indicates that media transfer is started. 1672 * @param subevent_code 1673 * @param a2dp_cid 1674 * @param local_seid 1675 */ 1676 #define A2DP_SUBEVENT_STREAM_STARTED 0x05 1677 1678 /** 1679 * @format 121 Stream is paused. 1680 * @param subevent_code 1681 * @param a2dp_cid 1682 * @param local_seid 1683 */ 1684 #define A2DP_SUBEVENT_STREAM_SUSPENDED 0x06 1685 1686 /** 1687 * @format 121 Stream is stoped or aborted. 1688 * @param subevent_code 1689 * @param a2dp_cid 1690 * @param local_seid 1691 */ 1692 #define A2DP_SUBEVENT_STREAM_STOPPED 0x07 1693 1694 /** 1695 * @format 121 Stream is released. 1696 * @param subevent_code 1697 * @param a2dp_cid 1698 * @param local_seid 1699 */ 1700 #define A2DP_SUBEVENT_STREAM_RELEASED 0x08 1701 1702 /** 1703 * @format 1211 1704 * @param subevent_code 1705 * @param a2dp_cid 1706 * @param local_seid 1707 * @param signal_identifier 1708 */ 1709 #define A2DP_SUBEVENT_COMMAND_ACCEPTED 0x09 1710 1711 /** 1712 * @format 1211 1713 * @param subevent_code 1714 * @param a2dp_cid 1715 * @param local_seid 1716 * @param signal_identifier 1717 */ 1718 #define A2DP_SUBEVENT_COMMAND_REJECTED 0x0A 1719 1720 /** 1721 * @format 12B1 1722 * @param subevent_code 1723 * @param a2dp_cid 1724 * @param bd_addr 1725 * @param status 0 == OK 1726 */ 1727 #define A2DP_SUBEVENT_SIGNALING_CONNECTION_ESTABLISHED 0x0B 1728 1729 /** 1730 * @format 12 Signaling channel is released. 1731 * @param subevent_code 1732 * @param a2dp_cid 1733 */ 1734 #define A2DP_SUBEVENT_SIGNALING_CONNECTION_RELEASED 0x0C 1735 1736 /** 1737 * @format 1211 Stream was reconfigured 1738 * @param subevent_code 1739 * @param a2dp_cid 1740 * @param local_seid 1741 * @param status 1742 */ 1743 #define A2DP_SUBEVENT_STREAM_RECONFIGURED 0x0D 1744 1745 /** AVRCP Subevent */ 1746 1747 /** 1748 * @format 11B2 1749 * @param subevent_code 1750 * @param status 0 == OK 1751 * @param bd_addr 1752 * @param avrcp_cid 1753 */ 1754 #define AVRCP_SUBEVENT_CONNECTION_ESTABLISHED 0x01 1755 1756 /** 1757 * @format 12 1758 * @param subevent_code 1759 * @param avrcp_cid 1760 */ 1761 #define AVRCP_SUBEVENT_CONNECTION_RELEASED 0x02 1762 1763 /** 1764 * @format 12111 1765 * @param subevent_code 1766 * @param avrcp_cid 1767 * @param command_type 1768 * @param repeat_mode 1769 * @param shuffle_mode 1770 */ 1771 #define AVRCP_SUBEVENT_SHUFFLE_AND_REPEAT_MODE 0x03 1772 1773 /** 1774 * @format 121441 1775 * @param subevent_code 1776 * @param avrcp_cid 1777 * @param command_type 1778 * @param song_length 1779 * @param song_position 1780 * @param play_status 1781 */ 1782 #define AVRCP_SUBEVENT_PLAY_STATUS 0x04 1783 1784 /** 1785 * @format 1211 1786 * @param subevent_code 1787 * @param avrcp_cid 1788 * @param command_type 1789 * @param play_status 1790 */ 1791 #define AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_STATUS_CHANGED 0x05 1792 1793 /** 1794 * @format 121 1795 * @param subevent_code 1796 * @param avrcp_cid 1797 * @param command_type 1798 */ 1799 #define AVRCP_SUBEVENT_NOTIFICATION_TRACK_CHANGED 0x06 1800 1801 /** 1802 * @format 121 1803 * @param subevent_code 1804 * @param avrcp_cid 1805 * @param command_type 1806 */ 1807 #define AVRCP_SUBEVENT_NOTIFICATION_NOW_PLAYING_CONTENT_CHANGED 0x07 1808 1809 /** 1810 * @format 121 1811 * @param subevent_code 1812 * @param avrcp_cid 1813 * @param command_type 1814 */ 1815 #define AVRCP_SUBEVENT_NOTIFICATION_AVAILABLE_PLAYERS_CHANGED 0x08 1816 1817 /** 1818 * @format 1211 1819 * @param subevent_code 1820 * @param avrcp_cid 1821 * @param command_type 1822 * @param absolute_volume 1823 */ 1824 #define AVRCP_SUBEVENT_NOTIFICATION_VOLUME_CHANGED 0x09 1825 1826 /** 1827 * @format 1211 1828 * @param subevent_code 1829 * @param avrcp_cid 1830 * @param command_type 1831 * @param absolute_volume 1832 */ 1833 #define AVRCP_SUBEVENT_SET_ABSOLUTE_VOLUME_RESPONSE 0x0A 1834 1835 /** 1836 * @format 1211 1837 * @param subevent_code 1838 * @param avrcp_cid 1839 * @param command_type 1840 * @param notification_id 1841 */ 1842 #define AVRCP_SUBEVENT_ENABLE_NOTIFICATION_COMPLETE 0x0B 1843 1844 /** 1845 * @format 1211 1846 * @param subevent_code 1847 * @param avrcp_cid 1848 * @param command_type 1849 * @param operation_id 1850 */ 1851 #define AVRCP_SUBEVENT_OPERATION_START 0x0C 1852 1853 /** 1854 * @format 1211 1855 * @param subevent_code 1856 * @param avrcp_cid 1857 * @param command_type 1858 * @param operation_id 1859 */ 1860 #define AVRCP_SUBEVENT_OPERATION_COMPLETE 0x0D 1861 1862 /** 1863 * @format 121 1864 * @param subevent_code 1865 * @param avrcp_cid 1866 * @param command_type 1867 */ 1868 #define AVRCP_SUBEVENT_PLAYER_APPLICATION_VALUE_RESPONSE 0x0E 1869 1870 /** 1871 * @format 12 1872 * @param subevent_code 1873 * @param avrcp_cid 1874 */ 1875 #define AVRCP_SUBEVENT_COMPANY_IDS_QUERY 0x0F 1876 1877 /** 1878 * @format 12 1879 * @param subevent_code 1880 * @param avrcp_cid 1881 */ 1882 #define AVRCP_SUBEVENT_EVENT_IDS_QUERY 0x10 1883 1884 /** 1885 * @format 12 1886 * @param subevent_code 1887 * @param avrcp_cid 1888 */ 1889 #define AVRCP_SUBEVENT_PLAY_STATUS_QUERY 0x11 1890 1891 /** 1892 * @format 12111 1893 * @param subevent_code 1894 * @param avrcp_cid 1895 * @param operation_id 1896 * @param operands_length 1897 * @param operand 1898 */ 1899 #define AVRCP_SUBEVENT_OPERATION 0x12 1900 1901 /** 1902 * @format 1211 1903 * @param subevent_code 1904 * @param avrcp_cid 1905 * @param command_type 1906 * @param track 1907 */ 1908 #define AVRCP_SUBEVENT_NOW_PLAYING_TRACK_INFO 0x13 1909 1910 /** 1911 * @format 1211 1912 * @param subevent_code 1913 * @param avrcp_cid 1914 * @param command_type 1915 * @param total_tracks 1916 */ 1917 #define AVRCP_SUBEVENT_NOW_PLAYING_TOTAL_TRACKS_INFO 0x14 1918 1919 /** 1920 * @format 1214 1921 * @param subevent_code 1922 * @param avrcp_cid 1923 * @param command_type 1924 * @param song_length in ms 1925 */ 1926 #define AVRCP_SUBEVENT_NOW_PLAYING_SONG_LENGTH_MS_INFO 0x15 1927 1928 /** 1929 * @format 121JV 1930 * @param subevent_code 1931 * @param avrcp_cid 1932 * @param command_type 1933 * @param value_len 1934 * @param value 1935 */ 1936 #define AVRCP_SUBEVENT_NOW_PLAYING_TITLE_INFO 0x16 1937 1938 /* 1939 * @format 121JV 1940 * @param subevent_code 1941 * @param avrcp_cid 1942 * @param command_type 1943 * @param value_len 1944 * @param value 1945 */ 1946 #define AVRCP_SUBEVENT_NOW_PLAYING_ARTIST_INFO 0x17 1947 1948 /* 1949 * @format 121JV 1950 * @param subevent_code 1951 * @param avrcp_cid 1952 * @param command_type 1953 * @param value_len 1954 * @param value 1955 */ 1956 #define AVRCP_SUBEVENT_NOW_PLAYING_ALBUM_INFO 0x18 1957 1958 /* 1959 * @format 121JV 1960 * @param subevent_code 1961 * @param avrcp_cid 1962 * @param command_type 1963 * @param value_len 1964 * @param value 1965 */ 1966 #define AVRCP_SUBEVENT_NOW_PLAYING_GENRE_INFO 0x19 1967 1968 /* 1969 * @format 1211 1970 * @param subevent_code 1971 * @param avrcp_cid 1972 * @param command_type 1973 * @param status 1974 */ 1975 #define AVRCP_SUBEVENT_NOW_PLAYING_INFO_DONE 0x1A 1976 1977 /** 1978 * @format 1B2 1979 * @param subevent_code 1980 * @param bd_addr 1981 * @param browsing_cid 1982 */ 1983 #define AVRCP_SUBEVENT_INCOMING_BROWSING_CONNECTION 0x1B 1984 1985 /** 1986 * @format 11B2 1987 * @param subevent_code 1988 * @param status 0 == OK 1989 * @param bd_addr 1990 * @param browsing_cid 1991 */ 1992 #define AVRCP_SUBEVENT_BROWSING_CONNECTION_ESTABLISHED 0x1C 1993 1994 /** 1995 * @format 12 1996 * @param subevent_code 1997 * @param browsing_cid 1998 */ 1999 #define AVRCP_SUBEVENT_BROWSING_CONNECTION_RELEASED 0x1D 2000 2001 /** 2002 * @format 12211 2003 * @param subevent_code 2004 * @param browsing_cid 2005 * @param uid_counter 2006 * @param browsing_status 2007 * @param bluetooth_status 2008 */ 2009 #define AVRCP_SUBEVENT_BROWSING_DONE 0x1E 2010 2011 /** 2012 * @format 1214 2013 * @param subevent_code 2014 * @param browsing_cid 2015 * @param scope 2016 * @param attr_bitmap 2017 */ 2018 #define AVRCP_SUBEVENT_BROWSING_GET_FOLDER_ITEMS 0x1F 2019 2020 /** 2021 * @format 121 2022 * @param subevent_code 2023 * @param browsing_cid 2024 * @param scope 2025 */ 2026 #define AVRCP_SUBEVENT_BROWSING_GET_TOTAL_NUM_ITEMS 0x20 2027 2028 /** 2029 * @format 1214 2030 * @param subevent_code 2031 * @param avrcp_cid 2032 * @param command_type 2033 * @param playback_position_ms 2034 */ 2035 #define AVRCP_SUBEVENT_NOTIFICATION_PLAYBACK_POS_CHANGED 0x21 2036 2037 2038 /** 2039 * @format 121BH1 2040 * @param subevent_code 2041 * @param goep_cid 2042 * @param status 2043 * @param bd_addr 2044 * @param con_handle 2045 * @param incoming 2046 */ 2047 #define GOEP_SUBEVENT_CONNECTION_OPENED 0x01 2048 2049 /** 2050 * @format 12 2051 * @param subevent_code 2052 * @param goep_cid 2053 */ 2054 #define GOEP_SUBEVENT_CONNECTION_CLOSED 0x02 2055 2056 /** 2057 * @format 12 2058 * @param subevent_code 2059 * @param goep_cid 2060 */ 2061 #define GOEP_SUBEVENT_CAN_SEND_NOW 0x03 2062 2063 /** 2064 * @format 121BH1 2065 * @param subevent_code 2066 * @param pbap_cid 2067 * @param status 2068 * @param bd_addr 2069 * @param con_handle 2070 * @param incoming 2071 */ 2072 #define PBAP_SUBEVENT_CONNECTION_OPENED 0x01 2073 2074 /** 2075 * @format 12 2076 * @param subevent_code 2077 * @param goep_cid 2078 */ 2079 #define PBAP_SUBEVENT_CONNECTION_CLOSED 0x02 2080 2081 /** 2082 * @format 121 2083 * @param subevent_code 2084 * @param goep_cid 2085 * @param status 2086 */ 2087 #define PBAP_SUBEVENT_OPERATION_COMPLETED 0x03 2088 2089 /** 2090 * @format 1212 2091 * @param subevent_code 2092 * @param goep_cid 2093 * @param status 2094 * @param phoneboook_size 2095 */ 2096 #define PBAP_SUBEVENT_PHONEBOOK_SIZE 0x04 2097 2098 /** 2099 * @format 1211 2100 * @param subevent_code 2101 * @param goep_cid 2102 * @param user_id_required 2103 * @param full_access 2104 */ 2105 #define PBAP_SUBEVENT_AUTHENTICATION_REQUEST 0x05 2106 2107 /** 2108 * @format 12JVJV 2109 * @param subevent_code 2110 * @param goep_cid 2111 * @param name_len 2112 * @param name 2113 * @param handle_len 2114 * @param handle 2115 */ 2116 #define PBAP_SUBEVENT_CARD_RESULT 0x06 2117 2118 2119 // HID Meta Event Group 2120 2121 /** 2122 * @format 121BH1 2123 * @param subevent_code 2124 * @param hid_cid 2125 * @param status 2126 * @param bd_addr 2127 * @param con_handle 2128 * @param incoming 2129 */ 2130 #define HID_SUBEVENT_CONNECTION_OPENED 0x01 2131 2132 /** 2133 * @format 12 2134 * @param subevent_code 2135 * @param hid_cid 2136 */ 2137 #define HID_SUBEVENT_CONNECTION_CLOSED 0x02 2138 2139 /** 2140 * @format 12 2141 * @param subevent_code 2142 * @param hid_cid 2143 */ 2144 #define HID_SUBEVENT_CAN_SEND_NOW 0x03 2145 2146 /** 2147 * @format 12 2148 * @param subevent_code 2149 * @param con_handle 2150 */ 2151 #define HID_SUBEVENT_SUSPEND 0x04 2152 2153 /** 2154 * @format 12 2155 * @param subevent_code 2156 * @param con_handle 2157 */ 2158 #define HID_SUBEVENT_EXIT_SUSPEND 0x05 2159 2160 2161 // HIDS Meta Event Group 2162 2163 /** 2164 * @format 12 2165 * @param subevent_code 2166 * @param con_handle 2167 */ 2168 #define HIDS_SUBEVENT_CAN_SEND_NOW 0x01 2169 2170 /** 2171 * @format 121 2172 * @param subevent_code 2173 * @param con_handle 2174 * @param protocol_mode 2175 */ 2176 #define HIDS_SUBEVENT_PROTOCOL_MODE 0x02 2177 2178 /** 2179 * @format 121 2180 * @param subevent_code 2181 * @param con_handle 2182 * @param enable 2183 */ 2184 #define HIDS_SUBEVENT_BOOT_MOUSE_INPUT_REPORT_ENABLE 0x03 2185 2186 /** 2187 * @format 121 2188 * @param subevent_code 2189 * @param con_handle 2190 * @param enable 2191 */ 2192 #define HIDS_SUBEVENT_BOOT_KEYBOARD_INPUT_REPORT_ENABLE 0x04 2193 2194 /** 2195 * @format 121 2196 * @param subevent_code 2197 * @param con_handle 2198 * @param enable 2199 */ 2200 #define HIDS_SUBEVENT_INPUT_REPORT_ENABLE 0x05 2201 2202 /** 2203 * @format 121 2204 * @param subevent_code 2205 * @param con_handle 2206 * @param enable 2207 */ 2208 #define HIDS_SUBEVENT_OUTPUT_REPORT_ENABLE 0x06 2209 2210 /** 2211 * @format 121 2212 * @param subevent_code 2213 * @param con_handle 2214 * @param enable 2215 */ 2216 #define HIDS_SUBEVENT_FEATURE_REPORT_ENABLE 0x07 2217 2218 /** 2219 * @format 12 2220 * @param subevent_code 2221 * @param con_handle 2222 */ 2223 #define HIDS_SUBEVENT_SUSPEND 0x08 2224 2225 /** 2226 * @format 12 2227 * @param subevent_code 2228 * @param con_handle 2229 */ 2230 #define HIDS_SUBEVENT_EXIT_SUSPEND 0x09 2231 2232 /** 2233 * @format 1211 2234 * @param subevent_code 2235 * @param con_handle 2236 * @param measurement_type // 0 - force magnitude, 1 - torque magnitude, see cycling_power_sensor_measurement_context_t 2237 * @param is_enhanced 2238 */ 2239 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_START_CALIBRATION 0x01 2240 2241 /** 2242 * @format 12 2243 * @param subevent_code 2244 * @param con_handle 2245 */ 2246 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_START 0x02 2247 2248 /** 2249 * @format 12 2250 * @param subevent_code 2251 * @param con_handle 2252 */ 2253 #define GATTSERVICE_SUBEVENT_CYCLING_POWER_BROADCAST_STOP 0x03 2254 2255 2256 // MAP Meta Event Group 2257 2258 /** 2259 * @format 121BH1 2260 * @param subevent_code 2261 * @param map_cid 2262 * @param status 2263 * @param bd_addr 2264 * @param con_handle 2265 * @param incoming 2266 */ 2267 #define MAP_SUBEVENT_CONNECTION_OPENED 0x01 2268 2269 /** 2270 * @format 12 2271 * @param subevent_code 2272 * @param map_cid 2273 */ 2274 #define MAP_SUBEVENT_CONNECTION_CLOSED 0x02 2275 2276 /** 2277 * @format 121 2278 * @param subevent_code 2279 * @param map_cid 2280 * @param status 2281 */ 2282 #define MAP_SUBEVENT_OPERATION_COMPLETED 0x03 2283 2284 2285 /** 2286 * @format 12LV 2287 * @param subevent_code 2288 * @param map_cid 2289 * @param name_len 2290 * @param name 2291 */ 2292 #define MAP_SUBEVENT_FOLDER_LISTING_ITEM 0x04 2293 2294 /** 2295 * @format 12D 2296 * @param subevent_code 2297 * @param map_cid 2298 * @param handle 2299 2300 */ 2301 #define MAP_SUBEVENT_MESSAGE_LISTING_ITEM 0x05 2302 2303 /** 2304 * @format 12 2305 * @param subevent_code 2306 * @param map_cid 2307 */ 2308 #define MAP_SUBEVENT_PARSING_DONE 0x06 2309 2310 2311 // MESH Meta Event Group 2312 2313 /** 2314 * @format 1 2315 * @param subevent_code 2316 */ 2317 #define MESH_SUBEVENT_CAN_SEND_NOW 0x01 2318 2319 /** 2320 * @format 11 2321 * @param subevent_code 2322 * @param status 2323 */ 2324 #define MESH_PB_ADV_PDU_SENT 0x02 2325 2326 /** 2327 * @format 112 2328 * @param subevent_code 2329 * @param status 2330 * @param pb_adv_cid 2331 */ 2332 #define MESH_PB_ADV_LINK_OPEN 0x03 2333 2334 /** 2335 * @format 112 2336 * @param subevent_code 2337 * @param status 2338 * @param pb_adv_cid 2339 */ 2340 #define MESH_PB_ADV_LINK_CLOSED 0x04 2341 2342 /** 2343 * @format 121 2344 * @param subevent_code 2345 * @param pb_adv_cid 2346 * @param attention_time in seconds 2347 */ 2348 #define MESH_PB_PROV_ATTENTION_TIMER 0x10 2349 2350 /** 2351 * Device Role 2352 * @format 12 2353 * @param subevent_code 2354 * @param pb_adv_cid 2355 */ 2356 #define MESH_PB_PROV_START_EMIT_PUBLIC_KEY_OOB 0x11 2357 2358 /** 2359 * Device Role 2360 * @format 12 2361 * @param subevent_code 2362 * @param pb_adv_cid 2363 */ 2364 #define MESH_PB_PROV_STOP_EMIT_PUBLIC_KEY_OOB 0x12 2365 2366 /** 2367 * Device Role 2368 * @format 12 2369 * @param subevent_code 2370 * @param pb_adv_cid 2371 */ 2372 #define MESH_PB_PROV_INPUT_OOB_REQUEST 0x13 2373 2374 /** 2375 * Device Role 2376 * @format 124 2377 * @param subevent_code 2378 * @param pb_adv_cid 2379 * @param output_oob number 2380 */ 2381 #define MESH_PB_PROV_START_EMIT_OUTPUT_OOB 0x15 2382 2383 /** 2384 * Device Role 2385 * @format 12 2386 * @param subevent_code 2387 * @param pb_adv_cid 2388 */ 2389 #define MESH_PB_PROV_STOP_EMIT_OUTPUT_OOB 0x16 2390 2391 /** 2392 * Provisioner Role 2393 * @format 12 2394 * @param subevent_code 2395 * @param pb_adv_cid 2396 */ 2397 #define MESH_PB_PROV_START_RECEIVE_PUBLIC_KEY_OOB 0x17 2398 2399 /** 2400 * Provisioner Role 2401 * @format 12 2402 * @param subevent_code 2403 * @param pb_adv_cid 2404 */ 2405 #define MESH_PB_PROV_STOP_RECEIVE_PUBLIC_KEY_OOB 0x18 2406 2407 /** 2408 * Provisioner Role 2409 * @format 12 2410 * @param subevent_code 2411 * @param pb_adv_cid 2412 */ 2413 #define MESH_PB_PROV_OUTPUT_OOB_REQUEST 0x19 2414 2415 /** 2416 * Provisioner Role 2417 * @format 124 2418 * @param subevent_code 2419 * @param pb_adv_cid 2420 * @param output_oob number 2421 */ 2422 #define MESH_PB_PROV_START_EMIT_INPUT_OOB 0x1a 2423 2424 /** 2425 * Provisioner Role 2426 * @format 12 2427 * @param subevent_code 2428 * @param pb_adv_cid 2429 */ 2430 #define MESH_PB_PROV_STOP_EMIT_INPUT_OOB 0x1b 2431 2432 /** 2433 * Provisioner Role 2434 * @format 1212111212 2435 * @param subevent_code 2436 * @param pb_adv_cid 2437 * @param num_elements 2438 * @param algorithms 2439 * @param public_key 2440 * @param static_oob_type 2441 * @param output_oob_size 2442 * @param output_oob_action 2443 * @param input_oob_size 2444 * @param input_oob_action 2445 */ 2446 #define MESH_PB_PROV_CAPABILITIES 0x1c 2447 2448 /** 2449 * @format 12 2450 * @param subevent_code 2451 * @param pb_adv_cid 2452 */ 2453 #define MESH_PB_PROV_COMPLETE 0x1d 2454 2455 #endif 2456