Callbacks associated with the operation of a BLE server.
More...
#include <NimBLEServer.h>
Callbacks associated with the operation of a BLE server.
◆ onAuthenticationComplete()
void NimBLEServerCallbacks::onAuthenticationComplete |
( |
ble_gap_conn_desc * |
desc | ) |
|
|
virtual |
Called when the pairing procedure is complete.
- Parameters
-
[in] | desc | A pointer to the struct containing the connection information.
This can be used to check the status of the connection encryption/pairing. |
◆ onConfirmPIN()
bool NimBLEServerCallbacks::onConfirmPIN |
( |
uint32_t |
pin | ) |
|
|
virtual |
Called when using numeric comparision for pairing.
- Parameters
-
[in] | pin | The pin to compare with the client. |
- Returns
- True to accept the pin.
◆ onConnect() [1/2]
void NimBLEServerCallbacks::onConnect |
( |
NimBLEServer * |
pServer | ) |
|
|
virtual |
Handle a client connection. This is called when a client connects.
- Parameters
-
[in] | pServer | A pointer to the BLE server that received the client connection. |
Default callback handlers
◆ onConnect() [2/2]
void NimBLEServerCallbacks::onConnect |
( |
NimBLEServer * |
pServer, |
|
|
ble_gap_conn_desc * |
desc |
|
) |
| |
|
virtual |
Handle a client connection. This is called when a client connects.
- Parameters
-
[in] | pServer | A pointer to the BLE server that received the client connection. |
[in] | desc | A pointer to the connection description structure containig information about the connection parameters. |
◆ onDisconnect() [1/2]
void NimBLEServerCallbacks::onDisconnect |
( |
NimBLEServer * |
pServer | ) |
|
|
virtual |
Handle a client disconnection. This is called when a client disconnects.
- Parameters
-
[in] | pServer | A reference to the BLE server that received the existing client disconnection. |
◆ onDisconnect() [2/2]
void NimBLEServerCallbacks::onDisconnect |
( |
NimBLEServer * |
pServer, |
|
|
ble_gap_conn_desc * |
desc |
|
) |
| |
|
virtual |
Handle a client disconnection. This is called when a client discconnects.
- Parameters
-
[in] | pServer | A pointer to the BLE server that received the client disconnection. |
[in] | desc | A pointer to the connection description structure containing information about the connection. |
◆ onMTUChange()
void NimBLEServerCallbacks::onMTUChange |
( |
uint16_t |
MTU, |
|
|
ble_gap_conn_desc * |
desc |
|
) |
| |
|
virtual |
Called when the connection MTU changes.
- Parameters
-
[in] | MTU | The new MTU value. |
[in] | desc | A pointer to the connection description structure containing information about the connection. |
◆ onPassKeyRequest()
uint32_t NimBLEServerCallbacks::onPassKeyRequest |
( |
| ) |
|
|
virtual |
Called when a client requests a passkey for pairing.
- Returns
- The passkey to be sent to the client.