LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-31-2009, 11:59 AM   #1
kemsiro
Member
 
Registered: Sep 2007
Location: Vietnam
Distribution: Slackware
Posts: 38

Rep: Reputation: 15
Question Wicd cannot obtain an IP automatically in a wireless network with WPA enabled.


I'm using Slack 13 (32 bit). When I connect to a wireless network with no encryption then the wicd work fine for me.
But when connect to a wireless network with security enabled (WPA),
I provided the network key correctly. I set that my computer should obtain an IP automatically, then I connect, after a while, the message return that "Error,cannot obtain an IP address".
When I use windows XP then connect to that network, it can obtain an IP from the network.
What can I do to deal with this problem?
Thank for your help.
 
Old 08-31-2009, 06:04 PM   #2
bassmadrigal
Member
 
Registered: Nov 2003
Location: Newport News, VA
Distribution: Slackware
Posts: 293

Rep: Reputation: 96
On the build of wicd that I am using, by default it uses dhclient to get an ip, which for whatever reason doesn't work for me (although I am using Slack 12.1). So I just went into the options and switched it to dhcp.
 
Old 08-31-2009, 07:57 PM   #3
em21701
Member
 
Registered: Feb 2008
Location: Rhode Island, USA
Distribution: Slackware12.2 & Slackware64-13
Posts: 247

Rep: Reputation: 40
Can you connect manually from the CLI?
 
Old 09-01-2009, 03:04 AM   #4
kemsiro
Member
 
Registered: Sep 2007
Location: Vietnam
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: 15
No, I can't.
At first I use:
iwlist wlan0 scan
it display my wireless network name (ESSID) is "IO-Media" and the MAC address of access point.
Then I wrote:
iwconfig wlan0 ap <access point address>
then the ESSID of wlan0 is changed to "hidden" (Actualy, my wireless network name is "IO-Media"). In wicd, it scan and show that it found an network name "hidden".
Next:
iwconfig enc s:"my network key"
here is the error says:
"Error for wireless request "Set Encode" (8B2A) :
SET failed on device wlan0 ; Invalid argument."

Also, I tried to assign a static IP address (172.16.1.30) for my wlan0, then add a route to the access point:
route add default gw 172.16.1.1 dev wlan0
but it display an strange error: I don't remember exacly (because I can't connect to the internet to post here when I'm in Slack). It mention about invalid "SADDRT" or similar thing.
My computer is ASUS K40IN with Slackware 32bit 13.0

Last edited by kemsiro; 09-01-2009 at 03:06 AM.
 
Old 09-01-2009, 03:12 AM   #5
kemsiro
Member
 
Registered: Sep 2007
Location: Vietnam
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: 15
Oh, I'm sorry, I misunderstood. I thought CLI means command line (terminal).
I've never use wpa_cli before. Can you show me some examples to use it? Thank you
 
Old 09-01-2009, 07:24 AM   #6
em21701
Member
 
Registered: Feb 2008
Location: Rhode Island, USA
Distribution: Slackware12.2 & Slackware64-13
Posts: 247

Rep: Reputation: 40
You were correct, I was referring to the command line. wpa_cli is for getting updates from the wpa_supplicant daemon. It will be easier to setup your /etc/wpa_supplicant.conf to help you connect.

Code:
# wpa_passphrase IO-Media "your passkey" >> /etc/wpa_supplicant.conf
this will append the following to your /etc/wpa_supplicant.conf

Code:
network={
     ssid="IO-Media"
     psk=<some hex string>
}
from there add the following lines to make it look like this:

Code:
network={
     ssid="IO-Media"
     psk=<some hex string>
     key_mgmt=WPA-PSK
     proto=WPA
}
Now you should be able to connect

Code:
# iwconfig wlan0 essid IO-Media
# wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
# dhclinet wlan0
If wpa_supplicant is already running you will see an error message, you can ignore that. After running dhclient you should see it return an IP Address, at that point you are ll set.
 
Old 09-01-2009, 08:57 AM   #7
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 500

Rep: Reputation: 83
Make sure your adapter is working and configure wpa_supplicant as suggested by em21701. After you troubleshoot the authentication issue, goes for dhcp (dhcpd and dhclient).

Wicd put me on knees saturday, but I was able to circumvent my issue with authentication (wpa2) and my lame hidden essid not being named correctly. For the hidden issue, i edited "wicd-daemon.py" following this:

Adam Blackburn wrote on 2009-08-17:
"I committed some new code based on comments 9 and 7 for hidden network loading:

# Read the essid because we need to name those hidden
# wireless networks now - but only read it if it is hidden.
if cur_network["hidden"]:
# check if there is an essid in the config file
# if there isn't, .get( will return None
stored_essid = self.config.get(section, 'essid')
if stored_essid:
# set the current network's ESSID to the stored one
cur_network['essid'] = stored_essid

I think this will solve the problem of loading the hidden network ESSIDs.


Thanks Adam, solved for me.

For the authentication issue, I used a file downloaded on another place and think it's not ethic if I post a direct link. The file was wnettools.py hacked for 1.6.2. I'm using 1.6.2.1, but when the file was replaced, Wicd authenticate on first try. Can I post the diff?

My setup: Slackware 13 + athk5 + Atheros242x + wrt54g + wpa2 + hidden essid.
 
Old 09-01-2009, 09:08 AM   #8
kemsiro
Member
 
Registered: Sep 2007
Location: Vietnam
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: 15
Hi folks, I'm glad to see your instructions.
To BrZ: where can I find wicd-daemon.py and edit it? How can I use it to run or config the network after editing it?
Now I was of from my wireless network because of going for a 1 day holiday.I'll return and follow your instructions to check if it connect successfully.
Thank you for your helps .
 
Old 09-01-2009, 09:20 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 11,387
Blog Entries: 3

Rep: Reputation: 1479Reputation: 1479Reputation: 1479Reputation: 1479Reputation: 1479Reputation: 1479Reputation: 1479Reputation: 1479Reputation: 1479Reputation: 1479
Hi,

You can setup your 'wicd' configurations from the 'cli' with 'wicd-curses' as root. Then select the device you wish to configure via the curses screen.

Never fails for me! Of course you can edit the config files manually but most new users will find the 'wicd-curses' easier to do. The user must have all configuration data to input to the proper fields.
 
Old 09-01-2009, 09:27 AM   #10
BrZ
Member
 
Registered: Apr 2009
Distribution: Slackware
Posts: 500

Rep: Reputation: 83
Think it's '/usr/lib/wicd/wicd-daemon.py' or '/usr/lib64/wicd/wicd-daemon.py'. You can try 'updatedb' followed by 'locate wicd-demon.py'.
 
Old 09-02-2009, 07:28 AM   #11
rvdboom
Member
 
Registered: Jul 2007
Distribution: Slackware
Posts: 186

Rep: Reputation: 23
Hmm, this "hidden" thing is interesting : I have a laptop with a Ralink adapter on it and I can connect to my own wifi network at home using WPA without issues, as well as many others. However, sometimes, there are wifi networks I can connect to. They are displayed in the WICD interface but when I try to connect on them, just as the main poster, I can't get an IP address.
I'd be very happy if this is solved by this new commit!
 
Old 09-02-2009, 08:46 AM   #12
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
One thing to keep in mind when using WPA is that wpa_supplicant must be compiled properly or it won't work. For example, for my atheros-based card I use madwifi, but the wpa_supplicant that comes with slackware (at least in 12.2) cannot connect to wpa, so I have to compile my own version and make sure to edit the config file to enable the madwifi drivers. After doing this it works fine.
 
Old 09-03-2009, 02:56 AM   #13
kemsiro
Member
 
Registered: Sep 2007
Location: Vietnam
Distribution: Slackware
Posts: 38

Original Poster
Rep: Reputation: 15
Well, after using all of above methods, I couldn't connect .
Here is my wireless network when I run #iwlist wlan0 scan

Quote:
Cell 02 - Address: 00:21:29:C5:25:8B
ESSID:"IO-Media"
Mode:Master
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=75/100 Signal level:-61 dBm
Encryption keyn
IE: Unknown: 0008494F2D4D65646961
IE: Unknown: 010882848B962430486C
IE: Unknown: 030101
IE: Unknown: 2A0104
IE: Unknown: 2F0104
IE: Unknown: 32040C121860
IE: Unknown: DD090010180202F4000000
IE: WPA Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extra:tsf=0000002ae305b183
Extra: Last beacon: 43ms ago
At first, I run this line:
# wpa_passphrase IO-Media "your passkey" >> /etc/wpa_supplicant.conf
The content of my wpa_supplicant.conf is:

Quote:
# See /usr/doc/wpa_supplicant-0.6.9/wpa_supplicant.conf.sample
# for many more options that you can use in this file.

# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=/var/run/wpa_supplicant
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
#country=US

# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
network={
key_mgmt=NONE
priority=0
}

# WPA protected network, supply your own ESSID and WPAPSK here:
network={
scan_ssid=0
ssid="IO-Media"
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP WEP104 WEP40
psk=bfa0ecf9a64ec32d8c0fa94382f8e4dcce41f3ad33309c29c1275082efa4d559
priority=10
}
Then I delete the file /var/run/wpa_spplicant/wlan0 and run:
#wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
# iwconfig wlan0 ap 00:21:29:C5:25:8B
root@kemsiro:/# dhclient wlan0

Quote:
Internet Systems Consortium DHCP Client V3.1.2p1
Copyright 2004-2009 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:24:23:04:61:3d
Sending on LPF/wlan0/00:24:23:04:61:3d
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
The network key is correct, but It still fail to connect. Although I can connected to it via Windows XP, and my computer can obtain an IP address automatically.

even this command:
#dhclient wlan0 -s 172.16.1.1 -p 68
Quote:
binding to user-specified port 68
Internet Systems Consortium DHCP Client V3.1.2p1
Copyright 2004-2009 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:24:23:04:61:3d
Sending on LPF/wlan0/00:24:23:04:61:3d
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 172.16.1.1 port 67 interval 5
DHCPDISCOVER on wlan0 to 172.16.1.1 port 67 interval 9
DHCPDISCOVER on wlan0 to 172.16.1.1 port 67 interval 18
DHCPDISCOVER on wlan0 to 172.16.1.1 port 67 interval 7
DHCPDISCOVER on wlan0 to 172.16.1.1 port 67 interval 13
DHCPDISCOVER on wlan0 to 172.16.1.1 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
and this:
Quote:
#dhclient wlan0 -s 172.16.1.2
Internet Systems Consortium DHCP Client V3.1.2p1
Copyright 2004-2009 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:24:23:04:61:3d
Sending on LPF/wlan0/00:24:23:04:61:3d
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 172.16.1.2 port 67 interval 4
DHCPDISCOVER on wlan0 to 172.16.1.2 port 67 interval 6
DHCPDISCOVER on wlan0 to 172.16.1.2 port 67 interval 11
DHCPDISCOVER on wlan0 to 172.16.1.2 port 67 interval 11
DHCPDISCOVER on wlan0 to 172.16.1.2 port 67 interval 11
receive_packet failed on wlan0: Network is down
receive_packet failed on wlan0: Network is down
DHCPDISCOVER on wlan0 to 172.16.1.2 port 67 interval 10
DHCPDISCOVER on wlan0 to 172.16.1.2 port 67 interval 8
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

My wireless network card is: atheros AR829X (in Slackware is atheros AR8290)
In win XP, after I supply the network key, my computer can obtain the IP address automatically from the network,
Here is connection detail:
Quote:
Physical Address: 00-24-23-04-61-3D
IP Address: 172.16.1.42
Subnet Mask: 255.255.255.0
Default Gateway: 172.16.1.1
Default DHCP Server: 172.16.1.2
DNS Server: 172.16.1.2
203.113.188.1
210.245.24.22
...

Last edited by kemsiro; 09-03-2009 at 03:19 AM.
 
Old 09-03-2009, 06:08 AM   #14
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
so you are using the madwifi drivers on not ? If so read this info carefully on how to compile wpa_supplicant properly:
http://madwifi-project.org/wiki/UserDocs/802.11i
 
Old 09-03-2009, 08:42 AM   #15
em21701
Member
 
Registered: Feb 2008
Location: Rhode Island, USA
Distribution: Slackware12.2 & Slackware64-13
Posts: 247

Rep: Reputation: 40
Change wpa_supplicant such that scan_ssid=1 for your network.

An atheros card came with my laptop and I had a lot of driver trouble, the result was the same as yours where it would not get an IP. I changed it for a broadcom card that I had laying around. You should make sure that you have the proper drivers.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wicd on Fedora 10 will not connect to WPA/WPA2 network after install Mikazo Linux - Wireless Networking 2 04-11-2009 01:38 PM
Cannot connect to wireless network with wicd on Zenwalk Kenny_C Linux - Wireless Networking 1 04-07-2009 03:11 PM
dhclient: no working leases. Wicd cannot obtain ip addr. Unencrypted college network. Romanus81 Slackware 10 09-01-2008 11:44 PM
Setting up Wireless w/ WPA to start automatically in Fedora 8 SlowCoder Linux - General 3 02-15-2008 04:54 PM
[ipw2200 & WPA] Need help to connect to WPA enabled router. Hyakutake Slackware 2 03-02-2007 10:58 AM


All times are GMT -5. The time now is 07:41 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration