Git Product home page Git Product logo

Comments (5)

abobija avatar abobija commented on June 27, 2024 1

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.

abobija avatar abobija commented on June 27, 2024

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.

mralperem avatar mralperem commented on June 27, 2024

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.

mralperem avatar mralperem commented on June 27, 2024

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.

abobija avatar abobija commented on June 27, 2024

You'r welcome. It supports 8266 as well. Here is SmartConfig docs for 8266 RTOS SDK.

from esp-smartconfig-dart.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.