MycroftAI / hardware-mycroft-mark-II

Mycroft's Mark II Rpi mechanical, electrical and industrial designs
109 stars 32 forks source link

Wifi credentials wiped on reboot #20

Open krisgesling opened 3 years ago

krisgesling commented 3 years ago

Sometimes on reboot the wifi credentials get wiped and you are prompted to setup your network connection again.

Needs investigation to:

NeonDaniel commented 3 years ago

Just a note that I was prompted to start WiFi setup on reboot but by the time I got to looking for the network on my phone, the Mark2 had decided to connect to my network again.. Might be worth noting this was the first reboot after successful setup.

During setup, I completed the wifi setup but the device didn't connect. I restarted via the pull-down menu and retried setup twice before connection was successful.

krisgesling commented 3 years ago

Hey Daniel,

The first issue is known - we're a little quick at starting the wifi setup instructions and sometimes these initiate before the device has finished trying to connect to the network. In the short term we're going to delay this slightly if the network has previously been setup. In the longer term we'd like to tie into the network manager so we can trigger events more explicitly.

I'm interested in your comment about first setup though - can you provide some more detail about the times where you tried to setup wifi and it didn't connect?

If it happens consistently at all, it would be really helpful to get some more detail about your wifi network - eg authentication type, channel, any specific security features you use like mac filtering or anything else you can think of that would help us to recreate a similar setup. Can of course email these if you don't want to share them publicly.

NeonDaniel commented 3 years ago

Sure; this does occur when connected to the "Mycroft" network. The network did disappear and never appeared to come back until restaring the Mark2; no indication of connnection on the Mark2 (no change at all). I haven't noticed this issue with any other devices at this location and am connecting to a Ubiquiti AP about 10 feet away

fusterjj commented 3 years ago

This happens to me on every single reboot--is there any specific info I can collect that would help?

krisgesling commented 3 years ago

Hey @fusterjj can I double check - you are seeing your device completely wipe the wifi credentials every reboot. That is not the first scenario I outlined above where the instructions would start, but it would connect by itself after a short period?

fusterjj commented 3 years ago

Sadly, I have let it sit there for >30min several times now. It never connects unless I go through the entire process again.

krisgesling commented 3 years ago

Thanks - the hypothesis at the moment is that the system takes too long to connect to the wifi so assumes it doesn't exist and instead kicks off the hotspot setup process. At this point the wifi system is in use by the hotspot so can't continue connection attempts to previously configured wifi.

Short term - we'll increase the wait time before the hotspot is activated, particularly if credentials exist so a connection is possible.

Longer term - the wifi setup will start on device, and the hotspot will only get activated if the user selects that option for wifi setup.