esp-nimble-cpp  1.4.1
NimBLEClientCallbacks Class Reference

Callbacks associated with a BLE client. More...

Public Member Functions

virtual void onConnect (NimBLEClient *pClient)
 Called after client connects. More...
 
virtual void onDisconnect (NimBLEClient *pClient)
 Called when disconnected from the server. More...
 
virtual bool onConnParamsUpdateRequest (NimBLEClient *pClient, const ble_gap_upd_params *params)
 Called when server requests to update the connection parameters. More...
 
virtual uint32_t onPassKeyRequest ()
 Called when server requests a passkey for pairing. More...
 
virtual void onAuthenticationComplete (ble_gap_conn_desc *desc)
 Called when the pairing procedure is complete. More...
 
virtual bool onConfirmPIN (uint32_t pin)
 Called when using numeric comparision for pairing. More...
 

Detailed Description

Callbacks associated with a BLE client.

Member Function Documentation

◆ onAuthenticationComplete()

void NimBLEClientCallbacks::onAuthenticationComplete ( ble_gap_conn_desc *  desc)
virtual

Called when the pairing procedure is complete.

Parameters
[in]descA reference to a NimBLEConnInfo instance containing the peer info.
This can be used to check the status of the connection encryption/pairing.

◆ onConfirmPIN()

bool NimBLEClientCallbacks::onConfirmPIN ( uint32_t  pin)
virtual

Called when using numeric comparision for pairing.

Parameters
[in]pinThe pin to compare with the server.
Returns
True to accept the pin.

◆ onConnect()

void NimBLEClientCallbacks::onConnect ( NimBLEClient pClient)
virtual

Called after client connects.

Parameters
[in]pClientA pointer to the calling client object.

◆ onConnParamsUpdateRequest()

bool NimBLEClientCallbacks::onConnParamsUpdateRequest ( NimBLEClient pClient,
const ble_gap_upd_params *  params 
)
virtual

Called when server requests to update the connection parameters.

Parameters
[in]pClientA pointer to the calling client object.
[in]paramsA pointer to the struct containing the connection parameters requested.
Returns
True to accept the parameters.

◆ onDisconnect()

void NimBLEClientCallbacks::onDisconnect ( NimBLEClient pClient)
virtual

Called when disconnected from the server.

Parameters
[in]pClientA pointer to the calling client object.

◆ onPassKeyRequest()

uint32_t NimBLEClientCallbacks::onPassKeyRequest ( )
virtual

Called when server requests a passkey for pairing.

Returns
The passkey to be sent to the server.