ath9k-devel.lists.ath9k.org archive mirror
 help / color / mirror / Atom feed
* [ath9k-devel] AR9271 antenna diversity
@ 2016-09-21 13:10 Gary Holtkamp
  0 siblings, 0 replies; only message in thread
From: Gary Holtkamp @ 2016-09-21 13:10 UTC (permalink / raw)
  To: ath9k-devel

Hello,

I've been testing quite a lot lately with Atheros wifi cards that use the ath9k_htc driver.

As a background: These cards are used for a project that uses monitor mode and pcap packet injection to stream h264 video for FPV use (remote camera on a model plane). See here if interested in details: https://befinitiv.wordpress.com/wifibroadcast-analog-like-transmission-of-live-video-data/

The setup works with two Raspberry Pi's, one on the aircraft, one on the ground:
Raspberry Pi camera --> raspivid application (fetches raw h264 from camera) --> tx application (injects packets via pcap) --> air --> rx application (receives packets in monitor mode) --> display application



I use TPLink WN722N sticks which use the Atheros AR9271 chipset. It has an RP-SMA antenna connector with a rubber-ducky antenna on it and also a small antenna printed on the PCB of the wifi stick.

According to this document: https://github.com/erikarn/ath9k-docs/blob/master/ath9k-hw-recv-single-chain-diversity.txt, the AR9271 has a switch in front of the chip, that somehow (I think I don't really understand the details ...) selects the "right" antenna (i.e. the one with the better signal) for reception.


However, I noticed some strange behaviour:

- When being near the receiver, reception is good, packetloss is low, as expected

- When being further away (so that RSSI is below roughly about -70dbm) quite a lot of packetloss appears, although the chipset can receive data succesfully down to around -84dBm (TX side sends 24Mbit 802.11g frames)

- Now the strange part: When I cover the PCB antenna with my thumb and index finger, packetloss instantly stops and reception works pretty good again down to around -84dbm


At first, I didn't realize it was the switching (?), thought it was external interference or my hand causing reflections that make for a better signal (or whatever else strange RF-effect).

However, this problem seems reproducible. I've tried this at home as well as on an open field in the middle of nowhere, also on different frequencies. I also connected a coax extension to the RP-SMA output of the 722n stick and located the antenna 3 meters away so that covering the PCB antenna does not have any near-field effect on the rubber ducky. Still same problem.

Right now, my feeling is that the switching is not working correctly. I already searched on how to debug this, but I found infos only for the ath9k, not ath9k_htc driver.

Could somebody please shed some light into this, howto further debug? 

Is it possible to disable the switching function in the driver by modifying something in antenna.c (so that only the external antenna is used) to see if I am on the right track?

Or maybe simply cut the trace to the PCB antenna and hope the switch will not select the PCB antenna anymore?


best regards,
Miguel



_____________________________________________________________
Washington DC's Largest FREE Email service. ---> http://www.DCemail.com ---> A Washington Online Community Member --->
http://www.DCpages.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-21 13:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-21 13:10 [ath9k-devel] AR9271 antenna diversity Gary Holtkamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).