Page 1 of 2
After Flash WLAN-Mode 3 possible?
Posted:
Mon Nov 16, 2015 6:37 am
by ulko
Hi,
running esp_iot_sdk_V1.3.0
default WLAN-Mode after flashing is AP (2).
Is it possible to have Mode 3 (softAP+Station) as default immediatly after flash??
Re: After Flash WLAN-Mode 3 possible?
Posted:
Mon Nov 16, 2015 9:52 am
by kolban
If you wish to stay in SoftAP+STA mode, consider checking the mode that your ESP is in when it starts running, if not in the correct mode, set the default mode that you desire and then restart (those last two can be done in software).
Re: After Flash WLAN-Mode 3 possible?
Posted:
Mon Nov 16, 2015 3:50 pm
by ulko
OK, thats what I am doing now. But I want to avoid the boring procedure of starting in wrong mode, modify and restart.
It should be possible to change the default value of wifi mode. Probably in system parameters.....
Re: After Flash WLAN-Mode 3 possible?
Posted:
Mon Nov 16, 2015 4:22 pm
by kolban
The API called 'wifi_set_opmode' is sticky ... (as opposed to 'wifi_set_opmode_current'). This means that when you use that API to change the operating mode, the new mode set will be the mode in effect at NEXT restart as well.
So ... when your ESP8266 starts up, it could call 'wifi_set_opmode' to your desired mode and then not only will you now BE immediately in the desired mode ... when next your device starts, it will automatically already be in the desired mode.