Sunday, January 17, 2010

Change country CRDA of ALFA-­AWUS036H version 500mW/1.000mW with RTL8187/Stacks-­mac­80211

NOTE:
- Editing and creating files described, must be done carefully.
- Check the difference in formatting characters (quotes '' “­­) when you copy&paste.
- Tested on Ubuntu Jaunty with Kernel 2.6.28-17-generic (not tested on Ubuntu Karmic or Kernel above 2.6.28)
­- The frequency of 5.0 GHz is not supported by chipset used by this model of ALFA card.

With mac­80211 drivers the limit of EIRP is set automatically by CRDA, for set/increase the full TX power You can choose only one of these two different options to change your default Country.

- FIRST OPTION ­-
Shortcuts for set automatically CRDA and enables to 2.4 GHz and 5.0 GHz of 30 dBm with one command line
­- If you use more than one wireless card is convenient to change automatically the CRDA when you need and only for your ALFA card.
­- To simplify and not permanently change the default data, I suggest using this method:

Create new file:

Code:
sudo gedit /usr/local/bin/crda_change
Copy&paste this text:

Code:
#!/bin/sh
sudo modprobe rtl8187
sleep 2
sudo iw reg set BO
Make file executable:

Code:
sudo chmod +x /usr/local/bin/crda_change
Create new alias:

Code:
printf "alias boost=\'sudo /usr/local/bin/crda_change'\n" | tee ­a ~/.bashrc
- Now if you want load the driver RTL8187 in your modules and change automatically the CRDA use only new one "boost" command:

Code:
boost
- SECOND OPTION ­-
Option to automate the modification of the CRDA, and put in "UP" mode your ALFA­-AWUS036H when you plugged in to USB port.

Create the file "crda_change" as described in previous step called ­­--> FIRST OPTION ­
Create this file: (or edit if it already exists)

Code:
sudo gedit /etc/udev/rules.d/80­programs.rules
Copy&paste this text:

Code:
SUBSYSTEMS=="usb", SYSFS{idVendor}=="0bda", SYSFS{idProduct}=="8187", RUN+="/usr/local/bin/crda_change"­
- Now, when you connected your wifi card into USB port, the scrip will perform all operations.

No comments: