Xinyuan-LilyGO / LilyGo-LoRa-Series

LILYGO LoRa Series examples
602 stars 168 forks source link

WiFi AP "password incorrect" in one T3S3 board #171

Open moshe-braner opened 3 weeks ago

moshe-braner commented 3 weeks ago

I cannot connect to the wifi network of one of my T3S3 boards (out of 3) when it is in SoftAP mode. The same .bin flashed into another board of same model works without problems. Also, the same board that does not connect in SoftAP mode connects with no problems if set instead to be a client on the house wifi network. How can this happen? Is the hardware in this specific board defective? In a way that is specific to the wifi encryption in SoftAP mode? Or is there a bug in a library, that is specific to this board? For example, perhaps the encryption algorithm uses the chip ID or MAC address in a way that can fail on some boards and not others?

lewisxhe commented 2 weeks ago

Is the AP generated normally? If the AP hotspot is generated normally, use the simplest data flow to test whether the web page can be opened. If the AP password is incorrect, then you should check the password setting or set it to no password

lewisxhe commented 2 weeks ago

https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiAccessPoint/WiFiAccessPoint.ino

Use this example to test, and note that the default account and password need to be changed.

// Set these to your desired credentials.
const char *ssid = "yourAP";
const char *password = "yourPassword";
moshe-braner commented 2 weeks ago

Thanks Lewis. But I don't understand how trying to access the web page would help. I cannot connect to the wifi network itself (the AP), it tells me "password incorrect". But the password is correct. The exact same compiled binary, flashed onto another T3S3 board, works correctly - I can connect to the AP network it creates, and then the rest of the program runs normally. Even the board that does not allow the connection runs normally otherwise, and after I load the house wifi SSID and password into it (via the SD card) then it connects to the house wifi with no problems. Only the initial WiFi AP fails with the "password incorrect" message, and only on this board, not the other identical board with the identical binary.

lewisxhe commented 2 weeks ago

Maybe you can try to erase the internal data of the flash and then test it again.

tools

image

lyusupov commented 1 week ago
image image
moshe-braner commented 2 days ago

I finally remembered to do the test, used the ESPtool to "erase the flash", and that fixed the problem: after I uploaded my program again (also via the ESPtool with the right auxiliary files) it was possible to connect to the WiFi AP it created, with the password that is hardcoded into the program. BTW (lyusupov) I compiled this program with ESP Core 2.0.17, which I had to shift to since older versions (prior to 2.0.15) have a bug regarding the S3 that prevents "Serial" output via USB and/or hangs on Serial output (appears to not boot), depending on the "USB CDC on boot" setting.

Strangely, the two other T3S3 boards that I bought at the same time with the same software (Meshtastic) installed at the factory did not have this problem.

lyusupov commented 2 days ago
image