rtl8812AU and/or rtl8814AU drivers


#21

@jose-pr i've built and loaded that successfully on my router (Linux lede 4.4.53 #0 Tue Mar 14 12:29:03 2017 mips GNU/Linux) but it has the same issue as stated in the above post (for me).

note: i've also just built and loaded Grawp/rtl8812au_rtl8821au (RTL871X: rtl8812au v4.3.20_16317.20160108) succesfully, same issue as above (for me).

edit: @jose-pr can you provide the build fail messages? otherwise it's hard for someone to help :frowning:
edit2: my issue seems to be the same as here: https://github.com/dl12345/rtl8812au/issues/1 and https://github.com/dl12345/rtl8812au/issues/2

Okay, so now going back at it and I got the AP to broadcast with a manual setup via command line (broadcasting with hostapd).

and here we are with client mode (but i need to make route rules. this was connected with wpa_supplicant and udhcpc):

root@lede:~# iw wlan2 link
Connected to xx:xx:xx:xx:xx:xx (on wlan2)
        SSID: itsmelol
        freq: 2437
        signal: -44 dBm
        tx bitrate: 72.2 MBit/s

root@lede:~# iwconfig wlan2
wlan2     IEEE 802.11gn  ESSID:"itsmelol"
          Mode:Managed  Frequency:2.437 GHz  Access Point: xx:xx:xx:xx:xx:xx
          Bit Rate:72.2 Mb/s
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=54/100  Signal level=100/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@lede:~# ifconfig wlan2
wlan2     Link encap:Ethernet  HWaddr 11:22:33:44:55:66
          inet addr:10.242.242.199  Bcast:10.243.255.255  Mask:255.252.0.0
          inet6 addr: fe80::76da:38ff:feaf:b870/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3148 errors:0 dropped:140 overruns:0 frame:0
          TX packets:212 errors:0 dropped:12 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:980 (980.0 B)  TX bytes:21111 (20.6 KiB)

edit again: actually i was confused trying to get it routed on net masked 255.252.0.0 network but it's connected just fine on a 255.255.255.0 network with the wpa_supplicant and udhcpc commands. [i need to figure out why it wasn't routed properly on a 255.252.0.0 network but i can't test that right now] but im using it to send this message through my router. pretty happy :slight_smile:

edit again: there wasn't a routing issue before it was a dns issue. which was not handling the dns provided by the hotspot (so that you could login). once i edited /usr/share/udhcpc/default.script to understand $dns i had no issues with that network either


#22

Hello i try to install rtl8812AU for huawei hg 556a without any help Any help will be appreciated trying to build this driver to use on a huawei hg556a .I have ubuntu, but the commands should be similar
Thanks


#23

@cabut33 as of right now (from what i know) this driver wouldn't let you control the your card from luci. even when you do get it loaded, you'd have to run manual commands to get it to actually do anything (that or write the scripts to do it for you). so unless you're comfortable with that, i wouldn't suggest going any further or wasting any of your time.


How install rtl8812au driver on raspberry pi 3 with LEDE
#24

Ok waiting for your development THANKS


#25

make[3]: Entering directory '/home/jose/Escritorio/lede/package/kernel/rtl8812au'
rm -f /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/.built
touch /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/.built_check
make -C /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13 ARCH="mips" CROSS_COMPILE="mips-openwrt-linux-musl-" KSRC="/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/linux-4.4.59" KVER="4.4.59" M="/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13" MODULE_NAME="8812au" USER_EXTRA_CFLAGS="-DBACKPORT -DCONFIG_MINIMAL_MEMORY_USAGE -DCONFIG_DEBUG -DCONFIG_DEBUG_RTL871X -DCONFIG_DEBUG_CFG80211 -DCONFIG_PROC_DEBUG -DDBG_MEM_ALLOC" NOSTDINC_FLAGS="-I/home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/usr/include/mac80211 -I/home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/usr/include/mac80211/uapi -I/home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/usr/include/mac80211-backport -include backport/backport.h " KBUILD_EXTRA_SYMBOLS="/home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/usr/include/mac80211/Module.symvers" CONFIG_POWER_SAVING="n"
make[4]: Entering directory '/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13'
make ARCH=mips CROSS_COMPILE=mips-openwrt-linux-musl- -C /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/linux-4.4.59 M=/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13 modules
make[5]: Entering directory '/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/linux-4.4.59'
CC [M] /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/core/rtw_cmd.o
In file included from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/byteorder/little_endian.h:30:0,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/rtw_byteorder.h:30,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/drv_types.h:33,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/core/rtw_cmd.c:22:
/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/byteorder/swab.h:114:29: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
__inline static const __u16 __fswab16(__u16 x)
^
/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/byteorder/swab.h:114:29: error: conflicting types for '__fswab16'
In file included from include/linux/swab.h:4:0,
from include/uapi/linux/byteorder/big_endian.h:12,
from include/linux/byteorder/big_endian.h:4,
from ./arch/mips/include/uapi/asm/byteorder.h:12,
from ./arch/mips/include/asm/bitops.h:19,
from include/linux/bitops.h:36,
from /home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/usr/include/mac80211-backport/linux/bitops.h:3,
from include/linux/kernel.h:10,
from /home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/usr/include/mac80211-backport/linux/kernel.h:3,
from include/linux/list.h:8,
from /home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/usr/include/mac80211-backport/linux/list.h:3,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:50,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/osdep_service_linux.h:24,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/osdep_service.h:41,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/drv_types.h:32,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/core/rtw_cmd.c:22:
include/uapi/linux/swab.h:46:41: note: previous definition of '__fswab16' was here
static inline attribute_const __u16 __fswab16(__u16 val)
^
In file included from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/byteorder/little_endian.h:30:0,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/rtw_byteorder.h:30,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/drv_types.h:33,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/core/rtw_cmd.c:22:
/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/byteorder/swab.h:122:29: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
__inline static const __u32 __fswab32(__u32 x)
^
/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/byteorder/swab.h:122:29: error: conflicting types for '__fswab32'
In file included from include/linux/swab.h:4:0,
from include/uapi/linux/byteorder/big_endian.h:12,
from include/linux/byteorder/big_endian.h:4,
from ./arch/mips/include/uapi/asm/byteorder.h:12,
from ./arch/mips/include/asm/bitops.h:19,
from include/linux/bitops.h:36,
from /home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/usr/include/mac80211-backport/linux/bitops.h:3,
from include/linux/kernel.h:10,
from /home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/usr/include/mac80211-backport/linux/kernel.h:3,
from include/linux/list.h:8,
from /home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/usr/include/mac80211-backport/linux/list.h:3,
from include/linux/preempt.h:10,
from include/linux/spinlock.h:50,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/osdep_service_linux.h:24,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/osdep_service.h:41,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/include/drv_types.h:32,
from /home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/core/rtw_cmd.c:22:
include/uapi/linux/swab.h:57:41: note: previous definition of '__fswab32' was here
static inline attribute_const __u32 __fswab32(__u32 val)
^
scripts/Makefile.build:258: recipe for target '/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/core/rtw_cmd.o' failed
make[6]: *** [/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/core/rtw_cmd.o] Error 1
Makefile:1400: recipe for target 'module/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13' failed
make[5]: *** [module/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13] Error 2
make[5]: Leaving directory '/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/linux-4.4.59'
Makefile:1576: recipe for target 'modules' failed
make[4]: *** [modules] Error 2
make[4]: Leaving directory '/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13'
Makefile:80: recipe for target '/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/.built' failed
make[3]: *** [/home/jose/Escritorio/lede/build_dir/target-mips_mips32_musl/linux-brcm63xx_generic/rtl8812au-2016-12-13/.built] Error 2
make[3]: Leaving directory '/home/jose/Escritorio/lede/package/kernel/rtl8812au'
package/Makefile:109: recipe for target 'package/kernel/rtl8812au/compile' failed
make[2]: *** [package/kernel/rtl8812au/compile] Error 2
make[2]: Leaving directory '/home/jose/Escritorio/lede'
package/Makefile:105: recipe for target '/home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/stamp/.package_compile' failed
make[1]: *** [/home/jose/Escritorio/lede/staging_dir/target-mips_mips32_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/jose/Escritorio/lede'
/home/jose/Escritorio/lede/include/toplevel.mk:199: fallo en las instrucciones para el objetivo 'world'
make: *** [world] Error 2

help...???


#26

i believe that was already answered in rtl8812AU and/or rtl8814AU drivers "I only quickly build tested my Makefile on x86, maybe it is different in this regard. As a quick hack, try passing USER_EXTRA_CFLAGS="-D_LINUX_BYTEORDER_SWAB_H" to make which should inhibit the redefinitions."

i'll repeat myself though "even when you do get it loaded, you'd have to run manual commands to get it to actually do anything." it can't be controlled by luci at all (other than scanning for an AP).

(it also seems you are trying to use little_endian and big_endian which, you can't do. if that is the case, this will cause a compile error after you fix the byteorder thing. if that isn't the case, it might be that you need to use big_endian instead of little_endian). i'm thinking this because i see both and i'm quite sure, seeing both in that log looks wrong to me.

anyways, please share your makefile and the driver you're trying to compile, if you want more help.

this is my makefile (well a slightly older one but this one should still build, if the driver is patched with these https://github.com/dl12345/rtl8812au/tree/master/patches and assuming your building for mips_24kc, unless you are on trunk. if you want more info about that just click the link then read the comments from the link in this gist, more toward the bottom): https://gist.github.com/kodewdle/3537b45981392dc4e403cbe005374957

~ on another note ~
as of right now, i have a little script I'm working on it's not 100% and it's probably not the best thing but it works pretty decent for me in client mode. http://i.imgur.com/UVJzJfo.png

the main goal of it is to start the module, initialize wpa_supplicant, and initialize udhcpc (for client mode) with some options (while putting udhcpc in the background and also printing out some info about the radio/dhcp info). right now, it works off of a set of preconfigured configuration files. all you have to do is power the router on then use the script to bring the card up and connect it with one of the preconfigured configuration files. this makes it easy because you just send one little line that's easily typed (/etc/config/wpad/start.sh wpa). also this can be added into the startup script for automatic purpose.

i plan on adding (what i stated above is already in-place) AP support into this when i have more time to test what actually works in AP mode and if it has some hard limit to the amount of clients that can connect to it (i really don't know because i haven't tested this mode any further than getting the AP to actually broadcast).

i haven't even tried to attempt to figure out why luci hates it so much but these might sum it up https://github.com/dl12345/rtl8812au/issues/1#issuecomment-284224662 and https://github.com/dl12345/rtl8812au/issues/2#issuecomment-284225158

also, i wasn't trying to be rude before when i said don't waste your time, i was just being honest. im surprised i even got it running at all, much less some-what-stable.

i hope you have a nice day~ :slight_smile:


Support for User-Defined Wpa-Supplicant Config
#27

New major driver version was posted on astsam's git 12 days ago. Driver v5.1.5 for RTL8812AU (Tenda U12). I will test this with my current setup on LEDE when i have time later! :slight_smile:

edit: patched, complied, loaded, and connected it! :smile: can confirm (on my setup at least) that it's in a working state, i don't know how well of a working state that is but it's working so far. :slight_smile:

Firmware Version	LEDE Reboot SNAPSHOT r4053-21c2e93e67 / LuCI Master (git-17.120.73620-61797d5)
Kernel Version	4.4.61
Mon May  1 14:02:47 2017 kern.warn kernel: [  112.355273] rtl8812au v5.1.5_19247.20160830
Mon May  1 14:02:47 2017 kern.info kernel: [  112.564408] usbcore: registered new interface driver rtl8812au

#28

I don't think v5.1.5 is newer !
They ripped only the rtl8812au part of their internal repository.


#29

i don't completely understand what you mean.. im sorry :frowning:
do you mean Tenda only updated the rtl8812au part?

its from here: http://www.tendacn.com/en/product/download/U12.html
U12 Driver(For Linux): http://down.tendacn.com/uploadfile/2017/Drive/U12_linux_v5.1.5_19247.20160830.rar


#30

The code is from Realtek !

from a quick look :
compared with v4.3.22-beta, v5.1.5 has newer tables.
Maybe also a newer firmware
I will check this at the right time :wink:


#31

ah, thank you! :slight_smile: i also looked real quick. i just noticed they changed something with how tx power is handled and how debugging is handled (slightly change at all) but as i said it was running just fine for me under LEDE. i didn't run into any issues using it.

Thank you! :smiley:


#32

Hi,can someone help me? I need to install it but I don't know what to do
I opened a new topic

Thnaks a lot


#33

i replied to your topic, basically just suggesting you read one of the posts from this topic.


#34

How to install and working rtl8814au (eq. this wifi-ac card: https://www.aliexpress.com/item/600Mbps-1200Mbps-1750Mbps-Mini-USB-Wifi-Adapter-2-4G-5GHZ-USB-Wirless-Wifi-Receiver-802-11AC/32787025685.html - CF-917AC ) . When add official support to lede for this driver ?

LEDE router mips/ppc(other ???) platform system of course.


#35

Simple answer here:
normally at the time the driver is upstream.


#36

So I'm going to change the question - does anyone from lede-project developers take the trouble to add drivers / firmware to this chip?


#37

sadly this is the only AC usb device available on the market with some support for linux and the drivers are not standard so you have to do things manually, there were some attempts to convert it but everything is abandoned
none of the previous realtek maintainers seems to be interested in this device

regards


#38

Build to Linux WNDR4700 4.9.34 #0 Tue Jun 27 09:47:07 2017 ppc GNU/Linux (r4467-6da4f03) properly from this git sources/drivers (https://github.com/weedy/lede-rtl8812au-rtl8814au/) and...not working. Bug:

root@WNDR4700:~# insmod 8814au failed to insert /lib/modules/4.9.34/8814au.ko root@WNDR4700:~# logread (...) Tue Jun 27 15:17:49 2017 kern.warn kernel: [ 1253.660966] 8814au: Unknown symbol __ieee80211_get_channel (err 0)
Pleas help - I'am still choice to this working correct...
:confused:
Generally to Ubuntu 16.04.1 LTS (kernel: 4.8.0-56-generic #61~16.04.1-Ubuntu SMP Wed Jun 14 11:58:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux) driver build (very simple: dkms) and work perfectly (only client mode: ~235 Mb/s) from other github sources https://github.com/sbosshardt/rtl8814AU in this card https://www.aliexpress.com/item/600Mbps-1200Mbps-1750Mbps-Mini-USB-Wifi-Adapter-2-4G-5GHZ-USB-Wirless-Wifi-Receiver-802-11AC/32787025685.html .
:slight_smile:


#39

Really no one understands how to compile/install (working) on the current LEDE-trunk?


#40

did you tried this ?


I think that you are missing the symbols, read previous posts
https://github.com/musashino-build/lede-rtl8812au/commit/3fd7615dcbc3e8377981670c7e47c6238ca7f937