Ubiquity is a supplier of WiFi equipment who is gaining popularity by the hour
This page will discuss how to configure CoovaChilli on their PicoStation2 product.
This procedure involves flashing Third Party Software (OpenWrt) into the PicoStation2. This may damage the device and void the warranty.
Some of the PicoStation2 devices seems to have a hardware bug, where it does not boot in a proper state after a power failure or soft reboot.
Please check with your supplier before buying large quantities and later regretting it.
This issue has been reported on the Ubiquity forums. ( http://www.ubnt.com/forum/showthread.php?t=10522 )
This can initially be done two ways. Once the device runs OpenWrt, you can only use the tftp method.
Ubiquity makes use of the RedBoot bootloader. This is a proper boot loader and very powerful.
It was initially developed by RedHat.
Using RedBoot makes it virtually impossible to brick your router.
It can be initialized in a way which will start a tftp server on a specified IP address.
This allows us then to dump firmware on the device using a tftp client.
You can do the initial flash or upgrades and reverting back with this method.
TFTP openwrt-atheros-ubnt2-pico2-squashfs.bin to 192.168.1.20 (default IP of the Ubiquity device)
tftp 192.168.1.20 tftp> binary tftp> rexmt 1 tftp> trace tftp> put openwrt-atheros-ubnt2-pico2-squashfs.bin
Wait for the image to load on the device.
Comment out the bridge option in /etc/config/network.
config interface lan option ifname eth0 # option type bridge option proto static option ipaddr 192.168.1.1 option netmask 255.255.255.0 option gateway 192.168.1.200 option dns 192.168.1.200
Activate the wireless in /etc/config/wireless.
# REMOVE THIS LINE TO ENABLE WIFI: #option disabled 1
Comment out the line which causes the wireless interface to be added to br-lan in /etc/config/wireless
# option network lan
Reboot the unit.
If you go through a proxy server to get to the packages you will have to specify the proxy before opkg will be able to install or list available packages.
Add the following line to opkg.conf:
option http_proxy http://proxy.co.za:3128/
Run the following command to pull a list of the latest packages
opkg update
Install the following packages, using opkg install. The dependencies should install automatically.
opkg install coova-chilli
We need to configure CoovaChilli' to fit in with the YFi Hotspot Manager Server.
In this section we will assume the YFi Hotspot Manager Server has an IP of 192.168.1.11.
Start out by copying /etc/chilli/defaults to /etc/chilli/config
cp /etc/chilli/defaults /etc/chhilli/config
Edit the config file and take care to specify the following important variables:
Variable
Value
Comment
HS_LANIF
ath0
This is the first Virtual Access Point Interface
HS_UAMPORT
3990
Watch out for this one, CoovaAP uses 3660. Must also be the same in /var/www/coova_json/uam.php on YFi server
HS_UAMSECRET
greatsecret
Should be the same as specified in /var/www/coova_json/uam.php and /var/www/coova_json/login.php on YFi server
HS_RADIUS
192.168.1.11
Point to RADIUS server running on YFi Hotspot Manager Server
HS_RADIUS2
192.168.1.11
Point to RADIUS server running on YFi Hotspot Manager Server
HS_RADSECRET
Secret
Shared secret between device and RADIUS server
HS_UAMALLOW
www.mydomain.com
Servers which can be acccesed without authentication first
HS_UAMSERVER
192.168.1.11
The server which will be used for UAM requests
HS_UAMHOMEPAGE
http://\$HS_UAMSERVER/coova_json/splash.php
Splash page before log-in
HS_UAMFORMAT
http://\$HS_UAMSERVER/coova_json/hs_land.php
The log-in page
The CoovaChilli package that is installed miss a start-up script.
You can use the following as a sample.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #!/bin/sh /etc/rc.common # ============================================ # == Coova Chilli Startup Script ============= # == Hardware: Ubiquity PicoStation2 ========= # == Version: 0.1 ============================ # == Date: 2009-10-22 ======================== # == Author: Dirk van der Walt =============== # ============================================ START=80 STOP=85 . /etc/chilli/functions start() { echo start # commands to launch application /sbin/modprobe tun > /dev/null 2>&1 echo 1 > /proc/sys/net/ipv4/ip_forward writeconfig radiusconfig iptables -F POSTROUTING -t nat iptables -I POSTROUTING -t nat -o $HS_WANIF -j MASQUERADE ifconfig $HS_LANIF 0.0.0.0 checkrunning } stop() { echo stop killall chilli # commands to kill application } checkrunning(){ check=`/bin/pidof chilli` if [ -z $check ] then echo "Chilli not running" chilli else echo "Chilli runnig PID: "$check fi } |
Create a file called '/etc/init.d/coova' with the above contents.
Change it so it can start up upon reboot.
chmod 755 /etc/init.d/coova /etc/init.d/coova enable
Disable the dnsmasq service
/etc/init.d/dnsmasq disable