nerves-networking / vintage_net_wizard

WiFi configuration wizard using vintage_net
Apache License 2.0
60 stars 21 forks source link

Avoids overwritting connection details on shutdown #260

Closed paulanthonywilson closed 2 years ago

paulanthonywilson commented 2 years ago

Thanks for VintageNetWizard. It is so useful!

I have run into a slight issue when I have been configuring devices (Pi Zero Ws, but that's probably not relevant) though the captive portal interface through iOS. I think it could be an issue with other devices, but I haven't checked.

The scenario is as follows:

  1. Set the SSID and password for Wifi
  2. Choose "Apply configuration"
  3. Usually the page telling me to wait 15 to 30 seconds is shown
  4. My iOS device reconnects to my own network, the captive portal page disappears, and the Pi Zero is connected to the network(*) - all good
  5. Ten minutes later the Pi Zero connection is dropped, and rebooting does not help.

The issue is caused by the following:

This PR makes the VintageNetWizard.BackendServer.complete/0 a no-op if the configuration has already successfully been applied, preventing the details being over-ridden on shutting down the wizard.


(*) I find it often take two goes applying the configuration before I can connect, but that is not a huge problem and not the subject of this PR. I do see the following message though:

[debug] wpa_supplicant(wlan0): Could not connect to kernel driver