How to change from Station Mode to Access Point mode
Posted: Mon Feb 27, 2017 8:33 pm
Hi,
I started with an ESP8266 using the Arduino SDK and this is what I would like to do during start-up:
First: Check if WiFi settings for an existing network are stored, if yes try to connect
Second: If no settings are stored or could not connect create an Access Point
Problem is now, after it tried to connect (but not successful) it is impossible to create an working Access Point, even when restarted. What I tried:
-Restart from software: ESP.restart();
-Crash from software to do restart: *((int*) 0) = 0;
-ESP.eraseConfig() (before and after restart)
-Calls to the C api (wifi_station_disconnect(), wifi_set_phy_mode(PHY_MODE_11G))
-Using GPIO to do external reset
-Change SDK to mode "RF init do all RF CAL" (last byte set to 3)
Nothing works, access point is created and sometimes it's even possible to connect, but ESP wont even respond to a ping.
Access point for me only works if it the device has never been in station mode since connecting to power. Seems a lot of people having this problem, there are many threads on GitHub, but most are closed without a solution. Any idea how to do that?
Best regards
Stefan
I started with an ESP8266 using the Arduino SDK and this is what I would like to do during start-up:
First: Check if WiFi settings for an existing network are stored, if yes try to connect
Second: If no settings are stored or could not connect create an Access Point
Problem is now, after it tried to connect (but not successful) it is impossible to create an working Access Point, even when restarted. What I tried:
-Restart from software: ESP.restart();
-Crash from software to do restart: *((int*) 0) = 0;
-ESP.eraseConfig() (before and after restart)
-Calls to the C api (wifi_station_disconnect(), wifi_set_phy_mode(PHY_MODE_11G))
-Using GPIO to do external reset
-Change SDK to mode "RF init do all RF CAL" (last byte set to 3)
Nothing works, access point is created and sometimes it's even possible to connect, but ESP wont even respond to a ping.
Access point for me only works if it the device has never been in station mode since connecting to power. Seems a lot of people having this problem, there are many threads on GitHub, but most are closed without a solution. Any idea how to do that?
Best regards
Stefan