Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Aug 2006 11:37:14 -0400
From:      Dylan Alex Simon <dylan@dylex.net>
To:        freebsd-net@freebsd.org
Subject:   wpa_supplicant on ndis cannot associate
Message-ID:  <20060805153714.GA22424@dylex.dylex.net>

next in thread | raw e-mail | index | archive | help

--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

This is on latest RELENG_6_1.

I'm using an ndis driver with a Dell TrueMobile 1300 (Latitude D610).
Generally it's working fine: if I set the ssid/keys with ifconfig, it will
associate and everything works wonderfully.

wpa_supplicant, however, doesn't work so well.  This is all with
key_mgmt=NONE and no encryption, so authentication shouldn't be an issue.

When I use the ndis driver (-D ndis), it can get scan results, but doesn't
seem to properly set the ssid and never associates.  There are lots of errors
about ndis_get_oid and ndis_set_oid failing (but none about OID_802_11_SSID).
While it's trying to associate, if I go and manually set the ssid with
ifconfig (ifconfig ndis0 ssid XXX), it will then associate and then
everything's okay.  wpa_supplicant thinks things worked and completes, but it
requires that manual step.  (ndis.log with === annotations)

I noticed that ifconfig is using the generic IEEE80211_IOC_SSID ioctls rather
than the special ndis ones that the wpa_supplicant ndis driver does, so I
decided to try -D bsd.

With the freebsd driver, it gets scan results, properly sets the ssid, and
then, while it's trying to associate, if I check ifconfig, it says associated
and everything is okay.  But wpa_supplicant doesn't notice the association,
and times out and goes back to scanning.  (bsd.log with === annotations)

This happens with both ap_scan=1 and 2 and with scan_ssid=0 and 1.

Does anyone have wpa_supplicant working on an ndis driver?

:-Dylan

--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Description: ndis.log
Content-Disposition: attachment; filename="ndis.log"

> wpa_supplicant -c /etc/wpa_supplicant.conf -i ndis0 -D ndis -d
Initializing interface 'ndis0' conf '/etc/wpa_supplicant.conf' driver 'ndis' ctrl_interface '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'
ctrl_interface_group=0 (from group name 'wheel')
ap_scan=1
Priority group 5
   id=0 ssid='XXX'
Initializing interface (2) 'ndis0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
NDIS: Packet.dll version: FreeBSD WinPcap compatibility shim v1.0
NDIS: 1 adapter names found
NDIS: 1 adapter descriptions found
NDIS: 0 - ndis0 - ndis0
NDIS: Adapter description prefix 'ndis0'
NDIS: Driver supports OID_802_11_CAPABILITY - NoOfPMKIDs 16 NoOfAuthEncrPairs 14
NDIS: driver capabilities: key_mgmt 0x1f enc 0xf auth 0x3
Own MAC address: 00:14:a5:50:67:9e
wpa_driver_ndis_set_wpa: enabled=1
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_set_oid: oid=0xd010114 len (4) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_set_oid: oid=0xd010114 len (4) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_set_oid: oid=0xd010114 len (4) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_set_oid: oid=0xd010114 len (4) failed
Setting scan request: 0 sec 100000 usec
Added interface ndis0
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=8):
     58 58 58                            XXX
NDIS: turning radio on before the first scan
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
Scan timeout - try to get results
Scan results: 3
Selecting BSS from priority group 5
0: 00:11:50:a6:19:92 ssid='XXX' wpa_ie_len=0 rsn_ie_len=0 caps=0x0
   skip - no WPA/RSN IE
1: 00:14:a4:4d:59:06 ssid='140a' wpa_ie_len=0 rsn_ie_len=0 caps=0x10
   skip - no WPA/RSN IE
2: 00:13:10:ee:a9:5e ssid='sam' wpa_ie_len=0 rsn_ie_len=0 caps=0x10
   skip - no WPA/RSN IE
   selected non-WPA AP 00:11:50:a6:19:92 ssid='XXX'
Trying to associate with 00:11:50:a6:19:92 (SSID='XXX' freq=2462 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: clearing own WPA/RSN IE
No keys have been configured - skip key clearing
State: SCANNING -> ASSOCIATING
ndis_set_oid: oid=0xd010119 len (4) failed
NDIS: Failed to set OID_802_11_PRIVACY_FILTER (0)
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - portControl=ForceAuthorized
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
=== Here, I can see:
> ifconfig ndis0
| ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
|         inet 192.168.2.52 netmask 0xffffff00 broadcast 192.168.2.255
|         ether 00:14:a5:50:67:9e
|         media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps)
|         status: no carrier
|         ssid XXX channel 11
|         authmode OPEN privacy OFF deftxkey 1 txpowmax 100 protmode CTS
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
Authentication with 00:00:00:00:00:00 timed out.
Added BSSID 00:00:00:00:00:00 into blacklist
State: ASSOCIATING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
Scan timeout - try to get results
Scan results: 4
Selecting BSS from priority group 5
0: 00:14:a4:4d:59:06 ssid='140a' wpa_ie_len=0 rsn_ie_len=0 caps=0x10
   skip - no WPA/RSN IE
1: 00:11:50:a6:19:92 ssid='XXX' wpa_ie_len=0 rsn_ie_len=0 caps=0x0
   skip - no WPA/RSN IE
2: 00:13:10:ee:a9:5e ssid='sam' wpa_ie_len=0 rsn_ie_len=0 caps=0x10
   skip - no WPA/RSN IE
3: 00:09:5b:ad:ed:5e ssid='Styx' wpa_ie_len=0 rsn_ie_len=0 caps=0x10
   skip - no WPA/RSN IE
   selected non-WPA AP 00:11:50:a6:19:92 ssid='XXX'
Trying to associate with 00:11:50:a6:19:92 (SSID='XXX' freq=2462 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: clearing own WPA/RSN IE
No keys have been configured - skip key clearing
State: SCANNING -> ASSOCIATING
ndis_set_oid: oid=0xd010119 len (4) failed
NDIS: Failed to set OID_802_11_PRIVACY_FILTER (0)
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - portControl=ForceAuthorized
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
NDIS: ReqFixed=0x3 RespFixed=0x7 off_req=40 off_resp=82 len_req=42 len_resp=16ec 0 usec
EAPOL: External notification - portControl=ForceAuthorized
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
ndis_get_oid: oid=0xd010101 len (6) failed
=== Here I run
> ifconfig ndis0 ssid XXX
ndis_get_oid: oid=0xd010101 len (6) failed
NDIS: ReqFixed=0x3 RespFixed=0x7 off_req=40 off_resp=82 len_req=42 len_resp=16
NDIS: 4 BSSID items to process for AssocInfo
Association info event
req_ies - hexdump(len=42): 00 08 58 58 58 58 58 58 58 58 01 08 82 84 8b 96 24 30 48 6c 32 04 0c 12 18 60 dd 06 00 40 96 01 01 00 dd 06 00 10 18 02 00 00
resp_ies - hexdump(len=16): 01 04 82 84 8b 96 32 08 0c 12 18 24 30 48 60 6c
beacon_ies - hexdump(len=54): 00 08 58 58 58 58 58 58 58 58 01 04 82 84 8b 96 03 01 0b 04 06 01 02 00 00 00 00 05 04 00 01 00 00 2a 01 02 32 08 0c 12 18 24 30 48 60 6c 04 06 00 02 00 00 00 00
WPA: clearing own WPA/RSN IE
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
State: ASSOCIATING -> ASSOCIATED
Associated to a new BSS: BSSID=00:11:50:a6:19:92
Associated with 00:11:50:a6:19:92
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state S_FORCE_AUTH
EAPOL: SUPP_BE entering state IDLE
Cancelling authentication timeout
State: ASSOCIATED -> COMPLETED
CTRL-EVENT-CONNECTED - Connection to 00:11:50:a6:19:92 completed (auth)
ndis_get_oid: oid=0xd010101 len (6) failed
Setting scan request: 0 sec 100000 usec
Added BSSID 00:11:50:a6:19:92 into blacklist
State: COMPLETED -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: External notification - portValid=0
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=8):
     58 58 58                           XXX
ndis_set_oid: oid=0xd01011a len (4) failed
Failed to initiate AP scan.
Setting scan request: 10 sec 0 usec
ndis_get_oid: oid=0xd010101 len (6) failed
NDIS: ReqFixed=0x3 RespFixed=0x7 off_req=40 off_resp=82 len_req=42 len_resp=16
NDIS: 1 BSSID items to process for AssocInfo
Association info event
req_ies - hexdump(len=42): 00 08 58 58 58 58 58 58 58 58 01 08 82 84 8b 96 24 30 48 6c 32 04 0c 12 18 60 dd 06 00 40 96 01 01 00 dd 06 00 10 18 02 00 00
resp_ies - hexdump(len=16): 01 04 82 84 8b 96 32 08 0c 12 18 24 30 48 60 6c
beacon_ies - hexdump(len=46): 00 08 58 58 58 58 58 58 58 58 01 04 82 84 8b 96 03 01 0b 04 06 00 02 00 00 00 00 05 04 00 01 00 00 2a 01 02 32 08 0c 12 18 24 30 48 60 6c
WPA: clearing own WPA/RSN IE
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
State: SCANNING -> ASSOCIATED
Associated to a new BSS: BSSID=00:11:50:a6:19:92
Associated with 00:11:50:a6:19:92
WPA: Association event - clear replay counter
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state S_FORCE_AUTH
EAPOL: SUPP_BE entering state IDLE
Cancelling authentication timeout
Removed BSSID 00:11:50:a6:19:92 from blacklist
State: ASSOCIATED -> COMPLETED
CTRL-EVENT-CONNECTED - Connection to 00:11:50:a6:19:92 completed (reauth)

--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Description: bsd.log
Content-Disposition: attachment; filename="bsd.log"

> wpa_supplicant -c /etc/wpa_supplicant.conf -i ndis0 -D bsd -d
Initializing interface 'ndis0' conf '/etc/wpa_supplicant.conf' driver 'bsd' ctrl_interface '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'
ctrl_interface_group=0 (from group name 'wheel')
ap_scan=1
Priority group 5
   id=0 ssid='XXX'
Initializing interface (2) 'ndis0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Own MAC address: 00:14:a5:50:67:9e
wpa_driver_bsd_set_wpa: enabled=1
wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
wpa_driver_bsd_del_key: keyidx=0
wpa_driver_bsd_del_key: keyidx=1
wpa_driver_bsd_del_key: keyidx=2
wpa_driver_bsd_del_key: keyidx=3
wpa_driver_bsd_set_countermeasures: enabled=0
wpa_driver_bsd_set_drop_unencrypted: enabled=1
Setting scan request: 0 sec 100000 usec
Added interface ndis0
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=8):
     58 58 58                            XXX
Received 0 bytes of scan results (1 BSSes)
Scan results: 1
Selecting BSS from priority group 5
0: 00:11:50:a6:19:92 ssid='XXX' wpa_ie_len=0 rsn_ie_len=0 caps=0x0
   skip - no WPA/RSN IE
   selected non-WPA AP 00:11:50:a6:19:92 ssid='XXX'
Trying to associate with 00:11:50:a6:19:92 (SSID='XXX' freq=2462 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: clearing own WPA/RSN IE
No keys have been configured - skip key clearing
wpa_driver_bsd_set_drop_unencrypted: enabled=0
State: SCANNING -> ASSOCIATING
wpa_driver_bsd_associate: ssid 'XXX' wpa ie len 0 pairwise 0 group 0 key mgmt 2
wpa_driver_bsd_associate: set PRIVACY 0
ioctl[SIOCS80211, op 21, len 42]: Invalid argument
Association request to the driver failed
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - portControl=ForceAuthorized
Authentication with 00:00:00:00:00:00 timed out.
Added BSSID 00:00:00:00:00:00 into blacklist
State: ASSOCIATING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Setting scan request: 0 sec 0 usec
 - skip key clearing
wpa_driver_bsd_set_drop_unencrypted: enabled=0
State: SCANNING -> ASSOCIATING
wpa_driver_bsd_associate: ssid 'XXX' wpa ie len 0 pairwise 0 group 0 key mgmt 2
wpa_driver_bsd_associate: set PRIVACY 0
ioctl[SIOCS80211, op 21, len 42]: Invalid argument
Association request to the driver failed
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - portControl=ForceAuthorized
Authentication with 00:00:00:00:00:00 timed out.
Added BSSID 00:00:00:00:00:00 into blacklist
State: ASSOCIATING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Received 0 bytes of scan results (3 BSSes)
Scan results: 3
Selecting BSS from priority group 5
0: 00:11:50:a6:19:92 ssid='XXX' wpa_ie_len=0 rsn_ie_len=0 caps=0x1
   skip - no WPA/RSN IE
1: 00:14:a4:4d:59:06 ssid='140a' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
2: 00:13:10:ee:a9:5e ssid='sam' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
   skip - no WPA/RSN IE
   selected non-WPA AP 00:11:50:a6:19:92 ssid='XXX'
Trying to associate with 00:11:50:a6:19:92 (SSID='XXX' freq=2462 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: clearing own WPA/RSN IE
No keys have been configured - skip key clearing
wpa_driver_bsd_set_drop_unencrypted: enabled=0
State: SCANNING -> ASSOCIATING
wpa_driver_bsd_associate: ssid 'XXX' wpa ie len 0 pairwise 0 group 0 key mgmt 2
wpa_driver_bsd_associate: set PRIVACY 0
Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - portControl=ForceAuthorized
=== Here, I see:
> ifconfig ndis0
| ndis0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
|         inet 192.168.2.52 netmask 0xffffff00 broadcast 192.168.2.255
|         ether 00:14:a5:50:67:9e
|         media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps)
|         status: associated
|         ssid XXX channel 11 bssid 00:11:50:a6:19:92
|         authmode OPEN privacy OFF deftxkey 1 txpowmax 100 protmode CTS
|         roaming MANUAL
Authentication with 00:00:00:00:00:00 timed out.
BSSID 00:00:00:00:00:00 blacklist count incremented to 2
State: ASSOCIATING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING

--OXfL5xGRrasGEqWY
Content-Type: text/plain; charset=us-ascii
Content-Description: wpa_supplicant.conf
Content-Disposition: attachment; filename="wpa.conf"

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=1

network={
	ssid="XXX"
	scan_ssid=1
	priority=5
	key_mgmt=NONE
	eapol_flags=0
}

--OXfL5xGRrasGEqWY--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060805153714.GA22424>