You are not logged in.

#1 2012-03-08 06:11:44

kahlil88
Member
From: Mendocino, CA
Registered: 2010-08-10
Posts: 143
Website

Atheros WLAN card using wrong country code

I just got a D-Link DWA-556 (Atheros AR5418/AR5008E) wireless card and having problems connecting to my router. NetworkManager fails instantly when attempting to connect, dmesg shows some errors related to country codes:

ath9k 0000:07:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
ath9k 0000:07:00.0: setting latency timer to 64
ath: EEPROM regdomain: 0x10
ath: EEPROM indicates we should expect a direct regpair map
ath: Country alpha2 being used: CO
ath: Regpair used: 0x10
ieee80211 phy0: Selected rate control algorithm 'ath9k_rate_control'
Registered led device: ath9k-phy0

There is no system but GNU and Linux is one of its kernels.

Offline

#2 2012-03-08 07:03:17

joako
Member
From: Buenos Aires, Argentina
Registered: 2012-03-08
Posts: 2

Re: Atheros WLAN card using wrong country code

different countries use different frequencies range from 2GHZ to 5GHZ
I suppose the atheros modules is guessing the wrong frequency unless you are living in colombia

from http://www.fehu.org/atheros-en.html

To get support for country specific frequencies, it is necessary to assign the parameter "countrycode" while loading the module.
    For example: Germany, 5 GHz subband 1+2

 $ modprobe ath_pci countrycode=276  

   

   

for united states is 840 you should try

   modprobe ath_pci countrycode=840  

    (or whatever atheros module uses your card)

Last edited by joako (2012-03-08 08:46:27)

Offline

#3 2012-03-09 03:28:20

kahlil88
Member
From: Mendocino, CA
Registered: 2010-08-10
Posts: 143
Website

Re: Atheros WLAN card using wrong country code

It uses ath9k, however modprobe with the countrycode option gives errors:

ERROR: could not insert 'ath9k': No such file or directory

This is after unloading all the ath* modules. With modules already loaded it just gives no output and I'm still unable to connect.


There is no system but GNU and Linux is one of its kernels.

Offline

#4 2012-03-14 03:33:13

kahlil88
Member
From: Mendocino, CA
Registered: 2010-08-10
Posts: 143
Website

Re: Atheros WLAN card using wrong country code

Is there some way to flash the EEPROM and change the country code?


There is no system but GNU and Linux is one of its kernels.

Offline

#5 2012-03-14 17:54:23

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Atheros WLAN card using wrong country code

The ath9k driver has an option to override the country code programmed into the EEPROM. You could recompile the driver.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#6 2012-03-14 17:59:02

kahlil88
Member
From: Mendocino, CA
Registered: 2010-08-10
Posts: 143
Website

Re: Atheros WLAN card using wrong country code

.:B:. wrote:

The ath9k driver has an option to override the country code programmed into the EEPROM. You could recompile the driver.

Would I have to do this every time there's a kernel update, or is there a special mkinitcpio option or something to automate the process? I haven't compiled a kernel since my experimental Gentoo days years ago tongue


There is no system but GNU and Linux is one of its kernels.

Offline

#7 2012-03-14 18:11:19

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Atheros WLAN card using wrong country code

Can you not just use /etc/rc.d/wireless-regdom? Works here with my broadcom.

Offline

#8 2012-03-14 18:55:40

kahlil88
Member
From: Mendocino, CA
Registered: 2010-08-10
Posts: 143
Website

Re: Atheros WLAN card using wrong country code

tomk wrote:

Can you not just use /etc/rc.d/wireless-regdom? Works here with my broadcom.

I added it to my rc.conf daemons but it doesn't work. I also tried iw reg set US which only gives me errors.


There is no system but GNU and Linux is one of its kernels.

Offline

#9 2012-03-14 20:33:00

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Atheros WLAN card using wrong country code

As I said, you cannot override the EEPROM settings, at least not with ath9k. My router has AR9xxx hardware and it didn't work there with OpenWrt, there are instructions on their forums on what option you need.

You can just compile the single module (or maybe using compat-wireless works as well).


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#10 2012-03-14 23:01:25

kahlil88
Member
From: Mendocino, CA
Registered: 2010-08-10
Posts: 143
Website

Re: Atheros WLAN card using wrong country code

.:B:. wrote:

You can just compile the single module (or maybe using compat-wireless works as well).

How do I do that?


There is no system but GNU and Linux is one of its kernels.

Offline

#11 2012-03-14 23:08:36

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Atheros WLAN card using wrong country code

http://www.cyberciti.biz/tips/compiling … odule.html

CONFIG_ATH_USER_REGD is the configuration setting you're looking for btw:

https://forum.openwrt.org/viewtopic.php … 08#p114808

A quick grep of the Arch kernel config shows it's not there though, so I don't know where you should go from there.

By the way, I had some vague recollection of having posted about this before...

Last edited by .:B:. (2012-03-14 23:17:28)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

Board footer

Powered by FluxBB