You are not logged in.

#1 2012-10-04 22:27:35

Thme
Member
From: Raleigh NC
Registered: 2012-01-22
Posts: 105

[Solved] Unable to set CRDA regulatory domain?

After doing some research on wireless cards supported on linux I decided to stick with Atheros based chipsets and wanted to get a high gain, high output card for testing injection and long range connectivity.
I found the Alfa AWUS036NHA card for an excellent deal with a 7dBi panel antenna and 5dBi omnidirectional. The card runs a well supported ar9271 atheros chipset. Had none of the issues reported on getting it up and running as I had read from some reviews.
   Now the Issue I DO have is being able to set my new card above the restricted txpower imposed on it by the settings in an eeprom applying limitations according to a country other than my own. In short I found in several blogs and on the Backtrack forums that in order to override this limitation I had to set my proper domain to the country I reside in (US) so that restrictions applying to that country will be properly set for the card. Here I can legally run it at it's full potential at 27dBm with my current antennae. contrary to some reports and ads this card's specifications are 630mW for output on certain bands. Not 1000mW as some believe or advertise. I installed CRDA and wireless-regdb from the core repos and was prompted that I could uncomment the right country in /etc/conf.d/wireless-regdom which I did then rebooted. CRDA reports from the command line that the country has not been set. Here's all the relevant info on how I've attempted to set this and my AWUS036NHA card above 20dBm (100mW).

taken from /etc/conf.d/wireless-regdom
#
# Wireless regulatory domain configuration
#
WIRELESS_REGDOM="US"
(the commented domains were left out)

======================================================================
The output here is as decribed in the link following
# iwconfig wlan1
wlan1     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
# iwconfig wlan1 txpower 27dBm
Error for wireless request "Set Tx Power" (8B26) :
    SET failed on device wlan1 ; Invalid argument.
# crda 
COUNTRY environment variable not set.

I have the ABS trees for wireless-regdb and CRDA if there's anything in need of being modified for it to set my regulatory domain properly. According the what I've read I should've only needed to uncomment it in /etc/conf.d/wireless-regdom which I had. I tested This on the stock , LTS and linux-ck kernels so It's not related to my kernel from my understanding. Is there anyone with an understanding of how to set the regulatory domain properly? Am I missing any steps or is there a difference with using systemd in order to get CRDA to start working and setting my regulatory domain right? 
my only lead on this solution for maxing out my ar9271 card was found mainly on a few backtrack forums and here especially:
http://blog.binaryfactory.ca/2012/09/se … rd-can-go/
Also if there's an alternative way to override the cards eeprom restrictions I'm all ears...

Last edited by Thme (2012-10-15 09:38:50)


"Hidden are the ways for those who pass by, for light is perished and darkness comes into being." Nephthys:
Ancient Egyptian Coffin Texts

Offline

#2 2012-10-14 01:33:26

Thme
Member
From: Raleigh NC
Registered: 2012-01-22
Posts: 105

Re: [Solved] Unable to set CRDA regulatory domain?

Ok from what I've gathered this is what crda is doing. Browsing the output of journalctl if found this.
According to the output it is setting the country right yet not the world regulatory domain... which confuses me even more as the output of crda still shows no country environment variable set... I believe that has to do with the world variable not being set and therefore still being restriced according to that and not the "US" regulatory domain. The following were the lines related to crda that I found in the journal.

kernel: cfg80211: World regulatory domain updated:    # Notice that nothing follows the ":" here...
kernel: cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
kernel: cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel: cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
kernel: cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
kernel: cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel: cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel: cfg80211: Calling CRDA for country: US
kernel: cfg80211: Regulatory domain changed to country: US   # And here "US" is definitely pulled and set from my config as posted previously out of /etc/conf.d/wireless-regdom....
kernel: cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
kernel: cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
kernel: cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
kernel: cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel: cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel: cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
kernel: cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)

I guess my next question would be if there's a different line to add in /etc/conf.d/wireless-regdom in order to set the world domain correctly. I tried uncommenting two lines and also setting two lines with US as the domain yet nothing occurs on boot. The journal output is still the same...

Last edited by Thme (2012-10-14 01:36:34)


"Hidden are the ways for those who pass by, for light is perished and darkness comes into being." Nephthys:
Ancient Egyptian Coffin Texts

Offline

#3 2012-10-14 03:51:29

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [Solved] Unable to set CRDA regulatory domain?

The world regulatory domain should represent the eeprom, i.e. a safe default. Your CRDA then seems to be applied, overwriting the defaults with your countries' mBm, as I see it. No idea why crda reports different/nothing in the first post. Check what

iw reg get

brings up. Also there is a para in man crda about an udev rule.

Offline

#4 2012-10-14 06:06:00

Thme
Member
From: Raleigh NC
Registered: 2012-01-22
Posts: 105

Re: [Solved] Unable to set CRDA regulatory domain?

Ok It's definitely registering "US"  from the output of "iw

 
country US:
	(2402 - 2472 @ 40), (3, 27)
	(5170 - 5250 @ 40), (3, 17)
	(5250 - 5330 @ 40), (3, 20), DFS
	(5490 - 5600 @ 40), (3, 20), DFS
	(5650 - 5710 @ 40), (3, 20), DFS
	(5735 - 5835 @ 40), (3, 30)

it still isn't allowing me to change the txpower of either my internal or external Alfa card above their lower defaults. both are more than capable of going above 100mW (internal ar9285 can't go above 14dbm and the Alfa is stuck at 20dbm). even stranger is I've seen my internal report back as being scaled to 500mW after a clean boot yet I've not been able to reproduce this every boot. the next time I see it I'll post the output because when it did set to 500mW I could scale it back down but not back up...


"Hidden are the ways for those who pass by, for light is perished and darkness comes into being." Nephthys:
Ancient Egyptian Coffin Texts

Offline

#5 2012-10-14 13:14:38

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [Solved] Unable to set CRDA regulatory domain?

Ok, so CRDA appears to work and as you will have noted from the array, >20dbm is only allowed on the highest and lowest channel - which is (certainly) what your FCC has set.
Don't get me wrong but actually in my opinion you might address a better audience for your quite specific question on a amateur radio forum rather than here.

Thme wrote:

..wanted to get a high gain, high output card for testing injection and long range connectivity...

You surely know yourself that fiddling with the wlan power parameter one-sidedly does nothing for a more stable wifi connection, which is what users here are usually after, but more creates link quality problems. For long range output one better does what you did: get a better antenna or a repeater. And injection .. well, that's more the focus of Backtrack et al anyway .. but for that you could lower the power actually and sit next to the router in order so not to disturb surrounding equipment. Just suggesting.

Offline

#6 2012-10-15 09:38:09

Thme
Member
From: Raleigh NC
Registered: 2012-01-22
Posts: 105

Re: [Solved] Unable to set CRDA regulatory domain?

Ok so I'll mark this as solved since CRDA is actually setting the regulatory domain correctly yet it may not have been the goal implied by my reason for posting it is answered. And as for my packet injection comment it was more off-hand and not related to my main goal which was raising txpower with the external card for stable long range connections. rx sensitivity isn't an issue with the 7dbi panel as the card definitely gives great signals even 2-3 out of 4 bars for APs over a mile away yet the antenna doesn't really compensate for the card running way below it's tx specifications for sending over that distance. It does better overall but not what it is capable of 'legally'. Also based on what I've read on how It's regulated with the FCC I'm well within legal restrictions if I ran the External Alfa card at 630mW with the 7dBi panel antenna attached. The restrictions apply differently to directional antennas. In general You can have higher gain/output when transmitting in a P2P manner. The requlations for EIRP allow for high txpower and higher gain when using the type of antenna I have. Anyhow I appreciate the response.


"Hidden are the ways for those who pass by, for light is perished and darkness comes into being." Nephthys:
Ancient Egyptian Coffin Texts

Offline

#7 2012-10-15 18:07:26

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [Solved] Unable to set CRDA regulatory domain?

You're welcome. I likewise appreciate your informed response. A mile sounds amazing. Wish you good fun with the card.

Offline

Board footer

Powered by FluxBB