Examples
Code examples for SimpleBLE.
To learn how to use SimpleBLE, please refer to the examples provided in the repository. Those examples with a _safe suffix use the noexcept version of the library.
The following list briefly describes each example provided:
List Adapters
This example shows how to list all available Bluetooth adapters on the system. It prints the identifier and MAC address of each adapter.
Scan
This example demonstrates how to scan for nearby BLE devices. It sets up callbacks to print information about devices as they are found and updated.
Connect
This example connects to a specific BLE device (or the first one found) and lists its services and characteristics. It demonstrates the complete flow of scanning, connecting, and service discovery.
Read
This example shows how to read the value of a specific characteristic.
Write
This example shows how to write a value to a specific characteristic.
Notify
This example demonstrates how to subscribe to notifications on a characteristic and receive updates asynchronously.
