nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ pm_peer_id_get()

uint32_t pm_peer_id_get ( uint16_t conn_handle,
uint16_t * peer_id )

#include <peer_manager.h>

Retrieve the ID of a peer, given its connection handle.

Parameters
[in]conn_handleThe connection handle of the peer.
[out]peer_idThe peer ID, or PM_PEER_ID_INVALID if the peer is not bonded or conn_handle does not refer to a valid connection.
Return values
NRF_SUCCESSIf the peer ID was retrieved successfully.
NRF_ERROR_NULLIf peer_id was NULL.
NRF_ERROR_INVALID_STATEIf the Peer Manager is not initialized.