PLEASE NOTE: This article is obsolete or related to a discontinued product.

Use a DLINK WiFi USB adapter


The DWL-G122 Wireless USB Adapter and the FOX board LX
DWL-G122 Product info

Thanks to the availability of a new version of RaLink driver, the DLink WiFi adapter C1 version now works well under Phrozen SDK svn version 28 (Keep the SDK updated).

How to generate an image with the WiFi support

Inside the Phrozen SDK root directory type:
# make menuconfig

Enable the flag:

Driver settings --->
  [*] Enable WLAN support
Select the new item Wireless networking (WLAN) ---> and enable the flag:
[*] wireless tools

Select now the item DLink DWL-G122 (None) ---> and enable the flag:

( ) None
( ) B1
(*) C1

Save, exit and type:

# ./configure
...
# make
...
Now reflash your board with the new fimage generated. To do that close the network boot jumper J8, reset the board and type:
# make flash
...

After a while your board will reboot with the new image.

WiFi testing

Connect the FOX Board to the LAN by the Ethernet port and login to the default ip address 192.168.0.90.
When you are logged in type:

# tail -f /var/log/messages

Insert the WiFi USB adapter. You will see the following messages:

crisv10_irq dbg: ctr_status_irq, controller status: host_mode started
crisv10_irq dbg: ctr_status_irq, controller status: host_mode started running
usb 1-2: new full speed USB device using hc-crisv10 and address 5
idVendor = 0x7d1, idProduct = 0x3c03

Exit from the tail command pressing CTRL-C and type:

# /etc/init.d/wireless start
 * Bringing up rausb0...
    + IP: 192.168.10.90
    + WEP: off
    + Channel: 1
    + ESSID: FOX
    + Mode: ad-hoc                                                      

The Wifi adapter will go up with the default IP address 192.168.10.90.
Now see the TCP/IP configuration typing:

# ifconfig rausb0
rausb0    Link encap:Ethernet  HWaddr 00:17:9A:D0:12:EE
          inet addr:192.168.10.90  Bcast:192.168.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:102 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:8034 (7.8 KiB)

And see the wireless configuration parms typing:

# iwconfig
Warning: Driver for device rausb0 has been compiled with version 19
of Wireless Extension, while this program supports up to version 17.
Some things may be broken...

rausb0    RT73 WLAN  ESSID:""
          Mode:Ad-Hoc  Frequency=1 MHz  Cell: D6:48:6D:35:23:32
          Bit Rate=11 Mb/s
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality=0/100  Signal level:-121 dBm  Noise level:-115 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Configuring the WiFi adapter

The default configuration file of the WiFi adapter at the startup is /etc/conf.d/net.wireless. Let's look at its contents:
DEV="rausb0"

rausb is the device name of your WiFi adapter.

IP="192.168.10.90"
SUBNET="255.255.255.0"

IP if the default IP address @wikipedia='IP_address' assigned to the adapter.
SUBNET is the subnet mask of your network.

ESSID="FOX"

ESSID @wikipedia='ESSID' is the Extended Service Set ID and identify the name of the wireless network. By specifying the ESSID you make sure that you connect to your wireless network instead of your neighbors network by mistake.

WIFI_DEFAULT="0"
WIFI_GATEWAY=""
WIFI-DEFAULT tells is the WiFi adapter is the default gateway adapter and WIFI_GATEWAY indicates the IP address of the gateway on the network.
CHANNEL="1"

CHANNEL is the wireless channel @wikipedia='WiFi#Channels' that you want to use.

MODE="ad-hoc"

Set MODE="ad-hoc" to contact another host (another FOX Board for example) without using any Access Point @wikipedia='Access_point'.
Set MODE="managed" to link the FOX Board to Access Point@wikipedia='Access_point'.

KEY="off"

This parm is the key to use in WEP @wikipedia='Wired_Equivalent_Privacy' encryption. When equal to "off" no encryptions is used.

Once you have changed the settings, you need to restart the wireless interface by executing the following commands.

# /etc/init.d/wireless stop
# /etc/init.d/wireless start
The wireless will be running with the new settings.

Related links