Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Feb 2010 23:36:33 +0100
From:      Paul B Mahol <onemda@gmail.com>
To:        Anselm Strauss <amsibamsi@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: RTL8192SE WLAN
Message-ID:  <3a142e751002171436q6520f669rf23ef96ebd1891cd@mail.gmail.com>
In-Reply-To: <6F8A0187-02BC-4518-AF62-A178BF4532D1@gmail.com>
References:  <08C86D6F-3D2C-476B-8E4A-0B18065CCB84@gmail.com> <3a142e751002161428x63a33fd0h9a7649f4a3520356@mail.gmail.com> <29722c131002170320r76ef1f1rbbfbb68bb9c0cf9f@mail.gmail.com> <3a142e751002170454m2634b35bl8abdde919526b072@mail.gmail.com> <6F8A0187-02BC-4518-AF62-A178BF4532D1@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/17/10, Anselm Strauss <amsibamsi@gmail.com> wrote:
> On Feb 17, 2010, at 13:54 , Paul B Mahol wrote:
>
>> On 2/17/10, Anselm Strauss <amsibamsi@gmail.com> wrote:
>>> On Tue, Feb 16, 2010 at 11:28 PM, Paul B Mahol <onemda@gmail.com> wrote:
>>>
>>>> On 2/16/10, Anselm Strauss <amsibamsi@gmail.com> wrote:
>>>>> Hey,
>>>>>
>>>>> anybody got the RTL8192SE wireless chip to work with FreeBSD? I bought
>>>>> a
>>>>> Asus 1201N laptop. I successfully compiled the Windows XP driver with
>>>>> ndisgen(8). The driver loads and the device is there. On the FreeBSD
>>>> EeePC
>>>>> wiki it says it's a 8191 chip, but when I look at the driver download
>>>> from
>>>>> Asus and dmesg it's reported as 8192. The driver seems to work at least
>>>> in
>>>>> some way since I'm able to scan for networks and get a list. But I
>>>>> cannot
>>>>> connect to a WPA2 network. Association with the network always fails in
>>>>> wpa_supplicant(8).
>>>>
>>>> Maybe there is some kind of timeout, I could send you small patch to
>>>> test
>>>> it.
>>>> Just post full verbose debug output from wpa_supplicant(8)
>>>>
>>>> Anyway, feel free to test http://www.gitorious.org/NDISulator
>>>>
>>>>> Anyone has some experience?
>>>>
>>>> You are using wpa_supplicant with -D ndis flag, right?
>>>>
>>>
>>> Hm, interesting. No, I didn't know this option. Can't find it on the
>>> wpa_supplicant manpage. But I will try it ...
>>
>> You do not need it if you use 8.0 and you start wpa_supplicant via rc.conf
>
> I use 8.0. Here is the script of what I did to manually setup the card:
>
> Script started on Wed Feb 17 21:33:08 2010
> [root@thor ~]# kldload rtl8192se_sys
> [root@thor ~]# ifconfig ndis0
> ndis0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
> 	ether 00:25:d3:93:50:c8
> 	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
> 	status: no carrier
> [root@thor ~]# ifconfig ndis0 list caps

That is net80211 (funny) problem.
> ifconfig: unable to get device capabilities: Invalid argument
> [root@thor ~]# ifconfig wlan0 create wlandev ndis0
> [root@thor ~]# ifconfig wlan0
> wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
> 	ether 00:25:d3:93:50:c8
> 	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
> 	status: no carrier
> 	ssid "" channel 1 (2412 Mhz 11b)
> 	country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
> 	bintval 0
> [root@thor ~]# ifconfig wlan0 list caps
> drivercaps=1802303<STA,803ENCAP,IBSS,PMGT,TXPMGT,WPA1,WPA2>
> cryptocaps=b<WEP,TKIP,AES_CCM>
> [root@thor ~]# cat /etc/wpa_supplicant.conf
> ap_scan=2
> network={
>   ssid="ttyv0"
>   scan_ssid=1
>   proto=WPA2
>   key_mgmt=WPA-PSK
>   pairwise=CCMP
>   group=CCMP
>   psk="(removed)"
> }
> [rootk@thor ~]# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -dddt

Not going to work, you need explicit '-D ndis' flag.

Anyway you just need this entry in rc.conf:

wlans_ndis0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
wpa_supplicant_conf_file="/etc/wpa_supplicant.conf"

'-D bsd', default one, works only for wep and only in my git repo.

> 1266441009.079270: Initializing interface 'wlan0' conf
> '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge
> 'N/A'
> 1266441009.080825: Configuration file '/etc/wpa_supplicant.conf' ->
> '/etc/wpa_supplicant.conf'
> 1266441009.081640: Reading configuration file '/etc/wpa_supplicant.conf'
> 1266441009.082993: ap_scan=2
> 1266441009.083143: Line: 2 - start of a new network block
> 1266441009.084136: ssid - hexdump_ascii(len=5):
>      74 74 79 76 30                                    ttyv0
> 1266441009.084487: scan_ssid=1 (0x1)
> 1266441009.084612: proto: 0x2
> 1266441009.084719: key_mgmt: 0x2
> 1266441009.084822: pairwise: 0x10
> 1266441009.084943: group: 0x10
> 1266441009.085040: PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]
> 1266441009.396285: PSK (from passphrase) - hexdump(len=32): [REMOVED]
> 1266441009.396530: Priority group 0
> 1266441009.396561:    id=0 ssid='ttyv0'
> 1266441009.396585: Initializing interface (2) 'wlan0'
> 1266441009.400393: Own MAC address: 00:25:d3:93:50:c8
> 1266441009.400453: wpa_driver_bsd_set_wpa: enabled=1
> 1266441009.400558: wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
> 1266441009.400618: wpa_driver_bsd_del_key: keyidx=0
> 1266441009.400652: wpa_driver_bsd_del_key: keyidx=1
> 1266441009.400680: wpa_driver_bsd_del_key: keyidx=2
> 1266441009.400707: wpa_driver_bsd_del_key: keyidx=3
See wpa_supplicant use bsd driver.
> 1266441009.400738: wpa_driver_bsd_set_countermeasures: enabled=0
> 1266441009.400768: wpa_driver_bsd_set_drop_unencrypted: enabled=1
> 1266441009.400798: RSN: flushing PMKID list in the driver
> 1266441009.400862: Setting scan request: 0 sec 100000 usec
> 1266441009.434450: EAPOL: SUPP_PAE entering state DISCONNECTED
> 1266441009.434501: EAPOL: KEY_RX entering state NO_KEY_RECEIVE
> 1266441009.434521: EAPOL: SUPP_BE entering state INITIALIZE
> 1266441009.434652: EAP: EAP entering state DISABLED
> 1266441009.434765: Added interface wlan0
> 1266441009.503454: State: DISCONNECTED -> SCANNING
> 1266441009.503527: Trying to associate with SSID 'ttyv0'
> 1266441009.503553: Cancelling scan request
> 1266441009.503574: WPA: clearing own WPA/RSN IE
> 1266441009.503593: Automatic auth_alg selection: 0x1
> 1266441009.503624: wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1
> 1266441009.503668: WPA: No WPA/RSN IE available from association info
> 1266441009.503767: WPA: Set cipher suites based on configuration
> 1266441009.503783: WPA: Selected cipher suites: group 16 pairwise 16
> key_mgmt 2 proto 2
> 1266441009.503803: WPA: clearing AP WPA IE
> 1266441009.503821: WPA: clearing AP RSN IE
> 1266441009.503844: WPA: using GTK CCMP
> 1266441009.503866: WPA: using PTK CCMP
> 1266441009.503891: WPA: using KEY_MGMT WPA-PSK
> 1266441009.503913: 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
> 1266441009.503962: No keys have been configured - skip key clearing
> 1266441009.503984: wpa_driver_bsd_set_drop_unencrypted: enabled=1
> 1266441009.504016: State: SCANNING -> ASSOCIATING
> 1266441009.504048: wpa_driver_bsd_associate: ssid 'ttyv0' wpa ie len 22
> pairwise 3 group 3 key mgmt 1
> 1266441009.504104: wpa_driver_bsd_associate: set PRIVACY 1
> ioctl[SIOCS80211, op 21, len 42]: No such file or directory
> 1266441009.504550: Association request to the driver failed
> 1266441009.504576: Setting authentication timeout: 5 sec 0 usec
> 1266441009.504609: EAPOL: External notification - EAP success=0
> 1266441009.504634: EAPOL: External notification - EAP fail=0
> 1266441009.504655: EAPOL: External notification - portControl=Auto
> 1266441010.437381: EAPOL: disable timer tick
> 1266441014.508365: Authentication with 00:00:00:00:00:00 timed out.
> 1266441014.508477: Added BSSID 00:00:00:00:00:00 into blacklist
> 1266441014.508543: No keys have been configured - skip key clearing
> 1266441014.508586: State: ASSOCIATING -> DISCONNECTED
> 1266441014.508634: EAPOL: External notification - portEnabled=0
> 1266441014.508689: EAPOL: External notification - portValid=0
> 1266441014.508737: EAPOL: External notification - EAP success=0
> 1266441014.508799: Setting scan request: 0 sec 0 usec
> 1266441014.508915: State: DISCONNECTED -> SCANNING
> 1266441014.508977: Trying to associate with SSID 'ttyv0'
> 1266441014.509032: Cancelling scan request
> 1266441014.509080: WPA: clearing own WPA/RSN IE
> 1266441014.509122: Automatic auth_alg selection: 0x1
> 1266441014.509164: wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1
> 1266441014.509256: WPA: No WPA/RSN IE available from association info
> 1266441014.509305: WPA: Set cipher suites based on configuration
> 1266441014.509360: WPA: Selected cipher suites: group 16 pairwise 16
> key_mgmt 2 proto 2
> 1266441014.509415: WPA: clearing AP WPA IE
> 1266441014.509457: WPA: clearing AP RSN IE
> 1266441014.509506: WPA: using GTK CCMP
> 1266441014.509556: WPA: using PTK CCMP
> 1266441014.509610: WPA: using KEY_MGMT WPA-PSK
> 1266441014.509654: 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
> 1266441014.509788: No keys have been configured - skip key clearing
> 1266441014.509832: wpa_driver_bsd_set_drop_unencrypted: enabled=1
> 1266441014.509893: State: SCANNING -> ASSOCIATING
> 1266441014.509947: wpa_driver_bsd_associate: ssid 'ttyv0' wpa ie len 22
> pairwise 3 group 3 key mgmt 1
> 1266441014.510028: wpa_driver_bsd_associate: set PRIVACY 1
> ioctl[SIOCS80211, op 21, len 42]: No such file or directory
> 1266441014.510922: Association request to the driver failed
> 1266441014.510983: Setting authentication timeout: 5 sec 0 usec
> 1266441014.511055: EAPOL: External notification - EAP success=0
> 1266441014.511105: EAPOL: External notification - EAP fail=0
> 1266441014.511153: EAPOL: External notification - portControl=Auto
> ^C1266441017.044014: CTRL-EVENT-TERMINATING - signal 2 received
> 1266441017.044170: Removing interface wlan0
> 1266441017.044248: State: ASSOCIATING -> DISCONNECTED
> 1266441017.044325: No keys have been configured - skip key clearing
> 1266441017.044391: EAPOL: External notification - portEnabled=0
> 1266441017.044469: EAPOL: External notification - portValid=0
> 1266441017.044537: wpa_driver_bsd_set_wpa: enabled=0
> 1266441017.044599: wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0
> ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported
> 1266441017.045884: Failed to disable WPA in the driver.
> 1266441017.045950: wpa_driver_bsd_set_drop_unencrypted: enabled=0
> 1266441017.046038: wpa_driver_bsd_set_countermeasures: enabled=0
> 1266441017.046130: No keys have been configured - skip key clearing
> 1266441017.048685: Removed BSSID 00:00:00:00:00:00 from blacklist (clear)
> 1266441017.048861: Cancelling scan request
> 1266441017.048948: Cancelling authentication timeout
> 1266441017.049087: wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0
> ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported
> ELOOP: remaining socket: sock=4 eloop_data=0x28406140 user_data=0x2840e040
> handler=0x8069f40
> [root@thor ~]# ifconfig wlan0 scan
> [root@thor ~]# ifconfig wlan0 list scan
> [root@thor ~]# exit
>
> Script done on Wed Feb 17 22:10:33 2010
>
> For some reason I did not have any luck this time scanning the network. But
> I know that this worked at least once. I tried different values for ap_scan,
> but the result never changes. Sometimes it event gets not past the scanning
> part, it's just stuck.

There is race in link state event change that could cause this, but I belive
that real problem in your case is using '-D bsd' instead of '-D ndis'.



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