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