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 BLE_MAX_ADV_DATA_LEN (BT_ADV_DATA_MAX_LEN + BT_ADV_DATA_ADDRTYPE_LEN)
86#define BLE_MAX_GATT_DATA_LEN 244
227 uint8_t
data[BT_MAX_EVENT_DATA_LEN];
323 uint8_t
data[BT_MAX_EVENT_DATA_LEN];
410 uint8_t
data[BT_MAX_EVENT_DATA_LEN];
451 uint8_t
data[BLE_MAX_GATT_DATA_LEN];
507 uint8_t
data[BLE_MAX_GATT_DATA_LEN];
522 uint8_t
data[BLE_MAX_GATT_DATA_LEN];
536 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:209
@ BLE_GATT_EVENT_WRITE_REQ
Definition: bt_event.h:210
@ BLE_GATT_EVENT_READ_RESP
Definition: bt_event.h:214
@ BLE_GATT_EVENT_READ_REQ
Definition: bt_event.h:211
@ BLE_GATT_EVENT_WRITE_RESP
Definition: bt_event.h:213
@ BLE_GATT_EVENT_NOTIFY_REQ
Definition: bt_event.h:212
@ BLE_GATT_EVENT_DB_DISCOVERY_COMPLETE
Definition: bt_event.h:216
@ BLE_GATT_EVENT_NOTIFICATION
Definition: bt_event.h:215
BLE_COMMON_EVENT_ID
Bluetooth LE event ID for common function.
Definition: bt_event.h:194
@ BLE_COMMON_EVENT_SAVE_BOND
Definition: bt_event.h:199
@ BLE_COMMON_EVENT_SCAN_RESULT
Definition: bt_event.h:197
@ BLE_COMMON_EVENT_CONN_STAT_CHANGE
Definition: bt_event.h:195
@ BLE_COMMON_EVENT_ENCRYPTION_RESULT
Definition: bt_event.h:201
@ BLE_COMMON_EVENT_LOAD_BOND
Definition: bt_event.h:200
@ BLE_COMMON_EVENT_MTUSIZE
Definition: bt_event.h:198
@ BLE_COMMON_EVENT_CONN_DEV_NAME
Definition: bt_event.h:196
BT_GROUP_ID
Bluetooth profile and protocol ID.
Definition: bt_event.h:98
@ BT_GROUP_RFCOMM
Definition: bt_event.h:104
@ BT_GROUP_COMMON
Definition: bt_event.h:99
@ BT_GROUP_HFP
Definition: bt_event.h:102
@ BT_GROUP_SPP
Definition: bt_event.h:103
@ BT_GROUP_AVRCP
Definition: bt_event.h:101
@ BLE_GROUP_GATT
Definition: bt_event.h:106
@ BLE_GROUP_COMMON
Definition: bt_event.h:105
@ BT_GROUP_A2DP
Definition: bt_event.h:100
BT_HFP_EVENT_ID
Bluetooth event ID for HFP.
Definition: bt_event.h:167
@ BT_HFP_EVENT_AT_CMD_RESP
Definition: bt_event.h:174
@ BT_HFP_EVENT_AG_FEATURE_RESP
Definition: bt_event.h:173
@ BT_HFP_EVENT_AUDIO_CONNECT
Definition: bt_event.h:171
@ BT_HFP_EVENT_CMD_STATUS
Definition: bt_event.h:168
@ BT_HFP_EVENT_HF_CONNECT
Definition: bt_event.h:169
@ BT_HFP_EVENT_AUDIO_DISCONNECT
Definition: bt_event.h:172
@ BT_HFP_EVENT_HF_DISCONNECT
Definition: bt_event.h:170
BT_A2DP_EVENT_ID
Bluetooth event ID for A2DP.
Definition: bt_event.h:129
@ BT_A2DP_EVENT_MEDIA_PACKET
Definition: bt_event.h:133
@ BT_A2DP_EVENT_CMD_STATUS
Definition: bt_event.h:130
@ BT_A2DP_EVENT_CONNECT
Definition: bt_event.h:131
@ BT_A2DP_EVENT_DISCONNECT
Definition: bt_event.h:132
BT_AVRCP_EVENT_ID
Bluetooth event ID for A2DP.
Definition: bt_event.h:141
@ BT_AVRCP_EVENT_TRACK_REACH_END
Definition: bt_event.h:149
@ BT_AVRCT_EVENT_DISCONNECT
Definition: bt_event.h:146
@ BT_AVRCP_EVENT_TRACK_REACH_START
Definition: bt_event.h:150
@ BT_AVRCP_EVENT_VOLUME_CHANGE
Definition: bt_event.h:159
@ BT_AVRCP_EVENT_BATT_STAT_CHANGE
Definition: bt_event.h:152
@ BT_AVRCP_EVENT_NOW_PLAY_CHANGE
Definition: bt_event.h:155
@ BT_AVRCP_EVENT_APP_SETT_CHANGE
Definition: bt_event.h:154
@ BT_AVRCP_EVENT_UIDS_CHANGE
Definition: bt_event.h:158
@ BT_AVRCP_EVENT_PLAY_STAT_CHANGE
Definition: bt_event.h:147
@ BT_AVRCP_EVENT_PLAY_POS_CHANGE
Definition: bt_event.h:151
@ BT_AVRCC_EVENT_CONNECT
Definition: bt_event.h:143
@ BT_AVRCP_EVENT_SYS_STATUS_CHANGE
Definition: bt_event.h:153
@ BT_AVRCP_EVENT_ADDR_PLAYER_CHANGE
Definition: bt_event.h:157
@ BT_AVRCC_EVENT_DISCONNECT
Definition: bt_event.h:144
@ BT_AVRCP_EVENT_CMD_STATUS
Definition: bt_event.h:142
@ BT_AVRCT_EVENT_CONNECT
Definition: bt_event.h:145
@ BT_AVRCP_EVENT_AVAI_PLAYER_CHANGE
Definition: bt_event.h:156
@ BT_AVRCP_EVENT_TRACK_CHANGE
Definition: bt_event.h:148
BT_COMMON_EVENT_ID
Bluetooth event ID for common function.
Definition: bt_event.h:114
@ BT_COMMON_EVENT_PAIRING_COMPLETE
Definition: bt_event.h:116
@ BT_COMMON_EVENT_INQUIRY_COMPLETE
Definition: bt_event.h:118
@ BT_COMMON_EVENT_INQUIRY_RESULT
Definition: bt_event.h:117
@ BT_COMMON_EVENT_CONN_STAT_CHANGE
Definition: bt_event.h:119
@ BT_COMMON_EVENT_BOND_INFO
Definition: bt_event.h:121
@ BT_COMMON_EVENT_CMD_STATUS
Definition: bt_event.h:115
@ BT_COMMON_EVENT_CONN_DEV_NAME
Definition: bt_event.h:120
BT_SPP_EVENT_ID
Bluetooth event ID for SPP.
Definition: bt_event.h:182
@ BT_SPP_EVENT_CONNECT
Definition: bt_event.h:183
@ BT_SPP_EVENT_DISCONNECT
Definition: bt_event.h:184
@ BT_SPP_EVENT_CONNECT_FAIL
Definition: bt_event.h:185
@ BT_SPP_EVENT_RX_DATA
Definition: bt_event.h:186
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:573
bool trackReachedEnd
Definition: bt_event.h:576
bool playStatusChange
Definition: bt_event.h:574
bool trackReachedStart
Definition: bt_event.h:577
bool addrPlayChange
Definition: bt_event.h:584
bool trackChange
Definition: bt_event.h:575
bool appSettingChange
Definition: bt_event.h:581
bool batteryStatusChange
Definition: bt_event.h:579
bool uidsChange
Definition: bt_event.h:585
bool systemStatusChange
Definition: bt_event.h:580
bool volumeChange
Definition: bt_event.h:586
bool nowPlayingChange
Definition: bt_event.h:582
bool avalPlayerChange
Definition: bt_event.h:583
bool playPosChanged
Definition: bt_event.h:578
Bluetooth LE bonding information.
Definition: bt_common.h:210
Bluetooth LE advertise report event.
Definition: bt_event.h:530
int8_t rssi
Definition: bt_event.h:533
uint8_t scan_rsp
Definition: bt_event.h:534
BT_ADDR addr
Definition: bt_event.h:537
uint8_t group_id
Definition: bt_event.h:531
uint8_t length
Definition: bt_event.h:535
uint8_t data[BLE_MAX_ADV_DATA_LEN]
Definition: bt_event.h:536
uint8_t event_id
Definition: bt_event.h:532
Definition: bt_event.h:549
struct ble_bondinfo_s * bond
Definition: bt_event.h:553
int num
Definition: bt_event.h:552
uint8_t group_id
Definition: bt_event.h:550
uint8_t event_id
Definition: bt_event.h:551
Bluetooth LE connection status change event data type.
Definition: bt_event.h:418
BT_ADDR addr
Definition: bt_event.h:422
uint8_t group_id
Definition: bt_event.h:419
bool connected
Definition: bt_event.h:423
uint8_t status
Definition: bt_event.h:424
uint8_t event_id
Definition: bt_event.h:420
uint16_t handle
Definition: bt_event.h:421
Definition: bt_event.h:432
BT_ADDR addr
Definition: bt_event.h:435
uint8_t group_id
Definition: bt_event.h:433
uint8_t event_id
Definition: bt_event.h:434
char name[BT_NAME_LEN]
Definition: bt_event.h:436
Bluetooth LE encryption result event.
Definition: bt_event.h:562
uint16_t conn_handle
Definition: bt_event.h:565
int result
Definition: bt_event.h:566
uint8_t group_id
Definition: bt_event.h:563
uint8_t event_id
Definition: bt_event.h:564
Definition: bt_event.h:541
uint16_t mtusize
Definition: bt_event.h:545
uint8_t group_id
Definition: bt_event.h:542
uint8_t event_id
Definition: bt_event.h:543
uint16_t handle
Definition: bt_event.h:544
Bluetooth LE GATT notification event.
Definition: bt_event.h:515
uint16_t conn_handle
Definition: bt_event.h:518
uint16_t length
Definition: bt_event.h:521
bool indicate
Definition: bt_event.h:520
uint8_t group_id
Definition: bt_event.h:516
uint8_t data[BLE_MAX_GATT_DATA_LEN]
Definition: bt_event.h:522
uint16_t char_handle
Definition: bt_event.h:519
uint8_t event_id
Definition: bt_event.h:517
Bluetooth LE GATT Notify request event.
Definition: bt_event.h:472
uint16_t conn_handle
Definition: bt_event.h:476
uint16_t serv_handle
Definition: bt_event.h:475
uint8_t group_id
Definition: bt_event.h:473
uint16_t char_handle
Definition: bt_event.h:477
bool enable
Definition: bt_event.h:478
uint8_t event_id
Definition: bt_event.h:474
Bluetooth LE GATT Read request event.
Definition: bt_event.h:459
uint16_t conn_handle
Definition: bt_event.h:463
uint16_t serv_handle
Definition: bt_event.h:462
uint8_t group_id
Definition: bt_event.h:460
uint16_t char_handle
Definition: bt_event.h:464
uint8_t event_id
Definition: bt_event.h:461
Bluetooth LE GATT Read response event.
Definition: bt_event.h:500
uint16_t conn_handle
Definition: bt_event.h:504
uint16_t length
Definition: bt_event.h:506
uint16_t serv_handle
Definition: bt_event.h:503
uint8_t group_id
Definition: bt_event.h:501
uint8_t data[BLE_MAX_GATT_DATA_LEN]
Definition: bt_event.h:507
uint16_t char_handle
Definition: bt_event.h:505
uint8_t event_id
Definition: bt_event.h:502
Bluetooth LE GATT Write request event.
Definition: bt_event.h:444
uint16_t conn_handle
Definition: bt_event.h:448
uint16_t length
Definition: bt_event.h:450
uint16_t serv_handle
Definition: bt_event.h:447
uint8_t group_id
Definition: bt_event.h:445
uint8_t data[BLE_MAX_GATT_DATA_LEN]
Definition: bt_event.h:451
uint16_t char_handle
Definition: bt_event.h:449
uint8_t event_id
Definition: bt_event.h:446
Bluetooth LE GATT Write response event.
Definition: bt_event.h:486
uint16_t conn_handle
Definition: bt_event.h:490
uint16_t serv_handle
Definition: bt_event.h:489
uint8_t group_id
Definition: bt_event.h:487
uint16_t char_handle
Definition: bt_event.h:491
uint8_t status
Definition: bt_event.h:492
uint8_t event_id
Definition: bt_event.h:488
Bluetooth A2DP connection event data type.
Definition: bt_event.h:305
BT_ADDR addr
Definition: bt_event.h:309
uint8_t group_id
Definition: bt_event.h:306
uint8_t event_id
Definition: bt_event.h:307
uint16_t handle
Definition: bt_event.h:308
Bluetooth A2DP receive data event data type.
Definition: bt_event.h:318
BT_ADDR addr
Definition: bt_event.h:321
uint8_t data[BT_MAX_EVENT_DATA_LEN]
Definition: bt_event.h:323
uint8_t group_id
Definition: bt_event.h:319
uint8_t event_id
Definition: bt_event.h:320
int len
Definition: bt_event.h:322
Bluetooth AVRCP connection event data type.
Definition: bt_event.h:331
BT_ADDR addr
Definition: bt_event.h:335
uint8_t group_id
Definition: bt_event.h:332
uint8_t event_id
Definition: bt_event.h:333
uint16_t handle
Definition: bt_event.h:334
Bluetooth AVRCP play position event data type.
Definition: bt_event.h:343
uint8_t group_id
Definition: bt_event.h:344
uint32_t position
Definition: bt_event.h:347
uint8_t event_id
Definition: bt_event.h:345
uint16_t handle
Definition: bt_event.h:346
Bluetooth new bonding information event data type.
Definition: bt_event.h:294
BT_ADDR addr
Definition: bt_event.h:297
uint8_t group_id
Definition: bt_event.h:295
uint8_t event_id
Definition: bt_event.h:296
Bluetooth command status event data type.
Definition: bt_event.h:235
BT_CMD_STATUS cmd_status
Definition: bt_event.h:238
uint8_t group_id
Definition: bt_event.h:236
uint8_t event_id
Definition: bt_event.h:237
Bluetooth connection status change event data type.
Definition: bt_event.h:270
BT_ADDR addr
Definition: bt_event.h:273
uint8_t group_id
Definition: bt_event.h:271
bool connected
Definition: bt_event.h:274
uint8_t event_id
Definition: bt_event.h:272
Bluetooth change device name event data type.
Definition: bt_event.h:283
uint8_t group_id
Definition: bt_event.h:284
uint8_t event_id
Definition: bt_event.h:285
char name[BT_NAME_LEN]
Definition: bt_event.h:286
Bluetooth inquiry result event data type.
Definition: bt_event.h:258
BT_ADDR addr
Definition: bt_event.h:261
uint8_t group_id
Definition: bt_event.h:259
uint8_t event_id
Definition: bt_event.h:260
char name[BT_NAME_LEN]
Definition: bt_event.h:262
Bluetooth pairing complete event data type.
Definition: bt_event.h:246
BT_PAIR_STATUS status
Definition: bt_event.h:250
BT_ADDR addr
Definition: bt_event.h:249
uint8_t group_id
Definition: bt_event.h:247
uint8_t event_id
Definition: bt_event.h:248
Bluetooth parent event data type.
Definition: bt_event.h:224
uint8_t data[BT_MAX_EVENT_DATA_LEN]
Definition: bt_event.h:227
uint8_t group_id
Definition: bt_event.h:225
uint8_t event_id
Definition: bt_event.h:226
Bluetooth HFP ag feature event data type.
Definition: bt_event.h:368
BT_ADDR addr
Definition: bt_event.h:371
BT_HFP_AG_FEATURE_FLAG ag_flag
Definition: bt_event.h:372
uint8_t group_id
Definition: bt_event.h:369
uint8_t event_id
Definition: bt_event.h:370
Bluetooth HFP at command event data type.
Definition: bt_event.h:380
char at_resp[BT_MAX_EVENT_DATA_LEN]
Definition: bt_event.h:384
BT_ADDR addr
Definition: bt_event.h:383
uint8_t group_id
Definition: bt_event.h:381
uint8_t event_id
Definition: bt_event.h:382
Bluetooth HFP connection event data type.
Definition: bt_event.h:355
BT_ADDR addr
Definition: bt_event.h:359
uint8_t group_id
Definition: bt_event.h:356
uint8_t event_id
Definition: bt_event.h:357
uint16_t handle
Definition: bt_event.h:358
BT_PROFILE_TYPE hfp_type
Definition: bt_event.h:360
Bluetooth SPP connection event data type.
Definition: bt_event.h:392
BT_ADDR addr
Definition: bt_event.h:396
uint8_t group_id
Definition: bt_event.h:393
BT_CONNECT_FAIL_REASON_ID reason
Definition: bt_event.h:397
uint8_t event_id
Definition: bt_event.h:394
uint16_t handle
Definition: bt_event.h:395
Bluetooth SPP Rx event data type.
Definition: bt_event.h:405
BT_ADDR addr
Definition: bt_event.h:408
uint8_t data[BT_MAX_EVENT_DATA_LEN]
Definition: bt_event.h:410
uint8_t group_id
Definition: bt_event.h:406
uint8_t event_id
Definition: bt_event.h:407
int len
Definition: bt_event.h:409