PDA

View Full Version : OpenWRT on the NS2


cobianet
08-04-2008, 11:57 AM
Firstly, it is my understanding that UBNT does not and will not support 3rd party firmware. This question is aimed towards users, not UBNT.

I have successfully installed OpenWRT kamikaze on the NS2, and everything is quite operational. My issue is that the wireless is very flaky when compared to the AIROS software. Very flaky to the point of unusable.

Does anyone have any knowledge of the issue behind this? It seems to me that it's obviously a problem with the atheros radio driver. Will the new Ubiquiti Radio Driver v0.7-beta resolve this issue?

This is a major issue for me, as we need to use wifidog (captive portal) in order to deploy the units. Everything is setup and working under OpenWRT but the signal quality is simply pitiful.

Could it perhaps be the antenna selection, I do not know how to select which antenna in software or if it's even possible outside of AIROS. It's completely possible that the signal is being routed to the external antenna port with no antenna.... the signal is that bad.

A final question would be, is there any possibility of building wifidog for AIROS? It seems this would be the best possible solution to my problem.

Thanks in advance for any help!

physical
08-04-2008, 12:08 PM
the RadioDriver doesn't support the LS/NS/PS radios...

You could try chopping the madwifi driver from the provided AirOS SDK and inserting it into your OpenWRT buildroot. Not exactly sure how successful you'd be tho... the driver provided is compiled against a 2.4 version kernel and the Makefiles are modified in odd ways to make it work well with the SDK (not sure if newer versions are cleaner)

Also, not sure about building wifidog for AirOS, the Firmware is getting pretty fat already, i think there is less than 1mb left for other features... can you check to see how big wifidog is when compiled for mips? The only challenge to installing it would be meeting its dependencies without overflowing the 4mb mark.

I wish i knew a thing or two about OpenWRT... unfortunately I can't tell you if there are quirks with the way the madwifi driver works in it when paired with UBNT products.

travis
08-04-2008, 12:10 PM
What revision of OpenWRT are you using? I have been using OpenWRT on a NS2 for awhile now in sta and it has been quite stable. On my device the internal antennas are controlled by madwifi to use the external antenna I had to set set dev.wifi0.softled to 0 in sysctl and then use gpioctl to set pin 7 low.

cobianet
08-04-2008, 12:21 PM
I am actually using the build from the UBNT PS2 download page, http://ubnt.com/downloads/PS2.ar2316.OpenWRT-kamikaze.v7.09.bin

I simply tftp'd it on to the NS2 in recovery mode to install it.

It seems 7.09 is the latest version.

What are your experiences with the NS2 as an AP, client connecting from various laptops. Does it seem to just not work well at all? I'm getting flaky connections from another NS running AIROS also.

I went back and tested each location with a prism based AP running a stripped down version of Debian... same channel/ssid/everything and didn't seem to have any problems.

Perhaps this isn't an OpenWRT issue, but more a NS2 issue.

I am testing all of this with a Macbook and a bottom end dell laptop. Same results all around.

The oddest thing is that my signal strength when using openwrt or AIROS is -60 or better on the laptop's end, with noise being around -97. What could possibly be causing such rampant signal loss?

cobianet
08-04-2008, 12:36 PM
It looks like:

http://madwifi.org/wiki/UserDocs/AntennaDiversity

Is all I need in order to select which internal antenna.

Per travis:

"If you are using the internal antenna's on a ns2 they currently work
via the madwifi rx(tx)antenna settings but to use the external antenna
you need to install gpioctl and set softled to 0 for wifi0 in sysctl,
then use gpioctl to set pin 7 low."

It seems that it's entirely possible to use the external antenna also.

I would currently like to use the Internal antenna, and it seems that I am. However I am still having the issues described above on AIROS and on OpenWRT.

cobianet
08-04-2008, 12:55 PM
For what it's worth, I just switched to 802.11b (previously was using b/g) and everything works great.

Any explanation?

travis
08-04-2008, 01:00 PM
Can you install gpioctl on your ns2 and tell me what this returns.
gpioctl get 7

It is also possible that softled being on is causing the device to switch back and forth between the internal and external antennas. Please run the following:

wifi down
#disable softled
sysctl -w dev.wifi0.softled=0
#lets let madwifi select the best antenna for now
sysctl -w dev.wifi0.diversity=1
sysctl -w dev.wifi0.txantenna=0
sysctl -w dev.wifi0.rxantenna=0
wifi

cobianet
08-04-2008, 02:25 PM
I cannot find an ipkg with gpioctl, and there are no gpio entries in /dev...

Upon setting:

sysctl -w dev.wifi0.diversity=1
sysctl -w dev.wifi0.txantenna=0
sysctl -w dev.wifi0.rxantenna=0

It immediately resets dev.wifi0.rxantenna to 2.

Another odd issue I'm having on WRT is with trying to set 11b mode only.

"option agmode 11b"

doesn't work in /etc/config/wireless

When I try to set it with iwpriv, I get:

iwpriv ath0 mode 11b
Interface doesn't accept private ioctl...
mode (8BE2): Invalid argument

It's possible to set 11b mode on AIROS, any idea what the issue with setting it in OpenWRT is?

travis
08-04-2008, 02:28 PM
please try a trunk snapshot http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/, the madwifi in trunk is quite a bit better than 7.09

cobianet
08-04-2008, 02:31 PM
This is from 3.1.1 on another NS2:

XS2.ar2316.v3.1.1.3498.080725.1324# iwpriv ath0 get_mode
ath0 get_mode:11b

I wonder why I cannot set that on OpenWRT?

travis
08-04-2008, 02:37 PM
I have no issues setting the device into B mode using a recent OpenWRT trunk image.


root@OpenWrt:~# iwpriv ath0 get_mode
ath0 get_mode:11b

cobianet
08-04-2008, 03:21 PM
# OpenWrt Kamikaze bleeding edge, r12076 from:

http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/openwrt-atheros-ubnt2-squashfs.bin

This is working great, it's everything I could ask for. Signal issues have been resolved completely.

In 802.11g mode the signal is still quite pitiful, however 802.11b only is working better then I could hope for.

Now if I could just find working images that do not include x-wrt...

It's also important to note that I had to manually set many variables for the radio to work well:

config 'wifi-device' 'wifi0'
option 'type' 'atheros'
option 'channel' '11'
option 'agmode' '11b'
option 'diversity' '1'
option 'disabled' '0'
option 'txantenna' '0'
option 'rxantenna' '0'

config 'wifi-iface'
option 'device' 'wifi0'
option 'network' 'lan'
option 'mode' 'ap'
option 'ssid' 'openwrt'
option 'encryption' 'none'
option 'hidden' '0'
option 'isolate' '0'
option 'txpower' '16'
option 'bgscan' '0'
option 'wds' '0'
option 'macpolicy' 'none'

Most importantly agmode, diversity, txantenna, rxantenna, and txpower. by default txpower was set to 0!!

travis
08-04-2008, 03:40 PM
You do not need to use the webif from those images. Progress is being made to clean up issues like those you listed before the next release. If you want a image without the webif you will need to compile your own.

I am glad to see that it is working for you. :D

cobianet
08-04-2008, 04:19 PM
I want to really thank you for all your help.

Do you have any idea when wifidog will be working in the trunk?

Package: wifidog
Version: 1.1.5-1
Depends: iptables-mod-extra, iptables-mod-ipopt, iptables-mod-nat, libpthread
Provides:
Source: packages/net/wifidog

Some of the deps aren't currently in the Packages tree.

travis
08-04-2008, 04:23 PM
It should work right now, all the needed dependencies are available in trunk.

cobianet
08-04-2008, 07:22 PM
Surely I'm doing something wrong:


root@cobianet_base:~# ipkg update
Downloading http://downloads.openwrt.org/snapshots/atheros/packages/Packages
wget: server returned error: HTTP/1.0 404 Not Found
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages/Packages
Updated list of available packages in /var/ipkg-lists/X-Wrt
An error ocurred, return value: 1.
Collected errors:
ipkg_download: ERROR: Command failed with return value 1: `wget --passive-ftp -q -P /tmp/ipkg-c7ffIH http://downloads.openwrt.org/snapshots/atheros/packages/Packages'
root@cobianet_base:~# ipkg install wifidog
Installing wifidog (1.1.5-1) to root...
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages/./wifidog_1.1.5-1_mips.ipk
Nothing to be done
Done.
Collected errors:
Package wifidog md5sum mismatch. Either the ipkg or the package index are corrupt. Try 'ipkg update'.
root@cobianet_base:~#


This is a fresh install. There is no http://downloads.openwrt.org/snapshots/atheros/packages/Packages, returns a 404.

cobianet
08-04-2008, 07:57 PM
If I remove the standard openwrt repo, leaving only the x-wrt source I get this:


root@cobianet_base:~# ipkg update
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages/Packages
Updated list of available packages in /var/ipkg-lists/X-Wrt
Done.
root@cobianet_base:~# ipkg install wifidog
Installing wifidog (1.1.5-1) to root...
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/packages/./wifidog_1.1.5-1_mips.ipk
Nothing to be done
An error ocurred, return value: 1.
Collected errors:
ERROR: Cannot satisfy the following dependencies for wifidog:
kmod-ipt-extra kmod-ipt-ipopt kmod-ipt-nat
root@cobianet_base:~#

dimach3
08-05-2008, 12:13 AM
I'm using NS2 with Kamikaze from the trunk. It works fine for me too.

I believe you need to set txantenna and rxantenna to 2 if you want to use internal antenna. 0 means auto ...

travis
08-05-2008, 09:16 AM
I believe you need to set txantenna and rxantenna to 2 if you want to use internal antenna. 0 means auto ...

0 will auto between the 2 internal antennas which is the same as Adaptive in AirOS

prakharv
05-06-2009, 03:37 AM
Hi All,

I am not able to find "http://downloads.x-wrt.org/xwrt/kamikaze/snapshots/atheros-2.6/openwrt-atheros-ubnt2-squashfs.bin " at following link.

Does anybody has above mentioned bin file pls share.

Regards,
Prakhar

Shockware1
05-06-2009, 09:32 AM
If you suspect it is using the wrong polarity antenna in G mode, you could test this by simply twisting the radio 90 degrees. If this is true, you should get a 15 to 20 dB increase in signal right away.

You could also test the possibility that the RF is shooting out the external connector port by rigging up a piece of metal like a paperclip to touch the pin on the connector. If you do this you should see an increase in signal if this external connector is used.

Also, Wireless B maintains the same power output for all xmit rates. G likes to raise and lower that based on rates. Dunno why, but that's the way it is. :(

Perhaps the software is lowering the xmit power levels too low and not raising them? Perhaps in B mode it never has to worry about power level output and thus never makes that mistake?

Once you have this figured out for sure you can then spend time on fixing exactly what is wrong with the software I suppose.

CzechEnglishFrenchGermanItalianPolishPortugueseRussianSpanish
Translations delivered by vBET Translator 3.5.4