Boosting Transmit power for AWUS036NH WIFI card in Ubuntu

.
The script below will boost the TX power for a AWUS036nh to 1000MW. I discovered this when I upgraded Ubuntu once and my card stopped working. Luckily the rt2800usb driver is functioning with the new linux 3 kernel. We just have to let it know that it is supposed to drive the card. Ubuntu defaults TX power to 100MW, which in a modern urban environment can be problematic. Boosting the TX power can help solve signal interference issues arising from crowded areas. It may be against regulations in some jurisdictions, so be sure to double check in your area before running this script.

#!/bin/bash
#A little script to get the AWUS036NH working in ubuntu
#It also boosts the tx power to 1W
if [ "$#" -eq 0 ]
then
  echo -e "Not Enough Arguements!\\nUsage:\\nboost.sh start  -- starts the card"
  echo "boost.sh wlan5  -- this boosts the tx power to 1MW"
  exit
fi

sudo modprobe rt2800usb
sleep 2

if [ "$1" = "start" ]
then
  echo '148f 3070' | sudo tee /sys/bus/usb/drivers/rt2800usb/new_id
  ifconfig
else
  sudo ifconfig $1 up
  sudo iw reg set BO
  sudo iwconfig $1 txpower 30
  iwconfig
fi

How to use the script

  1. Save it as boost.sh (and don't forget to make it executable)
  2. start your card by typing ./boost.sh start
  3. (optional) boost your power by typing ./boost.sh wlanX where X is the number assigned to your card


UPDATE:
I've been getting some feedback to make this easier, so I added the script to a .zip file (to preserve the excecutable attribute). If you would like to use it here are some step by step directions:
  1. Save this zip file. I reccommend saving it to your home directory.
  2. Open a terminal
  3. If you didn't save boost.zip to your home directory, change directories to where you saved the zip file
  4. Unzip the script by typing: unzip boost.zip
  5. Run the script in start mode by typing: ./boost.sh start
  6. You should now see an ifconfig listing with your now functioning wireless card showing up
  7. If you want to boost power, use the wireless adapter now listed. Most likely you would type: ./boost.sh wlan0
.

Get in touch

Have any question? Drop us a message. We will get back to you in 24 hours.