Install RT2870/RT3070 Wireless Adapter on ubuntu 11.04 server

It is a alfaUSB wireless adapter using Ralink chips. Ubuntu 11.04 server doesn’t install drivers automatically (as one was used to windows 7). So ifconfig and iwconfig show no interface for the wireless router. I did the following.
1. download linux driver from Ralink (tar) and unzip it under /home/junwei as say STA, i.e., /home/junwei/STA
2. in the os/linux/config.mk, change from n to y

# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network Maganger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

3. under /home/junwei/STA/, type

sudo make
sudo make install
sudo modprobe rt5370sta

if you receive error messages saying the device is busy, then
4. add blacklist rt2870sta
to /etc/modprobe.d/blacklist.conf, and add rt5370sta to /etc/module
Now you should be able to see the network interface by typing ifconfig. If not, reboot the server.

ra0       Link encap:Ethernet  HWaddr xxxxxxxx
          inet addr:xxx  Bcast:xxx  Mask:xxx
          inet6 addr: xxx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 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:17222066 (17.2 MB)  TX bytes:18470827 (18.4 MB)

5. You certainly don’t see things above coz you haven’t configure which access point to connect. An easy way is to change your interface file to

junwei@Junbuntu:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo ra0 eth0
iface lo inet loopback

# The secondary wireless network interface
iface ra0 inet dhcp
  wpa-ssid APname
  wpa-ap-scan 2
  wpa-proto RSN
  wpa-pairwise AES
  wpa-group AES
  wpa-key-mgmt WPA-PSK
  wpa-psk Mypassword

# The primary network interface
iface eth0 inet dhcp

Notice that this is only for a WPA2/AES wireless connection. For other type of connection, you should google by yourself.
6.

sudo /etc/init.d/networking restart

Finally, you should have wireless internet connected.

Leave a Reply

Your email address will not be published. Required fields are marked *