SimpleJavaBLE
Examples
SimpleJavaBLE examples in Java for scanning, connecting, subscribing to notifications, hosting a local GATT service and connecting through a Dongl.
To learn how to use SimpleJavaBLE, please refer to the examples provided in the repository.
The example project includes:
- ScanExample: Scan for nearby peripherals and print advertisement details.
- ConnectExample: Scan, choose a connectable peripheral, connect, and list services and characteristics.
- NotifyExample: Connect to a peripheral, choose a characteristic, subscribe to notifications, then unsubscribe.
- PeripheralExample: Advertise a local GATT service whose characteristic echoes writes to subscribed clients.
- DonglExample: Select a Dongl adapter, scan, and connect with pairing callbacks registered.
For setup details, see Usage, Installation, and Quickstart.
Usage
Install SimpleJavaBLE from Maven Central or build it from source, load its native library, and use SimpleBLE from Java to scan, connect and host services.
Usage
Install SimpleGoBLE, the Go binding for SimpleBLE, and use it to list adapters, scan, connect, use GATT, host local services and handle errors.
