-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
difference between protocols #7
Comments
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. |
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. |
Use 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. |
thank you for the answer. I was able to find understand it. But do you know if does it support esp8266 or only esp32? |
You'r welcome. It supports 8266 as well. Here is SmartConfig docs for 8266 RTOS SDK. |
Hello,
What is the difference between EspTouch vs EspTouch V2? Which one should i use and why? Could you please explain this
The text was updated successfully, but these errors were encountered: