WIFI-N-USB

From embeddedTS Manuals
Revision as of 11:07, 22 September 2011 by Mark (talk | contribs)
WIFI-N-USB
Wifi-n-usb.jpg
Released Mar. 2011
Accessories Product Page
Files
Binaries
Sources
Ralink Drivers
Operating Temperature
Cold 0C
Hot 45C

Overview

The WIFI-N-USB or USB-N13 is an 802.11 B, G, and N device that operates on the 2.4GHZ spectrum. This uses the rt3070L chipset provided by ralink. This module measures 7.0 cm L* 2.2 cm W* 1.0 ccm H (Weight 12 gm). The WIFI-N-USB has 2 built in antennas, and has a maximum range of 490 ft (150m).

Depending on the rt3070sta driver version this device may show up as ra0, or rausb0. Aside from the drivers, some older boards with smaller flashes did not include the iwconfig or wpa_supplicant tools. Check your board's FTP directory for copies of these binaries.


Installation

Newer images will contain these drivers, however if you are working from an older board or older image you will need to install these manually.

For example, for the TS-4800 you would download the binaries package from here.

cd /tmp 
wget ftp://ftp.embeddedarm.com/misc/wifi-n-usb-binaries.tar.gz
tar -xf wifi-n-usb-binaries.tar.gz

# Copy the TS-4800 module to the system modules
cp wifi-n-usb-binaries/TS-kernel-2.6/rt3070sta-4800.ko /lib/modules/2.6.35.3-433-g0fae922/kernel/drivers/net/wireless/rt3070sta.ko

# Rebuild the dependency list (so it will load the appropriate USB modules first)
depmod

# Copy the driver's binary to where the driver will load it
cp wifi-n-usb-binaries/TS-kernel-2.6/RT2870STA-2.6.dat /etc/Wireless/RT2870STA/RT2870STA.dat

# Load the driver
modprobe rt3070sta

# You should now see an additional ra0 or rausb0 device in ifconfig or iwconfig.
ifconfig -a

# On some boards you may not have the wireless-tools package installed.  You can
# download this from APT on most boards, or copy the binaries from your board's FTP directory if
# your board does not run Debian.
apt-get update && apt-get install wireless-tools

# Now you should be able to scan for networks
iwlist scan

Usage

Infrastructure Mode

Connect to an Open Access point

# Replace linksys with your network name
iwconfig ra0 essid "linksys" 
# Set a static ip address
#ifconfig ra0 192.168.1.101

# Request an IP address from a DHCP server
# Depending on your board, this could be pump, dhclient, or udhcpc
dhclient ra0

Connect to a WEP Encrypted Access point

# Replace linksys with your network name, as well as the 'testing' key.
iwconfig ra0 essid "linksys" key "testing"

# Set a static ip address
#ifconfig ra0 192.168.1.101

# Request an IP address from a DHCP server
# Depending on your board, this could be pump, dhclient, or udhcpc
dhclient ra0

Connect to a WPA Encrypted Access point

ifconfig ra0 up

# Generate a configuration file for wpa_supplicant to use
wpa_passphrase the_essid the_password > /etc/wpa_supplicant_custom.conf

# Insert "proto=RSN" into "network" block in /etc/wpa_supplicant_custom.conf
vi /etc/wpa_supplicant_custom.conf

# Use wpa_supplicant to associate with AP and run it in the background (-B)
wpa_supplicant -ira0 -Dralink -c/etc/wpa_supplicant_custom.conf -B

# Set a static ip address
#ifconfig ra0 192.168.1.101

# Request an IP address from a DHCP server
# Depending on your board, this could be pump, dhclient, or udhcpc
dhclient ra0

Adhoc Mode

ifconfig ra0 up

# Set ra0 to adhoc mode.  Change "testing" to set the broadcasted network name.
iwconfig ra0 mode ad-hoc channel 3 enc off essid "testing"

# Set a static ip address
#ifconfig ra0 192.168.1.101

Master Mode

Unfortunately the driver does not yet support this functionality. When it does this page will be updated.

Troubleshooting

The message rt2870sta: Unknown symbol x means that the module dependencies have not been satisfied. Use the following as a guide as a basic checklist to insure the correct modules are loaded:

depmod
modprobe hid
modprobe usbcore
modprobe usb_storage
modprobe scsi_mod
modprobe ohci_hcd

The message insmod: error inserting 'rt2870sta_tsXXXX.ko': -1 Invalid module format will occur if you are trying to insert a module into a kernel that it was not compiled for. Verify that you have the correct module for your board. If you're sure the module should work, try using the insmod command with the -f option (ie. insmod -f rt2870sta_tsXXXX.ko).

If you are having difficulties in pinging your AP, try to disconnect eth0 byusing the command ifconfig eth0 down.