Distroname and release: Debian Squeeze

Wireless from console in Debian

It is fairly simple to get wireless network up and running without X, and only with the use of console in Debian.

First install wpasupplicant, which supports WPA and WPA2 encryption.
#aptitude install wpasupplicant 

Using iwconfig

First make sure that the wireless is up.
#iwconfig wlan0 up
Next we will scan for accessible wireless networks.
Replace wlan0 if needed.
#iwlist wlan0 scanning
You should get an output like below, with accessible wireless points.

Example output
Cell 16 - Address: 66:5C:E2:1C:19:38
    Frequency:5.18 GHz (Channel 36)
    Quality=21/70  Signal level=-89 dBm  
    Encryption key:on
    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
              36 Mb/s; 48 Mb/s; 54 Mb/s
    Extra: Last beacon: 4984ms ago
    IE: Unknown: 00026D6A63616C
    IE: Unknown: 01016C122824A048606D
    IE: Unknown: 028121
    IE: IEEE 802.11i/WPA2 Version 1
        Group Cipher : TKIP
        Pairwise Ciphers (1) : CCMP
        Authentication Suites (1) : PSK
    IE: Unknown: 2C1BEF0103FFFFFF0000000000000000000000000000000000000000
    IE: Unknown: 341DEF0103FFFFFF0000000000000000000000000000000000000000
    IE: Unknown: 2C16250D0000000000000000000000000000000000000000
    IE: Unknown: 1217250D0000000000000000000000000000000000000000
    IE: Unknown: 1B0E12000A002C02C900140005001900
    IE: Unknown: 7C0102
    IE: WPA Version 1
        Group Cipher : TKIP
        Pairwise Ciphers (1) : TKIP
        Authentication Suites (1) : PSK
    IE: Unknown: DD182250F2020101870003A4000027B5000042435E0062322F00
    IE: Unknown: DD0922037F01010000DD7F
If you get an output like this, everything is OK, and the wireless network card is up and running, but not yet connected.
Note the ESSID. Most likely you already are ware of this, since you should know your own network and the passphrase/key as well.
Now we should be able to connect to the wireless network.
#iwconfig wlan0 essid myWirelessNetwork key KEYFILE
Unfortunately iwconfig does not support passphrase at this time, so instead it is possible to add the info to the /etc/network/interfaces file.

Connecting to WPA, WPA2 networks

Put this into the interface file, and change the values to match your settings.
auto wlan0
iface wlan0 inet dhcp
wpa-ssid myWirelessNetwork
wpa-psk PASSWORDforMYWirelessNetwork
Then take up the wlan0 interface
#ifup wlan0
I hope some of this info came to good use!
Do not trust the authors words! POC, tests and experience is key

Copyright LinuxLasse.net 2009 - 2024 All Rights Reserved.

Valid HTML 4.01 Strict Valid CSS!