SimpleGoBLE
Examples
Runnable SimpleGoBLE examples in Go that list adapters and backends, scan, read a characteristic, host a GATT service and connect through a Dongl.
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/donglFor binding development, see the contributor guide. For installation, ownership, and callbacks, see Usage.
Usage
Install SimpleGoBLE, the Go binding for SimpleBLE, and use it to list adapters, scan, connect, use GATT, host local services and handle errors.
Usage
Install SimpleRsBLE from crates.io and use SimpleBLE from Rust to scan, connect, handle errors, configure backends, use a Dongl and host a peripheral.
