Поддерживаю драйвер tp-link t4u для linux
Когда купил wifi адаптер, думал, что будет работать на моей ubuntu 20.04, потому что в числе поддерживаемых систем значился linux. Оказалось, что не работает. Попробовал решения, которые предлагают на форумах, но адаптер так и не заработал. Пришлось вчера и сегодня заняться поддержкой драйвера.
Я подумал, а может это и не сложно сделать. И взялся за работу. При компиляции появлялись ошибки. Например, нет функции get_ds. Ну да, она была в 4 версии ядра, а в 5 этой функции нет. Я иногда думаю, что разработчики не хотят поддерживать свои драйвера из-за того, что в ядре постоянно изменения вносят и переписывать нужно некоторые участки кода. В общем, я посмотрел как в старой версии ядра реализован get_ds. Оказывается он просто возвращает KERNEL_DS. Ну это я и заменил также. Потом была проблема со структурой времени, которая в текущем ядре уже есть только 64 битная версия. Это исправил. Были ещё мелкие вроде исправления, но я не помню уже что исправлял. Итак, драйвер скомпилировался, но отказывался регистрировать устройство адаптер. Я нашел патч link, который обязывает производителей указывать правила. Я добавил в каждую запись в os_dep/linux/rtw_cfgvendor.c, такое .policy = VENDOR_CMD_RAW_DATA,
И скомпилировал, скопировал и запустил. и вуаля! у меня получилось. ) Хоть я в разработке ядра не разбираюсь, но поддержку простенькую мне удалось сделать. Ссылку на исходники драйвера пока что выложу на google диск. вот ссылка. link.
Источник
Вопрос по настройке WiFi через адаптер Tp-Link Archer T4U
CrazyDIamond4
New member
sudo apt install realtek-rtl88xxau-dkms |
выполнял, ifconfig выдает
eth0: flags=4163 mtu 1500
inet 192.168.31.52 netmask 255.255.255.0 broadcast 192.168.31.255
inet6 fe80::8e89:a5ff:fec3:e3ab prefixlen 64 scopeid 0x20
ether 8c:89:a5:c3:e3:ab txqueuelen 1000 (Ethernet)
RX packets 13224 bytes 10494702 (10.0 MiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 8042 bytes 871686 (851.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 88 bytes 6936 (6.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 88 bytes 6936 (6.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lsusb
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 002: ID 1532:0221 Razer USA, Ltd Razer BlackWidow Chroma V2
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 2357:0115 TP-Link 802.11ac NIC
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 0951:16a4 Kingston Technology HyperX 7.1 Audio
Bus 004 Device 002: ID 1038:1376 SteelSeries ApS DOTA2 Gaming Mouse
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Я уже облазил буквально все форумы как англ так и рус, скачивал драйвера с github и так далее, прошу помощи иначе еще через час пойду вскрывать вены, всем заранее спасибо
sudo apt install realtek-rtl88xxau-dkms |
выполнял, ifconfig выдает
eth0: flags=4163 mtu 1500
inet 192.168.31.52 netmask 255.255.255.0 broadcast 192.168.31.255
inet6 fe80::8e89:a5ff:fec3:e3ab prefixlen 64 scopeid 0x20
ether 8c:89:a5:c3:e3:ab txqueuelen 1000 (Ethernet)
RX packets 13224 bytes 10494702 (10.0 MiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 8042 bytes 871686 (851.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 88 bytes 6936 (6.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 88 bytes 6936 (6.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lsusb
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 002: ID 1532:0221 Razer USA, Ltd Razer BlackWidow Chroma V2
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 2357:0115 TP-Link 802.11ac NIC
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 0951:16a4 Kingston Technology HyperX 7.1 Audio
Bus 004 Device 002: ID 1038:1376 SteelSeries ApS DOTA2 Gaming Mouse
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Я уже облазил буквально все форумы как англ так и рус, скачивал драйвера с github и так далее, прошу помощи иначе еще через час пойду вскрывать вены, всем заранее спасибо
Источник
Tp link archer t4u plus kali linux
I just recently bought the Archer T4U Plus adapter. While it has a official support for Mac and Windows OSs, I would like to know if it is going to add a compatible Linux driver because I tried to use it in a Ubuntu based OS and the receiver is not working nor being recognised.
It is expected to add Linux support to this adapter?
Sorry that we don’t provide any official driver for the Ubuntu based OS, while the Archer T4U Plus use the same chipset as the T4U, which is RTL8812AU, you may check if you can use the driver for the T4U:
Please be aware that the official driver of T4U only supports Linux kernel 2.6.18
4.11. There is no official driver for higher versions, you can search for the latest driver on the third-party website such as GitHub, then try to install it on your Ubuntu based OS.
Many thanks for your support and for giving me the chipset number. It seems that in other distros, like Arch Linux, there are working packages like this one
I will give it a shot.
Yes, you can give that a try. Good luck.
I successfully compiled it with kernel 5.4.0-72 on Ubuntu-based distro (Linux Mint). Also probably runs on kernel 5.8+ but not tested yet.
Hope this helps somebody 🙂
(⎈ |yc-syn:default)➜ driver_tp_link_t4u git:(master) ✗ uname -a
Linux rangerx-home 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
(⎈ |yc-syn:default)➜ driver_tp_link_t4u git:(master) ✗ sudo iwconfig wlxd03745f8e9e4
wlxd03745f8e9e4 IEEE 802.11AC ESSID:»homenet2″ Nickname:» »
Mode:Managed Frequency:5.18 GHz Access Point: 84:D8:1B:8A:3D:A8
Bit Rate:867 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:****-****-****-****-****-****-****-**** Security mode:open
Power Management:off
Link Quality=65/100 Signal level=-68 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Источник
Tp link archer t4u plus kali linux
TP-Link Archer T2U Plus a.k.a AC600 High-Gain
TP-Link Archer T2U Plus a.k.a AC600 High Gain is a very affordable dual band wireless adapter compatible with kali linux and supports monitor mode , soft AP mode,packet injection etc. it supports both 2.4 GHz and 5GHz band and has a 5dBi Antenna for better signal reception.2357:0120
Why should i buy this adapter ?
This adapter has a Realtek RTL8821AU Chipset at its heart. RTL8821AU has plenty of developer support in linux community and has driver for Kali linux , Parrot OS , Black Arch .etc Archer T2U Plus is on sale under 15 USD
1000 INR , which is a very affordable price for Beginners in Pentesting. 2357:0120 is the USB ID.
Driver for Debian Based Linux Distros (Ubuntu/Kali Linux)(x86_64)
- Update the package information :
sudo apt install build-essential libelf-dev linux-headers-$(uname -r)
- Download the Driver files using git :
git clone https://github.com/aircrack-ng/rtl8812au.git
- Navigate to the Downloaded directory :
sudo make dkms_install if the installation is aborted , execute this command »’sudo dkms remove 8812au/5.6.4.2_35491.20191025 —all»’ , if errors pop up »’Usage: remove / —all»’
- Check the wireless interfaces by typing iwconfig .
Driver for Raspberry Pi (Raspbian OS / Kali)(ARM)
- Update the package information :
For Raspbian OS
sudo apt-get install raspberrypi-kernel-headers
For Kali for ARM
sudo apt-get install build-essential libelf-dev kalipi-kernel-headers
- Download the Driver files using git :
git clone https://github.com/aircrack-ng/rtl8812au.git
- Navigate to the Downloaded directory :
For Raspberry (RPI)
- Then run this step to change platform in Makefile, For RPI 1/2/3/ & 0/Zero:
sed -i ‘s/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g’ Makefile
sed -i ‘s/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g’ Makefile
But for RPI 3B+ & 4B you will need to run those below which builds the ARM64 arch driver:
sed -i ‘s/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g’ Makefile
sed -i ‘s/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g’ Makefile
In addition, if you receive an error message about unrecognized command line option ‘-mgeneral-regs-only’ (i.e., Raspbian Buster), you will need to run the following commands, then retry building and installing:
export ARCH=arm
sed -i ‘s/^MAKE=»/MAKE=»ARCH=arm\ /’ dkms.conf
- Check the wireless interfaces by typing iwconfig .
Источник
primaryobjects / tplink-archer-t4u.md
How to Install the TP-Link Archer T4U Plus AC1300 USB WiFi Adapter on Linux Mint
The following steps will install the Linux Mint driver for the TP-Link Archer T4U Plus AC1300 USB Wifi adapter.
Installing the TP-Link Archer T4U Driver
Open a Linux terminal and run the following commands to download and build the driver.
You should see the following output:
Run the following command to install the driver.
You should see the following output:
Restart the NetworkManager with the following command.
You should now be able to see the new TP-Link 802.11ac NIC in the Wifi Connections in the bottom-right corner of your desktop. Optionally, you can right-click the Wifi icon in your system tray and select Network Settings to see the new TP-Link Wi-Fi adapter listed.
Using with an xfinitywifi Hot Spot
After installing the driver and successfully connecting to your new adapter, you may choose to connect to the xfinitywifi hotspot, which requires a login before providing Internet access.
If you attempt to access the Internet from Chrome, you may see an error ERR_QUIC_PROTOCOL. The solution to this is to login to the xfinitywifi service, as shown below.
- In Chrome, navigate to chrome://flags
- Search for Experimental QUIC protocol.
- Select Disable.
- Navigate to any web page and you should be directed to the xfinitywifi sign-in page.
- Enter your account login to connect to the Internet.
If the sign-in button fails to work, open Firefox and repeat steps 4-5.
TP-Link USB WiFi Adapter for PC (Archer T4U Plus)
Dual Band Wireless Network Adapter
Desktop with 2.4GHz/5GHz High Gain 5dBi Antennas
Источник