frequently lost start connection wifi

albedo039
Posts: 4
Joined: Fri Feb 25, 2022 7:43 pm

frequently lost start connection wifi

Postby albedo039 » Fri Feb 25, 2022 7:54 pm

hello every one
i'm newbeez working with an esp32 wroom...great :D

I made my little web server on esp32 (Access Point (AP)) ... it works fine !! :mrgreen:

that said, I often crash when putting my password on my available ssid... (old age?) :? I try again 2 or 3 time before it's ok.. it works..

would there be a way to see or "getch in file" my typed password in order to see where I am stuck??

I looked at the SPIFFS library to store all that / WifiManager.. I couldn't find a way to capture my password on the fly... it's a bit pretentious, I don't know...!!

thank you for your precious help... :idea:

ESP_Sprite
Posts: 9591
Joined: Thu Nov 26, 2015 4:08 am

Re: frequently lost start connection wifi

Postby ESP_Sprite » Sun Feb 27, 2022 5:11 am

Can you explain a bit more? What code are you working on, what SDK, etc; how are you inputting your password exactly?

albedo039
Posts: 4
Joined: Fri Feb 25, 2022 7:43 pm

Re: frequently lost start connection wifi

Postby albedo039 » Sun Feb 27, 2022 12:41 pm

thank you for reading... ;)

here's my code :

Code: Select all

#include <Ambient.h>


#include <WiFiManager.h>

WiFiManager wm;
const char* ssid = "albedoz web";
const char* password = "011523239";

void setup()
{
  WiFi.mode(WIFI_STA);
  
  Serial.begin(115200);
  delay(1000);
  Serial.println("\n");
  
  if(!wm.autoConnect(ssid, password))
    Serial.println("Error login");
  else
    Serial.println("good cnx!");
}

void loop()
{
  //rst cnx
  if(touchRead(T0) < 50)
  {
    Serial.println("Suppress and back...");
    wm.resetSettings();
    ESP.restart();
  }
}
i often miss the good password (01152 01123.. :evil: ! id'like to know if there's a way to serial print the password i had typed to see what's bad..!!
do you see what i mean ??

ESP_Sprite
Posts: 9591
Joined: Thu Nov 26, 2015 4:08 am

Re: frequently lost start connection wifi

Postby ESP_Sprite » Mon Feb 28, 2022 1:03 am

Serial.println(password); maybe?

albedo039
Posts: 4
Joined: Fri Feb 25, 2022 7:43 pm

Re: frequently lost start connection wifi

Postby albedo039 » Mon Feb 28, 2022 7:22 pm

:geek: well i go back for an extremly simply prog for i understand...

this my code where i had to insert you're suggestion :

Code: Select all

#include <WiFi.h>  // i only use the library WiFi.h

const char* ssid = "albdeoweb";  // my ssid
const char* password = "aabbccddee";  // my pssw

void setup() {
  Serial.begin(115200);  // my serial mon to 115200
  delay(1000);
  Serial.println("\n");

  Serial.println("creat AP ...");
  WiFi.softAP(ssid, password);  // Init with WiFi.softAP / ssid et password

  Serial.print(" IP adress: ");
  Serial.println(WiFi.softAPIP());  // print my esp32 ip with WiFi.SoftIP
}

void loop() {


}
it seamed to be more simply, now look where to insert you'r :idea: " Serial.println(password);

ESP_Sprite
Posts: 9591
Joined: Thu Nov 26, 2015 4:08 am

Re: frequently lost start connection wifi

Postby ESP_Sprite » Tue Mar 01, 2022 1:17 am

Ah, wait, I completely missed the fact that you were trying to set up an access point, not a station, so the password is entered on your phone, not on the ESP. No, sorry, from what I recall (somewhat simplified) the WPA protocol mangles (hashes) the password so it is entirely recognizable (you can't even tell how long it is) before sending it to the access point. The access point then mangles the correct password in exactly the same way, then compares it with what it received. If the two don't match, the access point won't be able to tell you anything more than 'there's no match', the hashes are designed not to reveal any information about what the password looks like. In other words, no, the ESP32 can't print the received password as it doesn't know it.

albedo039
Posts: 4
Joined: Fri Feb 25, 2022 7:43 pm

Re: frequently lost start connection wifi

Postby albedo039 » Tue Mar 01, 2022 12:31 pm

:( of course..my problem stand in WPA security ... well ... i understand why it's not so easy to do that !! :|

many thank to you esp_sprite to open my newbee's eyes.. :D :shock:
i think we can close that topic (resolved)..
thank espressif esp32...we'v got a great forum here.. ;)
best..

Who is online

Users browsing this forum: No registered users and 114 guests