Module for managing Bluetooth LE bonding, which includes controlling encryption and pairing procedures as well as persistently storing different pieces of data that must be stored when bonded.
More...
|
| uint32_t | pm_init (void) |
| | Initialize the Peer Manager.
|
| |
| uint32_t | pm_register (pm_evt_handler_t event_handler) |
| | Register an event handler with the Peer Manager.
|
| |
| uint32_t | pm_sec_params_set (ble_gap_sec_params_t *sec_params) |
| | Provide pairing and bonding parameters to use for pairing procedures.
|
| |
| uint32_t | pm_conn_secure (uint16_t conn_handle, bool force_repairing) |
| | Establish encryption on a connection, and optionally establish a bond.
|
| |
| uint32_t | pm_conn_exclude (uint16_t conn_handle, const void *context) |
| | Exclude a connection from the Bluetooth LE event flow handled inside the Peer Manager.
|
| |
| void | pm_conn_sec_config_reply (uint16_t conn_handle, struct pm_conn_sec_config *conn_sec_config) |
| | Provide a security configuration for a link.
|
| |
| uint32_t | pm_conn_sec_params_reply (uint16_t conn_handle, ble_gap_sec_params_t *sec_params, const void *context) |
| | Provide security parameters for a link.
|
| |
| void | pm_local_database_has_changed (void) |
| | Manually inform that the local database has changed.
|
| |
| uint32_t | pm_conn_sec_status_get (uint16_t conn_handle, struct pm_conn_sec_status *conn_sec_status) |
| | Get the security status of a connection.
|
| |
| bool | pm_sec_is_sufficient (uint16_t conn_handle, struct pm_conn_sec_status *sec_status_req) |
| | Compare the security status of a connection against a baseline.
|
| |
| uint32_t | pm_lesc_public_key_set (ble_gap_lesc_p256_pk_t *public_key) |
| | Specify the public key to use for LESC operations.
|
| |
| uint32_t | pm_allow_list_set (const uint16_t *peers, uint32_t peer_cnt) |
| | Set or clear the allow list.
|
| |
| uint32_t | pm_allow_list_get (ble_gap_addr_t *addrs, uint32_t *addr_cnt, ble_gap_irk_t *irks, uint32_t *irk_cnt) |
| | Retrieve the previously set allow list.
|
| |
| uint32_t | pm_device_identities_list_set (const uint16_t *peers, uint32_t peer_cnt) |
| | Function for setting and clearing the device identities list.
|
| |
| uint32_t | pm_id_addr_set (const ble_gap_addr_t *addr) |
| | Set the local Bluetooth identity address.
|
| |
| uint32_t | pm_id_addr_get (ble_gap_addr_t *addr) |
| | Retrieve the local Bluetooth identity address.
|
| |
| uint32_t | pm_privacy_set (const ble_gap_privacy_params_t *privacy_params) |
| | Configure privacy settings.
|
| |
| uint32_t | pm_privacy_get (ble_gap_privacy_params_t *privacy_params) |
| | Retrieve privacy settings.
|
| |
| bool | pm_address_resolve (const ble_gap_addr_t *addr, const ble_gap_irk_t *irk) |
| | Resolve a resolvable address with an identity resolution key (IRK).
|
| |
| uint32_t | pm_conn_handle_get (uint16_t peer_id, uint16_t *conn_handle) |
| | Get the connection handle of the connection with a bonded peer.
|
| |
| uint32_t | pm_peer_id_get (uint16_t conn_handle, uint16_t *peer_id) |
| | Retrieve the ID of a peer, given its connection handle.
|
| |
| uint32_t | pm_peer_id_list (uint16_t *peer_list, uint32_t *const list_size, uint16_t first_peer_id, enum pm_peer_id_list_skip skip_id) |
| | Retrieve a filtered list of peer IDs.
|
| |
| uint16_t | pm_next_peer_id_get (uint16_t prev_peer_id) |
| | Get the next peer ID in the sequence of all used peer IDs.
|
| |
| uint32_t | pm_peer_count (void) |
| | Query the number of valid peer IDs that are available.
|
| |
|
Functions for manipulating peer data.
|
| uint32_t | pm_peer_data_load (uint16_t peer_id, enum pm_peer_data_id data_id, void *data, uint32_t *len) |
| | Retrieve the stored data of a peer.
|
| |
| uint32_t | pm_peer_data_bonding_load (uint16_t peer_id, struct pm_peer_data_bonding *data) |
| | Read a peer's bonding data (PM_PEER_DATA_ID_BONDING).
|
| |
| uint32_t | pm_peer_data_remote_db_load (uint16_t peer_id, struct ble_gatt_db_srv *data, uint32_t *len) |
| | Read a peer's remote DB values. (PM_PEER_DATA_ID_GATT_REMOTE).
|
| |
| uint32_t | pm_peer_data_app_data_load (uint16_t peer_id, void *data, uint32_t *len) |
| | Read a peer's application data. (PM_PEER_DATA_ID_APPLICATION).
|
| |
| uint32_t | pm_peer_data_store (uint16_t peer_id, enum pm_peer_data_id data_id, const void *data, uint32_t len, uint32_t *token) |
| | Set or update stored data of a peer.
|
| |
| uint32_t | pm_peer_data_bonding_store (uint16_t peer_id, const struct pm_peer_data_bonding *data, uint32_t *token) |
| | Set or update a peer's bonding data (PM_PEER_DATA_ID_BONDING).
|
| |
| uint32_t | pm_peer_data_remote_db_store (uint16_t peer_id, const struct ble_gatt_db_srv *data, uint32_t len, uint32_t *token) |
| | Set or update a peer's remote DB values. (PM_PEER_DATA_ID_GATT_REMOTE).
|
| |
| uint32_t | pm_peer_data_app_data_store (uint16_t peer_id, const void *data, uint32_t len, uint32_t *token) |
| | Set or update a peer's application data. (PM_PEER_DATA_ID_APPLICATION).
|
| |
| uint32_t | pm_peer_data_delete (uint16_t peer_id, enum pm_peer_data_id data_id) |
| | Delete specific data stored for a peer.
|
| |
| uint32_t | pm_peer_new (uint16_t *new_peer_id, struct pm_peer_data_bonding *bonding_data, uint32_t *token) |
| | Manually add a peer to the non-volatile storage.
|
| |
| uint32_t | pm_peer_delete (uint16_t peer_id) |
| | Delete all data stored for a peer and free the peer ID.
|
| |
| uint32_t | pm_peers_delete (void) |
| | Delete all data stored for all peers.
|
| |
| uint32_t | pm_peer_ranks_get (uint16_t *highest_ranked_peer, uint32_t *highest_rank, uint16_t *lowest_ranked_peer, uint32_t *lowest_rank) |
| | Find the highest and lowest ranked peers.
|
| |
| uint32_t | pm_peer_rank_highest (uint16_t peer_id) |
| | Update the rank of a peer to be the highest among all stored peers.
|
| |
Module for managing Bluetooth LE bonding, which includes controlling encryption and pairing procedures as well as persistently storing different pieces of data that must be stored when bonded.
The API consists of functions for configuring the pairing and encryption behavior of the device and functions for manipulating the stored data.
This module uses ZMS to interface with persistent storage. It uses a Devicetree storage partition exclusive to the Peer Manager.