Ubuntu – TP-Link Archer T2U does not work on Ubuntu 16.04

wireless

I have a TP-Link Archer T2U that I want to use on Ubuntu 16.04.1 LTS (kernel 4.4.0.31-generic). I downloaded the Linux driver from the TP-Link website (http://www.tp-link.com/en/download/Archer-T2U.html#Driver), but unfortunately they say on their website it only works for kernel versions 2.6~3.16. I tried my luck anyway, but alas, it does not work.

Has anyone been able to get it to work on kernel versions later than 4 ?

I tried their suggested installation :
(1) sudo make


Output of sudo make:

$ sudo make
make -C UTIL/ osutil
make[1]: Entering directory '/home/werner/Downloads/Archer_T2U_V1_150901/Driver/UTIL'
cp -f os/linux/Makefile.6.util /home/werner/Downloads/Archer_T2U_V1_150901/Driver/UTIL/os/linux/Makefile
make -C /lib/modules/4.4.0-31-generic/build SUBDIRS=/home/werner/Downloads/Archer_T2U_V1_150901/Driver/UTIL/os/linux modules
make[2]: Entering directory '/usr/src/linux-headers-4.4.0-31-generic'
  Building modules, stage 2.
  MODPOST 1 modules
make[2]: Leaving directory '/usr/src/linux-headers-4.4.0-31-generic'
make[1]: Leaving directory '/home/werner/Downloads/Archer_T2U_V1_150901/Driver/UTIL'
/bin/sh cp_util.sh

make -C MODULE/ build_tools
make[1]: Entering directory '/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE'
make -C tools
make[2]: Entering directory '/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/tools'
gcc -g bin2h.c -o bin2h
make[2]: Leaving directory '/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/tools'
/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/tools/bin2h
chipset = mt7650u
chipset = mt7630u
chipset = mt7610u
make[1]: Leaving directory '/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE'
make -C MODULE/ osdrv
make[1]: Entering directory '/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE'
cp -f os/linux/Makefile.6 /home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux/Makefile
make -C /lib/modules/4.4.0-31-generic/build SUBDIRS=/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux modules
make[2]: Entering directory '/usr/src/linux-headers-4.4.0-31-generic'
  CC [M]  /home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux/../../sta/sta_cfg.o
/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux/../../sta/sta_cfg.c: In function ‘RTMPIoctlShow’:
/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux/../../sta/sta_cfg.c:7053:85: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
             snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
^
/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux/../../sta/sta_cfg.c:7053:95: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
             snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
^
/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux/../../sta/sta_cfg.c: In function ‘RtmpIoctl_rt_private_get_statistics’:
/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux/../../sta/sta_cfg.c:9737:17: warning: unused variable ‘fec_coding’ [-Wunused-variable]
    static char *fec_coding[2] = {"bcc", "ldpc"};
                 ^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux/../../sta/sta_cfg.o' failed
make[3]: *** [/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux/../../sta/sta_cfg.o] Error 1
Makefile:1403: recipe for target '_module_/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux' failed
make[2]: *** [_module_/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE/os/linux] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.4.0-31-generic'
Makefile:548: recipe for target 'osdrv' failed
make[1]: *** [osdrv] Error 2
make[1]: Leaving directory '/home/werner/Downloads/Archer_T2U_V1_150901/Driver/MODULE'
Makefile:3: recipe for target 'all' failed
make: *** [all] Error 2
******

So clearly this is not working for me. I desperately need this to work.

I also ran lsusb, but it doesn't seem as if my system even picks up the device ****

$ lsusb
Bus 002 Device 002: ID 8087:8001 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8009 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 009: ID abcd:1234 Unknown 
Bus 003 Device 005: ID 413c:2110 Dell Computer Corp. 
Bus 003 Device 003: ID 413c:1010 Dell Computer Corp. 
Bus 003 Device 002: ID 046d:c063 Logitech, Inc. DELL Laser Mouse
Bus 003 Device 007: ID 148f:761a Ralink Technology, Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
****

Any ideas ?

I already looked at the following pages, and tried some of the suggestions there, but nothing seems to work:

TP-Link Archer T2U installing driver issue

Trying to install tp-link archer T2U on ubuntu

TP-Link Archer T2U does not work on Ubuntu 15.10 +

Best Answer

I'm trying to do exactly the same thing

lsusb 'can' see your device, from your lsusb output above:

Bus 003 Device 007: ID 148f:761a Ralink Technology, Corp.

You can get rid of your build errors by editing the config.mk file(s) The one that looks like it's failing for you in in ~/MODULE/os/linux/.

Edit the config.mk file in that folder, appending the following to the FLAGS to the compiler. ( approx line 235 ).

-Wno-error=date-time 

so that it looks something like this:

WFLAGS := -g -DAGGREGATION_SUPPORT -DPIGGYBACK_SUPPORT -DWMM_SUPPORT -DLINUX -Wall 
-Wstrict-prototypes -Wno-trigraphs -Wno-incompatible-pointer-types 
-Wno-error=date-time**

Good luck

I had issues with pointer types so I needed to add the other one as well.

Related Question