-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rtl8723bs: Invalid-key while connecting to wifi on LE12 #8731
Comments
The issue resides in iwd (not driver code) and will remain until someone who experiences the problem runs iwd in debug mode to generate log output that can be shared with iwd devs as part of a bug report; the debug output should show the code path that results in the error message. So far staff are unable to reproduce the problem to do that. |
I'll be happy to run
|
Copy NB: ^ not tested, but based on some past ideas on generating it. |
So before making those changes to
Here's the dmesg grepped for "wifi":
Does LibreELEC have a way to access a terminal locally rather than over SSH? That would allow me to execute the commands without bringing up the wired connection. |
You have run the commands correctly if you follow the Mar 29 onwards messages in the other issue. As a starter but given that your scan came up empty - the debug logs are when we need to look. We also need to ensure the device is in station mode not AP mode (please ensure tethering is off)
|
Tethering is off according to the GUI and also via
I then repeated the iwd debug test as described in the previous issue:
However, in the other window I could only reach the |
I decided to try Armbian to verify whether there is some sort of hardware issue at play with my system. Armbian comes with I also checked
So it appears that the hardware using the same firmware is at least capable of connecting to the access point via |
Looking at this, your information seems to be a “hardware / driver issue” but as you proved with armbian - not a hardware issue. But given that the interaction is “none” on the scan - then points to firmware,driver…. do you have a different WiFi card to test with? to validate this we will need to see the full kernel dmesg from both LE and armbian. What is the kernel difference, what is the driver difference, what is the firmware difference, what driver is being used on armbian, does the armbian firmware on LE fix things. Please share the full iwd logs from both armbian and LE There are a number of hits for issues with this WiFi card on google - e.g. https://groups.google.com/g/linux.debian.ports.arm/c/AcLn66gcf2E - but let’s not suggest this is the issue yet. |
There are a number of reports with this device not working in the forum too. Some current. also the output from the dts has all the right stuff in it - https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64-model-b.dts - is this the same dts being used in armbian? |
The title "rtl8723bs not getting a list of networks on LE12" isn't quite right because I can get a list of access points in LibreELEC GUI as long as I don't have the Ethernet connected; the problem in that situation is that I get the "invalid-key" error message when I try to connect to an access point. However, it is true that I have not been able to get a list of access points when I try to scan with the Ethernet plugged in, which is what's causing difficulty in troubleshooting the "invalid-key" error via SSH over Ethernet. It's possible these are separate issues, but in theory connecting Ethernet should not affect the WiFi at all because they're separate devices on the board (and also I can connect both Ethernet and WiFi at the same time in Armbian as well). I think it's safe to eliminate hardware and firmware as possible causes because I can connect and use the same device fine with the same firmware on Armbian. It's possible there is a difference in the dts or driver between the Armbian and LibreELEC build we could investigate. Here's the build configuration for Armbian for the Pine H64 Model B:
So it looks like the Armbian image is built with the same upstream Linux dts as in LibreELEC. Doing a simple search for "pine-h64-model-b" on the Armbian build repository yielded no results for patches, so it doesn't look like they're modifying anything for this particular device and just using the upstream Linux driver as-is. I'll collect logs of |
Here are the The
|
There does seem to be this patch to the r8723bs driver supposedly affecting "Wifi stability" by disabling power management: armbian/build@b26ea8b |
I created an The only other patch I found is this one that does seem to be some sort of "AP" bug fix: https://github.com/armbian/build/blob/main/patch/kernel/archive/sunxi-6.6/patches.armbian/drv-staging-rtl8723bs-AP-bugfix.patch |
Sorry for the noise, the "AP bugfix" patch is no longer necessary thanks to a fix already upstream initializing the structure members to zero: https://lore.kernel.org/lkml/[email protected]/T/ |
I realized I could trigger the
I want to try to start a custom systemd iwd.service with debug enabled for iwd, so I copied
|
do the same stop/disable/mask process to switch back to the non-debug one |
I’ve had to use similar when initially testing the rtw88 (but just ran the commands to disable the power down) from the dmesg In the gui (with no Ethernet) - are you seeing any wireless networks? do you see Bluetooth devices? You may also find that |
It does behave somewhat like it might be a power management issue (e.g. power draw from connected Ethernet turning off wifi device). But I would expect
The corresponding line in Armbian is this:
So it looks like this should be
I typically can see wireless networks in the GUI menu if I boot without Ethernet plugged in (although I have had a couple times when I saw nothing show up); I can also detect bluetooth devices nearby. After plugging in Ethernet, the wifi and bluetooth goes blank like it's not detecting anything. After disconnecting the Ethernet cable, sometimes it's recovers and I can see the both wifi networks and bluetoth devices again, sometimes just the bluetooth doesn't work, and other times I can't recover at all. If the respective MMC is having trouble, maybe that would explain this sporadic behavior. |
Something interesting happened when I followed @chewitt's commands to enable my custom Here's the dmesg log: dmesg_with_iwd_debug.txt
|
Here's my attempt to connect via
I can connect to bluetooth devices just fine, so the issue appears to be isolated to just WiFi. |
I wonder if this is a race condition of some kind. Executing |
I made an important discovery. I copied the device tree blob from Armbian via Here's the dmesg: dmesg_with_armbian_dtb.txt So it seems to show that something different in the Armbian DTB file is what fixes this particular WiFi scan issue. However, I do still see the
|
With the Armbian DTB loaded on LibreELEC and
Here's the I think think is the relevant excerpt of the log where the password is entered and an error is returned:
|
What are the kernel logs showing at this time? There should be some authentication messages: https://bbs.archlinux.org/viewtopic.php?id=264116 |
Can you please look at your wireless configuration. As it looks to have WPA3 enabled. Can we please simplify the configuration - simple ssid: just lowercase text , a simple passphrase: just lowercase text. Just WPA2 and no Fast Transition enabled. then hopefully we can get a clear run |
I think those Unfortunately, I don't see any authentication messages like in that link. Here's the connection attempt and failure with the full output of
It looks like only extra information in that full print out is a
|
I don't know what Fast Transition is. I decided to make this simple and use my Android phone as a hotspot for testing to eliminate any possible configuration issue with the wifi router. On my phone, I configured the hotspot SSID as
Here's the relevant full
|
I also tried connecting to a wireless network with no password earlier, and it's the same error as the other two:
So it doesn't look like the issue is related to the password at all. |
Here's an excerpt of the full
Here's some connection information from the Armbian system:
|
It seems a bit strange to me that swapping in the Armbian DTB file allows wireless networks to be seen in Another thought I've had is that perhaps the "invalid-key" issue in particular might be a regression in |
This issue also seems to affect the Raspberry Pi 3 wifi capabilities. I updated my RaspberryPi (Model 3 B plus Rev 1.3) from 12.0.0 to 12.0.1 and now the WiFi on that box is also no longer working with the invalid-key message in the GUI. After connecting a physical etheret cable I found the following in Journalctl for iwd:
(The CMD_SET_CQM failed line can be ignored, that is present even with working WiFi on LE12.0.0) After reverting the Pi back to 12.0.0 - the wifi immediately works again with original configuration. So seems there is something more going on here... |
Is this still occurring with the latest LE13 nightlies?
|
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
message with any password I give. However, if I give a wrong password I also see aNetwork input/output error
notification appear after, which seems to indicate that the correct passwords are actually detected as correct but the connection is failing on something else.I think the Pine H64 Model B has a Realtek RTL8723BS, so it's possible something is messing up with that device driver, but that would be a different driver regardless from the one supporting the Amlogic Meson GXBB mentioned in issue #7166 . That seems to indicate the issue is not with the individual device drivers, but somewhere shared between the two.
The text was updated successfully, but these errors were encountered: