XU4 and Archer T9UH V2 WLAN

Post Reply
Shadra
Posts: 7
Joined: Wed Mar 09, 2016 7:43 pm
languages_spoken: german
Has thanked: 2 times
Been thanked: 0
Contact:

XU4 and Archer T9UH V2 WLAN

Unread post by Shadra » Fri Nov 08, 2019 9:52 pm

Hello

I try to complie the driver for the Archer WLAN stick, but I can't find a solution yet.
On my research I couldn't "translate" the platforms from tp link and the XU4.

Makefile
https://pastebin.com/z21NU0e5

I followed the installation guide for raspberry (https://static.tp-link.com/2018/201812/ ... 0Linux.pdf), but didn't compiled a new kernel.
I set in the Makefile

Code: Select all

CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_BCM2709 = y
But make will not do it. Error:

Code: Select all

root@Zero:~/test/T9UH_linux_v4.3.21.1_24835.20171031# make
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.14.111-139/build M=/root/test/T9UH_linux_v4.3.21.1_24835.20171031  modules
make[1]: Verzeichnis „/usr/src/linux-headers-4.14.111-139“ wird betreten
  CC [M]  /root/test/T9UH_linux_v4.3.21.1_24835.20171031/core/rtw_cmd.o
In file included from ./include/linux/netfilter.h:8:0,
                 from ./include/linux/netfilter/nf_conntrack_tuple_common.h:6,
                 from ./include/linux/netfilter/nf_conntrack_dccp.h:29,
                 from ./include/net/netns/conntrack.h:11,
                 from ./include/net/net_namespace.h:27,
                 from ./include/linux/netdevice.h:42,
                 from /root/test/T9UH_linux_v4.3.21.1_24835.20171031/include/osdep_service_linux.h:35,
                 from /root/test/T9UH_linux_v4.3.21.1_24835.20171031/include/osdep_service.h:41,
                 from /root/test/T9UH_linux_v4.3.21.1_24835.20171031/include/drv_types.h:32,
                 from /root/test/T9UH_linux_v4.3.21.1_24835.20171031/core/rtw_cmd.c:22:
./include/linux/if.h:28:54: fatal error: sys/socket.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
scripts/Makefile.build:326: die Regel für Ziel „/root/test/T9UH_linux_v4.3.21.1_24835.20171031/core/rtw_cmd.o“ scheiterte
make[2]: *** [/root/test/T9UH_linux_v4.3.21.1_24835.20171031/core/rtw_cmd.o] Fehler 1
Makefile:1535: die Regel für Ziel „_module_/root/test/T9UH_linux_v4.3.21.1_24835.20171031“ scheiterte
make[1]: *** [_module_/root/test/T9UH_linux_v4.3.21.1_24835.20171031] Fehler 2
make[1]: Verzeichnis „/usr/src/linux-headers-4.14.111-139“ wird verlassen
Makefile:1714: die Regel für Ziel „modules“ scheiterte
make: *** [modules] Fehler 2
My system:
Linux Zero 4.14.111-139 #1 SMP PREEMPT Tue Apr 16 17:31:00 UTC 2019 armv7l armv7l armv7l GNU/Linux
Linux version 4.14.111-139 (root@1604_builder_armhf) (gcc version 5.4.1 20160904 (Ubuntu/Linaro 5.4.1-2ubuntu1~16.04)) #1 SMP PREEMPT Tue Apr 16 17:31:00 UTC 2019

Can someone help me please?
Thanks :)

User avatar
odroid
Site Admin
Posts: 32677
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 209 times
Been thanked: 364 times
Contact:

Re: XU4 and Archer T9UH V2 WLAN

Unread post by odroid » Tue Nov 12, 2019 10:59 am

If the WLAN adapter chipset is RTL8814AU, try to build this driver source.
https://github.com/mathew19/rtl8814AU

Shadra
Posts: 7
Joined: Wed Mar 09, 2016 7:43 pm
languages_spoken: german
Has thanked: 2 times
Been thanked: 0
Contact:

Re: XU4 and Archer T9UH V2 WLAN

Unread post by Shadra » Wed Nov 13, 2019 9:05 pm

I tried, but failed again. I need to configure the correct plattform, because it's not i386.
(See config list: https://pastebin.com/z21NU0e5)

I don't know which one is the correct one for building. I tried to check randomly arm variants, but no one worked for me.
So I can't build the driver :(

User avatar
igorpec
Posts: 419
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 11 times
Been thanked: 31 times
Contact:

Re: XU4 and Archer T9UH V2 WLAN

Unread post by igorpec » Wed Nov 13, 2019 9:42 pm

This WLAN dongle works on Armbian out of the box.

Plug and play with AP and full AC speed support.
ARMBIAN - follow on Twitter
linux for ARM development boards with user friendly development tools

User avatar
meveric
Posts: 10563
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105)
Has thanked: 19 times
Been thanked: 161 times
Contact:

Re: XU4 and Archer T9UH V2 WLAN

Unread post by meveric » Thu Nov 14, 2019 5:51 am

Shadra wrote:
Wed Nov 13, 2019 9:05 pm
I tried, but failed again. I need to configure the correct plattform, because it's not i386.
(See config list: https://pastebin.com/z21NU0e5)

I don't know which one is the correct one for building. I tried to check randomly arm variants, but no one worked for me.
So I can't build the driver :(
You should be able to use the following dkms package I created.
viewtopic.php?p=272641#p272641

You can also patch the code manually if you want:

Code: Select all

diff --git a/Makefile b/Makefile
index 84d76be..c01c6dc 100644
--- a/Makefile
+++ b/Makefile
@@ -917,7 +917,7 @@ EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04
 ifeq ($(CONFIG_PLATFORM_I386_PC), y)
 EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
 EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
-SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
+SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/arm.*/arm/ | sed -e s/aarch64/arm64/)
 ARCH ?= $(SUBARCH)
 CROSS_COMPILE ?=
 KVER  := $(shell uname -r)
These users thanked the author meveric for the post:
Shadra (Thu Nov 14, 2019 6:43 pm)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
odroid
Site Admin
Posts: 32677
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 209 times
Been thanked: 364 times
Contact:

Re: XU4 and Archer T9UH V2 WLAN

Unread post by odroid » Thu Nov 14, 2019 10:04 am

@Shadra,
I have no idea which OS image you are running but I have tested it on our Ubuntu 18.04 image with Kernel 4.14.150-170.

Code: Select all

sudo apt install git bc dkms
sudo apt purge linux-headers-4*
git clone --depth 1 https://github.com/mathew19/rtl8814AU
cd rtl8814AU/ 
Edited Makefile as @meveric's patch and built it.

Code: Select all

vi Makefile 
sudo cp -R . /usr/src/rtl8814au-4.3.21
sudo dkms build -m rtl8814au -v 4.3.21
sudo dkms install -m rtl8814au -v 4.3.21
There was no issue in the above process. But I couldn't test it since we have no same WiFi chipset here.
These users thanked the author odroid for the post:
Shadra (Thu Nov 14, 2019 6:43 pm)

Shadra
Posts: 7
Joined: Wed Mar 09, 2016 7:43 pm
languages_spoken: german
Has thanked: 2 times
Been thanked: 0
Contact:

Re: XU4 and Archer T9UH V2 WLAN

Unread post by Shadra » Thu Nov 14, 2019 6:42 pm

Thank you meveric! That was new for me and I'm glad that you linked me your thread. Thanks for your work!

I did like descriped:

Code: Select all

Die folgenden NEUEN Pakete werden installiert:
  8814au-dkms
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 1 nicht aktualisiert.
Es müssen 1'306 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 12.0 MB Plattenplatz zusätzlich benutzt.
Holen:1 https://oph.mdrjr.net/meveric all/main armhf 8814au-dkms all 4.3.21 [1'306 kB]
Es wurden 1'306 kB in 2 s geholt (597 kB/s).
Vormals nicht ausgewähltes Paket 8814au-dkms wird gewählt.
(Lese Datenbank ... 209320 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../8814au-dkms_4.3.21_all.deb ...
Entpacken von 8814au-dkms (4.3.21) ...
8814au-dkms (4.3.21) wird eingerichtet ...
Loading new 8814au-4.3.21 DKMS files...
Building for 4.14.111-139
Building for architecture armhf
Building initial module for 4.14.111-139
ERROR (dkms apport): kernel package linux-headers-4.14.111-139 is not supported
Error! Bad return status for module build on kernel: 4.14.111-139 (armhf)
Consult /var/lib/dkms/8814au/4.3.21/build/make.log for more information.

Code: Select all

root@ImageZero:~# cat /var/lib/dkms/8814au/4.3.21/build/make.log
DKMS make.log for 8814au-4.3.21 for kernel 4.14.111-139 (armhf)
Do Nov 14 10:34:22 CET 2019
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.14.111-139/build M=/var/lib/dkms/8814au/4.3.21/build  modules
make[1]: Verzeichnis „/usr/src/linux-headers-4.14.111-139“ wird betreten
  CC [M]  /var/lib/dkms/8814au/4.3.21/build/core/rtw_cmd.o
In file included from ./include/linux/netfilter.h:8:0,
                 from ./include/linux/netfilter/nf_conntrack_tuple_common.h:6,
                 from ./include/linux/netfilter/nf_conntrack_dccp.h:29,
                 from ./include/net/netns/conntrack.h:11,
                 from ./include/net/net_namespace.h:27,
                 from ./include/linux/netdevice.h:42,
                 from /var/lib/dkms/8814au/4.3.21/build/include/osdep_service_linux.h:35,
                 from /var/lib/dkms/8814au/4.3.21/build/include/osdep_service.h:41,
                 from /var/lib/dkms/8814au/4.3.21/build/include/drv_types.h:32,
                 from /var/lib/dkms/8814au/4.3.21/build/core/rtw_cmd.c:22:
./include/linux/if.h:28:10: fatal error: sys/socket.h: Datei oder Verzeichnis nicht gefunden
 #include <sys/socket.h>   /* for struct sockaddr.  */
          ^~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:326: recipe for target '/var/lib/dkms/8814au/4.3.21/build/core/rtw_cmd.o' failed
make[2]: *** [/var/lib/dkms/8814au/4.3.21/build/core/rtw_cmd.o] Error 1
Makefile:1535: recipe for target '_module_/var/lib/dkms/8814au/4.3.21/build' failed
make[1]: *** [_module_/var/lib/dkms/8814au/4.3.21/build] Error 2
make[1]: Verzeichnis „/usr/src/linux-headers-4.14.111-139“ wird verlassen
Makefile:1699: recipe for target 'modules' failed
make: *** [modules] Error 2
I did a release upgrade and now use Ubuntu Mate 18.04.03 LTS with a 4.14.111-139 kernel.

Uff...@ordoid
Should I really do that?
sudo apt purge linux-headers-4*

The headers are neccessary for the system... may I shouldn't purge them? O.o

User avatar
odroid
Site Admin
Posts: 32677
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 209 times
Been thanked: 364 times
Contact:

Re: XU4 and Archer T9UH V2 WLAN

Unread post by odroid » Thu Nov 14, 2019 7:34 pm

Our Kernel package comes with proper header files together automatically.
So we can remove the header package which comes from Canonical PPA.

Try this update process. You should have 4.14.150-170 after rebooting.
https://wiki.odroid.com/odroid-n2/os_im ... l_software

If you upgraded from 16.04, you need to add our Bionic PPA manually.

Shadra
Posts: 7
Joined: Wed Mar 09, 2016 7:43 pm
languages_spoken: german
Has thanked: 2 times
Been thanked: 0
Contact:

Re: XU4 and Archer T9UH V2 WLAN

Unread post by Shadra » Thu Nov 14, 2019 8:24 pm

odroid wrote:
Thu Nov 14, 2019 7:34 pm
Our Kernel package comes with proper header files together automatically.
So we can remove the header package which comes from Canonical PPA.

Try this update process. You should have 4.14.150-170 after rebooting.
https://wiki.odroid.com/odroid-n2/os_im ... l_software

If you upgraded from 16.04, you need to add our Bionic PPA manually.
I tried apt-get install linux-odroid-5422
And yes I came from 16.04 LTS and just did the upgrade like on a normal pc...

Code: Select all

root@ImageZero:~# apt-get install linux-odroid-5422
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Die folgenden NEUEN Pakete werden installiert:
  linux-odroid-5422
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 1 nicht aktualisiert.
Es müssen noch 0 B von 24.7 MB an Archiven heruntergeladen werden.
Nach dieser Operation werden 102 MB Plattenplatz zusätzlich benutzt.
(Lese Datenbank ... 203683 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../linux-odroid-5422_4.14.150-170_armhf.deb ...
Entpacken von linux-odroid-5422 (4.14.150-170) ...
dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/linux-odroid-5422_4.14.150-170_armhf.deb (--unpack):
 Versuch, »/boot/exynos5422-odroidxu3-lite.dtb« zu überschreiben, welches auch in Paket linux-image-4.14.111-139 20190416 ist
dpkg-deb: Fehler: Unterprozess einfügen wurde durch das Signal (Datenübergabe unterbrochen (broken pipe)) getötet
Fehler traten auf beim Bearbeiten von:
 /var/cache/apt/archives/linux-odroid-5422_4.14.150-170_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
My boot folder looks like this:

Code: Select all

root@ImageZero:~# ls -l /media/boot/
insgesamt 16268
-rwxr-xr-x 1 root root     9654 Nov 14 09:59  boot.ini
-rwxr-xr-x 1 root root      753 Aug 21  2017  boot.ini.default
-rwxr-xr-x 1 root root     9654 Nov 14 09:59  boot.ini.old
-rwxr-xr-x 1 root root    63513 Nov  8 12:31  exynos5422-odroidxu3.dtb
-rwxr-xr-x 1 root root    62458 Nov  8 12:31  exynos5422-odroidxu3-lite.dtb
-rwxr-xr-x 1 root root    63484 Nov  8 12:31  exynos5422-odroidxu4.dtb
-rwxr-xr-x 1 root root    63628 Nov  8 12:31  exynos5422-odroidxu4-kvm.dtb
drwxr-xr-x 2 root root     2048 Feb  8  2018 'System Volume Information'
-rwxr-xr-x 1 root root 10707829 Nov  8 12:31  uInitrd
-rwxr-xr-x 1 root root  5665992 Nov  8 12:31  zImage

User avatar
meveric
Posts: 10563
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105)
Has thanked: 19 times
Been thanked: 161 times
Contact:

Re: XU4 and Archer T9UH V2 WLAN

Unread post by meveric » Fri Nov 15, 2019 3:40 am

Shadra wrote:
Thu Nov 14, 2019 8:24 pm

Code: Select all

root@ImageZero:~# apt-get install linux-odroid-5422
Entpacken von linux-odroid-5422 (4.14.150-170) ...
dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/linux-odroid-5422_4.14.150-170_armhf.deb (--unpack):
 Versuch, »/boot/exynos5422-odroidxu3-lite.dtb« zu überschreiben, welches auch in Paket linux-image-4.14.111-139 20190416 ist
dpkg-deb: Fehler: Unterprozess einfügen wurde durch das Signal (Datenübergabe unterbrochen (broken pipe)) getötet
Fehler traten auf beim Bearbeiten von:
 /var/cache/apt/archives/linux-odroid-5422_4.14.150-170_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Try:

Code: Select all

apt-get autoremove --purge `dpkg --list | grep "linux-.*-4.14" | awk '{print $2}'`
apt-get install --reinstall linux-odroid-5422
The first line will remove all remains from the old Kernel images from HardKernel's Ubuntu 16.04
the second line will try to reinstall the new package from HardKernel.
Make sure to check /media/boot if all files are present before you reboot your system.
Even if you delete the Kernel from the system and the installation fails, don't worry as long as you don't restart the system you can probably fix any issue, so stay calm and no panic.

(Falls es Probleme gibt kannst Du mich auch direkt anschreiben und wir schauen ob wir sie lösen können ;))
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 0 guests