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

套件詳情v3.0.0

esp_smartconfig

EspTouch 與 EspTouchV2 的 SmartConfig 配置協議實作。純 Dart。適用於所有平台。

AndroidiOSmacOSWindowsLinux
近 30 天下載
580
喜歡數
46
Pub 分數
160

安裝套件

flutter pub add esp_smartconfig

套件介紹

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

一個用於物聯網設備設定的 Esptouch 與 EsptouchV2 智能設定協定的 Dart 實作。可讓 ESP8266/ESP32 設備透過智慧型手機或桌面應用程式無縫連接 Wi-Fi,無需直接網路存取。完全平台無關,支援 Android、iOS、macOS、Windows 與 Linux。專為希望在跨平台 Flutter 應用中整合零接觸裝置配對功能的開發者設計。此套件完全以 Dart 編寫,無原生相依性,確保在所有支援平台上的相容性。

適用情境

  • 物聯網裝置接駁
  • 智慧家庭裝置設定
  • 嵌入式設備配置
  • 跨平台 Wi-Fi 配置
  • 自動設備註冊

主要特色

  • Esptouch 與 EsptouchV2 支援
  • 純 Dart 實現
  • 多平台相容性
  • 無需原生程式碼
  • 輕量且高效
  • 安全的Wi-Fi憑證傳輸

適合對象

  • Flutter 開發人員建構物聯網應用
  • 使用ESP晶片的硬體整合商
  • 需要零接觸設備設定的應用程式
  • 跨平台行動/桌面解決方案
  • 避免原生平台程式碼的專案

使用建議

  • 需要相容的 ESP8266/ESP32 固件
  • 移動平台所需的網路權限
  • 僅限支援Esptouch協定的裝置
  • 不處理設定後的裝置重新啟動
  • 最佳用於本地網路環境

原始 README

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

esp_smartconfig

pub version license

Dart implementation of EspTouch provisioner. Supports Android, iOS, Windows, Linux and macOS.

Implemented protocols

  • EspTouch
  • EspTouch V2

Supported platforms

All non-web platforms are supported. Web platform is not supported mainly because browsers does not allow UDP communication.

If you are going to use this library on Desktop platforms make sure that UDP port 18266 is open in firewall for incoming data.

Breaking Change iOS 14.6/16

The breaking change was implemented with 14.6. However, it seems to be the case that the mentioned problem only occurs on devices with iOS version 16. It results in the fact that no connection to the ESP can be established.

How to:

  • You need an Apple-Developer account
  • After the Dev-Account has been approved, you have to make a request via this form to be allowed to use the Multicast Api.
  • Then you can follow this guide (new process)

Demo videos

Console App Flutter Mobile App
Demo Video - Console App Demo Video - Flutter Mobile App

Example

Several examples of using this library are available in example folder.

import 'package:esp_smartconfig/esp_smartconfig.dart';

final provisioner = Provisioner.espTouch();

provisioner.listen((response) {
    print("Device ${response.bssidText} connected to WiFi!");
});

try {
    await provisioner.start(ProvisioningRequest.fromStrings(
        ssid: "NETWORK NAME",
        bssid: "ROUTER BSSID", // Optional
        password: "NETWORK PASSWORD",
    ));

    // If you are going to use this library in Flutter
    // this is good place to show some Dialog and wait for exit
    //
    // Or simply you can delay with Future.delayed function
    await Future.delayed(Duration(seconds: 10));
} catch (e, s) {
    print(e);
}

// Provisioning does not have any timeout so it needs to be
// stopped manually
provisioner.stop();

SmartConfig

The SmartConfigTM is a provisioning technology to connect a new Wi-Fi device to a Wi-Fi network.

The advantage of this technology is that the device does not need to directly know SSID or password of an Access Point (AP). Those information is provided using this library. This is particularly important to headless device and systems, due to their lack of a user interface.

Author

GitHub: abobija
Homepage: abobija.com

License

MIT

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案