Exploring “meshaging”

I wrote this for the commotion blog a while ago… cross posting!

Over the past few years, The Work Department has been active in building community wireless networks in Detroit. We have experimented with different types of hardware and software, and we have helped neighborhoods build useful networks to share internet connectivity and provide local file sharing. Something we haven’t had much of an opportunity to explore, though, is building more elaborate systems that leverage the unique traits of mesh networks.

As we worked through other parts of the Commotion project, we brainstormed ideas for wireless mesh applications. We noticed that our ideas would often replicate existing web services — e.g. a local fileserver for music or movies, or a local message board for neighborhood discussion. We began to wonder what would make a community wireless application more appealing than using a centralized Internet-based application. We agreed that it wouldn’t be enough to offer someone the simple satisfaction of knowing their data is decentralized… there would need to be some other benefits to using a local application.

What would these benefits be? What is special about the architecture of a community wireless mesh network? In pondering these questions, we considered what is provided by these networks — earlier, I mentioned that the networks provide internet connection sharing and local file sharing, but that’s only a part of the story. These networks also provide something much grander: they become community institutions. Unlike the Comcast hardware that is bolted out of arm’s reach on a utility pole, our community wireless equipment lives on our porches, in chicken coops, in our bell towers, and next to our desks. Each piece of equipment has a story behind it. We know who held the ladder while it was being installed and who lent their hammer drill to run a cable up to it.

A community mesh wireless router’s IP address is more than a 32-bit number. It has history and meaning. How can we build applications that reflect and enhance this?

I had the good fortune to meet Adam Magaluk at Detroit’s hackerspace, OmniCorpDetroit. Adam works on mesh wireless systems at Illuminating Concepts, and is deeply interested in OLSR and embedded systems. We are both young programmers and share a preference for modular and decentralized systems. During our initial conversations and research, we ended up favoring web browser based application development. This way, people who might want to use an application wouldn’t have to download anything. Since today’s web browsers have lightweight streaming messaging capabilities with WebSocket, we would have a lot of flexibility in application development.

To build a web browser based application, we can start by limiting the amount of work the server does to a bare minimum. In the circumstance of a chat application, we can say that the server should simply keep a record of who is connected to a chat session (in a sort of subscription model) and then, as messages are posted, transfer messages from the publisher to the subscribers.

Limiting the duties of each mesh node to passing messages and keeping track of connected clients ends up being beneficial in two ways: it conserves computing resources and encourages decentralized application development. Since most community wireless routers are low power, low cost devices running with MIPS CPUs and 4-16MB memory, the former benefit is clearly attractive. The latter benefit is a bit more complex — do we really need a fully decentralized application? Why can’t we just have a little bit of local node storage? It sure would make things simpler if we could have a local data cache instead of trying to develop a peer-to-peer storage system, but for now we’ll embrace this limitation when designing applications.

To begin experimenting with the core concepts of lightweight messaging systems that can work with community wireless network hardware, we built an example application to provide WebSocket service to clients connected to a Commotion access point. This service can be utilized by anything on the network, but in our first example application, it is employed by a web application served from a publicly accessible LuCI URI linked from the splash page. The application provides a simple interface to chat with other people who have connected to the local node’s websocket chat system.

Thanks to the work of Hans-Christoph Steiner (from The Guardian Project) on the jsoninfo plugin, OLSRd can easily provide some useful network information as a json object to web applications. Above the network layer, our WebSocket message server can provide data about connected clients and possibly other information in the future.

After you get your head wrapped around the WebSocket server, its underlying restrictions, and the mesh network playing field, you can start to imagine various situations where local messaging might be interesting. With an idea in mind, a developer can easily jump into a familiar web application development environment. If you have used things like WebSockets or socket.io, you already understand the core concepts of writing a mesh network application using these building blocks. As we build more features into the platform, it will offer more options for developers.

Next Steps

Currently, the system provides a messaging service that doesn’t utilize node-to-node mesh connections. As it stands, we can develop some interesting and useful applications, but there is definitely a lot to gain from adding functionality and possibly revamping things in the interest of security or privacy.

Our next major task is to begin experimenting with systems that- allow neighboring nodes to subscribe to each others’ connections. To use the chat application as an example of how this might be used: a chat participant might be able to start a conversation with people connected to their own mesh node and its next neighbors, or some other arbitrary number of hops.

We would also like to experiment with simple implementations of shared / distributed storage. Again, to use the chat system as an illustration, we could have chat participants store chat logs and offer them to new participants who broadcast a request for the last N minutes of conversation. There is a lot of distributed storage work for us to reference, of course, so we have our work cut out for us!

Aside from enhancements and features in the messaging system itself, we have plenty of ideas for the actual applications. We have recently been prototyping games that could use a neighborhood or multi-neighborhood mesh network as a playing field. We have found that prototyping and brainstorming games is an enlightening process: it helps explain the ins and outs of the technology to people, and also presents clear challenges to create obvious and attainable goals within the technology’s limitations. We’ll be sharing some “capture the flag” style game ideas that utilize a “meshaging” system during the next couple of weeks.

Researching text message community alert systems

Preface: I have to put this into a bit of current events context:  I spent the morning researching for this blog post, but was interrupted with news of an ACLU investigation into Michigan police officers breaking into citizen’s cell phones and the iPhone logging location data and mirroring it to your computer’s hard drive.  Both of these stories made me queasy, especially in relation to all of the potentially democratic and liberating ways we can use mobile devices.

So anyways, my neighbors are interested in starting up a community alert system.  We could do it old-school style with a phone/sms tree, but that can introduce time delays, and for rapid response to problems in the neighborhood that’s just unacceptable.  In my short conversations with my neighbors so far, people are definitely interested in a voice and text system, but that might be hard to pull off.  I’m interested in how Village Defense works, and whether a staffed call center makes a difference in emergency response situations.

To start things off in my neighborhood, I’m advocating for a SMS mailinglist system.  Initially I was thinking that I could roll something together using twilio and custom code, but I’ve recently gotten hooked on FrontlineSMS.  I originally came across this project through my tree mapping experiments with Ushahidi.  FrontlineSMS uses a GSM modem (either a dedicated device or a tethered cellphone) to send and receive text messages programmatically.  It’s written in Java, field-tested, and seems super-solid overall.

The software’s GUI lets beginners easily define workflows for all sorts of sms communications needs.  I was excited to discover (via frontlinesms’s superfast twitter reply to me) that a project in Trinidad and Tobago uses FrontlineSMS for a neighborhood alert system!

It has the option to tie into an online SMS service provider (like clickatell) instead of using the local GSM device, but for this project I like the idea of keeping as much of the infrastructure local as possible.  Eventually, I’d love to experiment with using FrontlineSMS with an alternative cellphone network set up with OpenBTS and a bunch of abandoned old gsm handsets.

Supplies needed:

  • a computer that can run the FrontlineSMS java app
  • a gsm modem, btw $50-100. http://www.amazon.com/Sierra-Wireless-Mercury-885-Unlocked/dp/B001JU2RRY/ seems to be the only option available via amazon.com; more research pending
  • friendly neighbors that have cellphones with SMS capability
  • a few organizers that get to know the system really well and advocate for it in the neighborhood
  • a loving soul that will donate power and space for the computer to use and inhabit

I’m going to take my experimentations with me to a neighborhood meeting tomorrow, and we’ll see where everything goes.

Springtime meshes

It has been a busy winter for me, and I’m sad to say that i haven’t been very active with the community internet building until recently… that said, it has been pretty awesome for the past few weeks.

cut coax, foreground, with jig, background

Cut coax, foreground; jig, background

For the past couple OCD “open hack night” Thursdays, I’ve invited fellow wireless hackers to work on neighborhood mesh projects, talk about network protocols, and generally goof off in nerdy subversive ways.  That first Thursday, these two super-smart network engineer types, Patrick and Adam, came by.  The next week, piles of coaxial cable showed up and we started building omni antennas!  Also present this past Thursday was Ryan Hughes.  He’s organizing a community wireless project in Ann Arbor, and recently attended the Battle Mesh.  Finally, another superleet hacker came into the mix, Marky B, who is interested in experimenting with mobile mesh devices.

Over the next few weeks, we’ll be busy working on these antennae as well as some other experiments.  I’ve got a few new dual-radio open-mesh nodes on my workbench, and i’d like to work on devising a benchmark test for small neighborhood mesh networks.

my neighborhood: institutions, current mesh, future mesh

my neighborhood: institutions, current mesh, future mesh

Also notable:  A few weeks ago, I took part in a panel at SXSW Interactive (a surprisingly well-recorded audio feed of the event is available at that link).  Along with Adriel Thornton, Diana Nucera, Jenny Lee, and Invincible, I spoke about Detroit’s future media-based economy.  I introduced the idea of “media miles” as a technological parallel to “food miles” — sure, we all like avocados and parmesan reggiano once in a while, but shouldn’t we prioritize what we can grow in the back yard?  How can we design technology that emphasize local community exchange, in the same way we are designing food distribution systems that do the same?  Of course, you know the answer… mesh networks and community internet.  I’ll be elaborating on these ideas sooner or later, in cahoots with Nina Bianchi.

Vote for FACT Social Justice Challenge projects!

The public voting period for this year’s FACT Social Justice Challenge ends this Friday!  Read about how to vote on projects — unfortunately it’s a bit complicated.  I should’ve written up a grant to improve their website.

There are two interesting Detroit projects, as well as a few other cool ones, that I would like to promote:

Thanks for voting!

Detroit digital justice-related netsquared/FACT grant ideas

I worked with two groups in applying for Netsquared/FACT grants:

http://netsquared.org/projects/detroit-garden-sensor-development

http://netsquared.org/projects/pomaceous-detroitfruit-trees

The former project will hopefully lead to other sensor tech developments including environmental air-quality sensors.

The latter is a bit more ethereal but will hopefully get more urban agriculture-minded people interested in using media for organizing.

If you have a moment, leave a note of support by commenting and “like”ing the projects.

Late summer updates: leaves, chicken races, hacker spaces, garden sensors

I’d like to share a few stories:

Auto the dog, with leaves

Auto the dog, with leaves

1) Leaves

For some odd reason a tree in my backyard thinks it’s Autumn, turned yellow, and pooed its leaves all over the place.  Here’s a photo with my dog Auto.

This leaf event, combined with the end of an endless heat wave, has noticeably  changed my mood.  Time to start storing up nonperishables and fattening up for winter.  Gotta fix my fender-clad bicycle, fortify my insulation, and spend more time outside before detroit winter coma sets in.

A group of chicken racers prepare to release their hens

Racers prepare to drop hen

2) Chicken races

My friend Karthik Kavasseri convinced seventeen chicken farmers to let their fastest hens walk around in circles at the Temple Bar a few weeks ago.

Check a Flickr page for my photos, and also use the google to read other people’s reports.  Mr. Todd Scott has a lovely summary and additional photos.

Blair Nosan featured her frozen yogurt product at the Chicken Race

Blair Nosan featured her frozen yogurt product at the Chicken Race

While I was busy coaxing one of my chickens down a gravelly aisle, my girlfriend Blair Nosan served up some mean frozen-yogurt (fro-yo, if you will) with toppings.  The froyo was met with universal accolades, save for the one or two people who’d never tasted yogurt before.  Her offerings were nicely paired with the renegade food-cart offerings of the Pink Flamingo, which arrived fashionably late.

My upstairs neighbors and I ran one chicken in this event and I think we finished second.  I delivered the chicken to the event by bungee-cording a gigantic dog crate atop my B.O.B. trailer.  Yes, it was copping a backwards lean but the chicken and more importantly all of the straw was contained.  I delighted in riding through the Motor City Casino stretch of Temple with this contraption on display.  Nothing attracts a crowd like a bicycle trailer and a chicken.

I totally soldered that Garduino

I totally soldered that Garduino

3) Hacker spaces and garden sensors

As I mentioned in an earlier posting, I joined OmniCorpDetroit, a splendid hackety-hacker outfit in Eastern Market.  I’m currently trying to figure out how to construct mesh-networked temperature sensors to deploy in various Detroit greenhouses and hothouses.

Ideally, every greenhouse will have four temperature probes: soil and ambient, indoor and outdoor.  The probes would transmit back to a nearby wireless mesh network node that would operate as a local data server and, when there’s a good ‘net connection, upload data somewhere safe.  Mesh nodes would also act as community wireless extensions, if they’re in a useful location for that.

This work builds on the idea of connecting technology democracy / digital justice work with community gardening / environmental justice principals.  Read more about these ideas in OTI’s Hot Mesh report.

The initial prototyping will take place at the Mt Elliot Makerspace and the Earthworks Garden on the eastern side of our city.

Random thoughts to be expanded at a later date: thermocouple vs thermistor for temperature sensing: may have opportunity to make our own thermocouples…. do cost comparisons… length of cable, power draw? RF concerns with xbee vs 2.4/5.8 networking / lots of thermo sensors?

GSM hijacking + VoIP + community wifi

Via HN: Chris Paget demonstrated a nifty little GSM hijacking device at Defcon: with a directional antenna and some clever OpenBTS-based software, he was able to provide an irresistably-strong signal for cellphones, which would switch off call encryption and then trunk the call onto a VoIP network.

Sure, this is awesome for espionage, playing jokes on your neighbors, etc. but how about running an experimental cellphone network that can provide service for not only VoIP handsets but also old GSM phones?  It’d be great fun to build a renegade cell network using throwaway old GSM handsets and cobbled-together VoIP devices / homemade phonebooths.

NB: One commenter on hackernews pointed out the different types of phones that would allow this hijacking.  Good to know.

Extensive mesh

After an invigorating AMC2010, and a very fruitful HOT MESH conference session and media lab presence, I’m back at my daily work of code wrangling, system adminstering, etc.  But this afternoon I had the chance to extend the North Corktown community wireless network, with Dan from OTI and a few freshly-prepared wireless routers.

Back story

I live in North Corktown, a Detroit neighborhood about two miles from downtown.  I used to live up the street and had a cable modem, but when I moved a few blocks away and tried to transfer my account, the cable company refused to install service.  After a struggle, I ended up with a barely-broadband DSL connection.  Many of my neighbors have had similar problems in trying to get internet access.  To solve this, I set up a small network of meshed routers to repeat my signal down my block.  Also, a neighbor up the street from me was willing to share his connection with nearby residents, so I set him up a mesh router as well.  Hot Mesh was born, and North Corktown got a little bit of free internet.  People started noticing the signal, random cars started hanging out in front of my house, and I got to meet my new neighbors.

Enter the Spaulding Court

Spaulding Court is an apartment complex.  I live across the street from it.  After being neglected by an absentee landlord for a decade or so, some neighbors started getting serious with it and are fixing the place up.  Read more about this whole process in a Detroit YES! thread or via the official Spaulding Court web presence.

The US Social Forum served as a catalyst for Spaulding Court.  It’s playing host to a couple dozen tent-dwellers and temporary apartment tenants, as well as one long-term tenant.  Read a slightly-tongue-in-cheek mise-en-scène by my neighbor (and community wireless participant) Patrick.  The project’s organizers were interested in providing internet access to the new residents, and I was willing to help.

A few days ago, we deployed a few more nodes and extended the wireless coverage to the west.   The network now solidly covers about three blocks and is served by two residential DSL connections and a cable modem shared between nine wireless mesh nodes.  All of the new infrastructure will stay in place for the neighborhood to benefit from.

Technical Details

Take a look at the network map and notice the distance between nodes — even with a few trees in the way, we have a couple very large gaps between gateways and repeaters.  The node in the middle, codenamed “landyacht” and stowed in the pantry of an Airstream trailer, acts as a repeater that would bridge traffic if either of the gateways had a problem.  Landyacht is often out of service due to power issues.  The other out-of-service node, Courteous, is sitting on my table waiting to receive a specially-crafted XSS payload.

Both Dan and I were surprised at the power of these little 30mW routers: some of them are traversing multiple empty lots.  We’d thought that we would’ve needed some cantennas, but it wasn’t needed.

[update]   The North Corktown network is actually made up of a few separate Open-Mesh networks:  the one linked to above uses another network as a backhaul, and any other network can use it as a backhaul.  This means that anyone can set up their own nodes, with or without an internet connection, and easily extend the network.  These new networks can have completely different settings (i.e. you can set a password for your own personal network, or limit bandwidth, or give it a funny name).

The Future

This is my neighborhood’s network.  It worked well because I knew quite a few neighbors who were interested, and I was able to school them in mesh networking theory over and over again until they were all comfortable participating.  Many neighborhoods might not have the advantage of a resident community wifi zealot, but it only takes a few hours of playing with the hardware and learning some networking concepts to become a very capable mesh network technician.

I’d like to see the next DiscoTech happen alongside a mesh network install and computer training /giveaway.  I think there’s a nice pile of computers left around after the US Social Forum that ought to be put to good use.

hotMesh update

Hi,

Things have been extremely busy for me with work, and I haven’t been able to spend much time with the community wireless network development. I have, however, rolled out a couple test networks.

Two of the networks are running quite well. One is in the south Cass Corridor, the other in North Corktown. The next big network experiment will be in the Northwest Goldberg neighborhood, as a collaborative project with the Detroit Digital Justice Coalition, the Hush House, and some US Social Forum planners.

In addition to this planned network, I’d be interested in rolling out a smaller mesh (3-4 nearby nodes) in the shorter term, for real-world testing.

I’m eventually going to switch one of these networks to a self-hosted management server, as opposed to the Openmesh dashboard, to make it easier to experiment with router firmware and settings.