Skip to content
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

No wireless entry in the image from https://jayanta525.gitlab.io/openwrt-rockchip/armv8/ ? #1

Closed
Pix13 opened this issue Jul 20, 2020 · 25 comments

Comments

@Pix13
Copy link

Pix13 commented Jul 20, 2020

Hi, i just received my Rock Pi E with the Dual-band 802.11b/g/n/ac WiFi 5 and Bluetooth 4.2 via RTL8821CU, and i don't have Wireless appearing in the Network Menu.

Is the openwrt image out of date and i should build the latest git revision to get wireless, or is this wifi chip not yet supported ?

Best regards,

@Pix13 Pix13 closed this as completed Jul 20, 2020
@Pix13
Copy link
Author

Pix13 commented Jul 20, 2020

Nm found out the kmod for the rtl8821, but the kernel on the image is older than the kmods in opkg update, so i'll rebuild everything on my side :)

@jayanta525
Copy link
Owner

Hello @Pix13

The RockPiE sent to me had the RTL8723DU wireless, which had no native OpenWrt support. I included the drivers in OpenWrt build, but had issues with it initially and paused the work.

For the rtl8821, you can try compiling a build with drivers from here: https://github.com/suwus/openwrt-feeds-driver-ext/tree/master/rtl8821cu

Just include this GitHub repo URL in feeds.conf and select the appropriate kmod in menuconfig.
Let me know if you come across any issues.

Also, I rebased the repo to the latest openwrt/master.

@Pix13
Copy link
Author

Pix13 commented Jul 20, 2020

i'm rebuilding right now with rtl8xxxu who may work and be a good solution, i'll let you know, and if it does not work i'll switch to adding the repo you hilighted, thank you very much :)

@jayanta525
Copy link
Owner

@Pix13 rtl8xxxu probably won't work with rtl8821cu. RTL chipsets are released too frequently and the drivers aren't mainlined, which leads to very poor support.

You could give it a trial, and also with the GitHub repository I linked.

FriendlyARM has a working version of this driver, I'll have a look at it.

@jayanta525
Copy link
Owner

@Pix13 any luck with the wireless drivers?

@Pix13
Copy link
Author

Pix13 commented Jul 20, 2020

I left work with the build started it’s 10
Pm here :-) I launched it with the driver added to the feeds and selected it as builtin in the configuration, tomorrow morning i reflash the emmc and will let you know :)

@Pix13
Copy link
Author

Pix13 commented Jul 21, 2020

Something is missing from https://github.com/suwus/openwrt-feeds-driver-ext/ as the buildsys comes into the directory, builds nothing, touch .built and tries to install the kernel module.. and fails:

make[4]: Leaving directory '/home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/linux-5.4.52'
for subdir in .; do realdir=$(readlink -f /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1); grep -F /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1 /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/$subdir/Module.symvers >> /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/Module.symvers.tmp; [ "/home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1" = "$realdir" ] || grep -F $realdir /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/$subdir/Module.symvers >> /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/Module.symvers.tmp; done; sort -u /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/Module.symvers.tmp > /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/Module.symvers; mv /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/Module.symvers /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/symvers/rtl8821cu.symvers
touch /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/.built
rm -rf /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/.pkgdir/kmod-rtl8821cu.installed /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/.pkgdir/kmod-rtl8821cu
mkdir -p /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/.pkgdir/kmod-rtl8821cu
ERROR: module '/home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/rtl8821cu.ko' is missing.
make[3]: *** [Makefile:73: /home/pix/perso/rock-pi-e/build_dir/target-aarch64_generic_musl/linux-rockchip_armv8/rtl8821cu-1.0.1/.pkgdir/kmod-rtl8821cu.installed] Error 1

I'm looking into https://github.com/brektrou/rtl8821CU to maybe see if i can make it build in a separate feed, using the existing ones as an example

@jayanta525
Copy link
Owner

jayanta525 commented Jul 21, 2020

You might also want to look at friendlyarm's friendlywrt for these drivers.

I will be having my exams this week and won't be able to invest time here.

@Pix13
Copy link
Author

Pix13 commented Jul 21, 2020

No problem, i forked you repo and will work on it ( i'm used to cross compilation buildsystems, just not OpenWRT's one, but i'll learn). As soon as i have a modular kmod solution i'll send you a pull request if i succeed

@Pix13
Copy link
Author

Pix13 commented Jul 28, 2020

Quick update, i now can build the rtl8821cu kernel module, but it lacks necessary mac80211 api parts, and cannot be used by OpenWRT as far as i know.

How to test:

Pick this commit for RockPi's openwrt: https://github.com/Pix13/rock-pi-e/commit/fd7ed0c7d66540d57b117c6e537e2171f0ae242d ( it disables 32 bit support which is useless and triggers an unrelated compat define in the wifi part)

Install the feed from my fork: https://github.com/Pix13/openwrt-feeds-driver-ext

Then you can select 8821cu ( [*] ) and build the image, 2 radios will appear in LuCi, but unusable ( see openwrt/luci#3733), you can scan wifi networks as client, but they cannot work as an AP because of the lack of support in iwinfo.

I'm angling to https://github.com/neojou/rtw88-usb/issues/36 which will support the full mac80211 api

@Pix13
Copy link
Author

Pix13 commented Jul 28, 2020

I rebased my fork on your latest commit, just had to add another fix to the rtl8821cu afterwards due to an API change in mac80211, but now it loads and appears as a radio ( still not - yet i hope - useable)

@jayanta525
Copy link
Owner

Thanks for the update.

I saw some hacks related to iwinfo with rtl8189. I will look into it.

@Pix13
Copy link
Author

Pix13 commented Aug 3, 2020

I'm interested if you have some reference on the hacks ! :) ( or maybe you're already working on it ?)

@jayanta525
Copy link
Owner

Last time, when I was dealing with RTL8189 drivers in OpenWrt and uses this as reference: https://forum.openwrt.org/t/the-rtl8189-and-similar-drivers-are-not-compatible-with-commit-mac80211-rebase-ontop-of-v4-18-5-and-newer/31034/3?u=jayanta525

Seems like you've already been in that thread 😄

@jayanta525
Copy link
Owner

@Pix13 have a look at this: https://github.com/friendlyarm/rtl8821CU

FriendlyARM's friendlywrt seems to support rtl8821cu

@Pix13
Copy link
Author

Pix13 commented Aug 3, 2020

Yeah i found it afterwards, i'm also looking in https://github.com/powderluv/hostapd-rtl871xdrv/tree/hostapd-2.9 i'll check if i can package the patches with a "Realtek" option in hostapd to see if it allows AP mode at least in the CLI

@Pix13
Copy link
Author

Pix13 commented Aug 3, 2020

@Pix13 have a look at this: https://github.com/friendlyarm/rtl8821CU

FriendlyARM's friendlywrt seems to support rtl8821cu

Yeah i saw their tree but it's just the source tree fork, could not find the driver in FrientdlyWRT proper, i need to look better maybe

@Pix13
Copy link
Author

Pix13 commented Aug 3, 2020

Hm setting set wireless.${RADIO}.disabled=0 on the radios hangs the box if you try ifconfig or any interface query afterwards. ( if you try it, beware, you need a serial console to set disabled=1 on both radio or you won't have any LAN access :) )

@jayanta525
Copy link
Owner

Seems that FriendlyWrt's rtl8821cu driver implementation is split across three different repositories. And the hacks aren't organized to work with.

@Pix13
Copy link
Author

Pix13 commented Aug 5, 2020

Looks like the rtl8821cu is only supported on the NanoPi R1 ( Allwinner H3) and strangely the module is only provided as a prebuilt kernel module: https://github.com/friendlyarm/sd-fuse_h3/tree/master/prebuilt/kernel-module/4.14.111/extra

@Pix13
Copy link
Author

Pix13 commented Aug 5, 2020

@Pix13
Copy link
Author

Pix13 commented Aug 5, 2020

Following the trail.... friendlyarm/sd-fuse_rk3328@f2f556d

@Pix13
Copy link
Author

Pix13 commented Nov 4, 2020

Hi Jayanta, a heads up on the topic, i just noticed you did a rebase, i discovered that the rt8821cu is now supported in https://github.com/ulli-kroll/rtw88-usb which should mean the full mac80211 api support and access point for the board, i'm gonna create a feed to build it within openwrt, i'll keep up posted on the result of the test

@Pix13
Copy link
Author

Pix13 commented Nov 6, 2020

FYI: ulli-kroll/rtw88-usb#12

If you want to test and/or reproduce: https://github.com/Pix13/rk3328-rock-pi-e/tree/wip-rtw88-usb

select rtw88-usb in the Kernel Modules -> Wireless it will auto select the right firmwares too. Hopefully if the issue is fixed / explained on the driver side, it should fully enable the board :)

jayanta525 pushed a commit that referenced this issue Jan 17, 2021
The Ubiquiti Network airCube AC is a cube shaped device supporting
2.4 GHz and 5 GHz with internal 2x2 MIMO antennas.
It can be powered with either one of:
 - 24v power supply with 3.0mm x 1.0mm barrel plug
 - 24v passive PoE on first LAN port
There are four 10/100/1000 Mbps ports (1 * WAN + 3 * LAN).
First LAN port have optional PoE passthrough to the WAN port.

SoC:       Qualcomm / Atheros AR9342
RAM:       64 MB DDR2
Flash:     16 MB SPI NOR
Ethernet:  4x 10/100/1000 Mbps (1 WAN + 3 LAN)
LEDS:      1x via a SPI controller (not yet supported)
Buttons:   1x Reset
Serial:    1x (only RX and TX); 115200 baud, 8N1

Missing features:
 - LED control is not supported

Physical to internal switch port mapping:
 - physical port #1 (poe in) = switchport 2
 - physical port #2 = switchport 3
 - physical port #3 = switchport 5
 - physical port #4 (wan/poe out) = switchport 4

Factory update is tested and is the same as for Ubiquiti AirCube ISP
hence the shared configuration between that devices.

Signed-off-by: Roman Kuzmitskii <[email protected]>
jayanta525 pushed a commit that referenced this issue May 11, 2021
SMP isn't supported on BCM6358 since it has a shared TLB. Some boards boot
with CPU #1 instead of CPU #0, and this is currently not supported do to a
smp-bmips bug.

Signed-off-by: Álvaro Fernández Rojas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants