Nitobi
About Nitobi
Services
Products
Home -> Blogs -> Joe@Nitobi

Joe@Nitobi

Archive for the 'FtN' Category

DogOnRails, only a smaller piece of a bigger picture.

January 9th, 2008

I noticed that I’ve been referring to DogOnRails a lot in my Ruby Examples (because I don’t like exposing our clients’ code to the outside world if I can avoid it), so I better talk about what it is other than it being an abstract example I use here!

What is Dog On Rails?

DogOnRails is a WifiDog Captive Portal Authentication Server. Unlike the WifiDog server, it is written in Ruby on Rails (hence the name). It originally started out as a small hobby project so I could use it to run on a Linksys WRT54G at my apartment and have it redirect to my Dreamhost account. Then some other people saw that I was working on the project on Google Code and started to help me out with it. Then I started doing this Meraki FreeTheNet stuff, which gave me a new platform to put WifiDog client, and this was the perfect opportunity to de-mystify the whole process.

So, why is it cool?

The original concept of WifiDog is what drew me to it. The original WifiDog project was designed so that Captive Portals, which were only being used by WISPs at the time could be used to display both user-centric and location-centric information to the user so that they would learn more about the area around them. The reason I started working with DogOnRails was because I am able to add more features faster with Rails than I would be able to with PHP, and the fact that I dislike the Smarty Templating Engine, which made adding larger features a major hassle.

There is also the fact that the project seemed to cater more and more to the WISP community than its original purpose, so I felt the server no longer was interesting.

The thing that I like about it is the fact that this allows anyone who can hack Ruby on Rails to add more features onto something that normally would require that you write in C or Shell Script. By moving the authentication off the device, you can do much more with the process than simple authentication, you could redirect the user to what you want to see before they are on their way. And since they’re using YOUR bandwidth anyway. The analogy here is showing a visitor to your house around before they sit down and watch television. It’s not always necessary, but it’s a good courtesy for those who haven’t been to your house before.

Oh yeah, did I mention that it was voted the Best of HackDay 1. I think that bars it from competing in Hack Day 2. I have a whole new killer app for that. :P

So, what features did you add during HackDay?

I added the following features:

  • User-Agent detection for mobile devices
  • GoogleMaps Functionality
  • GoogleEarth Functionality

The User-Agent detection was much easier than I thought. I borrowed Alexei’s iPhone to test the final design, and at the end I was able to get the UserAgent detection to show the view easily, the code looks like this:


user_agent = request.user_agent.downcase
mobile = false

# Mobile Request URI
[ ‘iphone’ , ‘ipod’ ].each { |b|
mobile = true if user_agent.include? b
}

The rest is pretty self-explanitory at this point! After that was added, it was just a matter of doing some iPhone-based CSS. I used Facebook as an example of how to do this, and after cursing WebKit/Safari’s existance, I managed to get something that didn’t require a LOT of resizing to get working.

Of course, the following features were added post-hackday:

  • ROBIN/Open-Mesh Update Recieving - (Can’t update settings yet, can get the Mesh status)
  • Improved GoogleMaps Functionality - Looks more like the Merkai Map
  • Per Node Auditing
  • Graphs using gruff
  • MAC Address Blocking
  • Facebook Functionality

That’s right, DogOnRails is now a Facebook application as well. The idea behind this is to encourage people to grow Wifi networks like they would grow their own garden. Make it so that there’s a certain level of pride for having the nodes up and working. It’s very, very early alpha stages, but it exists and it currently looks like this:

It needs a lot more polish, but it’s going to be used by the FreeTheNet group in the coming month, and will be the replacement to the Meraki Dashboard that we have been looking it. There will probably be more changes to this, and to other things like this. But, when I refer to DogOnRails, I’m referring to a real app, and not some abstract thing like in a textbook.

And I will keep using it as an example of what to do and what NOT to do for many posts to come.

How the mesh works

September 18th, 2007

Many people have picked up on the Meraki Mesh idea, but people seem to be confused as to what a Mesh Network actually is. Here is the Wikipedia definition of a Mesh Network:


Mesh networking is a way to route data, voice and instructions between nodes. It allows for continuous connections and reconfiguration around broken or blocked paths by “hopping” from node to node until the destination is reached. A mesh network whose nodes are all connected to each other is a fully connected network.

The truth is that the Mesh Network is not really a Mesh but a Mobile Ad-Hoc Network. This means it has the properties of a mesh, but it’s mobile! For those who are interested, here’s the link to how this works from wikipedia:

ExOR Wireless Network Protocol

This should explain the basics of how this works, which is what Wikipedia is really good for. The Routing protocol that is being used is SrcRR, which what was used in Roofnet. This is an open-source protocol, and can be used in anything that has an Atheros Radio.

The nice thing about the Meraki Hardware is that it makes it accessible to people who want a finished product. It could be possible to mesh with the Linksys WRT54G using Optimized Link State Routing, but then there’s the problem of forcing the radio into Adhoc mode because Broadcom has a more closed design than Atheros. It also could have been done with Netgear WGT634Us and the new Linksys WRT150N, but these devices are twice as expensive.

Also, I find myself warming a bit to the Dashboard. It doesn’t allow people to configure custom spash pages per node, which would be nice functionality, nor does it allow for very much customization of the spash page. I think that this will be added down the road by Meraki since a lot of
people seem to be asking for this. Also, I find that it’s an interesting project working with a group of people who have admin on the nodes.

We’re definitely learning as we go along, and that’s what makes this interesting.

Pics of the Meraki Gear

September 11th, 2007

I managed to get my girlfriend’s Digital Camera to work, and now I finally have some photos in on my Flickr account (many years after I registered the account)

Check them out here

Mesh Wireless goes to the Mainstream, (maybe)

September 10th, 2007

I have a hobby of hacking the firmware on the Linksys WRT54G. I originally started doing it because I wanted to learn about how Embedded Linux worked, and I thought it was cool that it could run Linux. That’s how I got introduced to the Community Wireless movement.

Basically, the problem with the DIY Community Wireless hacking is that you’d have to either take off the shelf routers, flash them (and void your warantee) and then hope that you got something working. Then you can write applications for it like WifiDog, or various Mesh Networking Applications such as Optimised Link State Routing. This was great, but it ran into two big problems:

  1. It’s hard to convince someone to run a hacked Linksys router in their home, because it looks sketchy
  2. You’re at the whim of the manufacturer, who may not like that you can extend your hardware, or may change the hardware randomly or End of Life(EOL) it because they can make something that is cheaper.

In fact, the original Linksys WRT54G was changed after Version 4.0 to run vxworks because it took less processing power, voltage and memory to do what they wanted than they needed from their prior cookie-cutter design. Also, Netgear also discontinued the WGT634U because of similar logic. The reason I mention the WGT634U router is because that is what MIT Roofnet originally used to build the prototypes for what is now Meraki Mesh.

After BarCamp and talking to Boris at Bryght, I decided to buy some Meraki hardware. Now, I was expecting some unmarked boxes, and the devices to be large, but I was very suprised to find a branded box, like what you would find in FutureShop, and a very small device. Not only that, but it is extremely user friendly. I was also impressed with the range of the device. I put one in my Window at my apartment, and it seems to have a 100m (about 300 ft) range. Now, this is important, since the way mesh works is that you put a bunch of mesh nodes out into the world, and they route between each other to the nearest gateway node, the node with the least latency.

When I compare the Meraki out-of-the-box solution to the alternative, which is the Freifunk OLSR, there’s really no comparison for how easy it is to use. I think that Meraki has a very interesting project and it’s worth testing out. The main advantage of us testing out mesh is obvious, since we can facilitate a test bed for Ajax components in mobile devices right outside our window. With the release of the iPhone and the iPod touch (more importantly the iPod Touch, since we’re in Canada), content that is dynamic, and takes advantage of both geography, as well as the various user agents, is critical to providing a user experience like nothing else.

With more and more mobile devices equipped with Wifi for mass adoption, it just makes sense to at least play with the stuff. I’ll have pictures up here soon of us playing with the hardware!


Search Posts

You are currently browsing the archives for the FtN category.

Pages

Archives

Categories

All contents are (c) Copyright 2006, Nitobi Software Inc. All rights Reserved
Joe@Nitobi Entries (RSS) and Comments (RSS).