Skip to main content

Module ble

Module ble 

Source
Expand description

Safe wrapper for the ESP-IDF NimBLE BLE host.

Modules§

gap
NimBLE GAP: device name, connection events, and advertising.
gatt
NimBLE GATT: shared types and helpers.
l2cap
NimBLE L2CAP connection-oriented channels (CoC): a credit-based data pipe that runs parallel to GATT (both over a GAP connection), exposed as operations on the BleDriver.
mbuf
Safe interaction with the NimBLE os_mbuf buffer system

Structs§

BleAddr
BleDriver
The NimBLE host handle and primary entrypoint to BLE.
BleError
BleSecurity
Security Manager (SMP) configuration, applied via BleDriver::set_security before the host starts.

Enums§

BleUuid
A BLE UUID, either 16-bit (assigned) or 128-bit (vendor-specific).
HostEvent
Host-lifecycle events, delivered to the host_subscribe hook.

Constants§

CONN_HANDLE_NONE
The placeholder connection handle NimBLE uses for accesses that did not originate from a peer (BLE_HS_CONN_HANDLE_NONE) — e.g. the local read that fetches a characteristic value when a notification is sent without an explicit payload. Attribute permissions are not checked for those.

Functions§

ensure_addr
Attempt to configure at least one BLE address; how this is done is hardware-specific. If prefer_random is true, prefer using a random address even if a public address is configured.
id_copy_addr
Read back the device’s identity address of the given type.

Type Aliases§

ConnHandle
A connection handle (NimBLE’s conn_handle). A connection is a cross-cutting concept — born at the GAP layer and used by the GATT server, the GATT client, and L2CAP — so it lives at the root rather than in any one subsystem module.