-
Notifications
You must be signed in to change notification settings - Fork 15
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
failed to download firmware using rtw_8822cu on 8811cu #11
Comments
It appears that I was getting a firmware validation error, this was due to it loading rtw8822c_fw.bin for a 8811cu chip which should use rtw8821c_fw.bin if I understand correctly.Digging through the code a little more I see there are what appears to be the beginings of modules for rtw8821c. I copied the rtw8822cu and configured it work for the rtw8821cu (changed usb ids in both, changed 8821 to 8822 and added to the makefile). After compiling this I got a kernel panic with the following call stack. Call stack |
At this point I am not sure how to proceed to enable 8811cu. Pointers or advice would be really appreciated It appears there is an issue that causes the kernel to be "Unable to handle kernel access to user memory outside uaccess routines at virtual address 000000000000008". I assume that there are modifications to 8821c.c that needs to be made similar to those in 8822c.c to support USB better, however as of current apart from efuse parsing (which the efuses appear from other drives to have the same mapping between 8821ce and 8821cu) I cannot see any that need to be made. Below are my 8821cu.c and 8821cu.h files. I removed the USB ids from the 8822.c file to ensure both weren't loaded.
|
Can use please say which branch you are using Also I assume from the chipname 8811cu this devices I might be possible, there is some error in the bluetooth handling. try attached patch. Note
|
Thank you for the reply and the patch! I am indeed using the development/chipset/rtl8822cu branch and a rtl8811cu, no BT and I believe single antenna. The specific model is a simplecomm nw602. The patch got me a little further into the boot process. I see it init core and printing the firmware version info.I am now kenel panicing on rtw_usb_write_data with what appears to be a NPE. "Unable to handle kernel execution of user memory at virtual address" Specifically it seems to be failing on rtw_tx_fill_txdesc_checksum(rtwdev, pkt_info, skb->data); This line "chip->ops->fill_txdesc_checksum(rtwdev, pkt_info, txdesc);" in rtw_tx_fill_txdesc_checksum fails because there is no function for this in 8821c.c I commented it out, but I now get error beacon valid. More digging required. |
I implemented rtw_tx_filldesc_checksum for 8821c. I have now made it even further through the boot process. I now get an error rfe 34 isn't supported. |
More progress. I added 34 rfe's that are all the same for 8821c and this seemed to correctly load the firmware and get me to a new and exciting error "wiphy should have REGULATORY_CUSTOM_REG". I am going to take another pass tomorrow and see if I can figure out what I need to do to get this working and why this would be any different for 8821c compared to 8822c. |
Using https://github.com/torvalds/linux/blob/master/drivers/net/wireless/realtek/rtw88/regd.c for rtw_regd_init_wiphy and rtw_regd_init seemed to fix the issue above. I now have wiphy_register failing with warning on core.c:872. in cfg80211 core.c that seems to be either failing on !have_band or validating policy for vendor commands. I am assuming that this is likely due to the contents of wiphy config passed across rather than a bug in cfg80211 itself. I am not sure how bands would fail from my reading of the code, but I could also be missing something or not seeing something else that is failing. |
After adding some more logging to cfg80211 it is failing on !have_band where it belives wiphy has nothing for bands 0-3. |
I got this to successfully load and show up in iw dev. It seems that openwrts backported mac80211 and cfg80211 wasn't linked in correctly in my make file. Scan and AP mode don't seem to work currently, but I will share back a patch if/when I get that working |
Ok on my next round I will add rtw_tx_filldesc_checksum for this will hopefully merged with some other debug Info and other branches into master |
The device seems to not be responding to commands. When trying to use it with openwrt I get these errors. There are no errors in dmesg from the device initializing. hostapd: nl80211 driver initalization failed. The devices show up in iw and I have attached a dump of that information. I have also attached my 8821cu.c, 8821cu.h and 8821c.c files as you may want to patch mine rather than write your own (happy to send a pr if you would prefer). Thanks for your continued help. Hopefully my investigation is somewhat helpful to you and others. |
Grummel .... I messed up from my new from one of my test boxes running latest kernel
I use old tools only for smaller output. after wpa_supplicant
after dhcp
So there some error here. AP Mode not checked |
Thank you so much for the new branch. The efuses piece seemed so obvious in retrospect! I did some testing today, I found that:
|
Only for clarification ... also related with some error on 8822bu after WPA handshake |
Powersafe is one issue
but 8822bu works with many/lots of stalls
maybe I can think of master for testing in the wild, at least for 8822bu. |
I gave iw wlan3 set power_save off a go. I seem to just get the errors below. I have seen instances of
|
The power safe error is in the driver. This builds all chipsets from rtl8723d, rtl8822bu, rtl8821cu, rtl8822cu Also I've added make targets to load: with beforehand unloading upstream rtw88 drivers This is/should be documented in newer README
HAVE FUN |
Thank you! I gave master a go with the recommended disable power safe and disable idle params. I now get AP appears to set the correct channel etc. but fail to show on any client. |
I can add some more logging to the driver if that is helpful and see if I can track down more of what is going on? |
NO.
on or the other (or both) are misleading Also some covert bugs in the sources |
I have some question Did you use concurrent STA with AP mode ? |
I have not been using concurrent STA with AP mode. I have done a scan and run AP mode, but the vast majority of my testing is just AP mode in itself. |
I think there something with the antenna. |
Firstly thank you for putting together this set of drivers, nothing else I have found comes close to working!
I managed to compile these for openwrt master snapshot build (happy to share hacky package file).
However I have ran into a problem where I get failed to download firmware on both of my test devices (Simplecom NW602, 8811cu based devices with usb ids of 0bda:c811). I tried newer firmware from the debian repo as well (I noticed the existing firmware in the fw directory had a version mismatch between wow and non-wow firmware). I also tested the device on windows and it works perfectly fine.
I was using your 8822cu dev branch.
Once I plug in the device I get:
rtw_8822cu 1-1.3:1.0: USB:2
rtw_8822cu 1-1.3:1.0: Firmware version 9.9.0, H2C version 15
rtw_8822cu 1-1.3:1.0: Firmware version 9.9.0, H2C version 15
rtw_8822cu 1-1.3:1.0: failed to download firmware
rtw_8822cu 1-1.3:1.0: failed to setup chip efuse info
rtw_8822cu 1-1.3:1.0: failed to setup chip information
Steps to setup:
modprobe mac80211
modprobe rtw88_8822cu
plug in usb
Any help would be much appreciated
The text was updated successfully, but these errors were encountered: