You are not logged in.

#1 2009-07-15 23:23:19

originalsurfmex
Member
Registered: 2008-11-13
Posts: 150

connecting to wireless - IP address problems, netcfg and iwconfig

I have been running into some baffling problems when connecting to wireless.  I regularly connect to an unsecured wireless with a hidden essid connection that then has some kind of ssl login.

here is the info for it:

sudo iwlist eth1 scanning
Password:                                     
eth1      Scan completed :                   
          Cell 01 - Address: 00:15:6D:AB:A4:2A
                    ESSID:""                 
                    Mode:Managed             
                    Frequency:2.412 GHz (Channel 1)
                    Quality:1/5  Signal level:-81 dBm  Noise level:-91 dBm
                    Encryption key:off                                   
                    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

I can never connect with netcfg, i use the "wireless" profile as follows:

CONNECTION="wireless"
DESCRIPTION="auto connect to wireless node"
INTERFACE=eth1
SCAN="no"
SECURITY="None"
ESSID="any"
IP="dhcp"

if i do execute:

sudo netcfg wireless

then i get this:

:: wireless up                                                                                                                                       
[BUSY] dhcpcd: timed out                                                                                                                                           
- DHCP IP lease attempt failed.                                                                                                                             
                                                                                                                                                      [FAIL]

the only way i can connect is if i do a:

sudo ifconfig eth1 up
sudo iwconfig eth1 essid ""
sudo dhclient eth1

if dhclient doesnt connect, this is what it says:

sudo dhclient eth1
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.                           
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth1/00:21:00:05:e1:23
Sending on   LPF/eth1/00:21:00:05:e1:23
Sending on   Socket/fallback           
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 14
No DHCPOFFERS received.                                   
Trying recorded lease 172.16.112.36                       
PING 172.16.112.3 (172.16.112.3) 56(84) bytes of data.     

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

No working leases in persistent database - sleeping.

oftentimes i have to do dhclient multiple times (the same goes if i try and use dhcpcd)...can someone explain why this happens?

Offline

#2 2009-07-16 00:04:39

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: connecting to wireless - IP address problems, netcfg and iwconfig

You're using dhclient to start it manually, but netcfg is using dhcpcd.  Can you connect manually with dhcpcd?

You can add a DHCP_TIMEOUT value to your profile to change the timeout value (try 20 or more), but you might want to investigate why it's taking so many tries to get an offer from the dhcp server.  It could be a poor signal.

Offline

#3 2009-07-16 03:51:00

originalsurfmex
Member
Registered: 2008-11-13
Posts: 150

Re: connecting to wireless - IP address problems, netcfg and iwconfig

both dhclient and dhcpcd work fine, i just prefer the readout from dhclient because i can see what it is doing...i adjusted the timeout to 30 seconds but that made no difference.

i dont understand why netcfg won't connect and get an ip address.

Offline

#4 2009-07-16 07:40:45

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: connecting to wireless - IP address problems, netcfg and iwconfig

Seems pretty clear to me:

originalsurfmex wrote:

oftentimes i have to do dhclient multiple times (the same goes if i try and use dhcpcd)

You have to run it multiple times, netcfg runs it once.

As someone already said, it's probably a weak signal. Have a look at iwconfig output after you've associated with the AP.

Offline

#5 2009-07-16 12:45:20

originalsurfmex
Member
Registered: 2008-11-13
Posts: 150

Re: connecting to wireless - IP address problems, netcfg and iwconfig

well, actually i run netcfg 10 times before giving up.  here is the output after i connected successfully using the iwconfig and dhclient (or dhcpcd), it doesnt look that different to me:

eth1      Scan completed :
          Cell 01 - Address: 00:15:6D:AB:A3:D3
                    ESSID:""
                    Mode:Managed
                    Frequency=2.462 GHz (Channel 11)
                    Quality:0/5  Signal level:-91 dBm  Noise level:-90 dBm
                    Encryption key:off
                    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

so, just to confirm that i understand correctly: when there is a very weak signal, then netcfg (or wi-cd for that matter) will not get an IP address and be able to connect.  however, under the same circumstances i may be able to connect using iwconfig and dhclient (or dhcpcd)...correct?

edit: im just a little confused because i thought netcfg basically used those same tools.

Last edited by originalsurfmex (2009-07-16 12:46:34)

Offline

#6 2009-07-16 13:38:58

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: connecting to wireless - IP address problems, netcfg and iwconfig

That's definitely not a good signal (the 0/5 is what you're looking at).  Consider moving closer to the access point or increasing the signal strength if you can.

The most likely reason netcfg isn't connecting where dhcpcd by itself does is b/c (as tomk mentioned) netcfg only runs dhcpcd once per invocation.  With a signal like that you're not likely to have consistent results no matter what you try.

Offline

#7 2009-07-30 15:12:16

maddojf
Member
Registered: 2008-10-29
Posts: 8

Re: connecting to wireless - IP address problems, netcfg and iwconfig

I am having the same problem on a network with a signal Quality: 5/5.

I used to use wicd without problems (pre 1.6.*).  About a month ago I started having problems with wicd.  At first I had trouble getting wicd to start, but after updating to 1.6.2 that problem went away.  I then starting having problems with connecting to the network.  It would show that it was connected and then disconnect after a few seconds (may have been a problem with dhcp).  When I started having problems with wicd I decided to wait for an update to fix it, so I don't know if something else changed during that time that might be causing this problem. 

Last night I decided to try netcfg.  I following the directions on the Arch wiki and it worked.  I connected to my WPA network with DHCP and was able to surf the net.  I then tried disconnecting and reconnecting, just to be sure that everything was working.  Ever since then I have been getting the same

:: wireless up                                                                                                                                       
[BUSY] dhcpcd: timed out                                                                                                                                           
- DHCP IP lease attempt failed.                                                                                                                             
                                [FAIL]

that was mentioned earlier. 

Since this appears to be happening with both wicd and netcfg, is it possible that this is a problem with the driver?  I am using the broadcom-wl driver and the output from lspci  is

0b:00.0 Network controller: Broadcom Corporation BCM4328 802.11a/b/g/n (rev 05)

Thanks

Offline

#8 2009-08-04 13:25:33

originalsurfmex
Member
Registered: 2008-11-13
Posts: 150

Re: connecting to wireless - IP address problems, netcfg and iwconfig

i had the exact same problems.  wicd wouldnt work, so i started using netcfg and when that didnt work time to time i learned how to use iwconfig and dhclient and dhcpcd.  its very possible that it is a driver problem.

Offline

Board footer

Powered by FluxBB