Search This Blog

Friday, July 6, 2018

How to install linux drivers for WF2190 and WF2561 USB adapters?



Introduction.

### WF2190 ###

Information about WF2190 USB adapter:
http://www.netis-systems.com/Home/detail/id/96.html
http://www.netis-systems.com/Suppory/de_details/id/1/de/96.html

WF2190 driver:
http://www.netis-systems.com/Suppory/downloads/dd/1/img/443



### WF2561 ###

Information about WF2561 USB adapter:
http://www.netis-systems.com/Home/detail/id/100.html
http://www.netis-systems.com/Suppory/de_details/id/1/de/100.html

WF2561 drivers:
http://www.netis-systems.com/Suppory/downloads/dd/1/img/443
(link to WF2190 driver, because, it is written for WF2561 too.)

Before compiling i would like to say, that this driver recommended for Ubuntu 16.04, but i tried this on Debian 8, and worked, so as i think this simple driver should work, in the others too, because, this code makes only one file, and insert it to kernel's directory, so if something will be wrong, you can just remove module from kernel...

Before we are going to compile driver, we need development tools, different linux  distribution has different installation way, but tools work the same.

-~*~--~*~--~*~--~*~--~*~--~*~--~*~--~*~-

Ubuntu:
$ sudo apt-get install build-essential

Debian:
$ sudo apt-get install build-essential

CentOS:
$ sudo yum groupinstall 'Development Tools'

Fedora:
$ dnf install @development-tools

Arch:

$ sudo pacman -Sy base-devel

OpenSUSE:
$ sudo zypper install -t pattern devel_basis

-~*~--~*~--~*~--~*~--~*~--~*~--~*~--~*~--

OK.

Let's do this... :)

1. Download driver, (link is in this post).
2. Unpack driver;

$ unzip RTL8812AU_*.zip -d RTL8812AU/

3. Compile and install driver:

$ cd RTL8812AU/RTL881*/RTL*/
$ chmod +x install.sh
$ ./install.sh

(You will need type root password, or just start install.sh like root)

4. Errors :)

If you got compiling error, like this:

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/3.16.0-6-amd64/build M=/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108 modules
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-6-amd64'
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-6-amd64'
CC [M] /home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_cmd.o
CC [M] /home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_security.o
CC [M] /home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_debug.o
/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_debug.c: In function ‘dump_drv_version’:
/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_debug.c:71:64: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
DBG_871X_SEL_NL(sel, "build time: %s %s\n", __DATE__, __TIME__);
^
/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_debug.c:71:1: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
DBG_871X_SEL_NL(sel, "build time: %s %s\n", __DATE__, __TIME__);
^
/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_debug.c:71:1: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_debug.c:71:1: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_debug.c:71:1: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_debug.c:71:1: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
cc1: some warnings being treated as errors
/usr/src/linux-headers-3.16.0-6-common/scripts/Makefile.build:262: recipe for target '/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_debug.o' failed
make[4]: *** [/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108/core/rtw_debug.o] Error 1
/usr/src/linux-headers-3.16.0-6-common/Makefile:1358: recipe for target '_module_/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108' failed
make[3]: *** [_module_/home/user/Desktop/RTL8812AU/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/rtl8812AU_linux_v4.3.20_16317.20160108] Error 2
Makefile:181: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-6-amd64'
Makefile:1656: recipe for target 'modules' failed
make: *** [modules] Error 2
##################################################
Compile make driver error: 2
Please check error Mesg

##################################################


Don't worry, everything is just fine... :)

Some tricks to fix this:

1. Open zip with archive manager, like that:


2. Go to this location:
/RTL8812AU_WF2190_WF2561/RTL8812AU_linux_v4.3.20_16317_20160108/driver/

3. Open tar.gz package too:

4. Open folder:
/rtl8812AU_linux_v4.3.20_16317.20160108/

5. Open Makefile with text editor:

6. Insert this code to file, you can write this on the top of code:

EXTRA_CFLAGS += -Wno-error=date-time

7. Save the file, and you can compile driver again... should work...

Example...

##################################################
Compile make driver ok!!
##################################################
Authentication requested [root] for remove driver:
rmmod: ERROR: Module 8812au is not currently loaded
Authentication requested [root] for insert driver:
Authentication requested [root] for install driver:
install -p -m 644 8812au.ko  /lib/modules/3.16.0-6-amd64/kernel/drivers/net/wireless/
/sbin/depmod -a 3.16.0-6-amd64
##################################################
The Setup Script is completed !
##################################################

If you all did successfully, just plug in USB adapter, and your WIFI will show up...

Also, you can check your dmesg output, my example is here:

$ dmesg


But if this driver'll not work for your system, you can simply remove module from kernel's path, as example "/lib/modules/3.16.0-6-amd64/kernel/drivers/net/wireless/"  just read compiling output, you will see where module was installed...

# - means, you need do commands with root user;

# cd /lib/modules/3.16.0-6-amd64/kernel/drivers/net/wireless/ 
 (^^^this line is just example^^^ )
# rm 8812au.ko

 And after just:

# /sbin/depmod -a 3.16.0-6-amd64

(^^^ again it's just example, read your compiling output ^^^)



No comments: