|
PebbleOS
|
LE connection events and disconnection. More...
Data Structures | |
| struct | pbl_bt_conn_params |
| Parameters of an established connection. More... | |
| struct | pbl_bt_remote_version_info |
| Link layer version of a peer, as in LL_VERSION_IND (v4.2, Vol 6, Part B, 2.4.2.13). More... | |
| struct | pbl_bt_remote_version_info_received_event |
| Remote version information of a peer was received. More... | |
| struct | pbl_bt_conn_complete_event |
| A connection was established (LE Connection Complete Event, 7.7.65.1). More... | |
| struct | pbl_bt_disconn_complete_event |
| A connection was terminated (Disconnection Complete Event, 7.7.5). More... | |
| struct | pbl_bt_conn_update_complete_event |
| Connection parameters were updated (LE Connection Update Complete Event, 7.7.65.3). More... | |
| struct | pbl_bt_encryption_change |
| Link encryption changed (Encryption Change Event, 7.7.8). More... | |
| struct | pbl_bt_addr_change |
| The address of a connected peer changed, typically once its identity was resolved. More... | |
| struct | pbl_bt_irk_change |
| The IRK of a peer changed. More... | |
Enumerations | |
| enum | pbl_bt_addr_type { PBL_BT_ADDR_TYPE_PUBLIC , PBL_BT_ADDR_TYPE_RANDOM } |
| LE address type. More... | |
Functions | |
| int | pbl_bt_gap_le_disconnect (const struct pbl_bt_device_internal *peer_address) |
| Terminate a connection. | |
| void | pbl_bt_handle_le_connection_complete_event (const struct pbl_bt_conn_complete_event *event) |
| Called when a connection is established. | |
| void | pbl_bt_handle_le_disconnection_complete_event (const struct pbl_bt_disconn_complete_event *event) |
| Called when a connection is terminated. | |
| void | pbl_bt_handle_le_encryption_change_event (const struct pbl_bt_encryption_change *event) |
| Called when the encryption of a connection changes. | |
| void | pbl_bt_handle_le_conn_params_update_event (const struct pbl_bt_conn_update_complete_event *event) |
| Called when the parameters of a connection were updated. | |
| void | pbl_bt_handle_le_connection_handle_update_address (const struct pbl_bt_addr_change *e) |
| Called when the identity address of a connected peer was resolved. | |
| void | pbl_bt_handle_le_connection_handle_update_irk (const struct pbl_bt_irk_change *e) |
| Called when a new IRK of a peer was stored. | |
| void | pbl_bt_handle_peer_version_info_event (const struct pbl_bt_remote_version_info_received_event *e) |
| Called when the link layer version of a peer was received. | |
LE connection events and disconnection.
The event structures carry the data of the HCI events of the Bluetooth Core Specification v4.2, Vol 2, Part E, 7.7, noted on each. The firmware implements the pbl_bt_handle_le_* callbacks; unless noted otherwise they are invoked on the NimBLE host task.
| struct pbl_bt_conn_params |
| struct pbl_bt_remote_version_info |
| struct pbl_bt_remote_version_info_received_event |
Remote version information of a peer was received.
| Data Fields | ||
|---|---|---|
| struct pbl_bt_device_internal | peer_address | The peer. |
| struct pbl_bt_remote_version_info | remote_version_info | The peer's version information. |
| struct pbl_bt_conn_complete_event |
A connection was established (LE Connection Complete Event, 7.7.65.1).
| Data Fields | ||
|---|---|---|
| struct pbl_bt_conn_params | conn_params | Connection parameters. |
| uint16_t | handle | Connection handle. |
| struct pbl_bt_sm_key | irk |
The peer's IRK. Valid iff is_resolved is true. |
| bool | is_master | True if the local device is the central. |
| bool | is_resolved | True if the peer's address was resolved with a stored IRK. |
| uint16_t | mtu | Current ATT MTU. |
| struct pbl_bt_device_internal | peer_address | The peer, by its identity address when it is known. |
| enum pbl_bt_hci_status | status |
Status. The NimBLE backend only reports successful connections. |
| struct pbl_bt_disconn_complete_event |
A connection was terminated (Disconnection Complete Event, 7.7.5).
| Data Fields | ||
|---|---|---|
| uint16_t | handle | Connection handle. |
| struct pbl_bt_device_internal | peer_address | The peer. |
| enum pbl_bt_hci_status | reason |
Reason of the disconnection. The NimBLE backend reports its own error codes. |
| enum pbl_bt_hci_status | status | Status of the disconnection. |
| struct pbl_bt_conn_update_complete_event |
Connection parameters were updated (LE Connection Update Complete Event, 7.7.65.3).
| Data Fields | ||
|---|---|---|
| struct pbl_bt_conn_params | conn_params | New connection parameters. |
| struct pbl_bt_addr | dev_address |
Address of the peer. The address type is not available. |
| enum pbl_bt_hci_status | status |
Status. The NimBLE backend only reports successful updates. |
| struct pbl_bt_encryption_change |
Link encryption changed (Encryption Change Event, 7.7.8).
| Data Fields | ||
|---|---|---|
| struct pbl_bt_addr | dev_address |
Address of the peer. The address type is not available. |
| bool | encryption_enabled | True if the link is now encrypted. |
| enum pbl_bt_hci_status | status |
Status. The NimBLE backend reports its own error codes. |
| struct pbl_bt_addr_change |
The address of a connected peer changed, typically once its identity was resolved.
| Data Fields | ||
|---|---|---|
| struct pbl_bt_device_internal | device | Current device address. |
| struct pbl_bt_device_internal | new_device | New device address. |
| struct pbl_bt_irk_change |
The IRK of a peer changed.
| Data Fields | ||
|---|---|---|
| struct pbl_bt_device_internal | device | The peer. |
| struct pbl_bt_sm_key | irk | Identity Resolving Key. |
| bool | irk_valid | True if irk is valid. |
| enum pbl_bt_addr_type |
| int pbl_bt_gap_le_disconnect | ( | const struct pbl_bt_device_internal * | peer_address | ) |
Terminate a connection.
Completion is reported through pbl_bt_handle_le_disconnection_complete_event().
| peer_address | The peer to disconnect from. |
| 0 | The disconnection was initiated. |
| -1 | There is no connection with peer_address. |
|
extern |
Called when the parameters of a connection were updated.
| event | The new parameters. |
|
extern |
Called when a connection is established.
| event | The connection. |
|
extern |
Called when the identity address of a connected peer was resolved.
| e | The address change. |
|
extern |
Called when a new IRK of a peer was stored.
Invoked on KernelMain by the NimBLE backend.
| e | The IRK change. |
|
extern |
Called when a connection is terminated.
| event | The disconnection. |
|
extern |
Called when the encryption of a connection changes.
| event | The encryption change. |
|
extern |
Called when the link layer version of a peer was received.
Not invoked by the NimBLE backend.
| e | The version information. |