From 9699ded7ab16b2ecb0245ebd81c89c3760715058 Mon Sep 17 00:00:00 2001 From: Christian kimocoder Date: Fri, 6 Oct 2017 10:09:37 +0200 Subject: [PATCH 1/5] Update usb_intf.c * Fixed 1 uppercase VID/PID * Fixed 1 adapter name correction --- os_dep/linux/usb_intf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os_dep/linux/usb_intf.c b/os_dep/linux/usb_intf.c index 391873c..8cc2cd3 100644 --- a/os_dep/linux/usb_intf.c +++ b/os_dep/linux/usb_intf.c @@ -164,8 +164,8 @@ static struct usb_device_id rtw_usb_id_tbl[] ={ {USB_DEVICE(0x07B8, 0x8812),.driver_info = RTL8812}, /* Abocom - Abocom */ {USB_DEVICE(0x2001, 0x3315),.driver_info = RTL8812}, /* D-Link - Cameo */ {USB_DEVICE(0x2001, 0x3316),.driver_info = RTL8812}, /* D-Link - Cameo */ - {USB_DEVICE(0x13B1, 0x003f),.driver_info = RTL8812}, /* Linksys - WUSB6300 */ - {USB_DEVICE(0x2357, 0x0101),.driver_info = RTL8812}, /* TP-Link - Archer T4U */ + {USB_DEVICE(0x13B1, 0x003F),.driver_info = RTL8812}, /* Linksys - WUSB6300 */ + {USB_DEVICE(0x2357, 0x0101),.driver_info = RTL8812}, /* TP-Link - Archer T4U AC1200 */ {USB_DEVICE(0x2357, 0x0103),.driver_info = RTL8812}, /* TP-Link - T4UH */ {USB_DEVICE(0x2357, 0x010D), .driver_info = RTL8812}, /* TP-Link - Archer T4U AC1300 */ {USB_DEVICE(0x2357, 0x010E), .driver_info = RTL8812}, /* TP-Link - Archer T4UH AC1300 */ From 65323de3685342676cec1ffe341c69f2ad387777 Mon Sep 17 00:00:00 2001 From: Christian kimocoder Date: Fri, 6 Oct 2017 10:11:48 +0200 Subject: [PATCH 2/5] More USB VID/PID * Added adapter support for "Tenda U12" --- os_dep/linux/usb_intf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/os_dep/linux/usb_intf.c b/os_dep/linux/usb_intf.c index 8cc2cd3..a314c37 100644 --- a/os_dep/linux/usb_intf.c +++ b/os_dep/linux/usb_intf.c @@ -176,6 +176,7 @@ static struct usb_device_id rtw_usb_id_tbl[] ={ {USB_DEVICE(0x050D, 0x1109), .driver_info = RTL8812}, /* Belkin F9L1109 - SerComm */ {USB_DEVICE(0x148F, 0x9097), .driver_info = RTL8812}, /* Amped Wireless ACA1 */ {USB_DEVICE(0x0BDA, 0x8812), .driver_info = RTL8812}, /* Alfa - AWUS036AC */ + {USB_DEVICE(0x2604, 0x0012), .driver_info = RTL8812}, /* Tenda U12 */ #endif #ifdef CONFIG_RTL8821A From ad060ae04329b88eec4986a7a3025f36161208a1 Mon Sep 17 00:00:00 2001 From: Christian kimocoder Date: Fri, 6 Oct 2017 14:46:59 +0200 Subject: [PATCH 3/5] Created README.md * Created README.md --- README.md | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..18944ff --- /dev/null +++ b/README.md @@ -0,0 +1,107 @@ +# RTL8812AU/21AU and RTL8814AU drivers +# with monitor mode and frame injection + + +## DKMS +This driver can be installed using [DKMS]. This is a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated. To make use of DKMS, install the `dkms` package, which on Debian (based) systems is done like this: +``` +sudo apt install dkms +``` + +## Installation of Driver +In order to install the driver open a terminal in the directory with the source code and execute the following command: +``` +sudo ./dkms-install.sh +``` + +## Removal of Driver +In order to remove the driver from your system open a terminal in the directory with the source code and execute the following command: +``` +sudo ./dkms-remove.sh +``` + +## Make +For building & installing the RTL8812AU driver with 'make' use +``` +make +make install +``` +and for building & installing the RTL8814AU driver with 'make' use +``` +make RTL8814=1 +make install RTL8814=1 +``` + +## Notes +Download +``` +git clone -b v4.3.21 https://github.com/aircrack-ng/rtl8812au.git +``` +Package / Build dependencies +``` +sudo apt-get install build-essential +sudo apt-get install linux-headers-`uname -r` +``` +For setting monitor mode + 1. Fix problematic interference in monitor mode. + ``` + airmon-ng check kill + ``` + You may also uncheck the box "Automatically connect to this network when it is avaiable" in nm-connection-editor. This only works if you have a saved wifi connection. + + 2. Set interface down + ``` + sudo ip link set wlan0 down + ``` + 3. Set monitor mode + ``` + sudo iw dev wlan0 set type monitor + ``` + 4. Set interface up + ``` + sudo ip link set wlan0 up + ``` +For setting TX power (v4.3.21 branch only): +``` +sudo iwconfig wlan0 txpower 30 +``` +or +``` +sudo iw wlan0 set txpower fixed 3000 +``` +For Ubuntu 17.04 add the following lines +``` +[device] +wifi.scan-rand-mac-address=no +``` +at the end of file /etc/NetworkManager/NetworkManager.conf and restart NetworkManager with the command: +``` +sudo service NetworkManager restart +``` + +## Led Parameter +``` +We've added the "realtek-leds.conf" in build directory, +with this you may change the leds to +"2 Allways On", " 1 Normal" or "0 Allways Off" with placing the file in "/etc/modprobe.d/ + +Manual modprobe will override this file if option value also included at the command line, e.g., +$ sudo modprobe -r 8812au +$ sudo modprobe 8812au rtw_led_ctrl=1 +``` + +## Credits +``` +astsam - for the main work + monitor/injection support - https://github.com/astsam +``` + +## Other Sources +``` +astsam - https://github.com/astsam/rtl8812au +gnab - https://github.com/gnab/rtl8812au +zebulon2 - https://github.com/zebulon2/rtl8812au +paspro - https://github.com/paspro/rtl8812au +ulli-kroll - https://github.com/ulli-kroll/rtl8821au +tpircher - https://github.com/tpircher/rtl8814AU +xxNull-lsk - https://github.com/xxNull-lsk/rtl8812AU +``` From 879a4d7b9c2913d0daa441ff0f72591b3da68213 Mon Sep 17 00:00:00 2001 From: Christian kimocoder Date: Fri, 6 Oct 2017 14:48:04 +0200 Subject: [PATCH 4/5] Update README.md * Updated, without DKMS installation information --- README.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/README.md b/README.md index 18944ff..314bd6b 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,6 @@ # RTL8812AU/21AU and RTL8814AU drivers # with monitor mode and frame injection - -## DKMS -This driver can be installed using [DKMS]. This is a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated. To make use of DKMS, install the `dkms` package, which on Debian (based) systems is done like this: -``` -sudo apt install dkms -``` - -## Installation of Driver -In order to install the driver open a terminal in the directory with the source code and execute the following command: -``` -sudo ./dkms-install.sh -``` - -## Removal of Driver -In order to remove the driver from your system open a terminal in the directory with the source code and execute the following command: -``` -sudo ./dkms-remove.sh -``` - ## Make For building & installing the RTL8812AU driver with 'make' use ``` From 8cfaa2b86588466542e303aa5ae1678f99a96795 Mon Sep 17 00:00:00 2001 From: Christian kimocoder Date: Fri, 6 Oct 2017 14:54:17 +0200 Subject: [PATCH 5/5] Update README.md * Corrected some typos under "Led Parameter" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 314bd6b..560e8a0 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ sudo service NetworkManager restart ``` We've added the "realtek-leds.conf" in build directory, with this you may change the leds to -"2 Allways On", " 1 Normal" or "0 Allways Off" with placing the file in "/etc/modprobe.d/ +"2: Allways On", "1: Normal" or "0: Allways Off" with placing the file in "/etc/modprobe.d/ Manual modprobe will override this file if option value also included at the command line, e.g., $ sudo modprobe -r 8812au