[Main Page]

CoovaEWT on OpenWrt

A development snapshot of the new CoovaAP user interface can be installed on OpenWrt kamikaze. For now, only mips binaries are provided. Below you will find simple instructions. You can always remove the packages, and if you choose to use CoovaFX, the installation is very minimal.

Image:CoovaEWTOpenWrt.png

Getting started with kamikaze

Download and flash your router with OpenWrt kamikaze (you should know how to do that part). When it first boot, it does not have wireless enabled. Enable it, setup a wireless access point (with encryption perhaps), and setup the WAN. Here is a recipe you can cut-and-paste to do this:

cat > /etc/config/network <<EOF
config interface 'loopback'
       option ifname 'lo'
       option proto 'static'
       option ipaddr '127.0.0.1'
       option netmask '255.0.0.0'

config interface 'lan'
       option type 'bridge'
       option proto 'static'
       option ipaddr '192.168.1.1'
       option netmask '255.255.255.0'

config interface 'wan'
       option ifname 'eth0'
       option proto 'dhcp'
EOF
cat > /etc/config/system <<EOF
config system
       option hostname CoovaAP
EOF
cat > /etc/config/wireless <<EOF
config wifi-device  wifi0
       option type     atheros
       option channel  auto

config wifi-iface ath0
       option device   wifi0
       option network  lan
       option mode     ap
       option ssid     MyHouse
       option encryption psk2
       option key my-secret-key
EOF

Set your root password and make sure you can access the router remotely and reboot.

# passwd
Changing password for root
New password:
Retype password:
Password for root changed by root

# echo "iptables -I input_wan -p tcp --dport 22 -j ACCEPT" > /etc/firewall.user

# reboot

SSH back into your router and continue the setup!

Installing packages

Commands given below should be cut-and-pasted into a Terminal window that is logged into your router as root via SSH.

Prepare your kamikaze system with some additional required OpenWrt packages:

ipkg update
ipkg install zlib kmod-tun libopenssl libexpat hostapd

mips binary packages

If you have a mips (Atheros) router, the following sets up a shell variable with the basic packages you need from our repository:

PKGS="\
capd_0.1-1_mips.ipk  \
capd-openwrt_1.0-1_mips.ipk  \
coova-chilli_1.0.13-svn-1_mips.ipk \
"

To run things under SSL, add the following packages to the list:

PKGS="$PKGS  \
ssslutil_0.1-1_mips.ipk  \
libwrap_7.6-1_mips.ipk  \
stunnel_4.20-1_mips.ipk  \
"

Download and install the packages: (note: you may have to delete your ipkg lists as shown. to replace, just rerun ipkg update)

cd /tmp/
for pkg in $PKGS; do
  wget http://ap.coova.org/kamikaze/mips/$pkg
done

rm /usr/lib/ipkg/lists/*
ipkg install $PKGS

mipsel binary packages

Here are the same commands, but for a mipsel (broadcom) router:

PKGS="\
capd_0.1-1_mipsel.ipk  \
capd-openwrt_1.0-1_mipsel.ipk  \
coova-chilli_1.0.13-svn-1_mipsel.ipk \
"

PKGS="$PKGS  \
ssslutil_0.1-1_mipsel.ipk  \
libwrap_7.6-1_mipsel.ipk  \
stunnel_4.20-1_mipsel.ipk  \
"

cd /tmp/
for pkg in $PKGS; do
  wget http://ap.coova.org/kamikaze/mipsel/$pkg
done
 
rm /usr/lib/ipkg/lists/*
ipkg install $PKGS

Once the above is complete, you have all the software you need to run the web services. You will additionally need openvpn and other packages that the interface requires. As of yet, it does not install software automatically, or even manually, through the interface.

Complete the installation by initializing the CoovaEWT configuration file.

sh /etc/coova/scripts/uci-config.sh init

Web services and authentication

With OpenWrt, the httpd service should already be up and running. To set a password for the web services, you can easily do this in the CoovaEWT user interface - under System / Admin Access.

If running SSL, then enable the service and make it accessible from the WAN (optional):

/etc/init.d/stunnel enable
/etc/init.d/stunnel start

echo "iptables -I input_wan -p tcp --dport 443 -j ACCEPT" >> /etc/firewall.user

Selecting a user interface

CoovaFX

The best user interface to use comes with the CoovaFX Firefox add-on, which you can also use to authenticate at your Hotspot. Use the CoovaEWT application to login to your router - setting the username, password, and SSL settings appropriately.

Image:CoovaFXEWTLogin.png

Embedded on router

If you have space to kill on your router, you can also put the web application on-board. While GWT makes very compact code, it gets large with repetitive code to achieve cross-browser support. The package is about a megabyte in size.

ipkg install http://ap.coova.org/kamikaze/mips/cap-ui_1.0-1_mips.ipk

or (though really not platform specific)

ipkg install http://ap.coova.org/kamikaze/mipsel/cap-ui_1.0-1_mipsel.ipk

Once installed, access your router using:

(or it may be https, depending on your SSL preference).

Making changes

Everything needed to drive the user interface is found under the /etc/coova/ directory. The user interface is primarily driven by the XML files in the directory. The subdirectory scripts/. contains the shell scripts to collect and process data and do to interactive (wizard) screens.

License

The CoovaEWT web application and capd binary packages are licensed as freeware (for now at least). Integration scripts are licensed under the Gnu Public License.

Search >>

This page has been accessed 850 times. This page was last modified 19:37, 8 August 2008.