Re: wpa_supplicant problem.

2014-01-18 Thread Adrian Chadd
It still looks like its doing EAPOL at the higher tx rate. Its not doing it
at the same low tx rate that association is occurring at.

So yes someone has to backport that eapol rate override fix entirely. I bet
that'll solve this issue.

A
 On Jan 18, 2014 3:21 PM, "Peter Ankerstål"  wrote:

> On 01/18/14 17:10, Adrian Chadd wrote:
>
>> Ok.
>>
>> Compile the kernel with IWN_DEBUG, then sysctl dev.iwn.0.debug=0x1
>> (that enables TX debugging) and send over the log.
>>
>>
> Hi!
>
> Here's the log!
>
> Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 1 status 1
> Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 6 status 1
> Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 11 status 1
> Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 7 status 1
> Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 13 status 1
> Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 52 status 1
> Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 56 status 1
> Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 60 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 64 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 36 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 40 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 44 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 48 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 2 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 3 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 4 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 5 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 8 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 9 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 10 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 12 status 1
> Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 149 status
> 1
> Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 153 status
> 1
> Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 157 status
> 1
> Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 161 status
> 1
> Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 165 status
> 1
> Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 100 status
> 1
> Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 104 status
> 1
> Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 108 status
> 1
> Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 112 status
> 1
> Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 116 status
> 1
> Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 120 status
> 1
> Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 124 status
> 1
> Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 128 status
> 1
> Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 132 status
> 1
> Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 136 status
> 1
> Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 140 status
> 1
> Jan 18 21:01:49 mobius wpa_supplicant[608]: wlan0:
> CTRL-EVENT-SSID-REENABLED id=0 ssid="web"
> Jan 18 21:01:49 mobius wpa_supplicant[608]: wlan0: Trying to associate
> with 04:f0:21:01:3d:87 (SSID='web' freq=2452 MHz)
> Jan 18 21:01:49 mobius kernel: iwn_tx_data_raw: qid 3 idx 30 len 6 nsegs 1
> Jan 18 21:01:49 mobius kernel: iwn5000_tx_done: qid 3 idx 30 retries 0
> nkill 0 rate 420a duration 778 status 201
> Jan 18 21:01:49 mobius kernel: iwn_tx_data_raw: qid 3 idx 31 len 84 nsegs 1
> Jan 18 21:01:49 mobius kernel: iwn5000_tx_done: qid 3 idx 31 retries 0
> nkill 0 rate 420a duration 1402 status 201
> Jan 18 21:01:49 mobius kernel: wlan0: link state changed to UP
> Jan 18 21:01:49 mobius kernel: lagg0: link state changed to UP
> Jan 18 21:01:49 mobius kernel: received statistics without RSSI
> Jan 18 21:01:49 mobius wpa_supplicant[608]: wlan0: Associated with
> 04:f0:21:01:3d:87
> Jan 18 21:01:49 mobius kernel: iwn_tx_data: qid 3 idx 32 len 129 nsegs 2
> Jan 18 21:01:50 mobius kernel: iwn5000_tx_done: qid 3 idx 32 retries 16
> nkill 0 rate 6904 duration 2330 status 83
> Jan 18 21:01:50 mobius kernel: iwn_tx_data: qid 3 idx 33 len 129 nsegs 2
> Jan 18 21:01:50 mobius kernel: iwn5000_tx_done: qid 3 idx 33 retries 16
> nkill 0 rate 80006904 duration 2650 status 83
> Jan 18 21:01:51 mobius kernel: iwn_tx_data: qid 3 idx 34 len 129 nsegs 2
> Jan 18 21:01:51 mobius kernel: iwn5000_tx_done: qid 3 idx 34 retries 16
> nkill 0 rate 80006904 duration 2650 status 83
> Jan 18 21:01:52 mobius dhclient[1338]: send_packet: No buffer space
> available
> Ja

Re: wpa_supplicant problem.

2014-01-18 Thread Peter Ankerstål

On 01/18/14 17:10, Adrian Chadd wrote:

Ok.

Compile the kernel with IWN_DEBUG, then sysctl dev.iwn.0.debug=0x1
(that enables TX debugging) and send over the log.



Hi!

Here's the log!

Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 1 status 1
Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 6 status 1
Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 11 status 1
Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 7 status 1
Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 13 status 1
Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 52 status 1
Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 56 status 1
Jan 18 21:01:00 mobius kernel: iwn_notif_intr: scanning channel 60 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 64 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 36 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 40 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 44 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 48 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 2 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 3 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 4 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 5 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 8 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 9 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 10 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 12 status 1
Jan 18 21:01:01 mobius kernel: iwn_notif_intr: scanning channel 149 status 1
Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 153 status 1
Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 157 status 1
Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 161 status 1
Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 165 status 1
Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 100 status 1
Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 104 status 1
Jan 18 21:01:02 mobius kernel: iwn_notif_intr: scanning channel 108 status 1
Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 112 status 1
Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 116 status 1
Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 120 status 1
Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 124 status 1
Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 128 status 1
Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 132 status 1
Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 136 status 1
Jan 18 21:01:03 mobius kernel: iwn_notif_intr: scanning channel 140 status 1
Jan 18 21:01:49 mobius wpa_supplicant[608]: wlan0: 
CTRL-EVENT-SSID-REENABLED id=0 ssid="web"
Jan 18 21:01:49 mobius wpa_supplicant[608]: wlan0: Trying to associate 
with 04:f0:21:01:3d:87 (SSID='web' freq=2452 MHz)

Jan 18 21:01:49 mobius kernel: iwn_tx_data_raw: qid 3 idx 30 len 6 nsegs 1
Jan 18 21:01:49 mobius kernel: iwn5000_tx_done: qid 3 idx 30 retries 0 
nkill 0 rate 420a duration 778 status 201

Jan 18 21:01:49 mobius kernel: iwn_tx_data_raw: qid 3 idx 31 len 84 nsegs 1
Jan 18 21:01:49 mobius kernel: iwn5000_tx_done: qid 3 idx 31 retries 0 
nkill 0 rate 420a duration 1402 status 201

Jan 18 21:01:49 mobius kernel: wlan0: link state changed to UP
Jan 18 21:01:49 mobius kernel: lagg0: link state changed to UP
Jan 18 21:01:49 mobius kernel: received statistics without RSSI
Jan 18 21:01:49 mobius wpa_supplicant[608]: wlan0: Associated with 
04:f0:21:01:3d:87

Jan 18 21:01:49 mobius kernel: iwn_tx_data: qid 3 idx 32 len 129 nsegs 2
Jan 18 21:01:50 mobius kernel: iwn5000_tx_done: qid 3 idx 32 retries 16 
nkill 0 rate 6904 duration 2330 status 83

Jan 18 21:01:50 mobius kernel: iwn_tx_data: qid 3 idx 33 len 129 nsegs 2
Jan 18 21:01:50 mobius kernel: iwn5000_tx_done: qid 3 idx 33 retries 16 
nkill 0 rate 80006904 duration 2650 status 83

Jan 18 21:01:51 mobius kernel: iwn_tx_data: qid 3 idx 34 len 129 nsegs 2
Jan 18 21:01:51 mobius kernel: iwn5000_tx_done: qid 3 idx 34 retries 16 
nkill 0 rate 80006904 duration 2650 status 83
Jan 18 21:01:52 mobius dhclient[1338]: send_packet: No buffer space 
available

Jan 18 21:01:52 mobius kernel: iwn_tx_data: qid 3 idx 35 len 129 nsegs 2
Jan 18 21:01:53 mobius kernel: iwn5000_tx_done: qid 3 idx 35 retries 16 
nkill 0 rate 80006904 duration 2650 status 83
Jan 18 21:01:53 mobius wpa_supplicant[608]: wlan0: 
CTRL-EVENT-DISCONNECTED bssid=04:f0:21:01:3d:87 reason=0
Jan 18 21:01:53 mobius wpa_supplicant[608]: wlan0: WPA: 4-Way Handshake 
failed - pre-shared key may be incorrect
Jan 18 21:01:53 mobius wpa_supplicant[608]: wl

Re: wpa_supplicant problem.

2014-01-18 Thread Adrian Chadd
Ok.

Compile the kernel with IWN_DEBUG, then sysctl dev.iwn.0.debug=0x1
(that enables TX debugging) and send over the log.


-a


On 18 January 2014 03:11, Peter Ankerstål  wrote:
>
> On 08 Jan 2014, at 18:46, Adrian Chadd  wrote:
>
>> On 8 January 2014 00:31, Peter Ankerstål  wrote:
>>> Hehe,
>>>
>>> I dont think Im ready for 11 yet. Do you think these fixes will be in 10 any
>>> time soon?
>>
>> I can try backporting the EAPOL fix(es) to HEAD but it may involve other 
>> fixes.
>>
>> I'll take a look.
>
> Just as an experiment i tried in my own stupidity to “implement” your change 
> in r257947 of if_iwn.c
> and just added the extra if statement, but at last that did not change 
> anything.
>
> /Peter.
>
>
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: wpa_supplicant problem.

2014-01-18 Thread Peter Ankerstål

On 08 Jan 2014, at 18:46, Adrian Chadd  wrote:

> On 8 January 2014 00:31, Peter Ankerstål  wrote:
>> Hehe,
>> 
>> I dont think Im ready for 11 yet. Do you think these fixes will be in 10 any
>> time soon?
> 
> I can try backporting the EAPOL fix(es) to HEAD but it may involve other 
> fixes.
> 
> I'll take a look.

Just as an experiment i tried in my own stupidity to “implement” your change in 
r257947 of if_iwn.c
and just added the extra if statement, but at last that did not change 
anything. 

/Peter.


___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: wpa_supplicant problem.

2014-01-16 Thread Peter Ankerstål

On 08 Jan 2014, at 18:46, Adrian Chadd  wrote:

> On 8 January 2014 00:31, Peter Ankerstål  wrote:
>> Hehe,
>> 
>> I dont think Im ready for 11 yet. Do you think these fixes will be in 10 any
>> time soon?
> 
> I can try backporting the EAPOL fix(es) to HEAD but it may involve other 
> fixes.
> 
> I'll take a look.
> 
 Maybe you already knew this but I just realised that its only when the AP uses 
ht it fails.
If I turn off ht it works perfectly for both 2.4 and 5ghz.

/Peter.
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: wpa_supplicant problem.

2014-01-08 Thread Adrian Chadd
On 8 January 2014 00:31, Peter Ankerstål  wrote:
> Hehe,
>
> I dont think Im ready for 11 yet. Do you think these fixes will be in 10 any
> time soon?

I can try backporting the EAPOL fix(es) to HEAD but it may involve other fixes.

I'll take a look.



-a
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: wpa_supplicant problem.

2014-01-08 Thread Peter Ankerstål

Hehe,

I dont think Im ready for 11 yet. Do you think these fixes will be in 10 
any time soon?



On 01/08/2014 07:30 AM, Adrian Chadd wrote:

Hm, sounds to me like something I fixed in -HEAD. Try -HEAD.

The TL;DR - the EAPOL frames are going out at a much higher transmit
rate than the initial association attempts, which means it associates
fine but it can't authenticate successfully.

Try running -HEAD. I bet it'll work.





___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: wpa_supplicant problem.

2014-01-07 Thread Adrian Chadd
Hm, sounds to me like something I fixed in -HEAD. Try -HEAD.

The TL;DR - the EAPOL frames are going out at a much higher transmit
rate than the initial association attempts, which means it associates
fine but it can't authenticate successfully.

Try running -HEAD. I bet it'll work.


-a


On 7 January 2014 22:03, Peter Ankerstål  wrote:
> Hi!
>
> Now I get on the router:
> wlan0: STA f0:de:f1:c9:14:4d WPA: EAPOL-Key timeout
> WPA: f0:de:f1:c9:14:4d WPA_PTK entering state PTKSTART
> wlan0: STA f0:de:f1:c9:14:4d WPA: sending 1/4 msg of 4-Way Handshake
>
>
> and on the client:
> wlan0: Selecting BSS from priority group 0
> wlan0: 0: 04:f0:21:01:3d:87 ssid='web' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 
> level=-65
> wlan0:selected based on RSN IE
> wlan0:selected BSS 04:f0:21:01:3d:87 ssid='web'
> wlan0: Request association: reassociate: 0  selected: 04:f0:21:01:3d:87  
> bssid: 00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING
> wlan0: Trying to associate with 04:f0:21:01:3d:87 (SSID='web' freq=2412 MHz)
> FT: Stored MDIE and FTIE from (Re)Association Response - hexdump(len=0):
> wlan0: Cancelling scan request
> wlan0: WPA: clearing own WPA/RSN IE
> wlan0: Automatic auth_alg selection: 0x1
> RSN: PMKSA cache search - network_ctx=0x0 try_opportunistic=0
> RSN: Search for BSSID 04:f0:21:01:3d:87
> RSN: No PMKSA cache entry found
> wlan0: RSN: using IEEE 802.11i/D9.0
> wlan0: WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
> wlan0: WPA: clearing AP WPA IE
> WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 
> 04 01 00 00 0f ac 02 00 00
> wlan0: WPA: using GTK CCMP
> wlan0: WPA: using PTK CCMP
> wlan0: WPA: using KEY_MGMT WPA-PSK
> WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 
> 00 0f ac 04 01 00 00 0f ac 02 00 00
> wlan0: No keys have been configured - skip key clearing
> wlan0: State: SCANNING -> ASSOCIATING
> Limit connection to BSSID 04:f0:21:01:3d:87 freq=2412 MHz based on scan 
> results (bssid_set=0)
> wpa_driver_bsd_associate: ssid 'web' wpa ie len 22 pairwise 3 group 3 key 
> mgmt 1
> wpa_driver_bsd_set_drop_unencrypted: enabled=1
> bsd_set_opt_ie: set WPA+RSN ie (len 22)
> wpa_driver_bsd_associate: set PRIVACY 1
> wlan0: Setting authentication timeout: 10 sec 0 usec
> EAPOL: External notification - EAP success=0
> EAPOL: Supplicant port status: Unauthorized
> EAPOL: External notification - EAP fail=0
> EAPOL: Supplicant port status: Unauthorized
> EAPOL: External notification - portControl=Auto
> EAPOL: Supplicant port status: Unauthorized
> RSN: Ignored PMKID candidate without preauth flag
> wlan0: Event ASSOC (0) received
> wlan0: State: ASSOCIATING -> ASSOCIATED
>
> On 08 Jan 2014, at 00:00, Adrian Chadd  wrote:
>
>> hi,
>>
>> please retry with the only network block entries being:
>>
>> ssid=
>> psk=
>>
>> .. and let wpa_supplicant figure it out.
>>
>>
>> -a
>>
>>
>> On 7 January 2014 13:07, Peter Ankerstål  wrote:
>>> Hi!
>>>
>>> Im trying to connect from a Lenovo X220 to my FreeBSD router running 
>>> hostapd. The router is supporting
>>> a lot of other clients (OS X and iOS) without any problems.  And my laptop 
>>> can connect to my phone when
>>> I set it up as a hotspot.
>>>
>>> Lenovo X220:
>>> FreeBSD lenny 10.0-RC2 FreeBSD 10.0-RC2 #0 r259404: Sun Dec 15 08:18:20 UTC 
>>> 2013 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>>>
>>> iwn0@pci0:3:0:0:class=0x028000 card=0x13118086 chip=0x00858086 
>>> rev=0x34 hdr=0x00
>>>vendor = 'Intel Corporation'
>>>device = 'Centrino Advanced-N 6205 [Taylor Peak]'
>>>class  = network
>>>
>>> # cat /etc/wpa_supplicant.conf
>>> ctrl_interface=/var/run/wpa_supplicant
>>> eapol_version=2
>>> ap_scan=1
>>> fast_reauth=1
>>>
>>> network={
>>>priority=100
>>>proto=RSN WPA
>>>ssid="web"
>>>key_mgmt=WPA-PSK
>>>pairwise=CCMP TKIP
>>>group=CCMP TKIP
>>>psk=“secret”
>>> }
>>>
>>> Router:
>>> FreeBSD gw 10.0-RC1 FreeBSD 10.0-RC1 #3 r259258: Thu Dec 12 16:21:37 CET 
>>> 2013 root@gw:/usr/obj/usr/src/sys/SOEKRIS  i386
>>>
>>> ath0@pci0:7:0:0:class=0x028000 card=0x3114168c chip=0x0030168c 
>>> rev=0x01 hdr=0x00
>>>vendor = 'Atheros Communications Inc.'
>>>device = 'AR9300 Wireless LAN adaptor'
>>>class  = network
>>>
>>> # cat /etc/hostapd.conf
>>> interface=wlan0
>>> driver=bsd
>>> debug=0
>>> ctrl_interface=/var/run/hostapd
>>> ctrl_interface_group=wheel
>>> ssid=web
>>> wpa=2
>>> wpa_passphrase=secret
>>> wpa_key_mgmt=WPA-PSK
>>> wpa_pairwise=CCMP TKIP
>>> rsn_pairwise=CCMP
>>>
>>>
>>> debug output from wpa_supplicant.
>>> # wpa_supplicant -D bsd -i wlan0 -d -c /etc/wpa_supplicant.conf
>>> wpa_supplicant v2.0
>>> Successfully initialized wpa_supplicant
>>> Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'bsd' 
>>> ctrl_interface 'N/A' bridge 'N/A'
>>> Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_

Re: wpa_supplicant problem.

2014-01-07 Thread Peter Ankerstål
Ooops. Missed the important part of client messages. Also I have tried with 
different pre-shared keys but it still don’t work. 

wlan0: State: ASSOCIATING -> ASSOCIATED
wlan0: Associated to a new BSS: BSSID=04:f0:21:01:3d:87
wlan0: No keys have been configured - skip key clearing
wlan0: Associated with 04:f0:21:01:3d:87
wlan0: WPA: Association event - clear replay counter
wlan0: WPA: Clear old PTK
EAPOL: External notification - portEnabled=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: enable timer tick
EAPOL: SUPP_BE entering state IDLE
wlan0: Setting authentication timeout: 10 sec 0 usec
wlan0: Cancelling scan request
wlan0: RX EAPOL from 04:f0:21:01:3d:87
wlan0: Setting authentication timeout: 10 sec 0 usec
wlan0: IEEE 802.1X RX: version=2 type=3 length=95
wlan0:   EAPOL-Key type=2
wlan0:   key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
wlan0:   key_length=16 key_data_length=0
  replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 01
  key_nonce - hexdump(len=32): 94 73 9c af a7 74 b0 22 b2 28 94 82 ac b2 63 13 
e5 f1 96 d7 8e e1 61 15 e3 0c 7c 2d 4c 41 f1 d8
  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
wlan0: State: ASSOCIATED -> 4WAY_HANDSHAKE
wlan0: WPA: RX message 1 of 4-Way Handshake from 04:f0:21:01:3d:87 (ver=2)
RSN: msg 1/4 key data - hexdump(len=0):
WPA: Renewed SNonce - hexdump(len=32): 89 be 5d 40 70 3f 59 27 34 ed 6d 31 0e 
03 c5 41 b5 de cc 2d 9e 05 a0 b4 5b b8 ac 7a 46 bc 6a 79
WPA: PTK derivation - A1=f0:de:f1:c9:14:4d A2=04:f0:21:01:3d:87
WPA: Nonce1 - hexdump(len=32): 89 be 5d 40 70 3f 59 27 34 ed 6d 31 0e 03 c5 41 
b5 de cc 2d 9e 05 a0 b4 5b b8 ac 7a 46 bc 6a 79
WPA: Nonce2 - hexdump(len=32): 94 73 9c af a7 74 b0 22 b2 28 94 82 ac b2 63 13 
e5 f1 96 d7 8e e1 61 15 e3 0c 7c 2d 4c 41 f1 d8
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: WPA IE for msg 2/4 - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f 
ac 04 01 00 00 0f ac 02 00 00
WPA: Replay Counter - hexdump(len=8): 00 00 00 00 00 00 00 01
wlan0: WPA: Sending EAPOL-Key 2/4
WPA: KCK - hexdump(len=16): [REMOVED]
WPA: Derived Key MIC - hexdump(len=16): c1 6a 85 5f fa 2c f2 b1 d8 25 bf ad 39 
bf 71 b9
EAPOL: startWhen --> 0
EAPOL: disable timer tick
EAPOL: SUPP_PAE entering state CONNECTING
EAPOL: enable timer tick
EAPOL: txStart
WPA: drop TX EAPOL in non-IEEE 802.1X mode (type=1 len=0)
wlan0: Event DISASSOC (1) received
wlan0: Disassociation notification
wlan0: CTRL-EVENT-DISCONNECTED bssid=04:f0:21:01:3d:87 reason=0
wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="web" auth_failures=1 duration=10

On 08 Jan 2014, at 00:00, Adrian Chadd  wrote:

> hi,
> 
> please retry with the only network block entries being:
> 
> ssid=
> psk=
> 
> .. and let wpa_supplicant figure it out.
> 
> 
> -a
> 
> 
> On 7 January 2014 13:07, Peter Ankerstål  wrote:
>> Hi!
>> 
>> Im trying to connect from a Lenovo X220 to my FreeBSD router running 
>> hostapd. The router is supporting
>> a lot of other clients (OS X and iOS) without any problems.  And my laptop 
>> can connect to my phone when
>> I set it up as a hotspot.
>> 
>> Lenovo X220:
>> FreeBSD lenny 10.0-RC2 FreeBSD 10.0-RC2 #0 r259404: Sun Dec 15 08:18:20 UTC 
>> 2013 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>> 
>> iwn0@pci0:3:0:0:class=0x028000 card=0x13118086 chip=0x00858086 
>> rev=0x34 hdr=0x00
>>vendor = 'Intel Corporation'
>>device = 'Centrino Advanced-N 6205 [Taylor Peak]'
>>class  = network
>> 
>> # cat /etc/wpa_supplicant.conf
>> ctrl_interface=/var/run/wpa_supplicant
>> eapol_version=2
>> ap_scan=1
>> fast_reauth=1
>> 
>> network={
>>priority=100
>>proto=RSN WPA
>>ssid="web"
>>key_mgmt=WPA-PSK
>>pairwise=CCMP TKIP
>>group=CCMP TKIP
>>psk=“secret”
>> }
>> 
>> Router:
>> FreeBSD gw 10.0-RC1 FreeBSD 10.0-RC1 #3 r259258: Thu Dec 12 16:21:37 CET 
>> 2013 root@gw:/usr/obj/usr/src/sys/SOEKRIS  i386
>> 
>> ath0@pci0:7:0:0:class=0x028000 card=0x3114168c chip=0x0030168c 
>> rev=0x01 hdr=0x00
>>vendor = 'Atheros Communications Inc.'
>>device = 'AR9300 Wireless LAN adaptor'
>>class  = network
>> 
>> # cat /etc/hostapd.conf
>> interface=wlan0
>> driver=bsd
>> debug=0
>> ctrl_interface=/var/run/hostapd
>> ctrl_interface_group=wheel
>> ssid=web
>> wpa=2
>> wpa_passphrase=secret
>> wpa_key_mgmt=WPA-PSK
>> wpa_pairwise=CCMP TKIP
>> rsn_pairwise=CCMP
>> 
>> 
>> debug output 

Re: wpa_supplicant problem.

2014-01-07 Thread Peter Ankerstål
Hi!

Now I get on the router:
wlan0: STA f0:de:f1:c9:14:4d WPA: EAPOL-Key timeout
WPA: f0:de:f1:c9:14:4d WPA_PTK entering state PTKSTART
wlan0: STA f0:de:f1:c9:14:4d WPA: sending 1/4 msg of 4-Way Handshake


and on the client:
wlan0: Selecting BSS from priority group 0
wlan0: 0: 04:f0:21:01:3d:87 ssid='web' wpa_ie_len=0 rsn_ie_len=20 caps=0x31 
level=-65
wlan0:selected based on RSN IE
wlan0:selected BSS 04:f0:21:01:3d:87 ssid='web'
wlan0: Request association: reassociate: 0  selected: 04:f0:21:01:3d:87  bssid: 
00:00:00:00:00:00  pending: 00:00:00:00:00:00  wpa_state: SCANNING
wlan0: Trying to associate with 04:f0:21:01:3d:87 (SSID='web' freq=2412 MHz)
FT: Stored MDIE and FTIE from (Re)Association Response - hexdump(len=0):
wlan0: Cancelling scan request
wlan0: WPA: clearing own WPA/RSN IE
wlan0: Automatic auth_alg selection: 0x1
RSN: PMKSA cache search - network_ctx=0x0 try_opportunistic=0
RSN: Search for BSSID 04:f0:21:01:3d:87
RSN: No PMKSA cache entry found
wlan0: RSN: using IEEE 802.11i/D9.0
wlan0: WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2 proto 2
wlan0: WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 
01 00 00 0f ac 02 00 00
wlan0: WPA: using GTK CCMP
wlan0: WPA: using PTK CCMP
wlan0: WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 
0f ac 04 01 00 00 0f ac 02 00 00
wlan0: No keys have been configured - skip key clearing
wlan0: State: SCANNING -> ASSOCIATING
Limit connection to BSSID 04:f0:21:01:3d:87 freq=2412 MHz based on scan results 
(bssid_set=0)
wpa_driver_bsd_associate: ssid 'web' wpa ie len 22 pairwise 3 group 3 key mgmt 1
wpa_driver_bsd_set_drop_unencrypted: enabled=1
bsd_set_opt_ie: set WPA+RSN ie (len 22)
wpa_driver_bsd_associate: set PRIVACY 1
wlan0: Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP fail=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portControl=Auto
EAPOL: Supplicant port status: Unauthorized
RSN: Ignored PMKID candidate without preauth flag
wlan0: Event ASSOC (0) received
wlan0: State: ASSOCIATING -> ASSOCIATED

On 08 Jan 2014, at 00:00, Adrian Chadd  wrote:

> hi,
> 
> please retry with the only network block entries being:
> 
> ssid=
> psk=
> 
> .. and let wpa_supplicant figure it out.
> 
> 
> -a
> 
> 
> On 7 January 2014 13:07, Peter Ankerstål  wrote:
>> Hi!
>> 
>> Im trying to connect from a Lenovo X220 to my FreeBSD router running 
>> hostapd. The router is supporting
>> a lot of other clients (OS X and iOS) without any problems.  And my laptop 
>> can connect to my phone when
>> I set it up as a hotspot.
>> 
>> Lenovo X220:
>> FreeBSD lenny 10.0-RC2 FreeBSD 10.0-RC2 #0 r259404: Sun Dec 15 08:18:20 UTC 
>> 2013 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>> 
>> iwn0@pci0:3:0:0:class=0x028000 card=0x13118086 chip=0x00858086 
>> rev=0x34 hdr=0x00
>>vendor = 'Intel Corporation'
>>device = 'Centrino Advanced-N 6205 [Taylor Peak]'
>>class  = network
>> 
>> # cat /etc/wpa_supplicant.conf
>> ctrl_interface=/var/run/wpa_supplicant
>> eapol_version=2
>> ap_scan=1
>> fast_reauth=1
>> 
>> network={
>>priority=100
>>proto=RSN WPA
>>ssid="web"
>>key_mgmt=WPA-PSK
>>pairwise=CCMP TKIP
>>group=CCMP TKIP
>>psk=“secret”
>> }
>> 
>> Router:
>> FreeBSD gw 10.0-RC1 FreeBSD 10.0-RC1 #3 r259258: Thu Dec 12 16:21:37 CET 
>> 2013 root@gw:/usr/obj/usr/src/sys/SOEKRIS  i386
>> 
>> ath0@pci0:7:0:0:class=0x028000 card=0x3114168c chip=0x0030168c 
>> rev=0x01 hdr=0x00
>>vendor = 'Atheros Communications Inc.'
>>device = 'AR9300 Wireless LAN adaptor'
>>class  = network
>> 
>> # cat /etc/hostapd.conf
>> interface=wlan0
>> driver=bsd
>> debug=0
>> ctrl_interface=/var/run/hostapd
>> ctrl_interface_group=wheel
>> ssid=web
>> wpa=2
>> wpa_passphrase=secret
>> wpa_key_mgmt=WPA-PSK
>> wpa_pairwise=CCMP TKIP
>> rsn_pairwise=CCMP
>> 
>> 
>> debug output from wpa_supplicant.
>> # wpa_supplicant -D bsd -i wlan0 -d -c /etc/wpa_supplicant.conf
>> wpa_supplicant v2.0
>> Successfully initialized wpa_supplicant
>> Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'bsd' 
>> 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'
>> eapol_version=2
>> ap_scan=1
>> fast_reauth=1
>> Priority group 100
>>   id=0 ssid='web'
>> wpa_driver_bsd_capa: drivercaps=0x2581e201,cryptocaps=0x
>> wlan0: Own MAC address: f0:de:f1:c9:14:4d
>> bsd_set_key: alg=0 addr=0x0 key_idx=0 set_tx=0 seq_len=0 key_len=0
>> bsd_del_key: key_idx=0
>> bsd_set_key: alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
>> bsd_del_key: key_i

Re: wpa_supplicant problem.

2014-01-07 Thread Adrian Chadd
hi,

please retry with the only network block entries being:

ssid=
psk=

.. and let wpa_supplicant figure it out.


-a


On 7 January 2014 13:07, Peter Ankerstål  wrote:
> Hi!
>
> Im trying to connect from a Lenovo X220 to my FreeBSD router running hostapd. 
> The router is supporting
> a lot of other clients (OS X and iOS) without any problems.  And my laptop 
> can connect to my phone when
> I set it up as a hotspot.
>
> Lenovo X220:
> FreeBSD lenny 10.0-RC2 FreeBSD 10.0-RC2 #0 r259404: Sun Dec 15 08:18:20 UTC 
> 2013 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>
> iwn0@pci0:3:0:0:class=0x028000 card=0x13118086 chip=0x00858086 
> rev=0x34 hdr=0x00
> vendor = 'Intel Corporation'
> device = 'Centrino Advanced-N 6205 [Taylor Peak]'
> class  = network
>
> # cat /etc/wpa_supplicant.conf
> ctrl_interface=/var/run/wpa_supplicant
> eapol_version=2
> ap_scan=1
> fast_reauth=1
>
> network={
> priority=100
> proto=RSN WPA
> ssid="web"
> key_mgmt=WPA-PSK
> pairwise=CCMP TKIP
> group=CCMP TKIP
> psk=“secret”
> }
>
> Router:
> FreeBSD gw 10.0-RC1 FreeBSD 10.0-RC1 #3 r259258: Thu Dec 12 16:21:37 CET 2013 
> root@gw:/usr/obj/usr/src/sys/SOEKRIS  i386
>
> ath0@pci0:7:0:0:class=0x028000 card=0x3114168c chip=0x0030168c 
> rev=0x01 hdr=0x00
> vendor = 'Atheros Communications Inc.'
> device = 'AR9300 Wireless LAN adaptor'
> class  = network
>
> # cat /etc/hostapd.conf
> interface=wlan0
> driver=bsd
> debug=0
> ctrl_interface=/var/run/hostapd
> ctrl_interface_group=wheel
> ssid=web
> wpa=2
> wpa_passphrase=secret
> wpa_key_mgmt=WPA-PSK
> wpa_pairwise=CCMP TKIP
> rsn_pairwise=CCMP
>
>
> debug output from wpa_supplicant.
> # wpa_supplicant -D bsd -i wlan0 -d -c /etc/wpa_supplicant.conf
> wpa_supplicant v2.0
> Successfully initialized wpa_supplicant
> Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'bsd' 
> 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'
> eapol_version=2
> ap_scan=1
> fast_reauth=1
> Priority group 100
>id=0 ssid='web'
> wpa_driver_bsd_capa: drivercaps=0x2581e201,cryptocaps=0x
> wlan0: Own MAC address: f0:de:f1:c9:14:4d
> bsd_set_key: alg=0 addr=0x0 key_idx=0 set_tx=0 seq_len=0 key_len=0
> bsd_del_key: key_idx=0
> bsd_set_key: alg=0 addr=0x0 key_idx=1 set_tx=0 seq_len=0 key_len=0
> bsd_del_key: key_idx=1
> bsd_set_key: alg=0 addr=0x0 key_idx=2 set_tx=0 seq_len=0 key_len=0
> bsd_del_key: key_idx=2
> bsd_set_key: alg=0 addr=0x0 key_idx=3 set_tx=0 seq_len=0 key_len=0
> bsd_del_key: key_idx=3
> wpa_driver_bsd_set_countermeasures: enabled=0
> wlan0: RSN: flushing PMKID list in the driver
> wlan0: Setting scan request: 0 sec 10 usec
> WPS: Set UUID for interface wlan0
> WPS: UUID based on MAC address - hexdump(len=16): f4 2a e7 3f ed 75 52 b7 99 
> 15 e0 56 b1 07 04 4f
> EAPOL: SUPP_PAE entering state DISCONNECTED
> EAPOL: Supplicant port status: Unauthorized
> EAPOL: KEY_RX entering state NO_KEY_RECEIVE
> EAPOL: SUPP_BE entering state INITIALIZE
> EAP: EAP entering state DISABLED
> EAPOL: Supplicant port status: Unauthorized
> EAPOL: Supplicant port status: Unauthorized
> wlan0: Added interface wlan0
> wlan0: State: DISCONNECTED -> DISCONNECTED
> wlan0: State: DISCONNECTED -> SCANNING
> wlan0: Starting AP scan for wildcard SSID
> wpa_driver_bsd_set_wpa: enabled=1
> wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
> EAPOL: disable timer tick
> EAPOL: Supplicant port status: Unauthorized
> wlan0: Event SCAN_RESULTS (3) received
> Received 2508 bytes of scan results (9 BSSes)
> wlan0: BSS: Start scan result update 1
> wlan0: BSS: Add new id 0 BSSID 04:f0:21:01:3d:87 SSID 'web'
> wlan0: BSS: Add new id 1 BSSID 8a:08:93:36:a1:10 SSID 'Mavar'
> wlan0: BSS: Add new id 2 BSSID 88:1f:a1:36:93:08 SSID 'Gotland'
> wlan0: BSS: Add new id 3 BSSID 8a:09:93:36:a1:10 SSID 'Mavar'
> wlan0: BSS: Add new id 4 BSSID 88:1f:a1:36:93:09 SSID 'Gotland++'
> wlan0: BSS: Add new id 5 BSSID 58:98:35:ba:2c:17 SSID 'Katyusha'
> wlan0: BSS: Add new id 6 BSSID 58:98:35:be:ef:9f SSID 
> 'TeliaGateway58-98-35-BE-EF-9F'
> wlan0: BSS: Add new id 7 BSSID cc:b2:55:94:23:e8 SSID 'P-sons'
> wlan0: BSS: Add new id 8 BSSID a0:21:b7:b4:55:d8 SSID 'Bonnier'
> BSS: last_scan_res_used=9/32 last_scan_full=0
> wlan0: New scan results available
> WPS: AP cc:b2:55:94:23:e8 type 0 added
> WPS: AP a0:21:b7:b4:55:d8 type 0 added
> WPS: AP[0] cc:b2:55:94:23:e8 type=0 tries=0 last_attempt=-1 sec ago 
> blacklist=0
> WPS: AP[1] a0:21:b7:b4:55:d8 type=0 tries=0 last_attempt=-1 sec ago 
> blacklist=0
> wlan0: Selecting BSS from priority group 100
> wlan0: 0: 04:f0:21:01:3d:87 ssid='web' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 
> level=-67
> wlan0:selected based on RSN IE
> wlan0:selected BSS 04:f0:21:01:3d:87 ssid='web'
> wlan0: R