Radio Driver
From Ubiquiti Wiki
Here is some general help for getting Ubiquity's Radio Driver running on your system
Contents |
What is the Ubiquity Radio Driver or "HAL"?
The Ubiquity HAL is an extension of the MadWifi HAL that allows additional functionality for the Ubiquity radio cards. By compiling or installing the Ubiquity HAL, you will be able to:
- Use 5/10Mhz channel width
- have support for the SR9/XR9 radio modules(900Mhz)
- (5/10Mhz width for 907,912,917,922Mhz and 20Mhz width for 912,917Mhz)
- Have proper Tx power reporting for Ubiquiti cards
- support other Frequency Freedom Ubiquiti cards (XR7,XR2.3,XR3,XR4)
First, a few notes.
- The Radio Driver does not seem to compile on Ubuntu 8.04 OR 8.10 as of version 4.17.2008. If someone doesn't make a deb first, I may do so if I find time ;)
- The madwifi project has some excellent docs, look around over there, they may be able to answer you questions.
Basic Instructions
These instructions are for just about any generic Linux installation. Make sure you have the standard build tools installed. On Ubuntu, you need to install the build-essential package.
Build
Download the latest driver from here. http://ubnt.com/support/radiodriver.php
Example:
wget http://ubnt.com/downloads/radiodriver/ubnt-hal-0.7.379.tar.gz
Then untar it.
tar xvf ubnt-hal-0.7.379.tar.gz
cd into the directory
cd ubnt-hal-0.7.379
And finally start the build process
make
Install
If all went well, your kernel modules are now in the "src/madwifi-dfs-r3319-20080201" directory. You will need to find where your kernel modules are stored. This will tell you what kernel you are running.
uname -r
Now take the output from uname, append "/ath_hal/ath_hal.mod.o" and find the module location with locate.
locate 2.6.27-11-generic/ath_hal/ath_hal.mod.o
Now back up your old HAL, This is just an example, use the output from the above command!
mv /lib/linux-restricted-modules/2.6.27-11-generic/ath_hal/ath_hal.mod.o /lib/linux-restricted-modules/2.6.27-11-generic/ath_hal/ath_hal.mod.o.back
Now copy the new HAL in place, again using the output from locate
cp src/madwifi-dfs-r3319-20080201/ath_hal.mod.o /lib/linux-restricted-modules/2.6.27-11-generic/ath_hal/ath_hal.mod.o
the insert it into the kernel!
rmmod ath_hal modprobe ath_hal
Troubleshooting
If modprobe says something about the module not matching the kernel, you probably either have a different kernel source or header version installed than your running kernel, and a completely different compiler version than the kernel was compiled with.
Configuration and Use
Now for the fun part!
Changing Channel Widths
To change channel width to 10Mhz:
ifconfig ath0 down echo 0x156d0001 > /proc/sys/dev/wifi0/cwidth ifconfig ath0 up
To change channel width to 5Mhz:
ifconfig ath0 down echo 0x156d0002 > /proc/sys/dev/wifi0/cwidth ifconfig ath0 up
To change back to 'normal' width:
ifconfig ath0 down echo 0x156d0000 > /proc/sys/dev/wifi0/cwidth ifconfig ath0 up
Dynamic ACK Timout
To enable Dynamic ACK
echo 20 > /proc/sys/dev/wifi0/dynack_count
This makes it evaluate the last 20 packets for ACK adjustment. For more details, see the readme in the HAL source
To disable dynamic ACK
echo 0 > /proc/sys/dev/wifi0/dynack_count
Again, for more options see the readme!
GUI
I (Lawrence Shafer) have started a Python/PyQT GUI for configuring the various options the Ubiquity Radio Driver adds. I will be releasing it in time as source on the UBNT Forums. If you want it before then, Contact me at lawrence at orbwireless dot net