搜尋套件、儲存庫與 APP 分類

套件詳情v1.1.0

esptouch_smartconfig

空值安全 Flutter ESP Touch 智能設定外掛程式。可在 Android 與 iOS 上執行。ESP 設備連接目標 AP,設備需執行智能設定。

AndroidiOS
近 30 天下載
98
喜歡數
25
Pub 分數
150

安裝套件

flutter pub add esptouch_smartconfig

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個空安全的 Flutter 插件,讓 ESP 設備能使用 Smart Config 連接到目標 Wi-Fi 網路。支援 Android 與 iOS 平台,透過應用程式廣播 Wi-Fi 憑證,實現 ESP 基於物聯網裝置的無縫設定。此插件專為支援 Smart Config 協定的 ESP 芯片設計,讓使用者無需手動輸入即可設定裝置。非常適合需要快速裝置設定的物聯網應用開發者。

適用情境

  • 物聯網裝置接駁
  • 智慧家庭裝置設定
  • 無線感測器網路設定
  • ESP32/ESP8266 裝置配對
  • 自動 Wi-Fi 設定

主要特色

  • 空值安全性支援
  • 跨平台(Android & iOS)
  • ESP Smart Config 集成
  • 用於Wi-Fi憑證傳輸的簡單API
  • 即時連接反饋

適合對象

  • 物聯網應用開發者
  • 硬體整合商
  • 智慧家庭產品創作者
  • 嵌入式系統工程師
  • 原型開發團隊

使用建議

  • 需要具備智慧配置韌體的ESP設備
  • 僅限支援智慧設定的裝置
  • Android 上所需的網路權限
  • iOS 後台執行限制
  • 取決於正確的ESP韌體實現

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

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

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。