esp_smartconfig 2.0.3 copy "esp_smartconfig: ^2.0.3" to clipboard
esp_smartconfig: ^2.0.3 copied to clipboard

EspTouch and EspTouchV2 implementations of SmartConfig provisioning protocols. Plain Dart. All platforms.

example/example.dart

import 'dart:io';

import 'package:esp_smartconfig/esp_smartconfig.dart';
import 'package:loggerx/loggerx.dart';

void main() async {
  logging.level = LogLevel.debug;

  final provisioner = Provisioner.espTouch();

  provisioner.listen((response) {
    log.info("\n"
        "\n------------------------------------------------------------------------\n"
        "Device ($response) is connected to WiFi!"
        "\n------------------------------------------------------------------------\n");
  });

  try {
    await provisioner.start(ProvisioningRequest.fromStrings(
      ssid: "Renault 1.9D",
      bssid: "f8:d1:11:bf:28:5c", // optional
      password: "renault19",
    ));

    await Future.delayed(Duration(seconds: 10));
  } catch (e, s) {
    log.error(e, s);
  }

  provisioner.stop();
  exit(0);
}
39
likes
150
points
410
downloads

Publisher

verified publisherabobija.com

Weekly Downloads

EspTouch and EspTouchV2 implementations of SmartConfig provisioning protocols. Plain Dart. All platforms.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

loggerx, pointycastle

More

Packages that depend on esp_smartconfig