Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Aug 2008 19:59:48 +0200
From:      David Naylor <naylor.b.david@gmail.com>
To:        Sam Leffler <sam@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: ral, rum and bi-antenna
Message-ID:  <200808051959.53073.naylor.b.david@gmail.com>
In-Reply-To: <48987A3A.3030506@freebsd.org>
References:  <200808042213.19795.naylor.b.david@gmail.com> <48987A3A.3030506@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1332477.MVuACEzNBb
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Tuesday 05 August 2008 18:05:14 Sam Leffler wrote:
> David Naylor wrote:
> > Hi,
> >
> > I happen to have the good fortune of owning a RT2661S (ral driver) and a
> > RT2601USB (rum driver) [manufactured by Canyon].  Both chipsets have the
> > ability to handle two antenna.
> >
> > Now the good fortune, both chipsets default to the wrong antenna.  When=
 I
> > should be getting a stable connection at about -70dBm instead I am
> > getting very poor connection (less than 50% connectivity, reported from
> > ping) and about -90dBm.
> >
> > After looking at the FreeBSD driver code (and the [Open/Net]BSD) the
> > antenna selection is marked as *TBD*.  Does anyone know how to add
> > antenna selection (the ralink linux drivers are a wild maze).  I
> > considered trying to do it myself but I do not know the first thing abo=
ut
> > kernel hacking (let alone chipset drivers) and have no idea where to
> > start.
> >
> > I was thinking a stop-gap solution will be to have the antenna selectab=
le
> > using tunables/sysctl?
> >
> > Needless to say I am very willing to try any patches (and even attempt =
to
> > create one myself if someone could point me in the right direction...).
>
> So far as I know the hardware provides no help in this area; e.g. like
> switching antenna ports on retry attempts or reporting which antenna was
> used to tx/rx a frame.  I don't even know if the h/w does rx diversity.
> I believe the ralink drivers for these chips do some form of s/w
> diversity or antenna switching.
>
> Otherwise you can certainly hookup a sysctl to fix the antenna; ath has
> code to do this you can crib.  At some point we'll get around to hooking
> up ifconfig (I've delayed as MIMO makes this api slightly more involved
> then pick one of auto, 0, 1).
I have been reading through the rt2560 driver code and they do in-fact use=
=20
sysctl although it is undocumented.  It appears to me that a lot of the cod=
e=20
is copied and could be refactored (with a bit of abstraction?) [where=20
templates from C++ will be handy?].  An idea for a project, should someone=
=20
want some extra work :->

> But the bigger question is why you're seeing such a difference when
> locking tx to one port or another; it sounds like the antenna design on
> your card is highly directional.  This is not unexpected for USB devices
> where every penny is scrimped in design+manufacture but cardbus cards
> typically are better.  Cardbus cards often have U.FL connectors under
> the sheath so if you're willing to canibalize your card you can remove
> the sheath and attach good antennae to see if you get better behaviour.
The card only has one slot available to connect an 'external' antenna and I=
=20
think it defaults to the internal one.  I think in this case the external=20
antenna does make a big difference.  (I even have homemade parabolic=20
reflectors attached to the aerials, which does give some boost).

I assume there will be no problem if I copied from the linux drivers provid=
ed=20
by ralink (it looks like a BSD license to me)

--nextPart1332477.MVuACEzNBb
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQBImJUZUaaFgP9pFrIRAlxDAKCKcXQ/F0N6V/CCXfxUI+vWlF1BRgCbB6uQ
CWNak0bkfjNOUiJNBrJKVSs=
=ZBXg
-----END PGP SIGNATURE-----

--nextPart1332477.MVuACEzNBb--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808051959.53073.naylor.b.david>