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