Multiple Directional Antenna's

Bhavin Patel bhavin.patel at plextek.com
Thu Jan 4 09:10:56 PST 2018


Hi Adrian,

Thanks for the suggestion, we are making the modifications.

Bhavin
________________________________________
From: adrian.chadd at gmail.com <adrian.chadd at gmail.com> on behalf of Adrian Chadd <adrian at freebsd.org>
Sent: 03 January 2018 17:52
To: Bhavin Patel
Cc: Thomas Rouse; ath9k_htc_fw at lists.infradead.org
Subject: Re: Multiple Directional Antenna's

hi,

Ok. so there's no easy way to configure those per-transmit, because
they're switched when you flip GPIO pins, NOT switched when you do a
transmit or receive.

There's a feature called smart antenna, where you get a 24 bit shift
register that is sent out on a pair of GPIO pins every time you
transmit a frame and every time you go back to receive, so you can do
more complicated antenna control patterns. If you add that to the
PA/FEM control lines so you know when transmit/receive starts (so you
can handle the case where you "missed" a shifted bit for some reason!)
then you can effectively get per-packet transmit antenna control.

Here's the writeup:

https://wiki.freebsd.org/dev/ath_hal%284%29/ShiftRegisterDiversity

It should 100% apply to the AR9271 NIC. It unfortunately does mean
you'll have to go add a shift register and run a couple lines for
resetting things based on the antenna switch state, but it shouldn't
be too hard a hardware modification for testing!

The setup is:

* setup GPIO pins for smart antenna strobe/smart antenna data;
* you setup AR_DEF_ANTENNA to be what value the antenna switch should
have by default, and
* then you configure a per-transmit TX antenna 24 bit value per
transmit descriptor.

Then the hardware will do the shifting out for you per packet!

I hope that helps!



-adrian

On 3 January 2018 at 02:10, Bhavin Patel <bhavin.patel at plextek.com> wrote:
> Hi,
>
> We have a custom PCB for the antenna switch and plastic enclosure for the mounting of 6 directional antennas (60 degree beam width), all designed in house.
> The interface to the antenna PCB has 3 GPIO inputs 2^3 = 8.
> I have got control of the GPIO in the firmware using "iowrite32(0x10004048, 0x00004000);"
>
> Our current setup has the RF output connected to a DSO (Digital Storage Oscilloscope) via an enveloped detector, we have solder wires directly to AR9271 GPIO pins and connected these to the DSO.
>
> We effectively want to switch the antenna's just before the transmission and just after to maintain as much bandwidth as possible, using the setup above we are able to measure both of these parameters.
>
> I have made some progress with the beacon messages, in if_ath.c f :
>
> static void ath_tgt_send_beacon(struct ath_softc_tgt *sc, adf_nbuf_t bc_hdr, adf_nbuf_t nbuf, HTC_ENDPOINT_ID EndPt)
>
> The last line in the function:
> ah->ah_startTxDma(ah, sc->sc_bhalq);
>
> I have added a pulse on the GPIO after this to see if this would be a good place to put the antenna control code.
>
> My understanding is that this is where the beacon packet is DMA to an address where a hardware peripheral would then send it down the TX chain.
>
> From my measurements there is >10 ms delay between the pulse and the actual transmission of the packets, we would preferable want this in the Us range.
>
> Do you have any suggestions for modifying the firmware?
>
> Thanks
> Bhavin
>
> -----Original Message-----
> From: adrian.chadd at gmail.com [mailto:adrian.chadd at gmail.com] On Behalf Of Adrian Chadd
> Sent: 03 January 2018 02:05
> To: Bhavin Patel
> Cc: ath9k_htc_fw at lists.infradead.org
> Subject: Re: Multiple Directional Antenna's
>
> hi!
>
> How are you hooking up the antennas? I can help you with it if you can tell me what's going on!
>
> Is this via the 24 bit shift register thingy?
>
>
> -a
>
>
> On 2 January 2018 at 07:53, Bhavin Patel <bhavin.patel at plextek.com> wrote:
>> Hi,
>>
>> The firmware is largely not commented, Is there any detailed documentation available?
>>
>> We are trying to add 6 directional antennas to the device, the problem we are having is modifying the firmware to control the antenna switch.  To maintain the bandwidth we would want to switch just before the packet transmission and after the packet is in the air. We would need to do this for both the mgmt beacon packets and data packets. Any advice on where to put the antenna switch code?
>>
>> Thanks
>> Bhavin
>>
>>
>> _______________________________________________
>> ath9k_htc_fw mailing list
>> ath9k_htc_fw at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
>
> _______________________________________________
> ath9k_htc_fw mailing list
> ath9k_htc_fw at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw



More information about the ath9k_htc_fw mailing list