[RPi3] WiFi Broken (Invalid Key)

  • Hello everyone!

    introduced in LE 10/11(?) the "invalid key" problem (broken wifi) seems still to be a problem in LE 12.I searched the forum/githubs/reddits/internet and as of today plenty of people seem to have problems.

    Many work'a'rounds with scripts or other tweaks (disabling 802.11n etc.)

    Most interesting seems the comment from @helmat in this issue here:

    [BUG] Invalid-key while connecting to wifi - LE11 · Issue #7166 · LibreELEC/LibreELEC.tv
    Describe the bug Hello :) Since upgrading to LireElec 10 (10.0.3) the wifi is really unstable. Every now and then, LibreElec will forget the wifi password and…
    github.com

    claiming that the kernel 6.6.78 actually might fixes things...

    but at the moment (stable) LE 12.0.2 only ships 6.6.71 (RPi2-5 6.6.70)...

  • The error message itself is misleading and wireless being wireless there's a large number of potential variables including poor signal which RPi boards are inherently prone to. Over time things seem to have generally improved though, and you're the first person flagging an issue in this forumn for some time.

    LE13 nightlies are running newer kernels and lots of other bits. Perhaps make a test install on a spare SD card and see if that helps.

  • Other solutions suggested "use a cable" :rolleyes:

    I now also tried the latest LE 12 nightly which should with a more recent kernel than 6.6.78 - but no luck. invalid key error still is their with the router being two meters away...maybe it also fails if the signal is too good?

    Will try LE13 nightly next to see if this supports wifi.

    And from what it looks like it seems to be a pure software problem/bug? The same PI SBC has no problems with the same wifi/router when running PiOS for example.

  • LE and RPiOS use the same kernels but RPiOS uses wpa_supplicant whereas LE uses iwd and the issue is proven to not occur when using wpa_supplicant. Reverting LE images to wpa_supplicant can be done but aren't going to entertain that idea as wpa_supplicant has its own set of very-legacy-code problems and the Linux community is keen to iwd mature and replace it. Signal strength is the most important factor as poor signal introduces all kinds of errors and iwd is probably not handling all of them as gracefully as it needs to; although a specific issue with WPA3 on Broadcom cards (which RPi boards use) was resolved and things have generally improved to the point where invalid-key is rarely reported now.

    Cables are always best. External dongles or anything with a proper antenna beats the RPi on-board one.