USB to WiFi adapter

From ArmadeusWiki
Revision as of 21:43, 28 January 2009 by JulienB (Talk | contribs) (Move to Talk)

Jump to: navigation, search

Tested hardware

Ralink RT2571WF

The WiFi chipset RT2571WF can be found under the D-Link WiFi key DWL-G122. All drivers are included in Linux kernel 2.6.27. But firmware must be downloaded from serialmonkey website at this address.

To use it with APF9328, you need an APF9328DevFull development board (with USB Host).

Kernel configuration

  • First, to use a USB dongle, USB Host must be configured. See this page to know how to do with the APF9328DevFull.
  • Then, Wireless network must be configured selecting these options in make linux-menuconfig:
 [*] Networking support  --->
    Wireless  --->
        <*> Generic IEEE 802.11 Networking Stack (mac80211)
  • Finally, select the chipset :
 Device Drivers  --->
    [*] Network device support  --->
        Wireless LAN  --->
            [*] Wireless LAN (IEEE 802.11)
            <M> Ralink driver support
            <M> Ralink rt2501/rt73 (USB) support

Packages needed

To play with WiFi, select these packages in make menuconfig:

  • To configure Wlan:
 Package Selection for the target  --->
    [*] Networking  --->
        [*]   wireless tools
  • To surf on the net:
 Package Selection for the target  --->
    [*] Networking  --->
        [*]   links

After flashing your rootfs and kernel, you can boot the card and configure WiFi.

WiFi configuration

First mount the module:

# modprobe rt73usb

Then copy the firmware named rt73.bin (found in Module directory of rt73-cvs archive) in apf /lib/firmware directory. If /lib/firmware doesn't exist create it.

 mkdir -p /lib/firmware
 tftp -g -r rt73.bin <yourIP>
 mv rt73.bin /lib/firmware

Your WiFi-module driver is ready, you can now connect the dongle. To see your wireless configuration use iwconfig command.

 # iwconfig
 lo        no wireless extensions.
 
 eth0      no wireless extensions.
 
 sit0      no wireless extensions.
 
 wmaster0  no wireless extensions.
 
 wlan0     IEEE 802.11bg  ESSID:""  
           Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   
           Tx-Power=0 dBm   
           Retry min limit:7   RTS thr:off   Fragment thr=2352 B   
           Encryption key:off
           Power Management:off
           Link Quality:0/100  Signal level:112/146  Noise level:0/0
           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0

To configure WiFi cryptography, only WEP can be set as is. If you want to configure dongle for WPA, install [http://hostap.epitest.fi/wpa_supplicant/ wpa_supplicant].

WEP configuration

Note : to see all access point available for your apf, use iwlist command :

 # iwlist scanning

This example is given for a WiFi Access Point named armadeus, but the key is false of course ;) :

 # iwconfig wlan0 essid armadeus
 # iwconfig wlan0 key 12345678901234567890
 # ifconfig wlan0 up
 firmware: requesting rt73.bin
 ADDRCONF(NETDEV_UP): wlan0: link is not ready
 # ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

Now, the WiFi adapter is ready and attached :

 # iwconfig
 lo        no wireless extensions.
 
 eth0      no wireless extensions.
 
 sit0      no wireless extensions.
 
 wmaster0  no wireless extensions.
 
 wlan0     IEEE 802.11bg  ESSID:"armadeus"  
           Mode:Managed  Frequency:2.437 GHz  Access Point: 00:1B:2F:E7:E4:08   
           Bit Rate=2 Mb/s   Tx-Power=7 dBm   
           Retry min limit:7   RTS thr:off   Fragment thr=2352 B   
           Encryption key:XXXXXXXXXXXXXXXXXXXXXXXXXX   Security mode:restricted
           Power Management:off
           Link Quality:0/100  Signal level:73/146  Noise level:0/0
           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0
 

We can configure the network to access internet via the WiFi interface instead of the Ethernet one :

 # ifconfig eth0 down
 # ifconfig wlan0 192.168.0.212
 # route add default gw 192.168.0.1 dev wlan0

And configure the nameserver in /etc/resolv.conf

 domain dev.null
 nameserver 192.168.0.207
 ~                   
 ~
 ~

We can now ping the best website in the world :

 # ping www.armadeus.org
 PING www.armadeus.org (213.186.33.5): 56 data bytes
 64 bytes from 213.186.33.5: seq=0 ttl=122 time=66.735 ms
 64 bytes from 213.186.33.5: seq=1 ttl=122 time=50.392 ms
 ^C
 --- www.armadeus.org ping statistics ---
 2 packets transmitted, 2 packets received, 0% packet loss
 round-trip min/avg/max = 50.392/58.563/66.735 ms
Surf on the net

To surf on the web, you can use links software :

 # links www.armadeus.org

It's an ASCII internet browser.

ZyDas zd1212 chipset

To buy this device in France

Configure Linux

$ make linux26-menuconfig
Same as Ralink +

Device Drivers  --->
    [*] Network device support  --->
        Wireless LAN  --->
            <M> ZyDAS ZD1211/ZD1211B USB-wireless support
            [*]   ZyDAS ZD1211 debugging

Get firmware

Install firmware

 # mkdir -p /lib/firmware/zd1211
 # cd /lib/firmware/
 # tftp -g -r zd1211-firmware-1.4.tar.bz2 192.168.0.17
 # bunzip2 zd1211-firmware-1.4.tar.bz2
 # tar xf zd1211-firmware-1.4.tar
 # mv zd1211-firmware zd1211

Launch driver

 # modprobe zd1211rw
 zd1211rw 1-1.1:1.0: phy0
 # ifconfig wlan0 up
 firmware: requesting zd1211/zd1211b_ub
 firmware: requesting zd1211/zd1211b_uphr


Links