I bought the MediaTek (Ralink) UWN100 Wi-Fi adapter from Logic Supply 
because they had the BBB in stock and I didn't want to pay separate 
shipping. Apparently it works immediately in Ubuntu 13, but not before 
12.10. I already had 12.04 installed before learning this, so I thought, 
"How hard could it be to get it working in 12.04?"

Here's the answer. Hard. Or at least frustrating...  Of course I'd probably 
have run into most of these issues eventually, so I guess it was good 
education. 

Despite its tiny size, the 7601 chip puts out a stronger Wi-Fi signal than 
my 12" tablet or my Moto Electrify. Seems to work great now. 


The play-by-play adventure (possibly not all essential):

ubuntu@ubuntu-armhf:/$ sudo apt-get -y install lxde lxde-core 
lxde-icon-theme
ubuntu@ubuntu-armhf:/$ sudo reboot

[insert USB Wi-Fi adapter]
ubuntu@ubuntu-armhf:/$ sudo reboot
ubuntu@ubuntu-armhf:~$ lsusb
Bus 001 Device 002: ID 148f:7601 Ralink Technology, Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

[This Quick Installation failed]
<https://docs.google.com/document/d/1-CIGQYdk8ZhU3D3UCNn70jc7C9HdXvEZAsiNW71fGIE/edit?pli=1>

ubuntu@ubuntu-armhf:~$ sudo mkdir -p /etc/Wireless/RT2870STA
ubuntu@ubuntu-armhf:~$ sudo apt-get install curl
ubuntu@ubuntu-armhf:~$ curl -kO 
https://googledrive.com/host/0B_JlgOR4VNe0Sjg4ei00ySEY4aUE/mt7601.tar.gz

ubuntu@ubuntu-armhf:~$ sudo tar xzvf mt7601.tar.gz -C 
/etc/Wireless/RT2870STA/ RT2870STA.dat
ubuntu@ubuntu-armhf:~$ sudo tar xzvf mt7601.tar.gz -C /lib/modules/$(uname 
-r)/  mt7601Usta.ko mtutil7601Usta.ko mtnet7601Usta.ko
ubuntu@ubuntu-armhf:~$ sudo depmod -a
ubuntu@ubuntu-armhf:~$ sudo echo mtnet7601Usta > 
/etc/modules-load.d/mt7601.conf 

[That file structure didn't seem to exist for me, I edited the one I found 
manually:]
ubuntu@ubuntu-armhf:/etc$ nano modules
[paste mtnet7601Usta]
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
mtnet7601Usta

ubuntu@ubuntu-armhf:/etc$ sudo reboot
[no ra0 in ifconfig]
ubuntu@ubuntu-armhf:~$ dmesg | grep 7601
[    2.727503] usb 1-1: New USB device found, idVendor=148f, idProduct=7601
[    3.953088] mtutil7601Usta: disagrees about version of symbol 
module_layout
[    5.428503] mtutil7601Usta: disagrees about version of symbol 
module_layout

[Conclusion - their driver was built with different symbols.]

ubuntu@ubuntu-armhf:/lib/modules/3.8.13-bone30$ sudo rm mt7601Usta.ko
ubuntu@ubuntu-armhf:/lib/modules/3.8.13-bone30$ sudo rm mtnet7601Usta.ko
ubuntu@ubuntu-armhf:/lib/modules/3.8.13-bone30$ sudo rm mtutil7601Usta.ko



<http://osdir.com/ml/beagleboard/2013-07/msg01948.html>
-----
The UWN100 and UWN200 have been tested and work on Ubuntu 13.04 (with 
NetworkManager support, too). The pre-compiled drivers won't work, as they 
were compiled on the ARM architecture. However, the full installation 
process will work, and is nearly the same as the tutorial outlines. There 
are some distribution-specific changes that need to be made, though. 
 You'll need to install the "build-essential" package instead of 
"kernel-dev," and you'll probably also need "linux-headers-$(uname -r)".The 
module files (.ko files) should be copied to /lib/modules/$(uname 
-r)/kernel/drivers/net/wireless/You'll need to add "mtnet7601Usta" to 
/etc/modules, instead of /etc/modules-load.d/mt7601.conf
-----

[Trying Full Installation]

ubuntu@ubuntu-armhf:~$ sudo apt-get install build-essential
ubuntu@ubuntu-armhf:~$ sudo reboot

ubuntu@ubuntu-armhf:/lib/modules/3.8.13-bone30/kernel/drivers/net/wireless$ 
sudo apt-get install linux-headers-3.8.13-bone30
E: Unable to locate package linux-headers-3.8.13-bone30
E: Couldn't find any package by regex 'linux-headers-3.8.13-bone30'

[They aren't there...  They are at:]
http://rcn-ee.net/deb/precise-armhf/v3.8.13-bone30/ 

root@ubuntu-armhf:/# sudo apt-get install unzip wireless-tools
wireless-tools is already the newest version.
unzip is already the newest version.

root@ubuntu-armhf:/# sudo apt-get install synaptic
root@ubuntu-armhf:/# sudo apt-add-repository -r "deb 
http://rcn-ee.net/deb/precise-armhf/v3.8.13-bone30/ precise nelson"
[Tried several ways in cmdline and Synaptic GUI, could not add repo!]

[Downloaded the header file and driver source on PC, SFTP to BBB, installed 
manually]
root@ubuntu-armhf:/home/ubuntu# dpkg -i 
linux-headers-3.8.13-bone30_1.0precise_arrmhf.deb
root@ubuntu-armhf:/home/ubuntu# tar -xvjpf DPO_MT7601*

root@ubuntu-armhf:/home/ubuntu/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux# 
cat config.mk
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
[already set to 'y']

root@ubuntu-armhf:/home/ubuntu/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913# make 
all
/usr/src/linux-headers-3.8.13-bone30/arch/arm/include/asm/timex.h:18:24: 
fatal error: mach/timex.h: No such file or directory
[Known error in kernel vs. headers...]

/*
 *  arch/arm/include/asm/timex.h
 *
 *  Copyright (C) 1997,1998 Russell King
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 *  Architecture Specific TIME specifications
 */
#ifndef _ASMARM_TIMEX_H
#define _ASMARM_TIMEX_H

#ifdef CONFIG_ARCH_MULTIPLATFORM
#define CLOCK_TICK_RATE 1000000
#else
#include <mach/timex.h>
#endif
...

[There is no mach/timex.h.]

<https://groups.google.com/forum/#!msg/beagleboard/5xMAyFxQbdE/Tq4fE8C5C48J>
[Long series of problems, ending with needing full kernel source.]
<https://groups.google.com/forum/#!msg/beagleboard/1IkTdkdUCLg/8th83TmgdPkJ>
<http://datko.net/2013/10/03/howto_crypto_beaglebone_black/>
[This guy changed the timex link and it worked for crypto; I decided to try 
commenting the #include...  And it worked!]

root@ubuntu-armhf:/home/ubuntu# cd DPO*
root@ubuntu-armhf:/home/ubuntu/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913# make 
all
root@ubuntu-armhf:/home/ubuntu/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux# 
ls mt*
mt7601Usta.ko  mt7601Usta.mod.c  mt7601Usta.mod.o  mt7601Usta.o
root@ubuntu-armhf:/home/ubuntu/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux# 
sudo reboot

ubuntu@ubuntu-armhf:~/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913$ sudo depmod -a 

ubuntu@ubuntu-armhf:~/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913$ modprobe -l
...
kernel/drivers/net/wireless/mt7601Usta.ko
[last in the list!]

<https://help.ubuntu.com/community/WifiDocs/WirelessTroubleShootingGuide/Drivers>
ubuntu@ubuntu-armhf:/$ sudo modprobe -v mt7601Usta
insmod /lib/modules/3.8.13-bone30/kernel/drivers/net/wireless/mt7601Usta.ko 
ubuntu@ubuntu-armhf:/$ lsmod
Module                  Size  Used by
mt7601Usta            745256  0 
ubuntu@ubuntu-armhf:/$ ^C
ubuntu@ubuntu-armhf:/$ sudo ifconfig ra0 up
ubuntu@ubuntu-armhf:/$ ifconfig ra0
ra0       Link encap:Ethernet  HWaddr 00:0c:43:00:7d:7f  
          inet6 addr: fe80::20c:43ff:fe00:7d7f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:102 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:9392 (9.3 KB)  TX bytes:0 (0.0 B)

ubuntu@ubuntu-armhf:/$ iwconfig
ra0       Ralink STA  ESSID:"11n-AP"  Nickname:"MT7601STA"
          Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated   
          Bit Rate:1 Mb/s   
          RTS thr:off   Fragment thr:off
          Link Quality=10/100  Signal level:0 dBm  Noise level:0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

ubuntu@ubuntu-armhf:/$ sudo iwlist scan
ra0       Scan completed :
          Cell 01 - Address: 00:14:BF:05:4A:4D
                    Protocol:11b/g BW20
                    ESSID:"101Netlink2"
                    Mode:Managed
                    Frequency:2.412 GHz (Channel 1)
                    Quality=94/100  Signal level=-53 dBm  Noise level=-92 
dBm
                    Encryption key:off
                    Bit Rates:54 Mb/s

ubuntu@ubuntu-armhf:/$ sudo dhclient ra0

ubuntu@ubuntu-armhf:/$ ifconfig ra0
ra0       Link encap:Ethernet  HWaddr 00:0c:43:00:7d:7f  
          inet addr:10.1.1.121  Bcast:10.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:43ff:fe00:7d7f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:57337 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2486 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:12084053 (12.0 MB)  TX bytes:215792 (215.7 KB)

ubuntu@ubuntu-armhf:~$ iwlist ra0 peers
ra0       Peers/Access-Points in range:
    58:DE:A8:3E:30:DE : Quality=99/100  Signal level=-51 dBm  Noise 
level=-92 dBm
    6D:C0:17:8B:00:00 : Quality=57/100  Signal level=-67 dBm  Noise 
level=-92 dBm

[looks alive but won't actually connect...]
[Tried Network-Manager, both cli and GUI, no luck. In the GUI, all edit 
fields were always grayed out and empty.]

<http://www.techdrivein.com/2012/09/slow-erratic-wifi-ubuntu1204-fixed.html>

ubuntu@ubuntu-armhf:/$ sudo apt-get remove network-manager
ubuntu@ubuntu-armhf:/$ sudo apt-get install wicd

[Used VNC and WiCd GUI to connect Wi-Fi immediately!]

[There is also wicd-curses which creates a char graphic interface in 
terminal:]
<http://forum.xbmc.org/showthread.php?tid=81858>
[Arrow down to move cursor to chosen access point; type command letter.]


I have _not_ verified that I captured all the necessary steps in this 
procedure. These commands were just copied from my terminal log, days after 
the actual procedure. But the tiny Wi-Fi adapter is definitely working in 
my Ubuntu 12.04. I love learning stuff...  

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to