WiFi Issues

Hi all,

I’ve just dusted of my RPi3 + OSMC (Feb update) and had issues connecting to my new WiFi network - the GUI just throws an error “failed to connect”. The WiFi network is the same SSID as before, but I have a new router, new passphrase, settings, etc.

After some investigation I found it to be a problem with connman as if I connected manually it would throw this error:

connmanctl> connect wifi_b827ebc94a9a_5468652053696c656e6365206f6620546865204c414e7320322e34_managed_psk PASSPHRASE
Error 'connect': Argument list too long

I found this ambigious error gets thrown when the WiFi network files already exist in /var/lib/connman - which it does in my case. I had to force removal of them with:

connmanctl wifi wifi_b827ebc94a9a_5468652053696c656e6365206f6620546865204c414e7320322e34_managed_psk --remove

And then the OSMC GUI would work and connect as expected.

So, I guess this is open for discussion but maybe OSMC can detect if the WiFi network config file already exists and allow the user to remove the WiFi network settings from the GUI via a prompt/context menu (similar to the one that appears if you select a WiFi network you’re already connected to) Or perhaps a more user friendlier way is to detect when this happens, remove and existing files if the user is reconfiguring the network and then connect with the new settings - thoughts?

The error message is a bit strange - and certainly not user-friendly - but the failure to connect will be related to this part (in bold):[quote=“eth0izzle, post:1, topic:38575”]
The WiFi network is the same SSID as before, but I have a new router, new passphrase, settings, etc.

Switching “agent on” in connmanctl will prompt you for a passphrase the first time you connect to a router, and then store that passphrase. However, in this case, although the SSID is the same, the passphrase has apparently been changed, so the Pi will try to connect using the old password - and fail to do so.

Had you used a different SSID (or the same SSID and same passphrase) on the new router, this issue would probably not have arisen.

Yes I understand why it happened and I was fortunate enough to be able to fix it.

For your average user this will be an issue and I think it’s a common problem users will have at some point, I.e if their ISP sends them a new router - most people would keep the same SSID. I’ll raise an issue on GitHub.

I doubt ‘most people’ would bother to change the SSID which is in my experience unique to the router. Still worth looking into, though.