Installation

A guide to getting Jasager up and running.

Firmware Users

Jasager is now available as a complete firmware, just flash and go. The firmware includes all dependencies and opkg recognises that the Jasager package is installed.

There are plenty of docs on how to install openwrt firmware on devices but here are the steps I follow to install, these are based on a linux laptop with a running tftp server.

If you are flashing a standard Fon (2100) you will need your machine to be on 192.168.1.1 and the Fon will be listening on 192.168.1.254, if you are on either a Fon+ or a Fon2 you will want your machine on 192.168.1.254 and the Fon will be on 192.168.1.1. These instructions assume a Fon+ as that is what I have to hand.

Grab redboot.pl and the firmware from the download page and unpack the firmware tarball into your tftp files directory.

Run up redboot ./redboot.pl 192.168.1.1 and then power on the Fon. You will get a couple of unreachable messages then hopefully an alive message you will drop into redboot. If not, if you have a UK Fon then you may be out of luck, they come shipped listening on 0.0.0.0 so you can't access them without a cable.

If you need to set the IP address of the Fon and/or the tftp server you can do that from within redboot like this:

RedBoot> ip_address -l 192.168.1.1/24 -h 192.168.1.254

This forces the Fon to be on 192.168.1.1 and use 192.168.1.254 as the tftp server. These settings are for this session only, to store these settings permanently set them in the fconfig settings below.

You now need to execute the following commands:

RedBoot> fis init
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-vmlinux.lzma
Using default protocol (TFTP)
Raw file loaded 0x80040400-0x801003ff, assumed entry at 0x80040400
RedBoot> fis create -e 0x80041000 -r 0x80041000 vmlinux.bin.l7

< Wait for a while >

... Erase from 0xa8030000-0xa80f0000: ............
... Program from 0x80040400-0x80100400 at 0xa8030000: ............
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-root.squashfs
Using default protocol (TFTP)
Raw file loaded 0x80040400-0x801e03ff, assumed entry at 0x80040400
RedBoot> fis create -l 0x6F0000 rootfs

< Wait for a long while >

... Erase from 0xa80f0000-0xa87e0000: ...........
... Program from 0x80040400-0x801e0400 at 0xa80f0000: ..........................
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .

RedBoot> fconfig
Run script at boot: true
Boot script: 
Enter script, terminate with empty line
>> fis load -l vmlinux.bin.l7
>> exec
>> 
Boot script timeout (1000ms resolution): 2
Use BOOTP for network configuration: false
Gateway IP address: 
Local IP address: 192.168.1.1
Local IP address mask: 255.255.255.0
Default server IP address: 192.168.1.254
Console baud rate: 9600
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Update RedBoot non-volatile configuration - continue (y/n)? y
... Erase from 0xa87e0000-0xa87f0000: .
... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> reset

^]
telnet> Connection closed.
root@desktop ~ # 

After this the Fon should reboot and if you hit 192.168.1.1:1471 in your browser you will get the Jasager interface.

For Package Users

This install assumes you already have OpenWrt installed and working on the Fon.

As with the original version of Karma the package comes in two parts, the patched madwifi drivers and the interface. This is shipped as either two OpenWrt packages or as tarballs.

Dependencies

ruby, ruby-core and ruby-rexml - most of Jasager is written in Ruby and the module system makes use of XML.

webif - the webif package installs a really nice way to configure your Fon through a web interface and also sets up the web server.

kmod_gpio - this package allows Jasager to turn the wlan led on and off. You can download the kmod_gpio package from the download page. Due to a typo in the package install script after installation you need to run the following command:

echo proc_gpio > /etc/modules.d/80-gpio

Tarball Installation

Grab the tarballs from the download page and untar from the root directory.

This isn't the best option as any updates to madwifi will overwrite the patched drivers, however if you have problems installing packages (my older Fon refuses new packages) then this will at least get you going.

You also need to manually create the symlink which gets Jasager to automatically start on boot. To do this run:

ln -s /etc/init.d/jasager /etc/rc.d/S91jasager

Package Installation

Grab the packages from the download page and install as with any other package:

ipkg install jasager-madwifi_1.ipk
ipkg install jasager_2.1.ipk

For anyone who installed version 2 rc1, you will need to add the option -force-downgrade to the ipkg command. Due to string matching the ipkg script believes that 2 rc1 is a higher version than 2 so won't install it by default.

After installing you will need to reboot, this will replace your existing madwifi drivers with the new ones and start the logging scripts.

DHCP/DNS/Routing

For now I'm going to avoid this area and point everyone at the OpenWrt docs and the Hak5 Forums. Jasager does nothing special with DHCP, DNS or routing so the default config should just work. For routing, I learnt all the info I needed from setting up OpenVPN, there is some really good info on there about how to configure the routes and common pitfalls.

If anyone has real problems then let me know and I'll try to help but from experience it is hard to debug other peoples networks.