TP-LINK TL-WN821N

Carlos Jacobo Puga Medina cpm at fbsd.es
Thu Jul 10 07:14:00 UTC 2014


On Thu, 10 Jul 2014 13:05:24 +0800
Kevin Lo <kevlo at FreeBSD.org> wrote:

> On Wed, Jul 09, 2014 at 03:42:23PM +0200, Carlos Jacobo Puga Medina wrote:
> > 
> > On Wed, 9 Jul 2014 18:02:29 +0800
> > Kevin Lo <kevlo at FreeBSD.org> wrote:
> > 
> > > On Tue, Jul 08, 2014 at 12:45:50PM +0200, Carlos Jacobo Puga Medina wrote:
> > > > 
> > > > On Tue, 8 Jul 2014 10:22:20 +0800
> > > > Kevin Lo <kevlo at FreeBSD.org> wrote:
> > > > 
> > > > > On Mon, Jul 07, 2014 at 12:16:12PM -0700, Adrian Chadd wrote:
> > > > > > 
> > > > > > On 7 July 2014 12:10, Carlos Jacobo Puga Medina <cpm at fbsd.es> wrote:
> > > > > > > On Mon, 7 Jul 2014 11:48:36 -0700
> > > > > > > Adrian Chadd <adrian at freebsd.org> wrote:
> > > > > > >
> > > > > > >> I'd just look at porting over the openbsd driver. There's no 11n
> > > > > > >> support in the openbsd code though!
> > > > > > >
> > > > > > > That's bad, I hope that the 802.11n protocol will be implemented since it was released in 2009.
> > > > > > >
> > > > > > > What do you recommend to do?
> > > > > > 
> > > > > > I'd be happy if the driver showed up from OpenBSD. We can always try
> > > > > > to add 11n support.
> > > > > > 
> > > > > > I'm sorry, I don't have much else to say at the moment and as my day
> > > > > > job is decidedly not wireless, I can't be much help. :(
> > > > > 
> > > > > I'm trying to get D-Link DWA-160 rev. A1 usb wifi adapter working with  
> > > > > latest OpenBSD snapshot (2014/07/06).  It seems to me that there's a 
> > > > > problem with otus(4).
> > > > > 
> > > > > dmesg:
> > > > > otus0 at uhub1 port 7 "ATHER USB2.0 WLAN" rev 2.00/1.07 addr 2
> > > > > otus0: MAC/BBP AR9170, RF AR9104, MIMO 2T2R, address 00:22:b0:57:fc:dc
> > > > > 
> > > > > ifconfig otus0 scan doesn't yield any result.
> > > > > 
> > > > > # ifconfig otus0 scan
> > > > > otus0: flags=28802<BROADCAST,SIMPLEX,MULTICAST,NOINET6> mtu 1500
> > > > >         lladdr 00:22:b0:57:fc:dc
> > > > >         priority: 4
> > > > >         groups: wlan
> > > > >         media: IEEE802.11 autoselect
> > > > >         status: no network
> > > > >         ieee80211: nwid ""
> > > > > 	        none
> > > > > #
> > > > > 
> > > > > > -a
> > > > > 
> > > > > 	Kevin
> > > > 
> > > > Hi, 
> > > > 
> > > > OpenBSD doesn't support 802.11n yet, but some of this cards run in 11g mode for now. So this could be chew better if we work together with them. 
> > > 
> > > All OpenBSD wireless drivers don't support .11n yet.
> > > What I mean is that driver is not stable.  At least for D-Link DWA-160 rev. A1.
> > > 
> > > > Anyway if you don't mind I'll send you some outputs from TL-WN821N.
> > > 
> > > No, I don't mind. :-)  Thanks.
> > > 
> > > > Regards,
> > > > -- 
> > > > Carlos Jacobo Puga Medina <cpm at fbsd.es>
> > > 
> > > 	Kevin
> > 
> > I'm testing a TL-WN821N v4 device.
> 
> Wait a minute.  You mentioned OpenBSD otus(4), I thought we were talking 
> about the Atheros AR9170 chipset, not the Realtek RTL8192CU chip.

Oops, I forgot mentioned that v4 use the Realtek RTL8192CU chipset.

https://wikidevi.com/wiki/TP-LINK_TL-WN821N_v4

> 
> > # uname -a
> > FreeBSD box.underbuild.com 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r268070: Tue Jul  1 14:05:40 CEST 2014     root at box.underbuild.com:/usr/obj/usr/src/sys/PROD  i386
> > 
> > # dmesg | grep urtwn0
> > urtwn0: <vendor 0x0bda product 0x8178, class 0/0, rev 2.00/2.00, addr 3> on usbus2
> > urtwn0: MAC/BB RTL8192CU, RF 6052 2T2R
> > urtwn0: timeout waiting for firmware readiness
> > 
> > # usbconfig -u 2 -a 3 dump_device_desc
> > ugen2.3: <product 0x8178 vendor 0x0bda> 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 = 0x0bda 
> >   idProduct = 0x8178 
> >   bcdDevice = 0x0200 
> >   iManufacturer = 0x0001  <retrieving string failed>
> >   iProduct = 0x0002  <retrieving string failed>
> >   iSerialNumber = 0x0003  <retrieving string failed>
> >   bNumConfigurations = 0x0001 
> > 
> > # ifconfig urtwn0
> > urtwn0: flags=8803<UP,BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
> > 	ether 10:fe:ed:27:f6:5d
> > 	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> > 	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
> > 	status: associated
> > 
> > I noticed that wireless never goes up. Not much luck here, I get the error: 
> > 	urtwn0: timeout waiting for firmware readiness
> 
> Ok, I know where the problem lies.  Please try this patch, thanks.
> 
> Index: sys/dev/usb/wlan/if_urtwn.c
> ===================================================================
> --- sys/dev/usb/wlan/if_urtwn.c	(revision 268479)
> +++ sys/dev/usb/wlan/if_urtwn.c	(working copy)
> @@ -2281,9 +2281,6 @@ urtwn_fw_reset(struct urtwn_softc *sc)
>  	}
>  	/* Force 8051 reset. */
>  	urtwn_write_2(sc, R92C_SYS_FUNC_EN, reg & ~R92C_SYS_FUNC_EN_CPUEN);
> -	urtwn_write_2(sc, R92C_SYS_FUNC_EN,
> -	    urtwn_read_2(sc, R92C_SYS_FUNC_EN) |
> -	    R92C_SYS_FUNC_EN_CPUEN);
>  }
>  
>  static void
> @@ -2383,6 +2380,11 @@ urtwn_load_firmware(struct urtwn_softc *sc)
>  		urtwn_write_1(sc, R92C_MCUFWDL, 0);
>  	}
>  
> +	if (!(sc->chip & URTWN_CHIP_88E)) {
> +		urtwn_write_2(sc, R92C_SYS_FUNC_EN,
> +		    urtwn_read_2(sc, R92C_SYS_FUNC_EN) |
> +		    R92C_SYS_FUNC_EN_CPUEN);
> +	}
>  	urtwn_write_1(sc, R92C_MCUFWDL,
>  	    urtwn_read_1(sc, R92C_MCUFWDL) | R92C_MCUFWDL_EN);
>  	urtwn_write_1(sc, R92C_MCUFWDL + 2,

I'm just rebuilding the kernel.

-- 
Carlos Jacobo Puga Medina <cpm at fbsd.es>


More information about the freebsd-wireless mailing list