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:
LibreELEC (official): 12.0.1 (RPi4.aarch64)
LibreELEC:~ # iwctl station list
Devices in Station Mode
--------------------------------------------------------------------------------
Name State Scanning
--------------------------------------------------------------------------------
wlan0 disconnected
LibreELEC:~ # iwctl station wlan0 show
Station: wlan0
--------------------------------------------------------------------------------
Settable Property Value
--------------------------------------------------------------------------------
Scanning no
State disconnected
LibreELEC:~ # iwctl station wlan0 get-networks
Available networks
--------------------------------------------------------------------------------
Network name Security Signal
--------------------------------------------------------------------------------
CIA-Station-OH psk ****
GITTA psk ****
LibreELEC:~ # iwctl station wlan0 connect CIA-Station-OH
Type the network passphrase for CIA-Station-OH psk.
Passphrase: *********
LibreELEC:~ # iwctl station wlan0 show
Station: wlan0
--------------------------------------------------------------------------------
Settable Property Value
--------------------------------------------------------------------------------
Scanning no
State connected
Connected network CIA-Station-OH
IPv4 address 192.168.179.2
ConnectedBss aa:b5:8d:9f:3d:fa
Frequency 5180
Channel 36
Security WPA2-Personal
RSSI -64 dBm
TxBitrate 24000 Kbit/s
RxBitrate 6000 Kbit/s
LibreELEC:~ # ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP8000> mtu 1500 qdisc mq qlen 1000
link/ether dc:a6:32:e2:96:db brd ff:ff:ff:ff:ff:ff
inet 192.168.178.27/24 brd 192.168.178.255 scope global eth0
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1456 qdisc fq_codel qlen 1000
link/ether dc:a6:32:e2:96:dc brd ff:ff:ff:ff:ff:ff
inet 192.168.179.2/24 brd 192.168.179.255 scope global wlan0
valid_lft forever preferred_lft forever
Display More
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?