Wednesday, September 26, 2007

Hotspot in a Box

Ive finally managed to put it all together! I believe I have managed to build the ultimate embedded hotspot-in-a-box solution.
What I have done is, put together Chillispot, FreeRadius and phpMyPrepaid on the same box. While this itself is not unique, what separates this from other such initiatives is that all of this comes on a 512MB Compact Flash Disk.
The basic platform is a Soekris Engineering net4801 appliance. This has a decent 128MB of RAM and three Ethernet Interfaces. More details on the Soekris box are here.
The challenge was to look for a Linux distribution that recognised all the hardware on the Soekris, and was small enough to fit on a CF Card. My search lead me to Voyage Linux which is a debian derived distribution with a 66 MB footprint in its basic avatar.
Since I didnt have a CF Card reader, I used my Nikon Coolpix n770 camera as the reader. Attached it to my Ubuntu laptop and the card showed up as a usb disk. Using the voyage installer was a trivial exercise. Once the basic OS was installed, I then plugged the CF Card into the Soekris and watched it boot beautifully over the serial console!!
Once this was done, I connected the Soekris to the Internet and ran apt-update to update the package list.
I then went about installing MySQL, PHP, Lighttpd (lighty) instead of Apache, FreeRadius, Chillispot and Phpmyprepaid.
After two days of fiddling around, I figured out why Chillispot wasnt working properly, rectified it (eth1 has to be 0.0.0.0).
I now have a full fledged hotspot controller which does not need to connect to any centralized Radius Server for authentication.
The Soekris box is currently undergoing burn-in.

The only problem I am facing is that of MySQL tables crashing! I live in an area where power outages are the norm. Thank you DLF for wonderful buildings and crappy infrastructure.
High on my to-do list is change over from MySQL to firebirdSQL (www.firebirdsql.org). Wonder how long will it take to modify phpmyprepaid to work on firebirdsql...

For all your uber-geeks out there, I can send you a copy of the CF card image if you feel a little adventurous. #free -m reports
124 M Total 59M Used 64M Free
The total size of software on CF card is around 370 MB.