NimBLE-Arduino 1.4.2
Loading...
Searching...
No Matches
NimBLEClientCallbacks Class Reference

Callbacks associated with a BLE client. More...

#include <NimBLEClient.h>

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 pointer to the struct containing the connection information.
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.