0

I'm trying to install a Tp-Link T1U USB adapter on my machine. I'm currently running Ubuntu 18.04 with a 4.15.0-36-generic kernel. I've been looking at a few solutions for a couple of days, namely: https://github.com/ashaffer/rt3573sta https://github.com/lixz789/mt7610u_wifi_sta_v3002_dpo_20130916/pull/1

This is what I'm doing to install, following the README I downloaded and the suggested patch in the second link I posted:

sudo apt-get install git build-essential
$ mkdir ~/src
$ cd ~/src
$ git clone https://github.com/Myria-de/mt7610u_wifi_sta_v3002_dpo_20130916.git
$ git clone https://github.com/lixz789/mt7610u_wifi_sta_v3002_dpo_20130916.git
$ cd mt7610u_wifi_sta_v3002_dpo_20130916
$ make

This is what I get back:

make -C tools
make[1]: Entering directory '/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/tools'
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/tools/bin2h
chipset = mt7610u
cp -f os/linux/Makefile.6 /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/Makefile
make -C /lib/modules/4.15.0-36-generic/build SUBDIRS=/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-36-generic'
Makefile:975: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
CC [M]  /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.o
In file included from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_os.h:44:0,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_comm.h:75,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rt_config.h:33,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:28:
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/os/rt_linux.h:77:0: warning: "EXT_BUILD_CHANNEL_LIST" redefined
#define EXT_BUILD_CHANNEL_LIST  /* must define with CRDA */

<command-line>:0:0: note: this is the location of the previous definition
In file included from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/os/rt_linux.h:98:0,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_os.h:44,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_comm.h:75,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rt_config.h:33,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:28:
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/cfg80211.h:35:49: error: 'IEEE80211_NUM_BANDS' undeclared here (not in a function); did you mean 'IEEE80211_NUM_ACS'?
struct ieee80211_supported_band Cfg80211_bands[IEEE80211_NUM_BANDS];
                                             ^~~~~~~~~~~~~~~~~~~
                                             IEEE80211_NUM_ACS
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c: In function 'announce_802_3_packet':
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:341:16: warning: unused variable 'pAd' [-Wunused-variable]
RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)pAdSrc;
            ^~~
In file included from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_os.h:44:0,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_comm.h:75,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rt_config.h:33,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:28:
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c: In function 'STA_MonPktSend':
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:450:35: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]
     DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)\n", __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
                               ^                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/os/rt_linux.h:669:16: note: in definition of macro 'DBGPRINT_RAW'
     printk Fmt;               \
            ^~~
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:450:9: note: in expansion of macro 'DBGPRINT'
     DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)\n", __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
     ^~~~~~~~
scripts/Makefile.build:332: recipe for target '/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.o' failed
make[2]: *** [/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.o] Error 1
Makefile:1551: recipe for target '_module_/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux' failed
make[1]: *** [_module_/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-36-generic'
Makefile:403: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2

I'm in no shape or form, capable of translating all that and have no idea how to move forward.

Any help would be great.

NB: I hope I haven't made a mistake posting anything. I did try following the guidelines, but I'm not all that familiar.

2
  • 1
    The code probably isn't compatible with the kernel version you're running. It was written for older versions.
    – user880592
    Oct 12, 2018 at 18:52
  • Oh! Ok, that's interesting. I wonder if there's a way to get this adapter working with my kernel. I've got a Mediatek MT7630e on this machine and it's slowing down my internet connection, if not losing it all together every now and then. :/ Oct 12, 2018 at 20:14

2 Answers 2

0

Ahhhh! The always tricky, never straightforward mt7610u!

This driver has a difficult history with later Linux kernels, for example, here: https://ubuntuforums.org/showthread.php?t=2367163&highlight=mt7610u You might be interested in my post #18.

However, post #4 here claims that it is now working! https://ubuntuforums.org/showthread.php?t=2375919 We shall soon find out.

With a working internet connection by ethernet, tethering or whatever means possible, open a terminal and do:

sudo apt update
sudo apt install git
git clone https://github.com/ulli-kroll/mt7610u.git
cd mt7610u
make
sudo make installfw
sudo insmod mt7610u.ko

Before we proceed with further needed steps, tell us if a wireless interface is created:

iwconfig

...and if you can connect, pull web pages, etc., without difficulty.

EDIT: Let's be sure you have the 'master' branch. First, remove the possibly faulty file:

cd /home/momissimi
sudo rm -r mt7610u
git clone -b master https://github.com/ulli-kroll/mt7610u.git
cd mt7610u
make
sudo make installfw
sudo insmod mt7610u.ko

Any improvement?

19
  • Hi, sorry. I tried to reply earlier but did it the wrong way and my message got deleted. Here's what I get when I type make drive.google.com/file/d/1rBk5ECIz1-GztuNN7GjJO5SVJmgh0tS2/… Oct 14, 2018 at 17:28
  • Are you certain that you have build-essential installed? sudo dpkg -s build-essential | grep Status Are you certain that you cloned the 'master' branch?
    – chili555
    Oct 14, 2018 at 18:13
  • I think I do: Status: install ok installed Could you further explain cloning the master branch? Oct 14, 2018 at 19:41
  • The master branch makes with one warning and no errors on my 4.15.0-36 kernel. See my edit above in a few moments.
    – chili555
    Oct 14, 2018 at 20:59
  • Mmmhh... something happened. Not sure if installed though. Please keep in mind I do have a wireless connection on this machine, but the chipset is pathetic and keeps dropping the connection, hence the usb adapter. drive.google.com/file/d/1wCuZQFghFMCs95EpVFFMRHFbIJq60-zP/… Oct 15, 2018 at 18:20
0

Kernel 4.19 has a working drive.

To install:

  1. Open http://kernel.ubuntu.com/~kernel-ppa/mainline/ and select the latest kernel version folder.

  2. Download .deb for linux-headers, linux-headers-generic, linux-image and linux-modules and install.

  3. Reboot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .