Wifi Key Invalid 10.0.2

  • Did some more testing with the same Rpi4: swaped a few SD Cards with different systems on them to check if the 5 Ghz Issue is related to LibreElec or a general problem (hardware defect for example):

    1. LibreElec (10.0.4 & 11.0.0) -> no connection possible ("invalid-key")

    2. Raspian 64 Bit (Feb 2023 build) -> connection works just fine

    3. PINN (3.8.4) -> connection works just fine

    During all 3 tests the pi was in the same location / did not move so it can't be the signal strength either.

    I am not 100% sure but I think the problems started with LE 10.0.3 or 10.0.4 and persist through LE 11.0.0.

    Edited 4 times, last by Ulathar (March 11, 2023 at 4:24 PM).

  • Comparisons with other distros aren't meaningful as their software stacks are different and this is a software problem. If you can repeatably prove it works with earlier 10.0.x releases and then breaks at a specific release; this would be relevant.

  • I changed KERNEL and SYSTEM of LE11 on raspi4 with the old kernel 5.x, but saw the same behaviour, so I don't guess it's kernel related. Maybe the reason can be in the fact that wpa_supplicant was kicked out and iw is used now? As long as you can't establish a connection via console commands (like above), the way over GUI won't do it, wouldn't it?

    Edited once, last by ajbathe: error (March 11, 2023 at 8:09 PM).

  • Comparisons with other distros aren't meaningful as their software stacks are different and this is a software problem. If you can repeatably prove it works with earlier 10.0.x releases and then breaks at a specific release; this would be relevant.

    Just wanted to make sure that it's not me and/or the hardware. I know that the software stacks are different. Step one: exclude the user in front of the device :D.

    I can do more testing with different LE Versions if that helps but I will be on vacation from tomorrow until the end of the month, so it will take some time before I can get to it.

  • I just started having the exact same issue. I'm running LibreElec 11.0.0 on a Raspberry Pi 4. Yesterday it worked, this morning it keeps asking for my network password. I have found that if I plug in a USB TP-Link wifi dongle and use it instead of the built in wifi interface that it works. Very frustrating indeed.

  • I changed KERNEL and SYSTEM of LE11 on raspi4 with the old kernel 5.x, but saw the same behaviour, so I don't guess it's kernel related. Maybe the reason can be in the fact that wpa_supplicant was kicked out and iw is used now? As long as you can't establish a connection via console commands (like above), the way over GUI won't do it, wouldn't it?

    If you switched both KERNEL and SYSTEM you swapped Linux 6.1 + iwd (LE11) for Linux 5.10 + wpa_supplicant (LE10) .. which would imply the issue has nothing to do with the entire software stack. /shrug

  • If you switched both KERNEL and SYSTEM you swapped Linux 6.1 + iwd (LE11) for Linux 5.10 + wpa_supplicant (LE10) .. which would imply the issue has nothing to do with the entire software stack. /shrug

    yes, you are right; my try was just a thought ... Any idea how we can debug that more deeply?

  • Any idea how we can debug that more deeply?

    First enable Persistent Logging in LibreELEC Setting Addon's service tab to avoid journal wrap.

    To enable connman's debug logging for iwd and wpa_supplicant create with path:

    Code: /storage/.config/systemd/connman.service.d/debug.conf
    [Service]
    Environment=CONNMAN_DEBUG=--debug=../plugins/iwd.c
    Environment=CONNMAN_SUPPLICANT_DEBUG=1

    And reboot.

    Use only --debug to enable all connman debug messages. There are other environment variables that can be set.

    You may find it convenient to attach a keyboard and use the tools.gbmshell addon for network configuration.

  • Just another thought:

    When I start iwctl, it says:

    NetworkConfigurationEnabled: disabled <------

    StateDirectory: /var/lib/iwd

    Version: 2.3

    In some net search to iwd, this daemon normaly wants it's configuration file /etc/iwd/main.conf, which doesn't exist here. Do we need that configuration file? I would like to test with the content

    [General]

    EnableNetworkConfiguration=true

    [Network]

    NameResolvingService=systemd

    but ... you know: filesystem is read-only. Could this be the reason?

    Creating a file "[SSID].psk" with "touch /var/lib/iwd/"<network name>".psk", this file immediately gets filled with

    [Settings]

    AutoConnect=false

    where I could complete with

    [Security]

    PreSharedKey=[my psk-phasephrase created with wpa_supplicant]

    Also the file /var/lib/iwd/.known_network.freq get created with the content

    [3001bf4a-58ad-54fe-9778-a1954cf6d484]

    name=/var/lib/iwd/<"network name">.psk

    list= 5200

    So the command

    iwctl station wlan0 connect <"network name">

    doesn't ask for its WLAN password again but answers only with

    Operation failed



    First enable Persistent Logging in LibreELEC Setting Addon's service tab to avoid journal wrap.

    To enable connman's debug logging for iwd and wpa_supplicant create with path:

    Code: /storage/.config/systemd/connman.service.d/debug.conf
    [Service]
    Environment=CONNMAN_DEBUG=--debug=../plugins/iwd.c
    Environment=CONNMAN_SUPPLICANT_DEBUG=1

    And reboot.

    Use only --debug to enable all connman debug messages. There are other environment variables that can be set.

    You may find it convenient to attach a keyboard and use the tools.gbmshell addon for network configuration.

    Thank you very much for this information, I followed it and immediately after inserting the password, I got this here (maybe somebody can interpret it nicely ;)

    Mar 12 14:41:40 raspi4 connmand[737]: ipconfig state 2 ipconfig method 1

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:agent_request_passphrase()

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:station_property_change() /net/connman/iwd/0/3 state connecting

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:station_property_change() /net/connman/iwd/0/3 connected_network /net/connman/iwd/0/3/4c696e75782d4e6574776f726b_psk

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:network_property_change() /net/connman/iwd/0/3/4c696e75782d4e6574776f726b_psk connected 1

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:update_network_connected() interface name wlan0 index 3

    Mar 12 14:41:40 raspi4 connmand[737]: ipconfig state 3 ipconfig method 1

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:cm_network_connect_cb() /net/connman/iwd/0/3/4c696e75782d4e6574776f726b_psk connect failed: net.connman.iwd.Failed

    Mar 12 14:41:40 raspi4 connmand[737]: ipconfig state 7 ipconfig method 1

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:station_property_change() /net/connman/iwd/0/3 state disconnected

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:station_property_change() /net/connman/iwd/0/3 connected_network (null)

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:network_property_change() /net/connman/iwd/0/3/4c696e75782d4e6574776f726b_psk connected 0

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:update_network_disconnected() interface name Linux-Network

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:station_property_change() /net/connman/iwd/0/3 scanning 1

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:station_property_change() /net/connman/iwd/0/3 scanning 0

    Mar 12 14:41:40 raspi4 connmand[737]: ../plugins/iwd.c:ordered_networks_cb()

    Mar 12 14:41:40 raspi4 dbus-daemon[385]: [system] Rejected send message, 1 matched rules; type="method_return", sender=":1.10" (uid=0 pid=1059 comm="/usr/lib/kodi/kodi.bin --standalone -fs") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.6" (uid=0 pid=737 comm="/usr/sbin/connmand -nr --config=/etc/connman/main.")

    Edited once, last by ajbathe: Ein Beitrag von ajbathe mit diesem Beitrag zusammengefügt. (March 12, 2023 at 1:44 PM).

  • ajbathe
    March 25, 2023 at 8:48 PM
  • To add some questions into the puzzle, I've been experiencing the WiFi key invalid error since updating my router.

    I was using some Netgear as router/wifi access point. Recently I upgraded to TP Link Deco x55 for mesh wifi. When I was using it as *just* the access point the wifi still connected fine.

    When I switched to using the x55 as also doing router duties (including local IP reservation) then I started getting the key invalid error.

    I run LibreElec on a RPi 3 model B (bought Feb 2018), it's plugged into a powerline adapter for ethernet so I don't consider the wifi functionality essential for my use case.

    I also have an older Pi 2 model B v1.1 - when I plug a wifi adapter into the USB, it connects to the same x55 wifi just fine with no complaints.

    Both Pi's are on the same build of LibreElec (LibreELEC-RPi2.arm-9.2.8.img). So I wonder if there's a hardware or firmware level compatibility issue rather than it being software/OS.

    I tried plugging the wifi dongle into the Pi3 and then realised I don't know how to force it to use USB wifi to see if that would make a difference. Either way, like I say I have it hooked up via ethernet so it's not an essential issue for me but as I found this thread troubleshooting for a resolution I thought I'd pass on my experience. If desired, I can test things if there's info on where to get log information, though I'll be travelling for a week from tomorrow so don't expect anything immediate.

    I have a Pi5 on order so when that arrives I'll be interested to see if it works on wifi or the problems continue.

  • I have WiFi working on that Pi 3 on my network with the Pi running Raspbian, after using this solution which edits a /network/interfaces file - seems to be some issue with my router using DHCP? https://raspberrypi.stackexchange.com/questions/5164…n0-unassociated

    That same Pi3 is the one that wouldn't connect to the WiFi while running LibreElec. I don't know if this solution could be achieved on LE through SSH.

    My Pi2 using a dongle, Pi4 and Pi5 running LE all have no issue connecting to the WiFi without any tweaking (which is a nice bonus that LE has drivers for the WiFi dongle). I'm not sure why the issue seems to isolate just to this Pi3 since I switched the mesh network to also be the router.