--activity timeout not working
silvia-eio opened this issue · 6 comments
The --activity timeout seems not to be working for me...
If I turn on the device in an area with networks "a", "b" and "c" available, it scans and shows them appropriately.
If I don't connect to any of those networks, and move to a different area, with networks "x", "y" and "z" available, the Wifi-Connect access point will never refresh the network list - will keep showing only "a", "b" and "c" even though they are no longer within reach.
Is there a way to fix that, or is there something wrong with the way I used activity timeout in the code below?
while true; do
echo `date` " 3. Is there Internet connectivity via a google ping?"
wget "http://clients3.google.com/generate_204?" -O /dev/null 2>&1 | grep "204 No Content" > /dev/null
if [ $? -eq 0 ]; then
printf 'Skipping WiFi Connect\n'
else
printf 'Starting WiFi Connect\n'
./wifi-connect --portal-ssid "Camera ${RESIN_DEVICE_NAME_AT_INIT}" --activity-timeout 60
fi
echo "Use control-c to quit this script"
sleep 10
done
@silvia-eio There is currently an issue with --activity-timeout
where if you connect to the captive portal once, even after you await the amount specified in activity timeout the application will not exit. We need to rework the inner logic for this to be working better.
One possible way to solve this is for example to use a button on the device that you can hook to killing WiFi Connect externally. If that is not an option then other solutions there are other options as well but they will be an overkill. For example modifying the UI of WiFi Connect with adding a button for killing wifi-connect and having a custom web application which could listen on a given port and accepts the requests from the modified UI.
@majorz I was wondering if this issue was still relevant, so that I know if I should still implement a button to be able to kill WiFi Connect externally?
Ok, thank you.
I will look at using this: https://stackoverflow.com/questions/687948/timeout-a-command-in-bash-without-unnecessary-delay
[gelbal] This issue has attached support thread https://jel.ly.fish/f46ebc99-8408-472c-8771-e62602748952