47#ifndef __MODULES_INCLUDE_BLUETOOTH_HAL_BT_EVENT_H
48#define __MODULES_INCLUDE_BLUETOOTH_HAL_BT_EVENT_H
65#define BT_MAX_EVENT_DATA_LEN 1024
72#define BT_ADV_DATA_ADDRTYPE_LEN (1)
79#define BT_ADV_DATA_RSSI_LEN (1)
86#define BLE_MAX_ADV_DATA_LEN (BT_ADV_DATA_MAX_LEN + \
87 BT_ADV_DATA_ADDRTYPE_LEN + \
95#define BLE_MAX_GATT_DATA_LEN 244
236 uint8_t
data[BT_MAX_EVENT_DATA_LEN];
332 uint8_t
data[BT_MAX_EVENT_DATA_LEN];
419 uint8_t
data[BT_MAX_EVENT_DATA_LEN];
460 uint8_t
data[BLE_MAX_GATT_DATA_LEN];
516 uint8_t
data[BLE_MAX_GATT_DATA_LEN];
531 uint8_t
data[BLE_MAX_GATT_DATA_LEN];
545 uint8_t
data[BLE_MAX_ADV_DATA_LEN];
Bluetooth common header for SDK on Spresense.
BT_CONNECT_FAIL_REASON_ID
BT profile connection result.
Definition: bluetooth.h:238
BT_PAIR_STATUS
BT pairing result.
Definition: bluetooth.h:210
BT_CMD_STATUS
BT hci command status.
Definition: bluetooth.h:189
BLE_GATT_EVENT_ID
Definition: bt_event.h:218
@ BLE_GATT_EVENT_WRITE_REQ
Definition: bt_event.h:219
@ BLE_GATT_EVENT_READ_RESP
Definition: bt_event.h:223
@ BLE_GATT_EVENT_READ_REQ
Definition: bt_event.h:220
@ BLE_GATT_EVENT_WRITE_RESP
Definition: bt_event.h:222
@ BLE_GATT_EVENT_NOTIFY_REQ
Definition: bt_event.h:221
@ BLE_GATT_EVENT_DB_DISCOVERY_COMPLETE
Definition: bt_event.h:225
@ BLE_GATT_EVENT_NOTIFICATION
Definition: bt_event.h:224
BLE_COMMON_EVENT_ID
Bluetooth LE event ID for common function.
Definition: bt_event.h:203
@ BLE_COMMON_EVENT_SAVE_BOND
Definition: bt_event.h:208
@ BLE_COMMON_EVENT_SCAN_RESULT
Definition: bt_event.h:206
@ BLE_COMMON_EVENT_CONN_STAT_CHANGE
Definition: bt_event.h:204
@ BLE_COMMON_EVENT_ENCRYPTION_RESULT
Definition: bt_event.h:210
@ BLE_COMMON_EVENT_LOAD_BOND
Definition: bt_event.h:209
@ BLE_COMMON_EVENT_MTUSIZE
Definition: bt_event.h:207
@ BLE_COMMON_EVENT_CONN_DEV_NAME
Definition: bt_event.h:205
BT_GROUP_ID
Bluetooth profile and protocol ID.
Definition: bt_event.h:107
@ BT_GROUP_RFCOMM
Definition: bt_event.h:113
@ BT_GROUP_COMMON
Definition: bt_event.h:108
@ BT_GROUP_HFP
Definition: bt_event.h:111
@ BT_GROUP_SPP
Definition: bt_event.h:112
@ BT_GROUP_AVRCP
Definition: bt_event.h:110
@ BLE_GROUP_GATT
Definition: bt_event.h:115
@ BLE_GROUP_COMMON
Definition: bt_event.h:114
@ BT_GROUP_A2DP
Definition: bt_event.h:109
BT_HFP_EVENT_ID
Bluetooth event ID for HFP.
Definition: bt_event.h:176
@ BT_HFP_EVENT_AT_CMD_RESP
Definition: bt_event.h:183
@ BT_HFP_EVENT_AG_FEATURE_RESP
Definition: bt_event.h:182
@ BT_HFP_EVENT_AUDIO_CONNECT
Definition: bt_event.h:180
@ BT_HFP_EVENT_CMD_STATUS
Definition: bt_event.h:177
@ BT_HFP_EVENT_HF_CONNECT
Definition: bt_event.h:178
@ BT_HFP_EVENT_AUDIO_DISCONNECT
Definition: bt_event.h:181
@ BT_HFP_EVENT_HF_DISCONNECT
Definition: bt_event.h:179
BT_A2DP_EVENT_ID
Bluetooth event ID for A2DP.
Definition: bt_event.h:138
@ BT_A2DP_EVENT_MEDIA_PACKET
Definition: bt_event.h:142
@ BT_A2DP_EVENT_CMD_STATUS
Definition: bt_event.h:139
@ BT_A2DP_EVENT_CONNECT
Definition: bt_event.h:140
@ BT_A2DP_EVENT_DISCONNECT
Definition: bt_event.h:141
BT_AVRCP_EVENT_ID
Bluetooth event ID for A2DP.
Definition: bt_event.h:150
@ BT_AVRCP_EVENT_TRACK_REACH_END
Definition: bt_event.h:158
@ BT_AVRCT_EVENT_DISCONNECT
Definition: bt_event.h:155
@ BT_AVRCP_EVENT_TRACK_REACH_START
Definition: bt_event.h:159
@ BT_AVRCP_EVENT_VOLUME_CHANGE
Definition: bt_event.h:168
@ BT_AVRCP_EVENT_BATT_STAT_CHANGE
Definition: bt_event.h:161
@ BT_AVRCP_EVENT_NOW_PLAY_CHANGE
Definition: bt_event.h:164
@ BT_AVRCP_EVENT_APP_SETT_CHANGE
Definition: bt_event.h:163
@ BT_AVRCP_EVENT_UIDS_CHANGE
Definition: bt_event.h:167
@ BT_AVRCP_EVENT_PLAY_STAT_CHANGE
Definition: bt_event.h:156
@ BT_AVRCP_EVENT_PLAY_POS_CHANGE
Definition: bt_event.h:160
@ BT_AVRCC_EVENT_CONNECT
Definition: bt_event.h:152
@ BT_AVRCP_EVENT_SYS_STATUS_CHANGE
Definition: bt_event.h:162
@ BT_AVRCP_EVENT_ADDR_PLAYER_CHANGE
Definition: bt_event.h:166
@ BT_AVRCC_EVENT_DISCONNECT
Definition: bt_event.h:153
@ BT_AVRCP_EVENT_CMD_STATUS
Definition: bt_event.h:151
@ BT_AVRCT_EVENT_CONNECT
Definition: bt_event.h:154
@ BT_AVRCP_EVENT_AVAI_PLAYER_CHANGE
Definition: bt_event.h:165
@ BT_AVRCP_EVENT_TRACK_CHANGE
Definition: bt_event.h:157
BT_COMMON_EVENT_ID
Bluetooth event ID for common function.
Definition: bt_event.h:123
@ BT_COMMON_EVENT_PAIRING_COMPLETE
Definition: bt_event.h:125
@ BT_COMMON_EVENT_INQUIRY_COMPLETE
Definition: bt_event.h:127
@ BT_COMMON_EVENT_INQUIRY_RESULT
Definition: bt_event.h:126
@ BT_COMMON_EVENT_CONN_STAT_CHANGE
Definition: bt_event.h:128
@ BT_COMMON_EVENT_BOND_INFO
Definition: bt_event.h:130
@ BT_COMMON_EVENT_CMD_STATUS
Definition: bt_event.h:124
@ BT_COMMON_EVENT_CONN_DEV_NAME
Definition: bt_event.h:129
BT_SPP_EVENT_ID
Bluetooth event ID for SPP.
Definition: bt_event.h:191
@ BT_SPP_EVENT_CONNECT
Definition: bt_event.h:192
@ BT_SPP_EVENT_DISCONNECT
Definition: bt_event.h:193
@ BT_SPP_EVENT_CONNECT_FAIL
Definition: bt_event.h:194
@ BT_SPP_EVENT_RX_DATA
Definition: bt_event.h:195
BT_PROFILE_TYPE
BT HFP profile type.
Definition: bt_hfp_features.h:65
BT_HFP_AG_FEATURE_FLAG
HFP AG device supported feature flags.
Definition: bt_hfp_features.h:94
BT address types.
Definition: bluetooth.h:171
Codec information element structure, used to provide info of a single type of codec.
Definition: bt_a2dp_codecs.h:195
BT avrc supported notify event.
Definition: bt_event.h:582
bool trackReachedEnd
Definition: bt_event.h:585
bool playStatusChange
Definition: bt_event.h:583
bool trackReachedStart
Definition: bt_event.h:586
bool addrPlayChange
Definition: bt_event.h:593
bool trackChange
Definition: bt_event.h:584
bool appSettingChange
Definition: bt_event.h:590
bool batteryStatusChange
Definition: bt_event.h:588
bool uidsChange
Definition: bt_event.h:594
bool systemStatusChange
Definition: bt_event.h:589
bool volumeChange
Definition: bt_event.h:595
bool nowPlayingChange
Definition: bt_event.h:591
bool avalPlayerChange
Definition: bt_event.h:592
bool playPosChanged
Definition: bt_event.h:587
Bluetooth LE bonding information.
Definition: bt_common.h:222
Bluetooth LE advertise report event.
Definition: bt_event.h:539
int8_t rssi
Definition: bt_event.h:542
uint8_t scan_rsp
Definition: bt_event.h:543
BT_ADDR addr
Definition: bt_event.h:546
uint8_t group_id
Definition: bt_event.h:540
uint8_t length
Definition: bt_event.h:544
uint8_t data[BLE_MAX_ADV_DATA_LEN]
Definition: bt_event.h:545
uint8_t event_id
Definition: bt_event.h:541
Definition: bt_event.h:558
struct ble_bondinfo_s * bond
Definition: bt_event.h:562
int num
Definition: bt_event.h:561
uint8_t group_id
Definition: bt_event.h:559
uint8_t event_id
Definition: bt_event.h:560
Bluetooth LE connection status change event data type.
Definition: bt_event.h:427
BT_ADDR addr
Definition: bt_event.h:431
uint8_t group_id
Definition: bt_event.h:428
bool connected
Definition: bt_event.h:432
uint8_t status
Definition: bt_event.h:433
uint8_t event_id
Definition: bt_event.h:429
uint16_t handle
Definition: bt_event.h:430
Definition: bt_event.h:441
BT_ADDR addr
Definition: bt_event.h:444
uint8_t group_id
Definition: bt_event.h:442
uint8_t event_id
Definition: bt_event.h:443
char name[BT_NAME_LEN]
Definition: bt_event.h:445
Bluetooth LE encryption result event.
Definition: bt_event.h:571
uint16_t conn_handle
Definition: bt_event.h:574
int result
Definition: bt_event.h:575
uint8_t group_id
Definition: bt_event.h:572
uint8_t event_id
Definition: bt_event.h:573
Definition: bt_event.h:550
uint16_t mtusize
Definition: bt_event.h:554
uint8_t group_id
Definition: bt_event.h:551
uint8_t event_id
Definition: bt_event.h:552
uint16_t handle
Definition: bt_event.h:553
Bluetooth LE GATT notification event.
Definition: bt_event.h:524
uint16_t conn_handle
Definition: bt_event.h:527
uint16_t length
Definition: bt_event.h:530
bool indicate
Definition: bt_event.h:529
uint8_t group_id
Definition: bt_event.h:525
uint8_t data[BLE_MAX_GATT_DATA_LEN]
Definition: bt_event.h:531
uint16_t char_handle
Definition: bt_event.h:528
uint8_t event_id
Definition: bt_event.h:526
Bluetooth LE GATT Notify request event.
Definition: bt_event.h:481
uint16_t conn_handle
Definition: bt_event.h:485
uint16_t serv_handle
Definition: bt_event.h:484
uint8_t group_id
Definition: bt_event.h:482
uint16_t char_handle
Definition: bt_event.h:486
bool enable
Definition: bt_event.h:487
uint8_t event_id
Definition: bt_event.h:483
Bluetooth LE GATT Read request event.
Definition: bt_event.h:468
uint16_t conn_handle
Definition: bt_event.h:472
uint16_t serv_handle
Definition: bt_event.h:471
uint8_t group_id
Definition: bt_event.h:469
uint16_t char_handle
Definition: bt_event.h:473
uint8_t event_id
Definition: bt_event.h:470
Bluetooth LE GATT Read response event.
Definition: bt_event.h:509
uint16_t conn_handle
Definition: bt_event.h:513
uint16_t length
Definition: bt_event.h:515
uint16_t serv_handle
Definition: bt_event.h:512
uint8_t group_id
Definition: bt_event.h:510
uint8_t data[BLE_MAX_GATT_DATA_LEN]
Definition: bt_event.h:516
uint16_t char_handle
Definition: bt_event.h:514
uint8_t event_id
Definition: bt_event.h:511
Bluetooth LE GATT Write request event.
Definition: bt_event.h:453
uint16_t conn_handle
Definition: bt_event.h:457
uint16_t length
Definition: bt_event.h:459
uint16_t serv_handle
Definition: bt_event.h:456
uint8_t group_id
Definition: bt_event.h:454
uint8_t data[BLE_MAX_GATT_DATA_LEN]
Definition: bt_event.h:460
uint16_t char_handle
Definition: bt_event.h:458
uint8_t event_id
Definition: bt_event.h:455
Bluetooth LE GATT Write response event.
Definition: bt_event.h:495
uint16_t conn_handle
Definition: bt_event.h:499
uint16_t serv_handle
Definition: bt_event.h:498
uint8_t group_id
Definition: bt_event.h:496
uint16_t char_handle
Definition: bt_event.h:500
uint8_t status
Definition: bt_event.h:501
uint8_t event_id
Definition: bt_event.h:497
Bluetooth A2DP connection event data type.
Definition: bt_event.h:314
BT_ADDR addr
Definition: bt_event.h:318
uint8_t group_id
Definition: bt_event.h:315
uint8_t event_id
Definition: bt_event.h:316
uint16_t handle
Definition: bt_event.h:317
Bluetooth A2DP receive data event data type.
Definition: bt_event.h:327
BT_ADDR addr
Definition: bt_event.h:330
uint8_t data[BT_MAX_EVENT_DATA_LEN]
Definition: bt_event.h:332
uint8_t group_id
Definition: bt_event.h:328
uint8_t event_id
Definition: bt_event.h:329
int len
Definition: bt_event.h:331
Bluetooth AVRCP connection event data type.
Definition: bt_event.h:340
BT_ADDR addr
Definition: bt_event.h:344
uint8_t group_id
Definition: bt_event.h:341
uint8_t event_id
Definition: bt_event.h:342
uint16_t handle
Definition: bt_event.h:343
Bluetooth AVRCP play position event data type.
Definition: bt_event.h:352
uint8_t group_id
Definition: bt_event.h:353
uint32_t position
Definition: bt_event.h:356
uint8_t event_id
Definition: bt_event.h:354
uint16_t handle
Definition: bt_event.h:355
Bluetooth new bonding information event data type.
Definition: bt_event.h:303
BT_ADDR addr
Definition: bt_event.h:306
uint8_t group_id
Definition: bt_event.h:304
uint8_t event_id
Definition: bt_event.h:305
Bluetooth command status event data type.
Definition: bt_event.h:244
BT_CMD_STATUS cmd_status
Definition: bt_event.h:247
uint8_t group_id
Definition: bt_event.h:245
uint8_t event_id
Definition: bt_event.h:246
Bluetooth connection status change event data type.
Definition: bt_event.h:279
BT_ADDR addr
Definition: bt_event.h:282
uint8_t group_id
Definition: bt_event.h:280
bool connected
Definition: bt_event.h:283
uint8_t event_id
Definition: bt_event.h:281
Bluetooth change device name event data type.
Definition: bt_event.h:292
uint8_t group_id
Definition: bt_event.h:293
uint8_t event_id
Definition: bt_event.h:294
char name[BT_NAME_LEN]
Definition: bt_event.h:295
Bluetooth inquiry result event data type.
Definition: bt_event.h:267
BT_ADDR addr
Definition: bt_event.h:270
uint8_t group_id
Definition: bt_event.h:268
uint8_t event_id
Definition: bt_event.h:269
char name[BT_NAME_LEN]
Definition: bt_event.h:271
Bluetooth pairing complete event data type.
Definition: bt_event.h:255
BT_PAIR_STATUS status
Definition: bt_event.h:259
BT_ADDR addr
Definition: bt_event.h:258
uint8_t group_id
Definition: bt_event.h:256
uint8_t event_id
Definition: bt_event.h:257
Bluetooth parent event data type.
Definition: bt_event.h:233
uint8_t data[BT_MAX_EVENT_DATA_LEN]
Definition: bt_event.h:236
uint8_t group_id
Definition: bt_event.h:234
uint8_t event_id
Definition: bt_event.h:235
Bluetooth HFP ag feature event data type.
Definition: bt_event.h:377
BT_ADDR addr
Definition: bt_event.h:380
BT_HFP_AG_FEATURE_FLAG ag_flag
Definition: bt_event.h:381
uint8_t group_id
Definition: bt_event.h:378
uint8_t event_id
Definition: bt_event.h:379
Bluetooth HFP at command event data type.
Definition: bt_event.h:389
char at_resp[BT_MAX_EVENT_DATA_LEN]
Definition: bt_event.h:393
BT_ADDR addr
Definition: bt_event.h:392
uint8_t group_id
Definition: bt_event.h:390
uint8_t event_id
Definition: bt_event.h:391
Bluetooth HFP connection event data type.
Definition: bt_event.h:364
BT_ADDR addr
Definition: bt_event.h:368
uint8_t group_id
Definition: bt_event.h:365
uint8_t event_id
Definition: bt_event.h:366
uint16_t handle
Definition: bt_event.h:367
BT_PROFILE_TYPE hfp_type
Definition: bt_event.h:369
Bluetooth SPP connection event data type.
Definition: bt_event.h:401
BT_ADDR addr
Definition: bt_event.h:405
uint8_t group_id
Definition: bt_event.h:402
BT_CONNECT_FAIL_REASON_ID reason
Definition: bt_event.h:406
uint8_t event_id
Definition: bt_event.h:403
uint16_t handle
Definition: bt_event.h:404
Bluetooth SPP Rx event data type.
Definition: bt_event.h:414
BT_ADDR addr
Definition: bt_event.h:417
uint8_t data[BT_MAX_EVENT_DATA_LEN]
Definition: bt_event.h:419
uint8_t group_id
Definition: bt_event.h:415
uint8_t event_id
Definition: bt_event.h:416
int len
Definition: bt_event.h:418