Sunday, July 15, 2007

Setting up a Wi-Fi Hotspot: Profitable yet Affordable. Part-II

Continuing from where we left off...
I will attempt to discuss how a Wi-Fi hotspot can be built using cheap hardware ( Linksys WRT54GL - Rs 4100, Standard Barebones PC - Rs 15,000) and some free opensource tools. Though it is a non-trivial task, the fruits of labor are well earned!
To start off, lets identify the components of our hotspot:







Sl NoComponentOur SolutionWebsite
1Wireless RouterLinksys WRT54GLhttp://www.linksys.com
2Captive GatewayCoovahttp://www.coova.org
3AAA ServerFreeradiushttp://www.freeradius.org
4Subscriber Management SoftwarephpMyPrepaidphpmyprepaid


The following figure (from Chillispot) succinctly illustrates our setup.
Hotspot Architecture

To keep this post short and also to avoid making it sound like rocket science, I will focus upon a solution that offers a readymade package which is a combination of Sl No 1 & 2 above. As some people say, its like your Linksys router on Steroids!


Step 1: Preparing the Hotspot Controller


The first step is to convert a commonly available wireless router into a Hotspot Controller. To do this, we have to perform a little surgery on the WRT54GL Linksys router. Remember that this will void the warranty on the router. Though it will not go up in smoke, you might end up just "bricking" the router.

Download the latest version of the Coova firmware from here. Connect your laptop/PC to the WRT54GL with the blue patch cord that came with the router. Remember that you need to connect to one of the LAN ports and not the "WAN" or Internet port. The Linksys will assign an IP address to your PC in the series 192.168.1.x. This means that your PC will in all probability get an IP address of 192.168.1.2. Now fire up your favorite browser and type in http://192.168.1.1/ in the address bar.
You should be presented with a authentication window. Type in "admin" as the username and "admin" as the password. You should be logged in into the WRT54Gl management console. Now navigate to the Administration-->Firmware Upgrade tab. Click on the Choose FIle button. You will be presented with a File Chooser dialog box. Now point it to the firmware file that you downloaded eg. openwrt-wrt54g-squashfs.bin on your PC. When you now click on Upgrade the progress bar will indicate the upgrade in progress. Remember not to disturb this actvity as it may lead to "Bricking" your router!
Once the upgrade is over (it might take a couple of minutes), the router will reboot. Once the reboot is over (the DMZ led on the router will go off), you will be presented with the Coova web interface. It would be a good idea to connect your internet connection (DSL etc) to the "Internet" port on the router at this stage. This is to enable automatic download and installation of additional components by the new firmware. Now Coova is a project built upon the now-legendary OpenWRT project. It takes out the pain of configuring OpenWRT with Chillispot etc and presents everything in a nice Interface.
Enter the new password for the Coova Router (notice how we re-christen it?). I would suggest that you follow this link to setup the Coova router. It has some neat screenshots to ensure you recognize what you are doing.
Once you have reached this point in the above installation wiki, that says "Once the settings are applied, the router will be a HotSpot", you are all set to go!
Coova offers three ways of setting up a hotspot, Internal, Chillispot and WiFiDog. We will explore the first two.

Step 2: Testing the Hotspot Controller


Lets now perform some simple tests to ensure our upgrade went off well and the router is working as expected.
  • Coova as standard router
  • Your laptop should be able to connect to the Internet while being connected to the Coova router wirelessly.

  • Coova with internal hotspot
  • Coova offers an embedded internal hotspot which allows you to create a table of internal users with a limited edition 'landing page'
    Create a couple of users and enable the Internal hotspot. Now when you try to connect to the Internet through Coova, it should redirect you to the 'Landing page'. One you enter the username and password correctly, It should permit you to surf the Internet. For many applications like libraries etc, this is more than sufficient since you are not permitting people to access the Internet without registering for it (or you knowing about it). The obvious pitfalls of such a mechanism is that there is no session timeouts, users will have to be logged out manually and so on.

  • Coova as chillispot hotspot controller
  • This also has two options. Automatic settings as well as manual. With automatic settings, you will be redirected to a simple ToS page hosted on Coova's servers.
    Manual settings are what we are interested in. This is one place that I found that the Coova wiki does not document at all!
    We will explore Coova manual settings in the next part because we have to satisfy some pre-requisites before this can be achieved. This involves setting up of the components mentioned in Sl No 3 & 4 in the table above. I will outline how these can be installed and tested on a standard Linux PC (Though I am given to understand that this can be acheived with a Windows machine, I am a Linux guy and cant tell you much about that part!). Stay tuned for Part 3 of this series...

    5 comments:

    TV3 Sunrise Gadget Guy :: said...

    Wow - good post but that seems like alot of work!

    Why don't you deploy Tomizone (www.tomizone.com) and then take the hassle out of building hotspot controllers and billing systems. You can be up and running in no time (in fact, if you have a WRT54GL, download the firmware with Tomizone on it).

    Shawn Stern said...

    Have you completed Part 3 of this(Setting up a Wi-Fi Hotspot: Profitable yet Affordable. Part-II) article? I am very interested in setting up the manual settings of chillispot hotspot controller - I am attempting to set up a free wireless connection around my work with a basic branded landing page that allows the user to access the internet after viewing our "advertising" via the landing page. Would it be best to use the chillispot hotspot controller manual settings or just alter the coova landing page?

    Unknown said...

    Hi
    Based in South Africa. Doing wifi community deployments. Would be very interested in part 3

    Sam said...

    @Steve

    Tomizone isnt free and we dont have a full control over it..Coova is open source and made you self dependent then ever

    HotSpotSystem.com said...

    Very well-written article.

    Just one comment: our company created Hotspot management and billing software which builds on coova or chillispot. I know that you'd say it is not free as we ask for 20-30% from the end user income.

    But let me do some comparison: what you call 'free' is - in reality - not free. You have to operate your own web and radius servers 24/7, pay for the hosting, deal with all the support and pay a billing processing fee for the credit card company.

    This is all included in our 20-30% and what you get is a reliable, high-quality service without any hassle of setting up, running and maintaining the whole thing.