Comments (5)
Use esp_smartconfig_set_type
function, and set type to SC_TYPE_ESPTOUCH_V2
. Then, before calling esp_smartconfig_start
function, provide crypt key into smartconfig_start_config_t
configuration struct.
Your code for setting SmartConfig to use EspTouchV2 with encryption key should look something like this:
...
esp_smartconfig_set_type(SC_TYPE_ESPTOUCH_V2);
smartconfig_start_config_t start_config = {
.esp_touch_v2_enable_crypt = true,
.esp_touch_v2_key = "SecretKeyHere123",
};
esp_smartconfig_start(&start_config);
...
Rest of the code should be the same as in your example.
from esp-smartconfig-dart.
Hi @mralperem
TL;DR: V2 is more secure than V1.
In V1, data is transmitted in plain mode, so if anyone in network intercept your data (ssid/password), he will be able to read it. In the other hand, EspTouch V2, uses key to encrypt data. When you initialize V2 protocol you need to provide key in format of string. ESP device needs to have the same key in order to decrypt received data.
from esp-smartconfig-dart.
thank you for your response. When i looked at your code i understand the difference but when i looked at the code for esp8266 provided from espressif system both protocol use the same code and there is no decrypt method. Could you provide a link for the esp8266 code you have used for esp touch v2. I might be looking at the wrong code.
from esp-smartconfig-dart.
thank you for the answer. I was able to find understand it. But do you know if does it support esp8266 or only esp32?
from esp-smartconfig-dart.
You'r welcome. It supports 8266 as well. Here is SmartConfig docs for 8266 RTOS SDK.
from esp-smartconfig-dart.
Related Issues (18)
- It can working web, desktop? HOT 3
- Fails on iOS 16.x in flutter app
- ESP pairing response issue
- esp smartconfig provisioning fails on ios HOT 3
- provisioner.listen((response)
- app ones with a blank screen and then closes automatically.
- provisioner.listen can not get any data HOT 4
- SmartConfig is not working on Android HOT 2
- Does it support multicast mode? HOT 1
- empty password
- Trouble Provisoning On Android HOT 2
- ESPTOUCH_V2 does not send acknolwdgement correctly to Flutter HOT 1
- reservedDataLengthMax = 127; HOT 3
- ssid length error HOT 3
- ESP_TOUCH V2 not working
- RangeError on short password Length HOT 4
- esp provisioning v2 not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-smartconfig-dart.