NymeaWifiService
class NymeaWifiService(scanner: BleScanner, connectionFactory: BleConnectionFactory, dispatcher: CoroutineDispatcher)(source)
GATT client for the nymea-networkmanager WiFi provisioning profile.
Responsibilities:
Scan for a device advertising WIRELESS_SERVICE_UUID.
Connect and subscribe to the Commander Response characteristic.
Send JSON commands (chunked into ≤20-byte BLE packets) via the Wireless Commander characteristic.
Reassemble newline-terminated JSON responses from notification packets.
Parse the nymea JSON protocol into typed Kotlin results.
Lifecycle: create once per provisioning session, call connect, use scanNetworks / provision, then close.
Constructors
Link copied to clipboard
constructor(scanner: BleScanner, connectionFactory: BleConnectionFactory, dispatcher: CoroutineDispatcher)