0

I failed to connect to an open i.e. nonencrypted wireless network using Ubuntu command lines. Here is what I did. I firstly bring down the Network Manager, next bring wlan0 up and bring the encryption off, and then specify the open wireless network and connect to it:

$ sudo /etc/init.d/NetworkManager stop   
 * Stopping network connection manager NetworkManager [ OK ]   
$ sudo /sbin/ifconfig wlan0 up 
$ sudo /sbin/iwconfig wlan0 enc off   
$ sudo iwconfig wlan0 essid "Cavalier High-Speed 8-4-CAVTEL"  
$ sudo  dhclient wlan0  
There is already a pid file /var/run/dhclient.pid with pid 10812  
killed old client process, removed PID file  
Internet Systems Consortium DHCP Client V3.1.1  
Copyright 2004-2008 Internet Systems Consortium.  
All rights reserved.  
For info, please visit http://www.isc.org/sw/dhcp/  

wmaster0: unknown hardware address type 801  
wmaster0: unknown hardware address type 801  
Listening on LPF/wlan0/00:0e:9b:cd:4e:18  
Sending on   LPF/wlan0/00:0e:9b:cd:4e:18  
Sending on   Socket/fallback  
DHCPREQUEST of 192.168.1.67 on wlan0 to 255.255.255.255 port 67  
DHCPREQUEST of 192.168.1.67 on wlan0 to 255.255.255.255 port 67  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21  
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6  
No DHCPOFFERS received.  
Trying recorded lease 192.168.1.67  
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.  

--- 192.168.1.1 ping statistics ---  
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms  

Trying recorded lease 192.168.1.45  
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.  

--- 192.168.1.1 ping statistics ---  
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms  

No working leases in persistent database - sleeping.   
$ sudo /sbin/iwconfig wlan0  
wlan0     IEEE 802.11bg  Mode:Managed  Frequency:2.422 GHz    
          Access Point: Not-Associated   Tx-Power=27 dBm     
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B     
          Encryption key: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  

I was wondering what the problem is and how I can do it right?

Thanks and regards!

1

1 Answer 1

1

the output from /sbin/iwconfig wlan0 shows you aren't associated with any APs.

you will need to do /sbin/iwlist wlan0 scan to search for nearby APs, before, and in my experience, sometimes after, you set /sbin/iwconfig wlan0 essid "essid"

again, the app wicd is quite nice for managing your wireless, without requiring a lot of extras.

2
  • Thanks, cpbills! Is it necessary to issue the command "sudo /sbin/iwconfig wlan0 enc off" for a nonencrypted wireless network like I did?
    – Tim
    May 15, 2010 at 20:19
  • yes, if /sbin/iwconfig shows a key, or encryption on, you will need to turn it off.
    – cpbills
    May 15, 2010 at 20:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .