From owner-freebsd-questions@FreeBSD.ORG Wed Feb 17 22:36:34 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF3FB1065670 for ; Wed, 17 Feb 2010 22:36:34 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-ew0-f225.google.com (mail-ew0-f225.google.com [209.85.219.225]) by mx1.freebsd.org (Postfix) with ESMTP id 6CB988FC15 for ; Wed, 17 Feb 2010 22:36:34 +0000 (UTC) Received: by ewy25 with SMTP id 25so113395ewy.3 for ; Wed, 17 Feb 2010 14:36:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Mhp19f2v+avYG5/XBbYZyrbrpbalM8pVhd+CCU6ssrc=; b=iaGPXXe/xdJp9zLHQX1TEVC9N56XyC5XBj+ZO1OwlbHY4phVGmf32CUewHITWA10VW M2YupJbhT75Zvbo8ZJONEbOOGAuGXvbQtuJURf1vE0wUMt/7o1h7YCvlpyBZRSuBrcwX HiehXWdfIUj/KHE4iXAErlouB033vjIEZP4LE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=V+wkCgUZTL71/1xFSTL5nGhn5txPnH6XYKsxSEcOq0S+VGDGKFCV7SR5lblUiQrGID jrKbzyJGpn0jft8dKIqoJ7Q7DiG7yIoTz054AaqgipZfjOEuV/vnwukrb2SIC8J/0oop o67TGSOGj3SomT47r2AweWpm5VT4BxfNf/wKE= MIME-Version: 1.0 Received: by 10.213.48.74 with SMTP id q10mr5791794ebf.0.1266446193269; Wed, 17 Feb 2010 14:36:33 -0800 (PST) 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> Date: Wed, 17 Feb 2010 23:36:33 +0100 Message-ID: <3a142e751002171436q6520f669rf23ef96ebd1891cd@mail.gmail.com> From: Paul B Mahol To: Anselm Strauss Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org Subject: Re: RTL8192SE WLAN X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 22:36:35 -0000 On 2/17/10, Anselm Strauss wrote: > On Feb 17, 2010, at 13:54 , Paul B Mahol wrote: > >> On 2/17/10, Anselm Strauss wrote: >>> On Tue, Feb 16, 2010 at 11:28 PM, Paul B Mahol wrote: >>> >>>> On 2/16/10, Anselm Strauss 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 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 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 > cryptocaps=b > [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'.