-->
Page 1 of 1

ESP - changing modes

PostPosted: Thu Feb 23, 2017 1:06 pm
by jhinkle
If the ESP8266 starts in one mode but later determines it needs to be in another mode -- is a reset required?

Two scenarios:

1: Starting mode is STATIONAP_MODE. I need AP mode to be able to present a config web page to the user to identify the AP the station should connect to -- but I also need station mode to run an AP scan.

After config data is acquired -- I want the operating mode to be STATION_MODE. Can I just call wifi_set_opmode_current() followed by wifi_station_set_config_current() or would it be cleaner to just reset the ESP and start in STATION_MODE from the start?

2: Starting in STATION_MODE but after a time determine the ESP has yet to connect to an AP. Can I just call wifi_set_opmode_current() with STATIONAP_MODE or is it cleaner to reset and start in STATIONAP_MODE .

The ESP is a slave to another CPU which gives me the ability to reset the ESP and tell it what mode to start in.

Thanks.

Joe

Re: ESP - changing modes

PostPosted: Thu Feb 23, 2017 3:47 pm
by martinayotte
No needs for reset in such case.