-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AR9271 antenna diversity issue #105
Comments
hiya, so the AR9271 is like an AR9285. It doesn't necessarily have an external https://wiki.freebsd.org/dev/ath_hal%284%29/AntennaDiversity and: https://wiki.freebsd.org/dev/ath_hal%284%29/AntennaDiversityAR9285 Now, i don't know if all of the RX descriptor information is sent up in My guess is that the LNA mixing is not optimal for what you're doing and -adrian On 8 October 2016 at 09:41, Rodizio notifications@github.com wrote:
|
I opened up a WN722N card, it indeed seems there are no active components "behind" the chip, so it must be doing LNA mixing like you say I guess. In the link you posted: Does this work with AR9271 USB cards under FreeBSD? Installing FreeBSD is no big deal, if this gives me some insight on which antenna is chosen under what circumstances, I'd try that. Would de-soldering the white SMD component at the backside of the PCB be an option? This would cut the path to the PCB antenna. But not sure if this would make everything behave erratically ... |
There's no ath9k_htc support in freebsd yet. I keep wanting to do it but Maybe I'll finally go bring up the USB attach glue so i can prepare for As for ath9k support - it's not actually that hard to add the decoding -a On 9 October 2016 at 14:05, Rodizio notifications@github.com wrote:
|
Unfortunately, not a C developer at all. I hoped it would be enough to add some printk's here and there to get an idea or add a reg_set[] ... line somewhere to disable the PCB antenna path. |
Let me take a stab at it next week. I have some ath9k_htc hardware around -a On 9 October 2016 at 15:15, Rodizio notifications@github.com wrote:
|
Have done a lot more testing in the meantime with the white SMD component in the picture I posted above removed (so that the PCB antenna is disconnected). This seems to have fixed the problem. Is there maybe a simple way to just disable the PCB antenna via software in the driver completely? |
Hi, It needs to get some debugging added to ath9k. Soemone with ath9k_htc and -adrian |
Quoting you from the other thread:
Other users of my EZ-Wifibroadcast have now also disconnected the PCB antennas on their 722N sticks and also reported the issue is gone. So there is definitely something not right there. from the AR9271 datasheet:
Unfortunately I cannot really help with coding (but I've succesfully managed to write to a register of the Atheros card, yay ;)) Maybe you can give me a hint on how to change those LNA settings or where to look in the code? |
@rodizio1 take a look at linux/drivers/net/wireless/ath/ath9k/eeprom_4k.c |
Hi,
It'd be good to know what the LNA configuration is for this NIC. CAn you
cat base_eeprom from the ath9k/ debugfs directory?
…-adrian
|
Here is the output from base_eeprom and modal_eeprom:
|
A quick review points out that we would need to mask out the respective bits for diversity support ( Hopefully, masking of
|
|
hiya,
ok. So it's supposed to be enabling both antennas. You want to disable one,
right? Just set the alt_lnaconf and main_lnaconf values to the same value,
whichever you need (LNA1 or LNA2.)
The permissable options are:
LNA1
LNA2
LNA1+LNA2
LNA1-LNA2
.. the latter two are actually just straight signal mixing, no MIMO
processing at all. It sounds like you don't need that at all; you just need
LNA1 or LNA2 for both.
…-adrian
On 19 March 2017 at 17:52, Thomas Nagy ***@***.***> wrote:
Ant. Diversity ctl1 : 13
- bb_enable_ant_div_lnadiv : 1
- bb_ant_div_alt_gaintb : 0
- bb_ant_div_main_gaintb : 1
- bb_enable_ant_fast_div : 1
Ant. Diversity ctl2 : 9
- bb_ant_div_main_lnaconf = 10 (LNA1)
- bb_ant_div_alt_lnaconf = 01 (LNA2)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#105 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGl7fcpcpevd7bqnRi2PIfqJy_IPvtGks5rnc20gaJpZM4KRw-R>
.
|
If I see it correctly in the AR9271 datasheet, the rx only chain (LNA2) has 3db better sensitivity. 3db higher link budget "for free" (i.e. without increasing txpower or using directional antennas) would be quite awesome. I think I'll try soldering an external antenna to that chain and change the code to use only LNA2. Thanks a lot for your help guys. |
Here are some further ideas if you'd like to gain some more free link budget without breaking regulations:
|
Hello,
I've been testing quite a lot lately with Atheros wifi cards that use the ath9k_htc firmware.
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:
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?
Kernel used is 4.4.11 with ath9k_htc firmware version 1.4.
The text was updated successfully, but these errors were encountered: