WPA2 Key field too short

Continuing the discussion from OSMC difficulty setting up WiFi:

I found this user’s post very helpful in debugging my issue setting up wifi.

My router’s default key is longer than the limit of the field. Many default router passwords these days are long. Mine is 13 characters.

According to the WPA2 specification:

The encryption key may be from 8 to 63 printable ASCII characters or 64 hexadecimal
digits. The maximum length results in 256 bit strength, which is what
64 digits (8 bits each) multiplied by 4 bits/digit yields. I recommend
that you use at least 32 random characters.

OSMC’s setup program limits you to 10 characters. This is the max length for WEP.

What is the solution when you have set the incorrect password in setup? No amount of waiting for wifi configuration in the GUI helps.

My WiFi password is much longer than 10 characters. As a test, I tried a 26 character password and had no issue.

That is certainly not the case – we have tested incorrect preseeding in the past and this will not cause an issue. The user may have needed to reboot after entering the incorrect password so that the agent would attempt to connect with the new password.


my password is similar to this “founddream345” i type in “founddream” and cannot type any more. i have used the arrow key to count the number of characters (password has dots not like yours) and it is only allowing 10 characters.

The “version” it is letting me install is 2015-11-01. Is this the latest installer?

So back to the question, how to reset the password if the installer wrote the wrong one?

The messed up thing is, even if i go to OSMC Network settings, and re-enter the valid password, it still sits there with this waiting thing that never goes away.

Can you check /var/lib/connman/ for a connection configuration?

Are you sure that you can’t type anymore? The fields are hidden, so you may not think it’s typing, but it still is.

You can also manually edit preseed.cfg to add the password before booting.

The connection should only be persistently stored if the connection was successful, but nonetheless, it’s worth checking the directory @ActionA mentions.


Yeah there are files in there.

one for the ethernet (which is unplugged ATM) and one for the wifi.
plus a settings file, inside it has wifi enabled =true
(verified that already)
but the preferred order is ethernet,wifi in connmanctl

My feedback on this process is, having dots in the password field is kinda silly. There’s no one standing over my shoulder watching me enter the password. I don’t know why your screen shot shows the characters and mine does not.

I opened preseed cfg and one of the characters was repeated 5 times… there is no way i held the key down or did that intentionally.

I reinstalled AGAIN and methodically typed in the password.

Looked in preseed.cfg on the flash card. The correct password is there. Starting OSMC welcome install…

Ok so this totally worked, and the original post I quoted is correct.

If the password is preseeded wrong, there is no amount of reentering it in the GUI that will solve it.


While your concern in this regard is noted, hiding security characters such as wifi pw’s etc, is common practice and widely recommended/accepted. Even cell phones behave in the same way as well as every other modern operating system. This will remain to be our practice for OSMC.

You can probably see his characters because he’s likely working with the same developement code from when he wrote the installer and can easily revert the feature there…

How about the standard “Show characters” check box? Or more importantly, fix whatever is broken in the GUI that seems to be conflicting with the “incorrect preseeded” thing. It seems like a chicken and egg thing.

But thank you for the quick responses, hopefully my input will contribute to some kind of solution.


There have rarely been issues with the installer/preseeder in it’s current state. Appearing that the problem you describe has only occurred in very few use cases, I can’t see a lot of time being dedicated to this when there are far more pressing issues our small dev team should be addressing for the benefit of the OSMC community as a whole. Sorry…

Pull requests are gladly accepted though :wink:

This simply isn’t the case.

The way the preseeding works is that a service called ftr.service (first time run) runs once on first boot, which among other tasks runs /usr/bin/preseed. /usr/bin/preseed reads /boot/preseed.cfg and uses the connman dbus API to attempt to connect to the network using the credentials provided.

If this succeeds, connman saves this network, exactly as if you had used My OSMC -> networking (which also uses the connman dbus API) or used connmanctl.

However if the connection fails, whether due to the network not being present, no network adaptor plugged in, wrong passphrase etc connman does not save any details for the network. It will only save wifi settings on successful connection.

Also the preseeding script will only try to connect once if that fails, preseeding fails. (This is a known limitation of the preseeding process, some wifi adaptors will not always connect on the first attempt)

Therefore preseeding failing has no bearing on whether you can manually fix the connection using the GUI later on.

Then I guess I imagined the entire morning :slightly_smiling:

Maybe I’ll try to reproduce it on another SD card, I’ve already gotten pretty far in setting this up.

There may have been other factors at play.

I am (or was) using an RF wireless keyboard. I’m having a suspicion it is conflicting with the 2.4 ghz Wifi. I say this because I will sometimes notice it acts like i pressed a key but I didn’t, so i plugged in the USB keyboard. That’s when I noticed the preseed.cfg had a bogus string of repeated #s. I re=entered it in the GUI (thereby contradicting my statement above lol) and it worked.

Sorry for the noise, and thanks for the help.