From owner-freebsd-wireless@FreeBSD.ORG Tue Nov 18 14:33:03 2014 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D9BBFE1 for ; Tue, 18 Nov 2014 14:33:03 +0000 (UTC) Received: from mail-yk0-x230.google.com (mail-yk0-x230.google.com [IPv6:2607:f8b0:4002:c07::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9509DEB for ; Tue, 18 Nov 2014 14:33:02 +0000 (UTC) Received: by mail-yk0-f176.google.com with SMTP id q200so5416584ykb.7 for ; Tue, 18 Nov 2014 06:33:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=sRZw18B6C2geBfnSUUHZyrcDGrF1JpN1KePWN0bA93Y=; b=uYwQurzjcQ2vHTKUuJdCQd/mkjS8d7gKq1hSZC1der0nSYfxGDSmu6ug9PsuQaFajC AkiKdNilt7MhypIkH8Z7SVkf8196aalI76V+klBMOPb77re39xfTwDF8SM45IU/RDy9J DEOQuCwPZUpCmyoRb6er3L2PscMb/pIlveVLU/mAkzwwo1FqTsT19xW/8NssUfOKhKb7 LswtBTepF7L47XVLiId6xfNZK6QpQxDwPkJVhwtFKJEwds5Tfoym8Qk3WYGVqMosioXq VsQsHF4lFl8QZFJb3/t+qGHXVj5LwXIbcooxDQSPbahkBy25c9lKhu+F1+BuCIHnnQNW poqg== MIME-Version: 1.0 X-Received: by 10.170.93.194 with SMTP id k185mr4314088yka.93.1416321181768; Tue, 18 Nov 2014 06:33:01 -0800 (PST) Received: by 10.170.172.194 with HTTP; Tue, 18 Nov 2014 06:33:01 -0800 (PST) In-Reply-To: References: <20141118055615.GA38506@ns.kevlo.org> <20141118070837.GA38861@ns.kevlo.org> <20141118080001.GA39117@ns.kevlo.org> Date: Tue, 18 Nov 2014 15:33:01 +0100 Message-ID: Subject: Re: D-Link DWA-131 A1 (Realtek RTL8191SU) not working From: Idwer Vollering Cc: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2014 14:33:03 -0000 2014-11-18 11:04 GMT+01:00 Ben Woods : > Hmm... turns out this is an issue with authentication with wpa_supplicant. > If I turn off security I can connect just fine. Well, disabling AP security features is not the right solution. I have the EDUP adapter that uses if_rsu, and when I crank the debug level all the way up it works most of the time/ Can you apply the following patch to 10-STABLE or -CURRENT (committers, are you reading this? :) ), rebuild kernel and before rebooting add "hw.usb.rsu.debug=5" to /boot/loader.conf ? Index: sys/dev/usb/wlan/if_rsu.c =================================================================== --- sys/dev/usb/wlan/if_rsu.c (revision 274656) +++ sys/dev/usb/wlan/if_rsu.c (working copy) @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -68,11 +69,13 @@ #include +static SYSCTL_NODE(_hw_usb, OID_AUTO, rsu, CTLFLAG_RW, 0, "USB rsu"); + #ifdef USB_DEBUG -static int rsu_debug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, rsu, CTLFLAG_RW, 0, "USB rsu"); -SYSCTL_INT(_hw_usb_rsu, OID_AUTO, debug, CTLFLAG_RW, &rsu_debug, 0, +int rsu_debug = 0; +SYSCTL_INT(_hw_usb_rsu, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &rsu_debug, 0, "Debug level"); +TUNABLE_INT("hw.usb.rsu.debug", &rsu_debug); #endif static const STRUCT_USB_HOST_ID rsu_devs[] = { @@ -1277,7 +1280,7 @@ DPRINTF("WPS PBC pushed.\n"); break; case R92S_EVT_FWDBG: - if (ifp->if_flags & IFF_DEBUG) { + if (rsu_debug >= 6) { buf[60] = '\0'; printf("FWDBG: %s\n", (char *)buf); } Index: sys/modules/usb/rsu/Makefile =================================================================== --- sys/modules/usb/rsu/Makefile (revision 274656) +++ sys/modules/usb/rsu/Makefile (working copy) @@ -6,5 +6,6 @@ SRCS = if_rsu.c if_rsureg.h \ bus_if.h device_if.h \ opt_bus.h opt_usb.h usb_if.h usbdevs.h +CFLAGS+= -DUSB_DEBUG .include > > Other devices devices on my network are connecting fine with WPA2 AES PSK. > My wifi router is a TP-Link Archer D9 operating with both 2.4GHz and 5GHz. > I will go and try on another wifi network and report back if that works. > > % sudo cat /etc/wpa_supplicant.conf > ctrl_interface=/var/run/wpa_supplicant > eapol_version=2 > ap_scan=1 > fast_reauth=1 > network={ > ssid="MYSSIDHERE" > key_mgmt="WPA-PSK" > psk="MYPSKHERE" > } > > For the record, details of my wireless adapter: > % sudo usbconfig -d ugen2.3 dump_device_desc > ugen2.3: at usbus2, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=ON (500mA) > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0200 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x07d1 > idProduct = 0x3303 > bcdDevice = 0x0200 > iManufacturer = 0x0001 > iProduct = 0x0002 <11n Adapter> > iSerialNumber = 0x0003 <00e04c000001> > bNumConfigurations = 0x0001 > > Any thoughts? > > Regards, > Ben > > > -- > From: Benjamin Woods > woodsb02@gmail.com > > On 18 November 2014 16:32, Ben Woods wrote: > >> No worries :) >> >> Got any advice on how to diagnose why it's able to scan and lock onto the >> ssid (shows it in ifconfig), but not able to get an IP address with DHCP >> or communicate with a manual IP address? >> >> On Tuesday, November 18, 2014, Kevin Lo wrote: >> >>> Argh! I think I need more coffee. rsu(4) does support this chipset. >>> Sorry for the noise. >>> >>> Kevin >>> >>> On Tue, Nov 18, 2014 at 03:08:37PM +0800, Kevin Lo wrote: >>> > I'm pretty sure. See OpenBSD cvs log: >>> > http://marc.info/?l=openbsd-cvs&m=128897633210060&w=2 >>> > >>> > I'll be fixing rsu(4), thanks. >>> > >>> > Kevin >>> > >>> > On Tue, Nov 18, 2014 at 02:41:18PM +0800, Ben Woods wrote: >>> > > >>> > > Actually, the rsu(4) man page mentions the RTL8191SU chipset: >>> > > https://www.freebsd.org/cgi/man.cgi?query=rsu&sektion=4 >>> > > >>> > > And it appears to be in the code: >>> > > >>> http://svnweb.freebsd.org/base/head/sys/dev/usb/wlan/if_rsu.c?view=markup >>> > > >>> > > Are you sure it is not supported? >>> > > >>> > > Regards, >>> > > Ben >>> > > >>> > > >>> > > -- >>> > > From: Benjamin Woods >>> > > woodsb02@gmail.com >>> > > >>> > > On 18 November 2014 14:21, Ben Woods wrote: >>> > > >>> > > > There seems to be some misalignment with the official release >>> notes, which >>> > > > specifically mention the D-Link DWA-131 A1 is supported: >>> > > > https://www.freebsd.org/releases/10.1R/hardware.html >>> > > > >>> > > > However, according to this page it is the RTL8191SU chipset: >>> > > > https://wikidevi.com/wiki/D-Link_DWA-131_rev_A1 >>> > > > >>> > > > Apparently the RTL8191SU chipset is supported by the OpenBSD rsu(4) >>> driver: >>> > > > http://www.undeadly.org/cgi?action=article&sid=20101216231634 >>> > > > >>> > > > Regards, >>> > > > Ben >>> > > > >>> > > > >>> > > > >>> > > > >>> > > > -- >>> > > > From: Benjamin Woods >>> > > > woodsb02@gmail.com >>> > > > >>> > > > On 18 November 2014 13:56, Kevin Lo wrote: >>> > > > >>> > > >> The RTL8191SU chipset is not supported. >>> > > >> >>> > > >> Kevin >>> > > >> On Tue, Nov 18, 2014 at 01:29:57PM +0800, Ben Woods wrote: >>> > > >> > >>> > > >> > I should mention I am running FreeBSD 10.1-RELEASE >>> > > >> > >>> > > >> > >>> > > >> > -- >>> > > >> > From: Benjamin Woods >>> > > >> > woodsb02@gmail.com >>> > > >> > >>> > > >> > On 18 November 2014 13:23, Ben Woods wrote: >>> > > >> > >>> > > >> > > Hey guys, >>> > > >> > > >>> > > >> > > I am trying to get my D-Link DWA-131 A1 working, with some >>> success >>> > > >> but no >>> > > >> > > network connectivity. >>> > > >> > > >>> > > >> > > It shows up in my usb list with device id 07d1:3303. The >>> driver pages >>> > > >> > > suggest this should be working with the rsu(4) driver and >>> potentially >>> > > >> > > the rsu-rtl8712fw firmware, according to these: >>> > > >> > > https://www.freebsd.org/cgi/man.cgi?query=rsu&sektion=4 >>> > > >> > > http://www.undeadly.org/cgi?action=article&sid=20101216231634 >>> > > >> > > https://wikidevi.com/wiki/D-Link_DWA-131_rev_A1 >>> > > >> > > >>> > > >> > > I have added the following to /boot/loader.conf and rebooted: >>> > > >> > > legal.realtek.license_ack=1 >>> > > >> > > rsu-rtl8712fw_load="YES" >>> > > >> > > >>> > > >> > > It shows up in ifconfig, and even scans and finds wireless >>> access >>> > > >> points. >>> > > >> > > I have my WPA ssid and psk details for my access point stored >>> in >>> > > >> > > /etc/wpa_supplicant.conf. I can see from ifconfig that it is >>> trying to >>> > > >> > > associate with the correct access point ssid and do DHCP, but >>> it never >>> > > >> > > obtains an IP address. >>> > > >> > > >>> > > >> > > Has anyone had this issue before? Anyone know how can I go >>> about >>> > > >> > > troubleshooting this further? >>> > > >> > > >>> > > >> > > Regards, >>> > > >> > > Ben >>> > > >> > > >>> > > >> > > -- >>> > > >> > > From: Benjamin Woods >>> > > >> > > woodsb02@gmail.com >>> > > >> > > >>> > > >> > _______________________________________________ >>> > > >> > freebsd-wireless@freebsd.org mailing list >>> > > >> > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless >>> > > >> > To unsubscribe, send any mail to " >>> > > >> freebsd-wireless-unsubscribe@freebsd.org" >>> > > >> > >>> > > >> >>> > > > >>> > > > >>> > > _______________________________________________ >>> > > freebsd-wireless@freebsd.org mailing list >>> > > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless >>> > > To unsubscribe, send any mail to " >>> freebsd-wireless-unsubscribe@freebsd.org" >>> > > >>> > _______________________________________________ >>> > freebsd-wireless@freebsd.org mailing list >>> > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless >>> > To unsubscribe, send any mail to " >>> freebsd-wireless-unsubscribe@freebsd.org" >>> >> >> >> -- >> >> -- >> From: Benjamin Woods >> woodsb02@gmail.com >> > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org"