Search packages, repositories and app categories

Package detailsv1.1.0

esptouch_smartconfig

Null-Safety Flutter ESP Touch Smart Config Plugin. Runs on android and iOS. ESP devices to connect target AP, the devices need run smart config.

AndroidiOS
30-day downloads
98
Likes
25
Pub points
150

Install package

flutter pub add esptouch_smartconfig

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A null-safe Flutter plugin enabling ESP devices to connect to a target Wi-Fi network using Smart Config. It supports both Android and iOS platforms, facilitating seamless configuration of ESP-based IoT devices by broadcasting Wi-Fi credentials via the app. The plugin is designed for use with ESP chips that support Smart Config protocol, allowing users to configure devices without manual input. Ideal for developers building IoT applications requiring quick device setup.

Use cases

  • IoT device onboarding
  • Smart home gadget setup
  • Wireless sensor network configuration
  • ESP32/ESP8266 device pairing
  • Automated Wi-Fi provisioning

Key features

  • Null-safety support
  • Cross-platform (Android & iOS)
  • ESP Smart Config integration
  • Simple API for Wi-Fi credential transmission
  • Real-time connection feedback

Suitable for

  • IoT application developers
  • Hardware integrators
  • Smart home product creators
  • Embedded systems engineers
  • Prototyping teams

Considerations

  • Requires ESP device with Smart Config firmware
  • Limited to devices supporting Smart Config
  • Network permissions required on Android
  • iOS background execution constraints
  • Dependent on correct ESP firmware implementation

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

esptouch_smartconfig

Espressif’s ESP-TOUCH protocol implements the Smart Config technology to help users connect ESP8266EX- and ESP32-embedded devices (hereinafter referred to as the device) to a Wi-Fi network through simple configuration on a smartphone flutter app.

Getting Started

Android

Add Permission android/app/src/main/AndroidManifest.xml

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
iOS

image

Add ios/Info.plist

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Used to Location's Info always for Using Beacon.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Used to Location's Info always for Using Beacon.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Used to Location's Info for Using Beacon when In Use.</string>

Usage

late Stream<ESPTouchResult>? _stream;
final Set<ESPTouchResult> _results = Set();

@override
  void initState() {
    _stream = EsptouchSmartconfig.run(widget.ssid, widget.bssid,
        widget.password, widget.deviceCount, widget.isBroadcast);
    super.initState();
  }
  
@override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        leading: IconButton(
            icon: Icon(Icons.arrow_back),
            onPressed: () {
              Navigator.of(context).pop(_results);
            }),
        backgroundColor: Colors.red,
        title: Text(
          'Task',
        ),
      ),
      body: Container(
        child: StreamBuilder<ESPTouchResult>(
          stream: _stream,
          builder: (context, AsyncSnapshot<ESPTouchResult> snapshot) {
            if (snapshot.hasError) {
              return error(context, 'Error in StreamBuilder');
            }
            switch (snapshot.connectionState) {
              case ConnectionState.active:
                _results.add(snapshot.data!);
                return resultList(context, ConnectionState.active);
              case ConnectionState.none:
                return noneState(context);
              case ConnectionState.done:
                if (snapshot.hasData) {
                  _results.add(snapshot.data!);
                  return resultList(context, ConnectionState.done);
                } else
                  return noneState(context);
              case ConnectionState.waiting:
                return waitingState(context);
            }
          },
        ),
      ),
    );
  } 

Reference

ESP Touch

https://github.com/smaho-engineering/esptouch_flutter
https://github.com/kittenbot/flutter_smartconfig
https://github.com/EspressifApp/EsptouchForIOS
https://github.com/EspressifApp/EsptouchForAndroid

Wifi Info

https://github.com/flutter/plugins

Version

iOS Version v2.2.0
Android Version v2.0.0

Categories

Source repository

Projects using this package

No data available yet.