Topic: Cannot obtain IP address - losing the will to live!!

Ok, slight exaggeration, but I just cannot solve this having read just about every 'howto' and post relating to it... and it is driving me nuts!!

I am setting up an old laptop for a friend of mine who I am converting to Linux... Ubuntu flavour. Everything works fine apart from the (insert favourite expletive) USB WiFi dongle.

The device is an AirTies WUS-300, which comes from Turkey (my friend and his family are living out there on and off). There is a Windows driver that works fine (under Windows) and using ndiswrapper I was able to connect to my home internet if I turned off all security (i.e. a connection without WEP or WPA). However, and I have seen more posts about this on the Internet than I have had hot dinners, it cannot obtain an IP address once WPA is on.

Authentication is fine and every other aspect of the device seems to work seamlessly with Wicd (i.e. signal strength, detection of the security protocols etc.). I am certainly not an expert on this subject since my own wireless systems have worked straight out of the box using embedded Linux support and this is the first time I have had to dabble with Window$ drivers under Linux. That said, there are so many unsolved posts across the Internet on this one that there has to be something we are missing... perhaps :-)

I can provide any conf file listing or log reports that anyone would like to see, but the fact is that the device does not receive an offer of an IP address from the DHCP post authentication. Strangely, trying a static address Wicd reported that it could not contact the AP.

There seems no logic to this... any takers? (many thanks in advance)

Re: Cannot obtain IP address - losing the will to live!!

Can you post /var/log/wicd/wicd.log after a connection attempt?

Re: Cannot obtain IP address - losing the will to live!!

dano

With pleasure. The following is Wicd successfully connecting my wired interface, then unsuccessfully connecting the wireless and then back to a successful wired connection.

Many thanks for your interest and best regards.

2009/09/22 07:18:54 :: ---------------------------
2009/09/22 07:18:54 :: wicd initializing...
2009/09/22 07:18:54 :: ---------------------------
2009/09/22 07:18:54 :: wicd is version 1.6.2.2 463
2009/09/22 07:18:54 :: setting backend to external
2009/09/22 07:18:54 :: trying to load backend external
2009/09/22 07:18:54 :: successfully loaded backend external
2009/09/22 07:18:54 :: trying to load backend external
2009/09/22 07:18:54 :: successfully loaded backend external
2009/09/22 07:18:54 :: Automatically detected wireless interface wlan0
2009/09/22 07:18:54 :: setting wireless interface wlan0
2009/09/22 07:18:54 :: automatically detected wired interface eth0
2009/09/22 07:18:54 :: setting wired interface eth0
2009/09/22 07:18:54 :: setting wpa driver wext
2009/09/22 07:18:54 :: setting use global dns to False
2009/09/22 07:18:54 :: setting global dns
2009/09/22 07:18:54 :: global dns servers are None None None
2009/09/22 07:18:54 :: domain is None
2009/09/22 07:18:54 :: search domain is None
2009/09/22 07:18:54 :: setting automatically reconnect when connection drops True
2009/09/22 07:18:54 :: Setting dhcp client to 0
2009/09/22 07:18:54 :: Wireless configuration file found...
2009/09/22 07:18:54 :: Wired configuration file found...
2009/09/22 07:18:54 :: chmoding configuration files 0600...
2009/09/22 07:18:54 :: chowning configuration files root:root...
2009/09/22 07:18:54 :: Using wireless interface...wlan0
2009/09/22 07:18:54 :: Using wired interface...eth0
2009/09/22 07:19:00 :: Autoconnecting...
2009/09/22 07:19:02 :: Attempting to autoconnect with wired interface...
2009/09/22 07:19:02 :: Putting interface down
2009/09/22 07:19:02 :: Releasing DHCP leases...
2009/09/22 07:19:02 :: Setting false IP...
2009/09/22 07:19:02 :: Flushing the routing table...
2009/09/22 07:19:02 :: Putting interface up...
2009/09/22 07:19:02 :: Running DHCP
2009/09/22 07:19:03 :: dhcpcd.sh: interface eth0 has been configured with new IP=221.72.164.5
2009/09/22 07:19:03 :: 
2009/09/22 07:19:03 :: 
2009/09/22 07:19:03 :: DHCP connection successful
2009/09/22 07:19:03 :: Connecting thread exiting.
2009/09/22 07:19:09 :: Sending connection attempt result Success
2009/09/22 07:20:12 :: hidden
2009/09/22 07:20:33 :: Connecting to wireless network tigang
2009/09/22 07:20:33 :: Putting interface down
2009/09/22 07:20:33 :: Releasing DHCP leases...
2009/09/22 07:20:33 :: Setting false IP...
2009/09/22 07:20:33 :: Stopping wpa_supplicant
2009/09/22 07:20:33 :: Flushing the routing table...
2009/09/22 07:20:34 :: Putting interface up...
2009/09/22 07:20:34 :: Generating psk...
2009/09/22 07:20:34 :: Attempting to authenticate...
2009/09/22 07:20:35 :: Running DHCP
2009/09/22 07:20:55 :: err, wlan0: timed out
2009/09/22 07:20:55 :: 
2009/09/22 07:20:55 :: DHCP connection failed
2009/09/22 07:20:55 :: exiting connection thread
2009/09/22 07:20:55 :: Sending connection attempt result dhcp_failed
2009/09/22 07:21:06 :: Putting interface down
2009/09/22 07:21:06 :: Releasing DHCP leases...
2009/09/22 07:21:06 :: Setting false IP...
2009/09/22 07:21:06 :: Flushing the routing table...
2009/09/22 07:21:06 :: Putting interface up...
2009/09/22 07:21:06 :: Running DHCP
2009/09/22 07:21:07 :: dhcpcd.sh: interface eth0 has been configured with new IP=221.72.164.5
2009/09/22 07:21:07 :: 
2009/09/22 07:21:07 :: 
2009/09/22 07:21:07 :: DHCP connection successful
2009/09/22 07:21:07 :: Connecting thread exiting.
2009/09/22 07:21:07 :: Sending connection attempt result Success

Re: Cannot obtain IP address - losing the will to live!!

Not sure if it helps but I also tried setting 'dhclient' in the preferences and it also failed with the following in the log; it just seems like the wrong request is being sent to the router's DHCP server, but so strange that it works perfectly with encryption turned off...

2009/09/22 10:28:09 :: setting wireless interface wlan0
2009/09/22 10:28:09 :: setting wired interface eth0
2009/09/22 10:28:09 :: setting wpa driver wext
2009/09/22 10:28:09 :: setting automatically reconnect when connection drops 1
2009/09/22 10:28:09 :: setting backend to external
2009/09/22 10:28:09 :: Setting dhcp client to 1
2009/09/22 10:28:11 :: Connecting to wireless network tigang
2009/09/22 10:28:12 :: Putting interface down
2009/09/22 10:28:12 :: Releasing DHCP leases...
2009/09/22 10:28:12 :: Setting false IP...
2009/09/22 10:28:12 :: Stopping wpa_supplicant
2009/09/22 10:28:12 :: Flushing the routing table...
2009/09/22 10:28:12 :: Putting interface up...
2009/09/22 10:28:12 :: Generating psk...
2009/09/22 10:28:12 :: Attempting to authenticate...
2009/09/22 10:28:13 :: Running DHCP
2009/09/22 10:28:13 :: Internet Systems Consortium DHCP Client V3.1.1
2009/09/22 10:28:13 :: Copyright 2004-2008 Internet Systems Consortium.
2009/09/22 10:28:13 :: All rights reserved.
2009/09/22 10:28:13 :: For info, please visit http://www.isc.org/sw/dhcp/
2009/09/22 10:28:13 :: 
2009/09/22 10:28:14 :: Listening on LPF/wlan0/00:60:b3:28:c8:da
2009/09/22 10:28:14 :: Sending on   LPF/wlan0/00:60:b3:28:c8:da
2009/09/22 10:28:14 :: Sending on   Socket/fallback
2009/09/22 10:28:16 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
2009/09/22 10:28:21 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
2009/09/22 10:28:26 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
2009/09/22 10:28:33 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
2009/09/22 10:28:44 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
2009/09/22 10:28:51 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
2009/09/22 10:29:04 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
2009/09/22 10:29:17 :: No DHCPOFFERS received.
2009/09/22 10:29:17 :: No working leases in persistent database - sleeping.
2009/09/22 10:29:27 :: DHCP connection failed
2009/09/22 10:29:27 :: exiting connection thread
2009/09/22 10:29:27 :: Sending connection attempt result dhcp_failed

Re: Cannot obtain IP address - losing the will to live!!

Is this using WPA encryption?

Also, I should have said this the first time, but can you enable debug mode in the preferences window before you connect and repaste the log?

Re: Cannot obtain IP address - losing the will to live!!

Hi dano

Yes the encryption is WPA. Here is the log with debug enabled (I have edited the ascii and hex key values to dummy ones in the log to protect identity of the real ones)...

2009/09/22 18:20:18 :: setting use global dns to 0
2009/09/22 18:20:18 :: setting global dns
2009/09/22 18:20:18 :: global dns servers are   
2009/09/22 18:20:18 :: domain is 
2009/09/22 18:20:18 :: search domain is 
2009/09/22 18:20:18 :: setting wireless interface wlan0
2009/09/22 18:20:18 :: setting wired interface eth0
2009/09/22 18:20:18 :: setting wpa driver wext
2009/09/22 18:20:18 :: setting automatically reconnect when connection drops 1
2009/09/22 18:20:18 :: setting backend to external
2009/09/22 18:20:18 :: Setting dhcp client to 0
2009/09/22 18:20:19 :: ifconfig eth0
2009/09/22 18:20:20 :: scanning start
2009/09/22 18:20:20 :: ifconfig wlan0 up
2009/09/22 18:20:20 :: iwlist wlan0 scan
2009/09/22 18:20:21 :: ifconfig eth0
2009/09/22 18:20:23 :: ifconfig eth0
2009/09/22 18:20:24 :: scanning done
2009/09/22 18:20:24 :: found 1 networks:
2009/09/22 18:20:24 :: found afterscript in configuration None
2009/09/22 18:20:24 :: found postdisconnectscript in configuration None
2009/09/22 18:20:24 :: found dns_domain in configuration None
2009/09/22 18:20:24 :: found gateway in configuration None
2009/09/22 18:20:24 :: found use_global_dns in configuration 0
2009/09/22 18:20:24 :: found disconnect in configuration None
2009/09/22 18:20:24 :: found ip in configuration None
2009/09/22 18:20:24 :: found beforescript in configuration None
2009/09/22 18:20:24 :: found psk in configuration 1a2a3a4a5a6a7a8a9a1a2a3a4a5a6a7a8a9a01f2f3f4f5f6f7f8f9f0f9f8f7f7
2009/09/22 18:20:24 :: found netmask in configuration None
2009/09/22 18:20:24 :: found key in configuration SECRETWORD
2009/09/22 18:20:24 :: found predisconnectscript in configuration None
2009/09/22 18:20:24 :: found enctype in configuration wpa
2009/09/22 18:20:24 :: found dns3 in configuration None
2009/09/22 18:20:24 :: found dns2 in configuration None
2009/09/22 18:20:24 :: found dns1 in configuration None
2009/09/22 18:20:24 :: found use_settings_globally in configuration 0
2009/09/22 18:20:24 :: found use_static_dns in configuration 0
2009/09/22 18:20:24 :: found apsk in configuration "SECRETWORD"
2009/09/22 18:20:24 :: found automatic in configuration False
2009/09/22 18:20:24 :: found search_domain in configuration None
2009/09/22 18:20:24 :: found essid in configuration tigang
2009/09/22 18:20:24 :: found default in configuration 1
2009/09/22 18:20:24 :: Reading wired profile wired-default
2009/09/22 18:20:24 :: found afterscript in configuration None
2009/09/22 18:20:24 :: found postdisconnectscript in configuration None
2009/09/22 18:20:24 :: found dns_domain in configuration None
2009/09/22 18:20:24 :: found broadcast in configuration None
2009/09/22 18:20:24 :: found netmask in configuration None
2009/09/22 18:20:24 :: found predisconnectscript in configuration None
2009/09/22 18:20:24 :: found gateway in configuration None
2009/09/22 18:20:24 :: found use_global_dns in configuration False
2009/09/22 18:20:24 :: found dns3 in configuration None
2009/09/22 18:20:24 :: found dns2 in configuration None
2009/09/22 18:20:24 :: found dns1 in configuration None
2009/09/22 18:20:24 :: found lastused in configuration True
2009/09/22 18:20:24 :: found use_static_dns in configuration False
2009/09/22 18:20:24 :: found default in configuration 1
2009/09/22 18:20:24 :: found ip in configuration None
2009/09/22 18:20:24 :: found beforescript in configuration None
2009/09/22 18:20:24 :: found disconnectscript in configuration None
2009/09/22 18:20:24 :: found search_domain in configuration None
2009/09/22 18:20:24 :: found default in configuration 1
2009/09/22 18:20:24 :: saving wired profile wired-default
2009/09/22 18:20:24 :: iwconfig wlan0
2009/09/22 18:20:25 :: ifconfig eth0
2009/09/22 18:20:27 :: ifconfig eth0
2009/09/22 18:20:28 :: Connecting to wireless network tigang
2009/09/22 18:20:28 :: /sbin/dhcpcd -k eth0
2009/09/22 18:20:29 :: ifconfig eth0 0.0.0.0 
2009/09/22 18:20:29 :: /sbin/ip route flush dev eth0
2009/09/22 18:20:29 :: ifconfig eth0 down
2009/09/22 18:20:29 :: ifconfig eth0 up
2009/09/22 18:20:29 :: Putting interface down
2009/09/22 18:20:29 :: ifconfig wlan0 down
2009/09/22 18:20:29 :: Releasing DHCP leases...
2009/09/22 18:20:29 :: /sbin/dhcpcd -k wlan0
2009/09/22 18:20:29 :: iwconfig wlan0
2009/09/22 18:20:29 :: Setting false IP...
2009/09/22 18:20:29 :: ifconfig wlan0 0.0.0.0 
2009/09/22 18:20:29 :: Stopping wpa_supplicant
2009/09/22 18:20:29 :: wpa_cli -i wlan0 terminate
2009/09/22 18:20:29 :: Flushing the routing table...
2009/09/22 18:20:29 :: /sbin/ip route flush dev wlan0
2009/09/22 18:20:29 :: iwconfig wlan0 mode Managed
2009/09/22 18:20:29 :: Putting interface up...
2009/09/22 18:20:29 :: ifconfig wlan0 up
2009/09/22 18:20:29 :: enctype is wpa
2009/09/22 18:20:29 :: Generating psk...
2009/09/22 18:20:29 :: ['/usr/bin/wpa_passphrase', 'tigang', 'SECRETWORD']
2009/09/22 18:20:29 :: Attempting to authenticate...
2009/09/22 18:20:29 :: ['wpa_supplicant', '-B', '-i', 'wlan0', '-c', '/var/lib/wicd/configurations/0022b05de019', '-D', 'wext']
2009/09/22 18:20:29 :: ['iwconfig', 'wlan0', 'essid', 'tigang']
2009/09/22 18:20:29 :: iwconfig wlan0 channel 1
2009/09/22 18:20:29 :: iwconfig wlan0 ap 00:22:B0:5D:E0:19
2009/09/22 18:20:29 :: WPA_CLI RESULT IS DISCONNECTED
2009/09/22 18:20:30 :: WPA_CLI RESULT IS COMPLETED
2009/09/22 18:20:30 :: Running DHCP
2009/09/22 18:20:30 :: /sbin/dhcpcd wlan0
2009/09/22 18:20:50 :: err, wlan0: timed out
2009/09/22 18:20:50 :: 
2009/09/22 18:20:50 :: DHCP connection failed
2009/09/22 18:20:50 :: exiting connection thread
2009/09/22 18:20:51 :: Sending connection attempt result dhcp_failed
2009/09/22 18:20:51 :: ifconfig eth0
2009/09/22 18:20:51 :: ifconfig wlan0
2009/09/22 18:20:51 :: iwconfig wlan0
2009/09/22 18:20:53 :: ifconfig eth0
2009/09/22 18:20:53 :: ifconfig wlan0
2009/09/22 18:20:55 :: ifconfig eth0
2009/09/22 18:20:55 :: ifconfig wlan0
2009/09/22 18:20:57 :: ifconfig eth0
2009/09/22 18:20:57 :: ifconfig wlan0
2009/09/22 18:20:59 :: ifconfig eth0
2009/09/22 18:20:59 :: ifconfig wlan0
2009/09/22 18:21:01 :: ifconfig eth0
2009/09/22 18:21:01 :: ifconfig wlan0
2009/09/22 18:21:03 :: ifconfig eth0
2009/09/22 18:21:04 :: ifconfig wlan0
2009/09/22 18:21:06 :: ifconfig eth0
2009/09/22 18:21:06 :: ifconfig wlan0
2009/09/22 18:21:08 :: ifconfig eth0
2009/09/22 18:21:08 :: ifconfig wlan0
2009/09/22 18:21:11 :: ifconfig eth0
2009/09/22 18:21:11 :: ifconfig wlan0
2009/09/22 18:21:13 :: ifconfig eth0
2009/09/22 18:21:13 :: ifconfig wlan0
2009/09/22 18:21:15 :: ifconfig eth0
2009/09/22 18:21:15 :: ifconfig wlan0
2009/09/22 18:21:17 :: ifconfig eth0
2009/09/22 18:21:17 :: ifconfig wlan0

Re: Cannot obtain IP address - losing the will to live!!

I hate this word... BUMP smile

Anyhow... Although the most sensible solution to this would be to go out and buy an Ubuntu-compatible USB wireless stick from PC-World and use Linux embedded support, this has become a matter of principle now to get the AirTies stick working. Why? Because I hate the fact that it works in Window$ and NOT Linux... pass me a 'chill pill'.

Please... HELLLLLLLLLLLLLP yikes

Re: Cannot obtain IP address - losing the will to live!!

Well, according to wpa_supplicant you authenticated successfully.  Normally this would mean the problem was DHCP related, but you said that it works if encryption is off.  So that makes me think you're dealing with a driver problem, especially since you're using nsdiswrapper.

Re: Cannot obtain IP address - losing the will to live!!

Thanks for your reply dano. At least I am not going mad then... well not quite yet wink

You have confirmed my fears... unfortunately there is only one driver for this device and it works fine in Window$. I have tried so many times to convert folk to Linux, but the sad fact is that hardware manufacturers have the $ of Window$ in their eyes and unless you own 'main brand' equipment where Linux has built-in support it is a lottery.

I think it may be worth spending £10 of my own money to buy a Linux-compatible USB device just to win over another convert.

Re: Cannot obtain IP address - losing the will to live!!

This is ridiculous!!!

I have now tried two more USB adapters in three different machines running Ubuntu 9.04 and 9.10 Beta and same thing... it does not work!!!

Obviously these adapters work in Window$ (yawn) and I have now spent all of my free time trying to get them running under Linux. The latest purchase is a Ralink-based USB device which is recognised by the Linux Kernel... but fails even to scan this time!

So... after a year of trying to convert folk to Linux from MS I have to say... Linux sucks at WiFi... Linux (3 weeks, 3 adapters NoGo), Windows (3 adapters, 100% success, total of 6 minutes to set up).

Is suicide really painless?

Re: Cannot obtain IP address - losing the will to live!!

Did you change the wireless interface name in wicd?

Also, check sudo iwlist scan output in the terminal.

Re: Cannot obtain IP address - losing the will to live!!

Hi,
I have the same error. It works fine with unencrypted configurations of my router. But if I configure the router with WEP or WPA-PSK it fails.
Also, I have Ubuntu 9.04
However, the wired connection works fine always.
I have tried with the last two versions of wicd (1.6.2.2 and 1.6.2)
I am sure that it is not the dhcp software because I have set a IP fixed. Either it is because of the password because I have put with and without " "

Please... Anyone may help me?

Re: Cannot obtain IP address - losing the will to live!!

I found that I expected to use passcode for WEP but instead I had to use HEX.
Windows did not require choosing between passcode, Hex and restricted.