SimpleRsBLE
Examples
SimpleRsBLE examples in Rust for listing adapters, scanning, connecting, notifications, hosting a GATT service and pairing through a Dongl.
To learn how to use SimpleRsBLE, please refer to the examples provided in the repository.
The example crate includes:
- list_adapters: Print the adapters visible to SimpleRsBLE.
- scan: Scan for nearby peripherals and print advertisement details.
- connect: Scan, choose a peripheral, connect, and list services and characteristics.
- notify: Connect to a peripheral, subscribe to notifications, then unsubscribe.
- peripheral: Host a GATT service that echoes writes to subscribed clients.
- dongl: Scan with a Dongl adapter, connect to a device, and answer pairing requests from the terminal.
Run an example from the repository root:
cargo run --manifest-path examples/simplersble/Cargo.toml --bin scanFor setup details, see Usage, Installation, and Quickstart.
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.
Usage
Install SimpleJSBLE from npm and use SimpleBLE from Node.js and Electron to scan, connect, use GATT, host a local peripheral and configure backends.
