IP0X Web Firmware Updates

The IP04 IP-PBXes I sell run the BAPS firmware. This is a package based system similar to apt-get. While updating applications is easy updating the Linux uImage requires an awkward RS232 serial cable. This is fine for geeks but very difficult for the average person using an IP04 as their small office phone system. The alternative Astfin and Switchfin IP0X build systems have a web based image update which is much cooler. Web based firmware updates are also common for other embedded devices like OpenWRT and even IP phones.

Briefly, the steps for a BAPs image installation are:

  1. tftp the image, flash the uImage and boot with the RAM based file system
    “root=/dev/mtdblock0″
  2. copy the root file system from RAM to flash (mtdblock2), then reboot with
    “root=/dev/mtdblock2″.

The problem is the “root=/dev/mtdblock0″ and “root=/dev/mtdblock2″ steps need to be performed in the boot loader using the serial cable. Not for the faint hearted. It also makes switching between IP0X firmware distributions painful.

So I have developed a two stage flashing procedure that works like this. First, flash uImage_r2.mtd0 from the Linux command line:

    (cd /persistent if an Astfin box)
    root:~> wget http://rowetel.com/ucasterisk/downloads/uImage_r2.mtd0
    root:~> dd if=uImage_r2.mtd0 of=/dev/mtdblock1
    root:~> reboot

The neat trick is that this image has “root=/dev/mtdblock0″ hard coded in the kernel (via a small kernel patch), over-riding the u-boot “root=” settings. This patch doesn’t affect the Ethernet MAC. This image then boots, erases the mtdblock2 flash, then copies the RAM file system to flash. It then wgets uImage_r2.mtd2, which has “root=/dev/mtdblock2″ hard coded into the kernel, and flashes this. This second image then installs various packages to bring up an IP0X ready to make phone calls. If an Internet connection is not available it looks for uImage_r2.mtd2 on a local tftp server on 192.168.1.1.

The system works quite well and is fast and reliable in practice. I’ve tested it by flashing about 20 IP0Xs. The IP01s need a special image to install their special brand of zaptel (the only change is one line to pull down the zaptel-ip01 package):

    (cd /persistent if an Astfin box)
    root:~> wget http://rowetel.com/ucasterisk/downloads/uImage_r2.mtd0.ip01
    root:~> dd if=uImage_r2.mtd0.ip01 of=/dev/mtdblock1
    root:~> reboot

I have also modified the BAPS uClinux.mk file to automatically make the .mtd0 and .mtd2 targets. You can customise the packages installed by tweaking the rc.normal file and rebuilding uImage_r2.mtd0:

    host$ make -f uClinux.mk uImage.mtd0

The rc (executed by uImage_r2.mtd0) and rc.normal (executed by uImage_r2.mtd2) files are captured in this patch.

IP0X Roadmap and Ease of Use

This feature is part of a series of IP0X upgrades, including Asterisk 1.6, Dahdi, security upgrades, bug fixes, uClinux upgrades, and more work on the Mini Asterisk GUI. In particular I am really interested in exploring the ease of use meme. My goal is make the IP0X really easy to install and use in the small office environment for people who know nothing about Asterisk, Linux, and telephony.

I have a theory I would like to explore. One “problem” with the IP0X range is it’s low price (hundreds of $) compared to normal PBXes (thousands of $). There is just no room for regular margins needed by the “PBX guy” to install and maintain an IP0X phone system. So I think the IP0X needs to be really easy to set up and use. More like a Wifi router, ATA or DSL modem. That’s my thinking behind Mini Asterisk.

Dili Village Telco Part 10

This . . . → Read More: Dili Village Telco Part 10

Codec2 V0.1 Alpha Released

I . . . → Read More: Codec2 V0.1 Alpha Released

Wifi is Hard

While . . . → Read More: Wifi is Hard

Air Stream Kilkenny Part 2

A . . . → Read More: Air Stream Kilkenny Part 2

Science Alive

Our . . . → Read More: Science Alive

2.1km Mesh Potato Call

On . . . → Read More: 2.1km Mesh Potato Call

Blown Armature

The . . . → Read More: Blown Armature

2010 Travel

Wow . . . → Read More: 2010 Travel

Rowetel 2.0 Web Site

For . . . → Read More: Rowetel 2.0 Web Site