LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 11-10-2004, 01:09 AM   #1
patkalolo
Member
 
Registered: Jul 2004
Location: Seattle
Distribution: Slackware 10.0
Posts: 38

Rep: Reputation: 15
Wireless NIC can't Authenticate to AP using WPA; ndiswrapper/wpa_supplicant


Alright I give up..I need help:

Problem -

Wireless card cannot authenticate with AP.

Description -

I am trying to get my dlink dwl-g520 to connect to my dlink di-624 in Slackware 10.0, running kernel 2.6.9. I have the latest ndiswrapper installed as well as wpa_supplicant. The output of "ndiswrapper -l" is as follows:

Code:
Installed ndis drivers:
net5211 driver present, hardware present
Output of "iwconfig" is as follows:

Code:
IEEE 802.11g  ESSID:"makaha"
          Mode:Managed  Frequency:2.437GHz  Access Point: 00:0D:88:BC:4B:F3
          Bit Rate:108Mb/s
          Encryption key:off
          Link Quality:3/100  Signal level:5/154  Noise level:0/154
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
My "/etc/wpa_supplicant.conf" file reads as follows:

Code:
 ctrl_interface=/var/run/wpa_supplicant # for wpa_cli support

network={
  ssid="makaha"
  key_mgmt=WPA-PSK
  pairwise=TKIP
  group=TKIP
  psk="XXXXXXXXXX"
  proto=WPA
}

Output of ifconfig is as follows:

Code:
eth0      Link encap:Ethernet  HWaddr 00:0E:A6:59:25:17
          inet addr:192.168.0.101  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5722 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3699 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3261225 (3.1 Mb)  TX bytes:669757 (654.0 Kb)
          Base address:0xac00 Memory:fe9e0000-fea00000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:21 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1873 (1.8 Kb)  TX bytes:1873 (1.8 Kb)

wlan0     Link encap:Ethernet  HWaddr 00:0D:88:93:35:8F
          inet addr:192.168.0.101  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1757 (1.7 Kb)  TX bytes:250 (250.0 b)
          Interrupt:23 Memory:feaf0000-feafffff
Entering "iwlist scan" outputs lots of info, most important of which is:

Code:
Cell 03 - Address: 00:0D:88:BC:4B:F3
                    ESSID:"makaha"
                    Protocol:IEEE 802.11g
                    Mode:Managed
                    Frequency:2.437GHz
                    Quality:0/100  Signal level:-58 dBm  Noise level:-256 dBm
                    Encryption key: on
                    Bit Rate:1Mb/s
                    Bit Rate:2Mb/s
                    Bit Rate:5.5Mb/s
                    Bit Rate:11Mb/s
                    Bit Rate:6Mb/s
                    Bit Rate:12Mb/s
                    Bit Rate:24Mb/s
                    Bit Rate:36Mb/s
                    Bit Rate:9Mb/s
                    Bit Rate:18Mb/s
                    Bit Rate:48Mb/s
                    Bit Rate:54Mb/s
                    Extra:bcn_int=100
                    Extra:atim=0
                    Extra:wpa_ie=dd160050f20101000050f20201000050f20201000050f20


So to the best of my knowledge everything is fine. The proper drivers are installed, my wpa_supplicant.conf file reads correctly, but when I type in the command "wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf -dd" I get the following code:

Code:
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
Line: 3 - start of a new network block
SSID - hexdump_ascii(len=6):
     6d 61 6b 61 68 61                                 makaha
key_mgmt: 0x2
pairwise: 0x8
group: 0x8
PSK (ASCII passphrase) - hexdump_ascii(len=34):
     25 33 34 61 31 34 4b 5f 6b 6a 2b 63 26 5e 21 28   %34a14K_kj+c&^!(
     48 24 4b 21 29 21 23 23 68 24 29 28 2a 26 4c 4b   H$K!)!##h$)(*&LK
     4a 2a                                             J*
proto: 0x1
PSK (from passphrase) - hexdump(len=32): 90 ec 7a a4 57 cb 9f 55 ca df f6 0e 05
68 35 1f e8 02 45 61 95 bf 00 c7 6b 20 e8 35 f1 19 e5 c5
Priority group 0
   id=0 ssid='makaha'
Using existing control interface directory.
Setting scan request: 0 sec 100000 usec
Starting AP scan (broadcast SSID)
Scan timeout - try to get results
Received 1027 bytes of scan results (4 BSSes)
Scan results: 4
Selecting BSS from priority group 0
0: 00:0d:88:bc:4b:f3 ssid='makaha' wpa_ie_len=24 rsn_ie_len=0
   selected
Trying to associate with 00:0d:88:bc:4b:f3 (SSID='makaha' freq=2437 MHz)
Cancelling scan request
WPA: using IEEE 802.11i/D3.0
WPA: Own WPA IE - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00
50 f2 02 01 00 00 50 f2 02
Setting authentication timeout: 5 sec 0 usec
Wireless event: cmd=0x8c02 len=239
Custom wireless event: 'ASSOCINFO(ReqIE3048320
41224606cdd160050f20101000050f20201000050f20201000050f202dd0900037f01010007ff7f
RespIEdd0900037f01010007ff7fdd0c00037f02010100
0002a44000)'
Association info event
req_ies - hexdump(len=59): 00 06 6d 61 6b 61 68 61 01 08 02 04 0b 16 0c 18 30 48
 32 04 12 24 60 6c dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 02 01 00 0
0 50 f2 02 dd 09 00 03 7f 01 01 00 07 ff 7f
assoc_wpa_ie - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50
f2 02 01 00 00 50 f2 02
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:0d:88:bc:4b:f3
Association event - clear replay counter
Associated to a new BSS: BSSID=00:0d:88:bc:4b:f3
Setting authentication timeout: 10 sec 0 usec
Authentication with 00:0d:88:bc:4b:f3 timed out.
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
Scan timeout - try to get results
Received 1027 bytes of scan results (4 BSSes)
Scan results: 4
Selecting BSS from priority group 0
0: 00:0d:88:bc:4b:f3 ssid='makaha' wpa_ie_len=24 rsn_ie_len=0
   selected
Trying to associate with 00:0d:88:bc:4b:f3 (SSID='makaha' freq=2437 MHz)
Cancelling scan request


Conclusion:
Apparently my wireless card will not authenticate to my AP. Any ideas??
 
Old 11-10-2004, 01:51 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
This is a link that might help. There is a step near the bottom after the wpa_supplicant is listed , which may help. Or perhaps you did this and didn't indicate it.

http://www.fedoraforum.org/forum/arc...p/t-25891.html
 
Old 11-10-2004, 04:31 AM   #3
patkalolo
Member
 
Registered: Jul 2004
Location: Seattle
Distribution: Slackware 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
You see the thing is that I do not have this directory at all:

"/etc/sysconfig"

I will explore further though.
 
Old 11-10-2004, 08:09 AM   #4
2Gnu
Senior Member
 
Registered: Jan 2002
Location: Southern California
Distribution: Slackware
Posts: 1,880

Rep: Reputation: 51
You won't have /etc/sysconfig/anything in Slack. I read the link and the two references to that dir where to automate bringing up wpa_supplicant which you could do in /etc/rc.d/rc.wireless.

Unfortunately, I don't have the greater answer as to why you can't authenticate. Anything in the logs - /var/log/messages or the router log? Is the latest firmware running on the router and the wireless card?
 
Old 12-08-2004, 12:35 AM   #5
patkalolo
Member
 
Registered: Jul 2004
Location: Seattle
Distribution: Slackware 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
Sorry I took so long to respond but I been poking at other problems because this one is just pi$$ing me off. So in any case I looked in my router log and it has the floowing info:

Code:
Dec/07/2004 22:18:05 	state: paeDISCONNECTED			
Dec/07/2004 22:18:05 	Wireless PC connected			XX-XX-XX-XX-XX-XX
Dec/07/2004 22:17:53 	Authentication success
Even when I look in the list of currently connected wireless computers there I am!! It seems that the card and the AP connect but Linux doesnt.
 
Old 12-08-2004, 02:39 AM   #6
patkalolo
Member
 
Registered: Jul 2004
Location: Seattle
Distribution: Slackware 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
Alright so I didi a little more fidgeting. Here is the procedure i used:

Code:
ifconfig eth0 down
ifconfig wlan0
route add -net default gw 192.168.0.1
wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf -dd
I used the route command to get the gateway to 'wlan0 to be the same as it is when 'eth0' is in use.

Here is the funky output that I get:

Code:
root@rz54g:~# wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf -dd
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'ndiswrapper'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
Line: 3 - start of a new network block
ssid - hexdump_ascii(len=6):
     6d 61 6b 61 68 61                                myessid
key_mgmt: 0x2
pairwise: 0x8
group: 0x8
PSK (ASCII passphrase) - hexdump_ascii(len=34): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='makaha'
Using existing control interface directory.
bind(PF_UNIX): Address already in use
Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.
root@rz54g:~# wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf -dd
Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'ndiswrapper'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
Line: 3 - start of a new network block
ssid - hexdump_ascii(len=6):
     6d 61 6b 61 68 61                                 myessid
key_mgmt: 0x2
pairwise: 0x8
group: 0x8
PSK (ASCII passphrase) - hexdump_ascii(len=34): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='myessid'
Using existing control interface directory.
Initializing interface (2) 'wlan0'
Own MAC address: XX:XX:XX:XX:XX:XX
Setting scan request: 0 sec 100000 usec
l2_packet_receive - recv: Network is down
Starting AP scan (broadcast SSID)
Scan timeout - try to get results
ioctl[SIOCGIWSCAN]: Resource temporarily unavailable
The last part is the most interesting. Anyone see anything?

Last edited by patkalolo; 12-08-2004 at 02:40 AM.
 
Old 12-09-2004, 10:27 PM   #7
patkalolo
Member
 
Registered: Jul 2004
Location: Seattle
Distribution: Slackware 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
ribbit.
 
Old 12-10-2004, 12:58 AM   #8
patkalolo
Member
 
Registered: Jul 2004
Location: Seattle
Distribution: Slackware 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
Ha...

So I went into the configuration menu of my DI-624 router and made the IP of my DWL-G520 card static, and different from the Dynamic IP of my wired NIC. I previously attempted to use the same IP from the wired card (192.168.0.101) to bring up the wlan0 interface with the command:

Code:
 ifconfig wlan0 xxx.xxx.x.101
Now instead I am using the Static IP (192.168.0.111) assigned to the MAC address of my wired NIC to bring up the wlan0 interface using:

Code:
ifconfig wlan0 xxx.xxx.x.111
I think this was the main issue. Total PITA. In any case what follows is the steps that I have to use to get my wireless connection up:

Code:
ifconfig eth0 down
ifconfig wlan0 xxx.xxx.x.111
route add -net default gw xxx.xxx.x.1
wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf -dd
I still don't know why I have to set the default gateway that gets added to the eth0 connection automatically, but at this point I am just glad that I got things working. Now I just have to automate it.
 
Old 07-31-2006, 02:47 PM   #9
TheYetiMan
LQ Newbie
 
Registered: Jul 2006
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by patkalolo
Ha...

So I went into the configuration menu of my DI-624 router and made the IP of my DWL-G520 card static, and different from the Dynamic IP of my wired NIC. I previously attempted to use the same IP from the wired card (192.168.0.101) to bring up the wlan0 interface with the command:

Code:
 ifconfig wlan0 xxx.xxx.x.101
Now instead I am using the Static IP (192.168.0.111) assigned to the MAC address of my wired NIC to bring up the wlan0 interface using:

Code:
ifconfig wlan0 xxx.xxx.x.111
I think this was the main issue. Total PITA. In any case what follows is the steps that I have to use to get my wireless connection up:

Code:
ifconfig eth0 down
ifconfig wlan0 xxx.xxx.x.111
route add -net default gw xxx.xxx.x.1
wpa_supplicant -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf -dd
I still don't know why I have to set the default gateway that gets added to the eth0 connection automatically, but at this point I am just glad that I got things working. Now I just have to automate it.
patkalolo....... all I can say is THANK YOU SO MUCH!

I have been trying to get WPA working on my wireless linux boxes for literally months and months and months..... I got fed up of looking at the same damn instructions on all these web sites but none of them ever solved my problem which was that the linux boxes just wouldn't associate with my DI-624 even though the router was registering the linux box as associated! Every now and then I'd go back to it and have another go but never got anywhere - until now!!!!!!!!! Just got it up and running on my laptop using ipw2200 driver and it works fine! YES!

Thanks so much again, you are the man!

Yeti
 
  


Reply



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
wpa_supplicant and ndiswrapper rabidus Linux - Wireless Networking 2 10-20-2005 10:02 AM
Wireless nic trouble & ndiswrapper linuxhippy Fedora 3 07-23-2005 04:21 PM
wpa_supplicant not picking up WPA-PSK AP derfelcadarn Linux - Wireless Networking 2 04-07-2005 11:48 AM
wpa_supplicant/ndiswrapper seifenblasen Linux - Laptop and Netbook 3 03-24-2005 12:40 PM
How to use xsupplicant, wpa_supplicant for wpa/tkip/peap-mschapv2 weeds84 Linux - Wireless Networking 2 03-13-2005 05:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 08:18 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration