LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Can't figure out wpa-supplicant problem (https://www.linuxquestions.org/questions/linux-wireless-networking-41/cant-figure-out-wpa-supplicant-problem-582514/)

replica9000 09-05-2007 08:14 PM

Can't figure out wpa-supplicant problem
 
Some reason I just can't get wpa-supplicant to work.

I have my wireless network working. I can connect to unsecured and WEP (without wpa-supplicant) secured routers, but not WPA secured routers yet.

I have the bcm43xx drivers in ndiswrapper.

My router is secured:
Security Mode: WPA Personal
WPA Algorithim: AES
WPA Shared Key: XXXXXXX

# ndiswrapper -l
Code:

Debsidian:/home/replica# ndiswrapper -l
bcmwl5 : driver installed
        device (14E4:4318) present (alternate driver: bcm43xx)

# iwlist eth0 scan
Code:

eth0      Scan completed :
          Cell 01 - Address: 00:18:39:B8:A8:D6
                    ESSID:"AMD-NET"
                    Protocol:IEEE 802.11g
                    Mode:Managed
                    Frequency:2.462 GHz (Channel 11)
                    Quality:93/100  Signal level:-36 dBm  Noise level:-96 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    Extra:bcn_int=100
                    Extra:atim=0
                    IE: WPA Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK

My /etc/wpa_supplicant.conf (tried ap_scan 0,1,2 and #ap_scan)
Code:

ctrl_interface=/var/run/wpa_supplicant
#ctrl_interface_group=0

#eapol_version=1
ap_scan=1
#fast_reauth=1

network={
        ssid="AMD-NET"
        scan_ssid=1
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        group=CCMP TKIP
        psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}

# wpa_supplicant -w -Dndiswrapper -ieth0 -c/etc/wpa_supplicant.conf -dd
Code:

Initializing interface 'eth0' conf '/etc/wpa_supplicant.conf' driver 'ndiswrapper' ctrl_interface 'N/A' bridge 'N/A'
Unsupported driver 'ndiswrapper'.

Failed to add interface eth0
Cancelling scan request
Cancelling authentication timeout

# wpa_supplicant -w -Dwext -ieth0 -c/etc/wpa_supplicant.conf -dd
Code:

Initializing interface 'eth0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
Line: 8 - start of a new network block
ssid - hexdump_ascii(len=7):
    41 4d 44 2d 4e 45 54                              AMD-NET       
scan_ssid=1 (0x1)
proto: 0x1
key_mgmt: 0x2
pairwise: 0x18
group: 0x18
PSK - hexdump(len=32): [REMOVED]
Priority group 0
  id=0 ssid='AMD-NET'
Initializing interface (2) 'eth0'
SIOCGIWRANGE: WE(compiled)=22 WE(source)=18 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:14:a5:c1:ce:38
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 100000 usec
Using existing control interface directory.
Added interface eth0
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'eth0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'eth0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'eth0' added
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=7):
    41 4d 44 2d 4e 45 54                              AMD-NET       
Trying to get current scan results first without requesting a new scan to speed up initial association
Received 258 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 0
Try to find WPA-enabled AP
0: 00:18:39:b8:a8:d6 ssid='AMD-NET' wpa_ie_len=26 rsn_ie_len=0 caps=0x11
  selected based on WPA IE
  selected WPA AP 00:18:39:b8:a8:d6 ssid='AMD-NET'
Try to find non-WPA AP
Trying to associate with 00:18:39:b8:a8:d6 (SSID='AMD-NET' freq=2462 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: using IEEE 802.11i/D3.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 1
WPA: set AP WPA IE - hexdump(len=26): dd 18 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02 00 00
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
No keys have been configured - skip key clearing
wpa_driver_wext_set_drop_unencrypted
State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
wpa_driver_wext_associate
Setting authentication timeout: 10 sec 0 usec
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'eth0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
Wireless event: cmd=0x8b04 len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
Wireless event: cmd=0x8b1a len=15
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'eth0' added
RX EAPOL from 00:18:39:b8:a8:d6
RX EAPOL - hexdump(len=99): 01 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 00 01 1a 81 a3 0e 58 04 dd e2 cc 6e 97 5c f7 51 10 9d 4c 12 33 4e df d1 ff 71 15 66 e1 e8 92 c1 6b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Setting authentication timeout: 10 sec 0 usec
IEEE 802.1X RX: version=1 type=3 length=95
  EAPOL-Key type=254
  key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
  key_length=16 key_data_length=0
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_nonce - hexdump(len=32): 01 1a 81 a3 0e 58 04 dd e2 cc 6e 97 5c f7 51 10 9d 4c 12 33 4e df d1 ff 71 15 66 e1 e8 92 c1 6b
  key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
  key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
WPA: RX EAPOL-Key - hexdump(len=99): 01 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 00 01 1a 81 a3 0e 58 04 dd e2 cc 6e 97 5c f7 51 10 9d 4c 12 33 4e df d1 ff 71 15 66 e1 e8 92 c1 6b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
State: ASSOCIATING -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:18:39:b8:a8:d6 (ver=2)
WPA: Renewed SNonce - hexdump(len=32): 4e c7 ac 5a ed ed 2f 77 bf f7 ae 32 78 ca b7 18 69 9b 2a 3e 4f ac 3b af 9d cc 15 20 96 4d 96 5d
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=64): [REMOVED]
WPA: WPA IE for msg 2/4 - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
WPA: Sending EAPOL-Key 2/4
WPA: Use BSSID (00:18:39:b8:a8:d6) as the destination for EAPOL-Key
WPA: TX EAPOL-Key - hexdump(len=123): 01 03 00 77 fe 01 0a 00 10 00 00 00 00 00 00 00 00 4e c7 ac 5a ed ed 2f 77 bf f7 ae 32 78 ca b7 18 69 9b 2a 3e 4f ac 3b af 9d cc 15 20 96 4d 96 5d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cb bf 8a 07 a9 4e 7a 62 7c 6a 06 68 40 e4 0a d4 00 18 dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
RX EAPOL from 00:18:39:b8:a8:d6
RX EAPOL - hexdump(len=99): 01 03 00 5f fe 00 8a 00 10 00 00 00 00 00 00 00 00 01 1a 81 a3 0e 58 04 dd e2 cc 6e 97 5c f7 51 10 9d 4c 12 33 4e df d1 ff 71 15 66 e1 e8 92 c1 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface eth0
State: SCANNING -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
wpa_driver_wext_set_wpa
wpa_driver_wext_set_drop_unencrypted
wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing
Control interface directory not empty - leaving it behind
Removed BSSID 00:18:39:b8:a8:d6 from blacklist (clear)
Cancelling scan request
Cancelling authentication timeout
WEXT: Operstate: linkmode=0, operstate=6


2Gnu 09-06-2007 03:55 PM

Your post seems to have a couple of contradictions. Clarify a few things, please.

You say you loaded the bcm43xx drivers in ndiswrapper. If you mean you loaded the Windows drivers using ndiswrapper, OK. Otherwise, you may have a driver conflict. Use bcm43xx or ndiswrapper, but not both. The fact that your interface is showing as eth0 vs. wlan0 points to the fact the bcm43xx is loading.

Also, only call the driver in the wpa_supplicant using Dwext.

Is the ESSID broadcast turned off? If so, try enabling it.

replica9000 09-06-2007 04:30 PM

Well I have wpa_supplicant working now, not really sure what I did to finally get it working. I even have it so it's connected on boot (/etc/network/interfaces)

My wireless was already working before, it just wasn't connecting to the router when WPA was enabled. Before I could connect with no security or WEP secured.

PTrenholme 09-06-2007 04:44 PM

I've found, as you did, that the -Dndiswrapper setting fails to work.

I've also found that the values in /etc/sysconfig/wpa_supplicant need to be changed too, since (on a Fedora system, at least) /etc/init.d/ndiswrapper runs that script to get its option settings. And (again, on a Fedora system), the NetworkManager uses the init.d script to start wpa_supplicant when it's needed.

Oh, the newer b43 driver seems to work a little better than the bcm43xx one.

And, as 2Gnu said, if you're using the b43 or bcm43xx driver, you should not be using ndiswrapper at all. (You do need to extract the microcode from the Windows .sys file -- use fwcuttewr-bcm34xx to do this -- before the FOSS drivers will work.

replica9000 09-06-2007 04:57 PM

without ndiswrapper my wireless doesn't work. I'm using the bcmwl5 drivers in ndiswrapper.

if I don't "#modprobe ndiswrapper" I don't get a wlan0 or eth0
Code:

Debsidian:/home/replica# ifconfig
eth1      Link encap:Ethernet  HWaddr 00:E0:B8:B6:14:82 
          inet addr:192.168.9.100  Bcast:192.168.9.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:b8ff:feb6:1482/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1458 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11855 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:188642 (184.2 KiB)  TX bytes:1510995 (1.4 MiB)
          Interrupt:19

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:98 errors:0 dropped:0 overruns:0 frame:0
          TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6788 (6.6 KiB)  TX bytes:6788 (6.6 KiB)

vmnet1    Link encap:Ethernet  HWaddr 00:50:56:C0:00:01 
          inet addr:192.168.113.1  Bcast:192.168.113.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:209 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

vmnet8    Link encap:Ethernet  HWaddr 00:50:56:C0:00:08 
          inet addr:172.16.81.1  Bcast:172.16.81.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fec0:8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:211 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


PTrenholme 09-06-2007 05:20 PM

Yes, sorry: I read "bcmwl5" as "bcm43xx" since I just went through dropping ndiswrapper for b43, and my mind overrode my sight. But your setup is one I used for years (until it broke after Fedora added the b43 driver to their kernel), so, if it works for you on your distribution, that's great.

replica9000 09-06-2007 05:39 PM

Well so far I've had no issues with ndiswrapper. My friend has an identical laptop running WinXP and I can get a better connection than him. I'll keep an eye out for that b43 though.


All times are GMT -5. The time now is 11:00 AM.