ble_ota 1.1.0 copy "ble_ota: ^1.1.0" to clipboard
ble_ota: ^1.1.0 copied to clipboard

Upload firmware over bluetooth.

BLE OTA #

Upload firmware over bluetooth

Usage #

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

Scan configuration:

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

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

Read info:

infoReader = InfoReader(bleConnector: bleConnector);
infoReader.stateStream.listen((state) => print("Read state changed: ${state.status}"));
infoReader.read(manufacturesDictUrl: manufacturesDictUrl);

Upload local binary:

uploader = Uploader(bleConnector: bleConnector);
uploader.stateStream.listen((state) => print("Upload state changed: ${state.status}"));
uploader.uploadLocalFile(localPath: localPath, maxMtu: maxMtu);

Upload remote binary:

print("Hardware name: ${infoReader.state.deviceInfo.hardwareName}");
if (infoReader.state.remoteInfo.newestSoftware != null)
  uploader.uploadHttpFile(url: infoReader.state.remoteInfo.newestSoftware.path!, maxMtu: maxMtu);
1
likes
0
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

Upload firmware over bluetooth.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

archive, ble_backend, flutter, http, meta, yaml

More

Packages that depend on ble_ota