Closed oly99 closed 5 years ago
Looks like an incompatible WiFi security. What is your AP and how is it set up?
@lbernstone its a tenda ac18 with standard setup do need to give the esp32 a fixed ip then ? the rouer has ICMP Flood Attack Defense: TCP Flood Attack Defense: UDP Flood Attack Defense: Forbid WAN Ping: all enabled
The device is not authenticating, so a static IP is not going to work either. Your AP is not allowing the esp to connect, so you will need to wireshark the process to see what is failing.
I am having the same problem. Stable esp code now very seldomly connects to Arris XB6 modem since it was installed.
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:360] _eventCallback(): Reason: 2 - AUTH_EXPIRE [D][WiFiGeneric.cpp:345] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:345] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:360] _eventCallback(): Reason: 2 - AUTH_EXPIRE [D][WiFiGeneric.cpp:345] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:345] _eventCallback(): Event: 5 - STA_DISCONNECTED [W][WiFiGeneric.cpp:360] _eventCallback(): Reason: 2 - AUTH_EXPIRE [D][WiFiGeneric.cpp:345] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START
In my case ESP32 dev kit does not reconnect automatically, i need to either call WiFi.reconnect() or Wifi.Begin() again in loop.
OP has a very specific connection error. If you do not have this problem, or a solution for him, then you are not solving the issue.
@lbernstone thanks i will install wireshark and have a look tonight is there anything specific i need to be looking for in the wifi packets
@lbernstone ok i turned on my guest network and it connects to 192.168.10.139 but gateway etc is 192.168.0.1 so im guessing that 192.168.10.xxx is to do with it being the guest network separate from my other one
i did notice something weard with my other esp sonnoff that it kept on being given 192.168.0.1 as its ip and then would not connect after as thats reserved for the main router address i had to mess with tasmota to get it a fixed ip now its ok i think it was because IP Address was 192.168.0.1 Subnet Mask: 255.255.255.0 DHCP Server had IP Address Range: 192.168.0. 1 -200 so this clashed i have now changed the dhcp ip range to 10-200 not 1-200 . i dont think that was helping either hopped back on regular AP not working again
ok looks like ive found the issue i had to add the esp32 mac address to my routers mac filtering white list
it now connects at least at the moment the mqtt is not connecting how ever but i will check the code to see if its set correctly
ok got mqtt to connect and now can see on node red so all seems ok and fixed
many thanks for your help
It seem for me, you use Pin14 and 22 for measuring temperature. These Pins are ADC2 pins. As described by the ESP32 manufacturer, the ADC2 pins are used by the Wifi driver. you can use these Pins for ADC measuring if the Wifi is off (driver unloaded).Me too, stumble about this and wondering about unstable Wifi.
I'm using pin14 for digital purposes (digital output to drive a LED). I've had some wifi connection problems in my projects, and I don't know if those problems are by use this pin.
Are there some problems for wifi connections if pin14 is used as a digital output?
As mentioned... GPIO14 (the interrupt) is used by Wifi. You Need to disable Wi-Fi first, in you like to use the Pin for other things.
Pytho
As mentioned... GPIO14 (the interrupt) is used by Wifi. You Need to disable Wi-Fi first, in you like to use the Pin for other things.
Could you show me where do you find that in the documentation?
I understoot from documentation this (tell me if I wrong): If pin14 will be use for ADC purposes, Wi-Fi must be disable, because is a requirement for ADC, not for wifi-driver.
Thanks.
I think, it is not related to the special function of analog-digital conversion. It is related to the system itself, the control of interrupts, piping of signal flow. Pin14 can be used for IO, but shares the interrupt with Wifi. That can leads into misfunction while switching between Wifi and IO on system driver level. My suspicion: the same behavior have the I2C Pins.
https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/adc.html
@oly99 , i am having the same issue, after you added the mac address onto your filter list did you do anything else to get the esp32 to connect t wifi?
I have same observations as Pythonaire - if I use ADC2 pins for something that requires interrupts this impacts WiFi. In my case I used ports 26 and 27 for UART2 and WiFi couldn't connect to AP after soft reset. After moving UART2 pins to 16, 17, there were no more issues with WiFi connectivity.
In my case ESP32 dev kit does not reconnect automatically, i need to either call WiFi.reconnect() or Wifi.Begin() again in loop.
Can you please share the code? And is there any way to compile micropython in arduino?
esp32 WIFI not connecting for MOTO mobile I tried simple wifi code
const char ssid = "motog4"; const char password = "mymobilemoto";
void setup() {
Serial.begin(115200); //connect to WiFi Serial.printf("Connecting to %s ", ssid); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println(" CONNECTED"); //disconnect WiFi as it's no longer needed WiFi.disconnect(true); WiFi.mode(WIFI_OFF); }
void loop() {}
other mobile hotspot is connecting and only moto hotspot is not connecting solve this anyone Wise..... thank you
Check for ESP status, if you get AUTH Fail at that time only disconnect and then reconnect. it works!!
I downgraded from the 5ghz wifi ssid to 2.4ghz version and it worked for me. Hope it helps someone else.
I am having this problem: wifi station: retry to connect to the AP It says that the ESP32 is already in station mode, but will not get an IP or "connect" completely to the network. Did anyone have this problem? Please, I need to have my network by Monday
Was anyone able to get it to work?
I do not know if my issue is related but I had connection problems. First it was connecting to router pretty fast then after restart of the board it did not. I got a plenty of disconnect event, something like this:
...[ 2703][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: ****, BSSID: xx:d9:4d:xx:da:46, Reason: 2
My problem was hardware related. I had 10uF + 100nF capacitors on the 3.3V lines. I am using ESP32-Wrover and the datasheet recommends 22uF capacitors and in the wrover-kit reference design a 100uF capacitor was used. I hacked 100uF capacitor to my board and the WiFi issue dismissed. It seems like working now.
Please fill the info fields, it helps to get you faster support ;)
If you have a Guru Meditation Error, please decode it: https://github.com/me-no-dev/EspExceptionDecoder
----------------------------- Remove above -----------------------------
Hardware:
Board: ESP32 Dev Module Core Installation/update date: esp has not been updated firmware is about 2 years old IDE name: Arduino IDE Flash Frequency: 40Mhz? Upload Speed: 115200?
Description:
the esp32 wont connect to my network it just says connecting to wifi over and over and never connects it was working then it stopped could updating the esp32 firmware fix this or is it another issue , also is there a different way to connect to wifi that's different to the :
WiFi.begin(ssid,password);
while (WiFi.status() != WL_CONNECTED) { Serial.println("Connecting to WiFi.."); delay(300);
}
that might fix this issue
Sketch: