2

Hello fellow Ubuntunians ;)

I bought this cheap Ralink wifi adapter thinking that it would just work like magic as I am used to with Ubuntu. ;) However, this driver installation has been giving me much more trouble than I expected. I have scavenged through the boards for several hours trying everything. Well... I have known from the start that this would be the correct approach (I mean the answer):

Ralink MT7601U (148f:7601) Wi-Fi adapter installation

But, even with the patch applied I get the following:

ahti@ahti:~/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913$ make
make -C tools
make[1]: Siirrytään hakemistoon "/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools"
gcc -g bin2h.c -o bin2h
make[1]: Poistutaan hakemistosta "/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools"
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools/bin2h
cp -f os/linux/Makefile.6 /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/Makefile
make -C /lib/modules/3.2.0-70-generic/build SUBDIRS=/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux modules
make[1]: Siirrytään hakemistoon "/usr/src/linux-headers-3.2.0-70-generic"
  CC [M]  /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.o
In file included from /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rtmp_os.h:44:0,
                 from /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rtmp_comm.h:75,
                 from /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rt_config.h:33,
                 from /home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c:28:
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/os/rt_linux.h:282:2: virhe: unknown type name ”kuid_t”
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/os/rt_linux.h:283:2: virhe: unknown type name ”kgid_t”
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c: Funktio ”announce_802_3_packet”:
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c:331:16: varoitus: käyttämätön muuttuja ”pAd” [-Wunused-variable]
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c: Funktio ”STA_MonPktSend”:
/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c:399:9: varoitus: format ”%d” expects argument of type ”int”, but argument 3 has type ”long unsigned int” [-Wformat]
make[2]: *** [/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.o] Virhe 1
make[1]: *** [_module_/home/ahti/data/drivers/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux] Virhe 2
make[1]: Poistutaan hakemistosta "/usr/src/linux-headers-3.2.0-70-generic"
make: *** [LINUX] Virhe 2

Sorry for that my console output is in Finnish (How do I change those freaking console output in English anyway, btw? For apt and building tools mainly if not possible to use English locale for everything in terminal session? Not possible?)

But yeah, that's basically where I am at the moment.

I also tried to use ndis wrapper approach, but unshield couldn't extract the Windows driver executable and I couldn't find .sys/.inf combo anywhere so that idea was ditched.

Any help appreciated. I know that this is user namespace issue, but I haven't done any kernel coding, nevertheless I am a coder, thus can't solve this on my own.

Oh, and tinybit of my system info if needed: Ubuntu 12.04 (precise), Kernel: 3.2.0-70-generic (#105-Ubuntu SMP Wed Sep 24 19:49:16 UTC 2014), GCC version: 4.6 (x86_64-linux-gnu), Gnome 3.4.2

Many thanks in advance!

Ahti Komu
  • 542

2 Answers2

2

Answering to myself.

I was too eager to apply the patch. Without the patch applied, the driver compiled. However it seems either to map incorrectly or to just not work with my 148f:760b (<- notice the b instead of 1) usb adapter. I even modified the devices list to add a new alias, but even after loading the driver or a bunch of other stuff related to it, the adapter just was not recognized.

But when I installed the driver in Windows 7 (didn't seem to work on Windows XP) and after the installation process copied over the driver folder located in C:/ProgramData/Mediatek Driver/RT2870 Wireless LAN Card/Driver/ to Ubuntu and loaded it with ndis wrapper and with ndiswrapper-dkms package, the adapter was immediately functional. Actually, on Windows side it didn't recognize my wlan at all for some reason but on Ubuntu it was just one click and I was immediately online wirelessly.

So, odd behavior here and there but finally working.

Ahti Komu
  • 542
0

You're probably not using Ubuntu 12.04 anymore, but in any case, here's the solution for the compilation error you had when patches were applied:

The patches only work out-of-the-box with linux kernel >= 3.5. To make it work with Ubuntu's 12.04 kernel 3.2 you have to make a small correction:

In include/os/rt_linux.h, look for the following block. In my version it starts at line 280, but yours might be slightly different depending on where you got your sources from:

typedef struct _OS_FS_INFO_
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
    uid_t               fsuid;
    gid_t               fsgid;
#else
    kuid_t              fsuid;
    kgid_t              fsgid;
#endif
    mm_segment_t    fs;
} OS_FS_INFO;

Get this line (282 in my case):

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)

And change it to

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)

Try to compile now, and it should work :)

MestreLion
  • 20,086