SimpleBLE

Examples

Runnable Bluetooth client and GATT hosting examples for SimpleGoBLE.

The examples live alongside the other SimpleBLE binding examples:

  • list_adapters: Enumerate adapters directly and print names, addresses, and power state.
  • list_backends: Enumerate backends and list the adapters provided by each one.
  • scan: Discover peripherals and print their names, addresses, and signal strength.
  • read: Connect to a peripheral and read a GATT characteristic.
  • peripheral: Host a GATT service that echoes writes to subscribed clients.
  • dongl: Scan with a Dongl adapter, then optionally connect and answer pairing requests.

Run an example:

go run github.com/simpleble/simplegoble/examples/list_adapters
go run github.com/simpleble/simplegoble/examples/list_backends
go run github.com/simpleble/simplegoble/examples/scan
go run github.com/simpleble/simplegoble/examples/read
go run github.com/simpleble/simplegoble/examples/peripheral
go run github.com/simpleble/simplegoble/examples/dongl

For binding development, see the contributor guide. For installation, ownership, and callbacks, see Usage.