-
Notifications
You must be signed in to change notification settings - Fork 396
Description
We often have the following case: when the rpi starts, it correctly connects to the wifi access point (that was previously configured using wifi-connect captive portal), but after a few minutes or a few hours, the wifi-connect is starting (probably because the connection was temporarily lost), and the captive portal shows an empty list of detected wifis.
But we have a lot of wifi access points around, so there must be an issue here as the list should not be empty...
The rpi never connects back to our initial wifi access point, until we manually reboot the device.
Here is my start.sh script:
$ cat /usr/src/app/start.sh
#!/usr/bin/env bash
export DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
while true
do
iwgetid -r
if [ $? -ne 0 ]; then
printf 'Starting WiFi Connect\n'
./wifi-connect --portal-ssid helioslite-tracker --portal-passphrase XXX --activity-timeout 600
fi
sleep 10
done
Here are the logs of NetworkManager service:
https://gist.github.com/bbinet/d0ed2e5465824ef2594589b383cc5f93#file-networkmanager-log
Here are the logs of the container that runs wifi-connect:
https://gist.github.com/bbinet/d0ed2e5465824ef2594589b383cc5f93#file-wifi-connect-log