Wifi does not come up automatically

  • Howdy,

    I am totally new to libre.elec. I installed it on a raspi 4. Since my wifi key is really long I have enabled SSH on the box and setup wifi using this howto: https://www.jeffgeerling.com/blog/2023/conf…n-libreelec-ssh. In order to do this I put the box into my office, where I have an ethernet port available. Wifi works very nice then.

    But when I put the box back into the living room and connect it to the TV, then wifi doesn't work anymore, this message appears on the screen:

    No I could possibly enter the key, but this would be a tedius task. So, why doesn't it come up with the readily configured wifi? Or does Kodi have somehow a different wifi setup than the OS below?


    Many thanks in advance,

    Tom

  • It's a long-running issue that impacts a small number of users. It is not RPi hardware specific. Things that may help:

    • Disabling fast-transition (FT) in access-point radio properties
    • Not using WPA3
    • Moving the device closer to the access-point to improve signal strength

    It is probably an issue with iwd (as reverting to wpa_supplicant works around it) but it remains unresolved largely because nobody who can replicate the issue has code-level fault finding skills, and nobody among project staff or regular technical contributors with such skills can replicate the problem.

    rtl8723bs: Invalid-key while connecting to wifi on LE12 · Issue #8731 · LibreELEC/LibreELEC.tv
    This is a continuation of issue #7166 but for LE12. When running LibreELEC-H6.aarch64-12.0-nightly-20240312-d108ae1-pine-h64-model-b.img: I get invalid-key…
    github.com
  • I managed to configure wifi via the libre.elec settings addon, which worked. Until now. I didn't change anything, it just says "invalid key". And now it's not working anymore, whatever I try.

    Signal quality can't be the issue, the router is just 3 meters away. I have even created a guest network with a simpler key just to make sure it is easy to enter in the settings dialog in time.

    I also connected the rasbpi with ethernet and tried to manually configure the wifi with iwd - this works:

    So, wifi in general works, the password is correct as well, it only doesn't work, when entered via the UI on the TV.

    Oh, but now that I re-read you comment, when I am working on the raspi via LAN, then I take it into my office. This is the same room where the wifi router is located. So maybe it's a distance issue after all?

  • That's just a shot in the dark: Do you have some kind of special characters in your passphrase? Or maybe only a 'Y' <-> 'Z' issue from the difference between German (GUI) vs. English keyboard setting?

  • The issue has nothing to do with passphrase characters and it's definitely influenced by signal strength. The error message shown is probably the result of an error handling failure in iwd code. Instead of correctly catching the error and failing gracefully with a meaningful message you end up falling-through to a unintended wrong point in code and seeing "invalid key" instead.

  • Well, I added a little autostart.sh script where I log some wifi related stuff, and indeed, it doesn't receive anything when located in the living room.

    Now that I've got this confirmed, I also understand why it's probably not working: the raspi is housed in an Argon One M.2 enclosure which is made of metal and probably blocks signals. So, I'll either install an ethernet cable to the location or buy a wifi usb-stick to solve the issue.

  • Moving all the reports from GitHub to here.
    - https://github.com/LibreELEC/LibreELEC.tv/issues/7166
    - https://github.com/LibreELEC/LibreELEC.tv/issues/8731
    - https://github.com/LibreELEC/LibreELEC.tv/issues/7353
    - https://github.com/LibreELEC/LibreELEC.tv/issues/10573
    - https://github.com/LibreELEC/LibreELEC.tv/issues/8762
    - https://github.com/LibreELEC/LibreELEC.tv/issues/8760

    Some of the feedback / known issue / suggestions on the issues - please try these first.

    • Disabling fast-transition (FT) in access-point radio properties (this may be resolved in current connman/iwd/drivers, there have been changes in all 3 code bases around this)
    • Not using WPA3 (this may be resolved in current connman/iwd/drivers, there have been changes in all 3 code bases around this)
    • Moving the device closer to the access-point to improve signal strength


    **not recommended** - but has helped some.
    /etc/modprobe.d/iwlwifi-opt.conf
    Add the line "options iwlwifi 11n_disable=1" (without the quotes)


    There is a report that on “unclean restart” connman always returns “invalid”

    LE12.2 (nightly) and LE13 (nightly) both have the most recent iwd and connman. So any testing should be done against these releases. The kernel on 12.2 (nightly (6.16.12)) has diverged from LE13 - which is now 6.17.x on all except RPi, so testing should be performed on LE13 if not RPi.

    As in the issue logs a number of detailed scenarios have been run though, with some success. There seems to be a number of corner cases that cause the issue (including the known ones above) - the interesting observation on https://github.com/LibreELEC/Libr…ment-3395445892 is the DFS and 80. E.g. Does this occur on a simple 20 channel…


    Note - I test using a C9130AXI-Z 802.11ax 2.4 GHz/5 GHz access point at 20 MHz, no FT, no WPA3. Also test against Unifi AC Mesh.