Open lisander-lopez opened 1 year ago
Try increasing setConnectionTimeout, i have never seen that error code before, maybe turn up ESP debug. I bet there is some kind of error or bug in esp lib not being caught here, since there is not much info
Try increasing setConnectionTimeout, i have never seen that error code before, maybe turn up ESP debug. I bet there is some kind of error or bug in esp lib not being caught here, since there is not much info
Thank you for replying! I've been pulling my hair on this for a while. I've changed the code to this (and turned on ESP debug)
#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager
void setup() {
Serial.begin(115200);
WiFiManager wm;
WiFi.mode(WIFI_STA);
wm.setDebugOutput(true);
wm.setConnectTimeout(60 * 1); // 1 minute
wm.setConnectRetries(2);
bool res;
res = wm.autoConnect(); // auto generated AP name from chipid
if(!res) {
Serial.println("Failed to connect");
ESP.restart();
}
else {
//if you get here you have connected to the WiFi
Serial.println("connected...yeey :)");
}
}
void loop() {
// put your main code here, to run repeatedly:
}
I put the output on a pastebin since it is too large/clunky to fit here https://pastebin.com/f0XtxChX Im getting things like
HANDSHAKE_TIMEOUT
AUTH_EXPIRE
ASSOC_EXPIRE
you can also see that I have retries of 2 but it increases... super weird 😂
Try taking the space out of the Wifi SSID. Maybe The-Cloud or The_Cloud versus "The Cloud". Try all lowercase and no spaces or other special characters. While spaces are technically allowed within the SSID, some implementations may not handle them well. Spaces are not permitted as the first or last character in an SSID.
Perhaps it is something with the Verizon router and/or the "IOT network" feature. Have you tried a different 2.4GHz network or router? Can you add the MAC address of the ESP32 into the "allowed" list on the router? If using DHCP, can you set a reservation for the ESP32?
Try taking the space out of the Wifi SSID. Maybe The-Cloud or The_Cloud versus "The Cloud". Try all lowercase and no spaces or other special characters. While spaces are technically allowed within the SSID, some implementations may not handle them well. Spaces are not permitted as the first or last character in an SSID.
Perhaps it is something with the Verizon router and/or the "IOT network" feature. Have you tried a different 2.4GHz network or router? Can you add the MAC address of the ESP32 into the "allowed" list on the router? If using DHCP, can you set a reservation for the ESP32?
Thank you for contributing to this issue and trying to help.
I changed my SSID to the-cloud
and it worked the first time, but subsequent reboots the same error persisted.
I do have an option to create a "guest network" I tried that and no luck :( . I even temporarily shut off all bands expect for 2.4ghz on my main network and same issue. When the ESP32 first connected to my router it was "saved" so it knew its mac address etc. which I can then disallow if I wanted to (so by default its allow). I am using DHCP but I can give a static IP based on hostname and mac address, That didn't seem to fix my problem either.
Try turning off encryption to see if it is a crypto negotiation problem. When you say "reboot", is that by a button on the dev board or disconnecting power? I have some boards that will connect once but when I push the button on the board it won't reconnect. When I disconnect and reconnect power it works. It behaves like this with my Linksys wifi. When I use the mobile hotspot feature on Windows 10 to create an AP it connects fine by pushing the button or power cycling.
This is a huge issue with pmf and deauth protection I have an open issue with esp idf it has been a while since I tested this but not sure its fixed yet
Try turning off encryption to see if it is a crypto negotiation problem. When you say "reboot", is that by a button on the dev board or disconnecting power? I have some boards that will connect once but when I push the button on the board it won't reconnect. When I disconnect and reconnect power it works. It behaves like this with my Linksys wifi. When I use the mobile hotspot feature on Windows 10 to create an AP it connects fine by pushing the button or power cycling.
Ok breaks to say it but it worked on an open network! I'm partially happy since I prefer to have a password on my AP.
This is a huge issue with pmf and deauth protection I have an open issue with esp idf it has been a while since I tested this but not sure its fixed yet
This one? https://github.com/espressif/esp-idf/issues/8192 Seems like they closed it, I am using the latest version too :/
> pio pkg update -g -p espressif32
Platform Manager: espressif32@6.3.2 is already up-to-date
Tool Manager: framework-arduinoespressif32@3.20009.0 is already up-to-date
Tool Manager: tool-esptoolpy@1.40501.0 is already up-to-date
Tool Manager: tool-mkfatfs@2.0.1 is already up-to-date
Tool Manager: tool-mklittlefs@1.203.210628 is already up-to-date
Tool Manager: tool-mkspiffs@2.230.0 is already up-to-date
Tool Manager: toolchain-xtensa-esp32@8.4.0+2021r2-patch5 is already up-to-date
Can you confirm your IDF in code?
*DLOG: [1] ESP-IDF version: 4.4.5.230614
Can you confirm your IDF in code?
*DLOG: [1] ESP-IDF version: 4.4.5.230614
I used
Serial.println("ESP-IDF version is: " + String(esp_get_idf_version()));
and got ESP-IDF version is: v4.4.4
So its not lastest, but it should include the "fix"
So I can confirm that everything works smoothly when my WiFi is left insecure, but not working with WPA2
Basic Infos
Hardware
WiFimanager Branch/Release: Master (Added git url to platform.ini) (WiFiManager @ 2.0.16-rc.2+sha.3a303ee)
Esp8266/Esp32: ESP32
Hardware: esp-wroom-32
Core Version: framework-arduinoespressif32 @ 3.20009.0 (2.0.9)
Description
When connecting to my Router I get a "0x3007" error, according to the documentation it is
[ESP_ERR_WIFI_CONN](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_wifi.html#c.ESP_ERR_WIFI_CONN) (0x3007): WiFi internal control block of station or soft-AP error
I've looked ALL OVER online (issues, ESP forum, et) I've tried stuff like:
WiFi.mode(WIFI_STA);
beforewm.autoConnect()
wm.setCleanConnect(true);
before autoConnectsetConnectTimeout
setTimeout
My router is a Verizon CR1000B if it matters. It has an "iot" network feature that just locks an AP in 2.4ghz
I would connect before, but I would have non blocking code that just tried to connect over and over and eventually it would work (sometimes in 5 mins sometimes in hours)
Any help would be appreciated thanks :)
Settings in IDE
Module: ESP32
Additional libraries: None
Sketch
Debug Messages