OpenWrt Forum Archive

Topic: Ath9k and 5Ghz

The content of this topic has been archived between 22 Apr 2018 and 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I think you are right, eighter HT40+ or -, and it seems I was wrong about the option 'hwmode' 'na' should be option 'hwmode' '11na'
Another thing is that it seems that a lot of the options is for madwifi not ath9k.

something like this should be right:

config 'wifi-device' 'radio0'
    option 'type' 'mac80211'
    option 'macaddr' '00:23:6c:bf:a0:01'
    list 'ht_capab' 'HT40+'
    list 'ht_capab' 'SHORT-GI-40'
    list 'ht_capab' 'DSSS_CCK-40'
    option 'country' 'US'
    option 'hwmode' '11na'
    option 'channel' '44'
   
config 'wifi-iface'
    option 'device' 'radio0'
    option 'network' 'lan'
    option 'mode' 'ap'
    option 'ssid' 'XXXX'
    option 'key' 'XXXX'
    option 'encryption' 'psk2'
    option 'frag' ''
    option 'rts' ''

If I have both HT40+ and HT40-, it seems to use the correct one depending on whether I pick a high frequency or a low one.

genesis ops wrote:

Alittle off topic, but does anyone know for sure if trying to set power at lower levels is supported in ath9k 5ghz using the R52N or in 2.4ghz with the R2N. Bascially does setting option txpower actually do anything? I tried to set it and it showed 20dbm instead of 27dbm when running iwconfig, but I have no idea if that is actually accurate. Just trying to fine tune 5ghz and 2.4ghz.

Setting txpower was apparently broken until very recently. From the ath9k-devel list, a patch was supposedly checked into the ath9k code base yesterday (which means that it has probably not propagated to compat-wireless or OpenWRT yet):

http://bugzilla.kernel.org/show_bug.cgi?id=14642

...but you can try it yourself if you like:

http://bugzilla.kernel.org/attachment.cgi?id=23981

(I have to add that I tried this patch myself, but it didn't improve my RSSI at all.)

In the end, to get the card working with 5ghz, this is all I had to do. It's simple, it just wasn't all documented in one place:

1) Build OpenWrt with kmod-ath9k and crda (or install it afterwards)
2) Ensure that the COUNTRY environment variable is set for crda.  Being in the US, I just entered "export COUNTRY=US",
3) make sure that your wireless config contains "option country".  Mine is "option 'country' 'US'".
4) make sure your wireless config contains "option 'hwmode' 'n'".  Some people say to use 'na'.  Since some 5ghz cards are only 802.11a and others are 802.11a and 802.11n, I guess it can't hurt.
5) Set the  "list 'ht_capab'" options, for example:
list 'ht_capab'  'HT40-'
list 'ht_capab' 'HT40+'
list 'ht_capab' 'SHORT-GI-40'
list 'ht_capab' 'DSSS_CCK-40'
6) Set a wireless channel in the 5ghz range.

It's actually pretty forgiving if you have those bases covered.

I hope this isn't too basic, but I just thought that I would list all the required steps that I had to use to achieve success.

rabinnh

rabinnh wrote:

In the end, to get the card working with 5ghz, this is all I had to do. It's simple, it just wasn't all documented in one place:

1) Build OpenWrt with kmod-ath9k and crda (or install it afterwards)
2) Ensure that the COUNTRY environment variable is set for crda.  Being in the US, I just entered "export COUNTRY=US",
3) make sure that your wireless config contains "option country".  Mine is "option 'country' 'US'".
4) make sure your wireless config contains "option 'hwmode' 'n'".  Some people say to use 'na'.  Since some 5ghz cards are only 802.11a and others are 802.11a and 802.11n, I guess it can't hurt.
5) Set the  "list 'ht_capab'" options, for example:
list 'ht_capab'  'HT40-'
list 'ht_capab' 'HT40+'
list 'ht_capab' 'SHORT-GI-40'
list 'ht_capab' 'DSSS_CCK-40'
6) Set a wireless channel in the 5ghz range.

It's actually pretty forgiving if you have those bases covered.

I hope this isn't too basic, but I just thought that I would list all the required steps that I had to use to achieve success.

rabinnh

Thanks, that should be on the wiki. What real world speed can you get?

Wouldn't be a valid test since the board I am currently using only has a 100Mbs switch.  I am moving to a gig board and I will post then.

rabinnh wrote:

Wouldn't be a valid test since the board I am currently using only has a 100Mbs switch.  I am moving to a gig board and I will post then.

Well, if you get near 100 Mbps that's already pretty good. You could also try wireless to wireless. In a perfect world you should be getting more than 100 Mbps since it doesn't pass trough the switch.

(Last edited by zorxd on 20 Jan 2010, 22:46)

rabinnh wrote:

If I have both HT40+ and HT40-, it seems to use the correct one depending on whether I pick a high frequency or a low one.

Thanks for pointing that out, didn't think of that. I will have to try that as I was trying to come up with something that could auto set channels and wasn't sure if I had to only choose one or the other.

My biggest concern is stability. Has anyone actually used ath9k in a real world Access point setup to serve large amounts of people? I have a test bed setup and so far it appears that after a random amount of time I cannot associate anything with the wireless signal. I saw someone else had a similar problem in the forum and the question when unanswered. Anyone have any thoughts on what might trigger such a case where the router appears to be operating fine and pushing out an SSID and signal, yet a computer just cannot assoicate with the access point running in 2.4ghz N? A simple reboot clears the problem up, but then it just seems to randomly appear again.

@essdz Thanks for pointing out the txpower. I was looking for the same thing

I wish there was a complete section just for talk on openwrt ath9k/mac80211. I think a lot more would get accomplished and information would be far easier to find. You could probably say that about every subject, but N is coming along so good. It would be nice to have easy access in the forum with some many people providing feedback and top notch information.

(Last edited by foxtroop11 on 21 Jan 2010, 17:16)

No guarantees ;-)  I just know that when I had it that way, whether I set the channel to one of the higher ones or lower ones, I could connect with my MacBook Pro with 802.11n
at 5ghz.

BTW, forgot something else which trips people up with 802.11n - you have to use AES, TPIK does not work.  So use psk or psk2.

I think you mean psk-mixed. I figured that out awhile back, lol. Using psk along would not work since it didn't load something, forget what it's called atm. Using psk-mixed or psk2 solved the problem

Think i see what your saing about aes/tkip. I didn't try that, just tried using tkip.

(Last edited by foxtroop11 on 21 Jan 2010, 17:15)

just a note for those of you who think that the speed drops to 2MB/s.. It doesn't necessarily. It could also be a Network Manager bug if you're running Ubuntu. I have been getting speeds in the 50+ MBps range even though it only shows 2MBps... Another person's Vi**a box is showing 67MBps, so we are getting speeds greater than 11g.. Speaking of which, I am also getting solid connectivity in 11ng and dead fish in 11na with ar9132.

Mhh ... I seem to have a problem enabling the "Force Atheros driver to respect user's regdomain" setting. I've checked out the backfire 10.03 tag from svn and build the image for my TP 1043nd. Of course i've enabled the mentioned setting in ATH. After that i exchanged the cfg80211, mac80211 and ath* modules on my router (didn't know how much this settings involve the lower modules so i just wanted to be sure). But after that i get a kernel panic when loading ath9k (sorry - can't post the panic right now).

Has anyone some suggestions what was going wrong here? Do i have to exchange the whole kernel for getting this change to work? (if so - is there a way for just exchange the kernel and not the userspace?)

so far with a bunch of questions big_smile

ciao

Memphis

the backfire-svn-tag is not the same as the "stable" (binary) backfire-release. You get all kinds of updates which will be in the next interim-release 10.3.1
If you want to stick to the binary release, you should check out the same revision (check the ssh-loginscreen for the revision number), but i would recommend installing your compiled images, because there are many ath9k-related fixes since 10.3

Thanks - i'll try it when i'm at home ...

FiReSTaRT wrote:

just a note for those of you who think that the speed drops to 2MB/s.. It doesn't necessarily. It could also be a Network Manager bug if you're running Ubuntu. I have been getting speeds in the 50+ MBps range even though it only shows 2MBps... Another person's Vi**a box is showing 67MBps, so we are getting speeds greater than 11g.. Speaking of which, I am also getting solid connectivity in 11ng and dead fish in 11na with ar9132.

I can confirm this. NetworkManger still has a bug where the wifi does background scans every minute, and really screws up your connectivity. In the release notes for the latest version they claim to have solved this problem (with the "more networks" submenu) but it seems to be fairy tales.

I switched to wicd and never looked back.

Mhh - checking out the revision 20728 which should be the 10.03 release revision of backfire, doesn't fix my problem. If I recompile ATH with the "Force Atheros driver to respect user's regdomain" setting and use this modules (kmod-ath and kmod-ath9k updated) it panics on inserting ath9k. I know it would be better installing my own build completly, but for now i don't have time for getting the routers config back after this and would just get it going with installation of custom modules. My 1043nd has an US - regdom entry and i want my german channels back sad

any suggestions would be very welcome.

What's the panic you get?

I checked out the backfire tree from svn at revision 20728, did "make menuconfig" then specified the "force Atheros driver to respect regdomain" setting, then did "make", and copied the resulting kernel modules over to my WNDR3700. I tried unloading and reloading just ath9k; when I did "insmod ath9k" insmod segfaulted, and logread/dmesg shows a kernel oops (not exactly a panic though).

Anyone have better luck with this?

Yeah you're right ... it wasn't a panic it was an oops. For now i've build the current trunk and reflashed the boxes - there i don't get this problem.

I've read this topic but I'm not sure. Is it possible the get Tp-link 1043nd in 802.11 N 5Ghz mode with OpenWRT?

Erm... That model only supports 2,4 GHz. No 5 GHz.

Even no with a 5ghz usb wifi dongle ? smile

Your question was about the 1043ND, not about hardware you add yourself. If the dongle uses a chip that's supported, you can always install the modules and reconfigure wireless.

The discussion might have continued from here.