패키지, 저장소 및 앱 카테고리 검색

패키지 상세v1.1.0

esptouch_smartconfig

널 안전성 플러터 ESP 터치 스마트 구성 플러그인. Android 및 iOS에서 실행됩니다. ESP 장치가 대상 AP에 연결하려면 장치가 스마트 구성 기능을 실행해야 합니다.

AndroidiOS
30일 다운로드
98
좋아요
25
Pub 점수
150

패키지 설치

flutter pub add esptouch_smartconfig

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

null 안전한 Flutter 플러그인으로, 스마트 구성(Smart Config)을 사용하여 ESP 장치를 대상 Wi-Fi 네트워크에 연결할 수 있습니다. 이 플러그인은 Android 및 iOS 플랫폼을 모두 지원하며, 앱을 통해 Wi-Fi 자격 증명을 브로드캐스트함으로써 ESP 기반 IoT 장치의 원활한 설정을 가능하게 합니다. 스마트 구성 프로토콜을 지원하는 ESP 칩과 함께 사용하도록 설계되어, 사용자가 수동 입력 없이 장치를 설정할 수 있도록 합니다. 빠른 장치 설정이 필요한 IoT 애플리케이션 개발자에게 이상적입니다.

사용 사례

  • IoT 장치 온보딩
  • 스마트 홈 기기 설정
  • 무선 센서 네트워크 구성
  • ESP32/ESP8266 장치 페어링
  • 자동 Wi-Fi 프로비저닝

주요 기능

  • 널 안전성 지원
  • 크로스 플랫폼(안드로이드 및 iOS)
  • ESP Smart Config 통합
  • Wi-Fi 자격 증명 전송을 위한 간단한 API
  • 실시간 연결 피드백

적합한 대상

  • IoT 애플리케이션 개발자
  • 하드웨어 통합업체
  • 스마트 홈 제품 제작자
  • 임베디드 시스템 엔지니어
  • 프로토타이핑 팀

고려 사항

  • 스마트 구성 펌웨어가 탑재된 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

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.