23#ifndef PEER_MANAGER_H__
24#define PEER_MANAGER_H__
30#include <bm/bluetooth/peer_manager/peer_manager_types.h>
189 const void *context);
608 uint32_t len, uint32_t *token);
624 uint32_t len, uint32_t *token);
766 uint16_t *lowest_ranked_peer, uint32_t *lowest_rank);
uint32_t pm_init(void)
Initialize the Peer Manager.
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_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.
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.
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_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_rank_highest(uint16_t peer_id)
Update the rank of a peer to be the highest among all stored peers.
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_peers_delete(void)
Delete all data stored for all peers.
uint32_t pm_peer_count(void)
Query the number of valid peer IDs that are available.
uint32_t pm_id_addr_set(const ble_gap_addr_t *addr)
Set the local Bluetooth identity address.
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.
void(* pm_evt_handler_t)(const struct pm_evt *pm_evt)
Event handler for events from the Peer Manager module.
Definition peer_manager_types.h:509
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_handle_get(uint16_t peer_id, uint16_t *conn_handle)
Get the connection handle of the connection with a bonded peer.
uint32_t pm_privacy_get(ble_gap_privacy_params_t *privacy_params)
Retrieve privacy settings.
pm_peer_data_id
The different types of data associated with a peer.
Definition peer_manager_types.h:116
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.
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_register(pm_evt_handler_t event_handler)
Register an event handler with the Peer Manager.
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_peer_delete(uint16_t peer_id)
Delete all data stored for a peer and free the peer ID.
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).
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_conn_sec_status_get(uint16_t conn_handle, struct pm_conn_sec_status *conn_sec_status)
Get the security status of a connection.
uint32_t pm_privacy_set(const ble_gap_privacy_params_t *privacy_params)
Configure privacy settings.
uint32_t pm_allow_list_set(const uint16_t *peers, uint32_t peer_cnt)
Set or clear the allow list.
uint32_t pm_peer_id_get(uint16_t conn_handle, uint16_t *peer_id)
Retrieve the ID of a peer, given its connection handle.
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.
void pm_local_database_has_changed(void)
Manually inform that the local database has changed.
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_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_delete(uint16_t peer_id, enum pm_peer_data_id data_id)
Delete specific data stored for a peer.
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_id_addr_get(ble_gap_addr_t *addr)
Retrieve the local Bluetooth identity address.
pm_peer_id_list_skip
Peer list filtrations. They determine which peer ID will be added to list.
Definition peer_manager.h:37
@ PM_PEER_ID_LIST_SKIP_NO_ID_ADDR
Add only peers with an ID address (static address).
Definition peer_manager.h:41
@ PM_PEER_ID_LIST_SKIP_NO_IRK
Add only peers with a valid IRK. This implies PM_PEER_ID_LIST_SKIP_NO_ID_ADDR, since all peers with I...
Definition peer_manager.h:47
@ PM_PEER_ID_LIST_SKIP_ALL
All above filters applied.
Definition peer_manager.h:51
@ PM_PEER_ID_LIST_SKIP_NO_CAR
Add only peers with Central Address Resolution characteristic set to 0.
Definition peer_manager.h:49
@ PM_PEER_ID_LIST_ALL_ID
Add all peers.
Definition peer_manager.h:39
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).
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_device_identities_list_set(const uint16_t *peers, uint32_t peer_cnt)
Function for setting and clearing the device identities list.
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_sec_params_set(ble_gap_sec_params_t *sec_params)
Provide pairing and bonding parameters to use for pairing procedures.
Structure for holding information about the service and the characteristics present on a server.
Definition ble_gatt_db.h:61
Configuration of a security procedure.
Definition peer_manager_types.h:159
Security status of a connection.
Definition peer_manager_types.h:196
Data associated with a bond to a peer.
Definition peer_manager_types.h:169