1#ifndef NIMBLECONNINFO_H_
2#define NIMBLECONNINFO_H_
4#include "NimBLEAddress.h"
12 ble_gap_conn_desc m_desc;
35 uint16_t
getMTU() {
return ble_att_mtu(m_desc.conn_handle); }
38 bool isMaster() {
return (m_desc.role == BLE_GAP_ROLE_MASTER); }
41 bool isSlave() {
return (m_desc.role == BLE_GAP_ROLE_SLAVE); }
44 bool isBonded() {
return (m_desc.sec_state.bonded == 1); }
47 bool isEncrypted() {
return (m_desc.sec_state.encrypted == 1); }
A BLE device address.
Definition: NimBLEAddress.h:39
A model of a BLE client.
Definition: NimBLEClient.h:39
Connection information.
Definition: NimBLEConnInfo.h:9
uint16_t getConnLatency()
Gets the allowable latency for this connection (unit = number of intervals)
Definition: NimBLEConnInfo.h:32
uint8_t getSecKeySize()
Gets the key size used to encrypt the connection.
Definition: NimBLEConnInfo.h:53
bool isMaster()
Check if we are in the master role in this connection.
Definition: NimBLEConnInfo.h:38
bool isAuthenticated()
Check if the the connection has been authenticated.
Definition: NimBLEConnInfo.h:50
uint16_t getConnHandle()
Gets the connection handle of the connected peer.
Definition: NimBLEConnInfo.h:23
NimBLEAddress getIdAddress()
Gets the ID address of the connected peer.
Definition: NimBLEConnInfo.h:20
uint16_t getConnTimeout()
Gets the supervision timeout for this connection (in 10ms units)
Definition: NimBLEConnInfo.h:29
bool isEncrypted()
Check if the connection in encrypted.
Definition: NimBLEConnInfo.h:47
uint16_t getMTU()
Gets the maximum transmission unit size for this connection (in bytes)
Definition: NimBLEConnInfo.h:35
uint16_t getConnInterval()
Gets the connection interval for this connection (in 1.25ms units)
Definition: NimBLEConnInfo.h:26
bool isSlave()
Check if we are in the slave role in this connection.
Definition: NimBLEConnInfo.h:41
NimBLEAddress getAddress()
Gets the over-the-air address of the connected peer.
Definition: NimBLEConnInfo.h:17
bool isBonded()
Check if we are connected to a bonded peer.
Definition: NimBLEConnInfo.h:44
The model of a BLE server.
Definition: NimBLEServer.h:46