This small guide is taken from Oithona's reply to this thread:
Newbie need wireless helpThis guide will show you how to configure Wi-Fi from the command line. It assumes you're using WEP encryption. It also assumes you're using DHCP. (Oithona, if you feel this guide needs editing, feel free to do so.)
1. Check your modem/router for the 10-byte WEP key, and for the essid
2. As root, in a terminal window, type the following commands:
(If you're not logged in as root, type 'su' without the quotes and hit <enter> in the terminal, and then type the root password when prompted)
iwconfig wlan0 essid <your access point essid>
iwconfig wlan0 channel auto
This will give you the following output:
Error for wireless request "Set Frequency" (8B04) :
SET failed on device wlan0; Invalid argument.
iwconfig wlan0 mode managed
iwconfig wlan0 key open <your key>
ifconfig wlan0 up
dhcpcd -d -t 8 wlan0
This should output:
dhcpcd: MAC address = XX:XX:XX:XX:XX:XX <---your MAC address appears here
dhcpcd: your IP address = XXX.XXX.XXX.XXX <---your IP address appears here
iwconfig
This command should show you information about the ready configured Wi-Fi device, something similar to this:
lo no wireless extensions.
eth0 no wireless extensions.
wifi0 no wireless extensions.
wlan0 IEEE 802.11g ESSID:"belkin54g" Nickname:"wolvix"
Mode:Managed Frequency:2.462 GHz Access Point: 00:30:F1:CF:8C:2D
Bit Rate:48 Mb/s Tx-Power:17 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:XXXX-XXXX-XX Security mode:open
Power Management:off
Link Quality=53/94 Signal level=-46 dBm Noise level=-99 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
If all went well your Wi-Fi device should be ready for use.