Ribeiro Santos wrote:What about a command "on/off?
To turn off the "ap_ssid" is just possible by turning off the power, no?
"set ap_on [0|1]" now does the job. This parameter is also stored in the config, so you can start up the repeater silently.
Was actually a little bit harder than I expected: If you turn on and off STATIONAP mode the stack asynchronously creates a new netif with a new number every time. However the implementation of all API-functions are hardcoded to netif no 1 for the AP. This especially confuses the DHCP server that grabs its IP from netif no 1. Now I change the netif no back to 1 after each "set ap_on 1" and do the IP-config of the DHCP delayed in the timer-func - should work now. You can now even stop the AP, change its params, and restart it again without reset.