esptouch_smartconfig
नल-सेफ्टी फ्लटर एसपी टच स्मार्ट कॉन्फ़िग प्लगइन। एंड्रॉइड और आईओएस पर चलता है। एसपी डिवाइस लक्ष्य एपी के लिए कनेक्ट करने के लिए, डिवाइस को स्मार्ट कॉन्फ़िग चलाना आवश्यक है।
jpoh281/esptouch_smartconfig open-source repository details.
{"sdk":"flutter"}{"sdk":"flutter"}यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
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.
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" />
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>
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);
}
},
),
),
);
}
https://github.com/smaho-engineering/esptouch_flutter
https://github.com/kittenbot/flutter_smartconfig
https://github.com/EspressifApp/EsptouchForIOS
https://github.com/EspressifApp/EsptouchForAndroid
https://github.com/flutter/plugins