04-29-2020, 04:38 PM
(04-29-2020, 03:58 PM)blarg Wrote: is it possible to disable Moode defaulting to AP mode when there is no wifi signal or at least to allow a timeout increase?
in the event of a power outage, my RPI reboots much quicker than my router, causing it to go into AP mode and require me to log into it and reconnect. Would it be possible to add an option to either disable this behavior or allow a timeout to be set of 5-10 minutes just to make sure that there is time for the network to come back up before Moode decides to go into AP mode?
Currently the code checks 5 times for an IP address with a 3 second wait between each try for a total of 15 secs.
Of course some sort of configurable wait option could be added but I'd need more requests for this in order to devote dev time to it. In the meantime you can increase the number of times the code checks for a wlan0 ip address by modifying the source file below.
/var/www/command/worker.php
Search for the line below, it should be around line #264 and change 5 to some higher number.
$wlan0ip = waitForIpAddr('wlan0', 5);