PDA

View Full Version : [ubuntu] Command Line Wifi Configuration Not Working, Auto Is Working



Mizutsuki
January 20th, 2009, 07:21 AM
Hello,
I boot default into openbox, so gnome network management isn't loaded by default. I have no problem doing the wifi configuration with iwconfig and iwlist manually, but it's not working.

I type "sudo iwlist eth1 scanning" and I get the following:


eth1 Scan completed :
Cell 01 - Address: 00:21:29:B8:A9:AC
ESSID:"zamtown"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.422 GHz (Channel 3)
Encryption key:off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=71/100 Signal level=-57 dBm
Extra: Last beacon: 40ms ago
Cell 02 - Address: 00:1D:7E:63:E2:8E
ESSID:"Home"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.412 GHz (Channel 1)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=35/100 Signal level=-79 dBm
Extra: Last beacon: 152ms ago
Cell 03 - Address: 00:40:10:10:00:03
ESSID:"zamtown"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.422 GHz (Channel 3)
Encryption key:off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=20/100 Signal level=-86 dBm
Extra: Last beacon: 476ms ago
Cell 04 - Address: 00:21:29:CD:42:2A
ESSID:"BRITT"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.437 GHz (Channel 6)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=67/100 Signal level=-60 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 28ms ago
Cell 05 - Address: 00:11:95:72:94:C8
ESSID:"FREAKERNET"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.437 GHz (Channel 6)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 9 Mb/s; 11 Mb/s
6 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=46/100 Signal level=-73 dBm
Extra: Last beacon: 336ms ago
Cell 06 - Address: 00:18:39:C2:B6:9A
ESSID:"number7"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.437 GHz (Channel 6)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=31/100 Signal level=-81 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 1528ms ago
Cell 07 - Address: 00:22:3F:25:BF:34
ESSID:"katicole"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 9 Mb/s; 11 Mb/s
6 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=48/100 Signal level=-72 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 280ms ago
Cell 08 - Address: 00:1E:E5:F3:5C:C1
ESSID:"240felix"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 11 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=29/100 Signal level=-82 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 276ms ago
Cell 09 - Address: 00:16:01:9A:BA:24
ESSID:"munet1"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.417 GHz (Channel 2)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=27/100 Signal level=-83 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 504ms ago
Cell 10 - Address: 00:22:6B:7E:9A:16
ESSID:"linksys"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 11 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=39/100 Signal level=-77 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
Extra: Last beacon: 272ms ago
Cell 11 - Address: 00:14:95:78:19:59
ESSID:"2WIRE240"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.437 GHz (Channel 6)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=29/100 Signal level=-82 dBm
Extra: Last beacon: 3792ms ago
Cell 12 - Address: 00:1F:33:C5:65:78
ESSID:"NETGEAR3"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 9 Mb/s; 11 Mb/s
6 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=37/100 Signal level=-78 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 1044ms ago
Cell 13 - Address: 00:0F:3D:63:5C:32
ESSID:"munet2"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 9 Mb/s; 11 Mb/s
6 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=31/100 Signal level=-81 dBm
Extra: Last beacon: 272ms ago
Cell 14 - Address: 00:22:A4:72:87:C1
ESSID:"2WIRE033"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=31/100 Signal level=-81 dBm
Extra: Last beacon: 2528ms ago
Cell 15 - Address: 00:17:3F:20:5E:2F
ESSID:"tsags"
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.437 GHz (Channel 6)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Quality=27/100 Signal level=-83 dBm
Extra: Last beacon: 1908ms ago

The very first entry is the one I'm looking for so I connect to it like so, "sudo iwconfig eth1 essid zamtown" and this is what I get when I check it with "iwconfig eth1":

eth1 unassociated ESSID:"zamtown"
Mode:Managed Channel=0 Access Point: Not-Associated
Bit Rate:0 kb/s Tx-Power=20 dBm Sensitivity=8/0
Retry limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
So it's not associating properly. I figured it might be having some difficulty with two APs with the same ssid, so I did "sudo iwconfig eth1 ap 00:21:29:B8:A9:AC" with pretty much the same results. Using iwconfig, I couldn't get it to associate.

So I used "sudo nm-applet" and then ctrl-c ed out and that associated me and got me an IP address, but I figure that's only because I'd logged in to gnome in the past and set up this particular AP. I was to be able to use the command line tools, so does anyone have any idea what I might be doing wrong?

Oh, and I looked into the whole kill-switch thing, and iwconfig doesn't say "unassociated" when the kill switch is engaged, it says "radio off" or something like that, so I'm pretty sure it's not a kill-switch problem.

Thank you all for your time.

Ayuthia
January 20th, 2009, 05:26 PM
It might be possible that Network Manager is conflicting with the manual entry. You can check and see if it is running:

ps -ef|grep NetworkIf you find an entry that contains Network Manager, then it is running. You should be able to kill the process (there are usually two) and then the manual method should work. Of course if it does not work, you can always restart and Network Manager should come back up again.

bgerlich
January 20th, 2009, 05:49 PM
Set the channel:

sudo iwconfig eth1 channel 3

Plus, I don't know if you noticed but for some reason two AP named "zamtown" are detected.