I am using the version 3.1 (the most up to date in the release branch) of the ESP8266_RTOS_SDK. For my project, I start the application by setting the ESP8266 to AP mode, so that I can connect to it with my phone. Then, once I got the network credentials, I want to shut down the AP mode and go into STA mode using those credentials. The problem is that it doesn't work. The credentials are well received, but the switch between AP to STA mode just doesn't work...
I was previously using the version 2.x.x of that SDK, and there I was able to get it to work fine. But I just updated to the version 3.1 for security reason linked to FreeRTOS, and the WiFi APIs changed quite a lot. So, following the few example from Espressif available, I tried to write the code for my application to do that switch between AP and STA but it doesn't work.
I tried everything: stopping the wifi and restarting it between the two modes; stopping + de-initializing between the switch; just change the opmode without stopping the wifi... Anyway, nothing seems to be working. My AP mode works just fine, but the problem happens at the STA mode, it just keeps on entering into the event SYSTEM_EVENT_STA_DISCONNECTED... There I call esp_wifi_connect() (like shown in the SDK example), but it doesn't work. reenter again and again the SYSTEM_EVENT_STA_DISCONNECTED event. My mode is set to STA, I got the right network credentials, and my local network is working. So I don't know what is the issue and it is becoming very hard to find new things to try to fix this.
NOTE: I really don't wanna set my ESP8266 to dual AP+STA mode, I just want to set it to AP when needed, and then shut down the AP mode and go into full STA mode.
Please, if anyone has anything that I could try, let me know
Anyway, all works fine for now
Who is online
Users browsing this forum: No registered users and 4 guests
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
We also have a RTOS version and a MESH version too!
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!