Closed almini closed 6 years ago
+1 I have a similar issue. And I know that my ESP-32 hardware is fine since connecting to the AP using AmazonFreeRTOS works fine. Anyway I want to use ESP-IDF but I can not figure out how to fix the wifi connection so far. I tried porting aws_wifi with little success yet.
I understand that 5G is not working so I connected to a 2G AP.
I tried the following samples (none works for me):
what would be a good / the best approach to get proper wifi connectivity with WPA2 and DHCP on ESP-32?
Hi @almini @markfink, could you help to try IDF commit d57132b2129838a0d7193fbebc363391ba3e1b6d?
In your demo code, the WiFi only have one chance to connects the AP, it's not robust because the first time connecting may fail. The most common way is to call esp_wifi_connect()
instead of esp_wifi_stop()
when getting event SYSTEM_EVENT_STA_DISCONNECTED.
Hi @liuzfesp... I realized that my wifi problem was in fact caused by a silly mistake. I spelled the AP name in lowercase letters instead of uppercase - my bad. I still need to investigate what aws-wifi does differently and what they do to make it more resilient... once I find some time to do so I will open a separate ticket for that.
Hello @liuzfesp, thanks for the tip. After a few tries it successfully connects to my iPhone AP. v3.1 is able to always connect on the first try and it therefore needs much less time to connect.
Environment
Problem Description
Fails to connect to access point (iPhone hotspot). esp-idf v3.1 works without issues, but current master does not.
Expected Behavior
Connect successfully.
Actual Behavior
Fails to connect.
Steps to repropduce
Code to reproduce this issue
// If your code is longer than 30 lines, GIST is preferred.
Debug Logs
Other items if possible
sdkconfig: