BLE OTA

Upload firmware over bluetooth

Usage

Full example at: https://github.com/vovagorodok/ble_ota_app

Scan configuration:

import 'package:ble_ota/ble/uuids.dart';

final bleScanner = bleCentral.createScanner(serviceIds: [serviceUuid]);

Init:

bleOta = BleOta(bleConnector: bleConnector);
bleOta.stateStream.listen((state) => print("State changed: ${state.status}"));
bleOta.init();

Upload local binary:

bleOta.uploadLocalFile(localPath: localPath);

Upload remote binary:

print("Hardware name: ${bleOta.state.deviceInfo.hardwareName}");
if (bleOta.state.remoteInfo.newestSoftware != null)
  bleOta.uploadHttpFile(url: bleOta.state.remoteInfo.newestSoftware.path!);