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: 

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: 
 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 

- 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,

Washington DC's Largest FREE Email service. ---> http://www.DCemail.com ---> A 
Washington Online Community Member --->
ath9k-devel mailing list

Reply via email to