Libraries
bignum
binary
bitmap
ble
local
remote
bytes
core
crypto
device
encoding
esp32
expect
fixed-point
flash
font
gpio
i2c
i2s
icons
io
line-wrap
log
math
monitor
net
pulse-counter
reader
reader-writer
rmt
serial
spi
statistics
system
tls
uart
uuid
writer
zlib
Library ble
To use this library in your code:
import ble
Interfaces
Attribute
An attribute is the smallest data entity of GATT (Generic Attribute Profile).
Classes
Adapter
An adapter represents the chip or peripheral that is used to communicate over BLE.
AdapterConfig
AdapterMetadata
Advertisement
Advertisement data as either sent by advertising or received through scanning.
AdvertisementData
Deprecated. Use
Advertisement
instead.
BleUuid
A BLE Universally Unique ID.
DataBlock
A Bluetooth data block.
Exported classes
Central
The manager for creating client connections.
LocalCharacteristic
LocalDescriptor
LocalService
Defines a BLE service with characteristics.
Peripheral
The manager for advertising and managing local services.
RemoteCharacteristic
A remote characteristic belonging to a remote service.
RemoteDescriptor
RemoteDevice
A remote connected device.
RemoteScannedDevice
A remote device discovered by a scanning.
RemoteService
A service connected to a remote device through a client.
Globals
BLE-ADVERTISE-FLAGS-BREDR-UNSUPPORTED
A device that doesn't support the Bluetooth Classic radio.
Since Toit only supports BLE, this flag should always be set.
BLE-ADVERTISE-FLAGS-GENERAL-DISCOVERY
A device that is discoverable for an indefinite period of time.
See the core specification Section 9.2.4.
https://www.bluetooth.com/specifications/specs/core-specification-6-0/
BLE-ADVERTISE-FLAGS-LE-BREDR-CONTROLLER
A device that is a controller.
This device is both an LE and a BR/EDR controller.
BLE-ADVERTISE-FLAGS-LE-BREDR-HOST
A device that is a host.
This device is both an LE and a BR/EDR host.
BLE-ADVERTISE-FLAGS-LIMITED-DISCOVERY
A device that is discoverable for a limited period of time.
See the core specification Section 9.2.3.
https://www.bluetooth.com/specifications/specs/core-specification-6-0/
BLE-CONNECT-MODE-DIRECTIONAL
This device accepts a connection from a known peer device.
See the core specification Section 9.3.3.
https://www.bluetooth.com/specifications/specs/core-specification-6-0/
BLE-CONNECT-MODE-NONE
This device should not be connected to.
See the core specification Section 9.3.2.
https://www.bluetooth.com/specifications/specs/core-specification-6-0/
BLE-CONNECT-MODE-UNDIRECTIONAL
This device accepts connections from any device.
See the core specification Section 9.3.4.
https://www.bluetooth.com/specifications/specs/core-specification-6-0/
CHARACTERISTIC-PERMISSION-READ
CHARACTERISTIC-PERMISSION-READ-ENCRYPTED
CHARACTERISTIC-PERMISSION-WRITE
CHARACTERISTIC-PERMISSION-WRITE-ENCRYPTED
CHARACTERISTIC-PROPERTY-AUTHENTICATED-SIGNED-WRITES
CHARACTERISTIC-PROPERTY-BROADCAST
CHARACTERISTIC-PROPERTY-INDICATE
CHARACTERISTIC-PROPERTY-INDICATE-ENCRYPTION-REQUIRED
CHARACTERISTIC-PROPERTY-NOTIFY
CHARACTERISTIC-PROPERTY-NOTIFY-ENCRYPTION-REQUIRED
CHARACTERISTIC-PROPERTY-READ
CHARACTERISTIC-PROPERTY-WRITE
CHARACTERISTIC-PROPERTY-WRITE-WITHOUT-RESPONSE
Functions
ble-get-subscribed-clients
characteristic/
any
->
any