SimpleBLE

Examples

Example code for SimpleCBLE.

You can find the official examples in the examples/simplecble directory of the repository.

  • Scan: Scans for peripherals and prints their details.
  • Connect: Connects to a selected peripheral and lists its services.
  • Notify: Subscribes to notifications from a characteristic.

Building Examples

To build the examples:

cmake -S examples/simplecble -B build_examples
cmake --build build_examples

The examples use the refactored error API and release all returned service/manufacturer snapshots. Run the executables from build_examples/bin. See the tutorial for local hosting and backend selection, and the migration guide to update an existing application.

On this page