Hack 76. Build an Online Community in Your Offline Neighborhood

Allow people in a café or other public Wi-Fi place to share information locally, apart from the global Web.

Wi-Fi is great for standard web and email access away from home. But take a closer look. That little router holds a world of opportunity that most people never consider.

Wi-Fi can:

  • Connect people in a neighborhood, through web services tied intimately to a place.
  • Offer an open venue for sharing digital information locally, which is a very different thing from publishing on the global Web (think: a chat with a regular at the local pub versus an interview with The New York Times).
  • Provide a useful platform for location-based services that doesn't require participation by (or permission from) cellular carriers or Internet service providers.

You can work all this Wi-Fi mojo without forcing users to install any new hardware or software, and without requiring your favorite café owner (or other hotspot operator) to buy and maintain a server.

5.15.1. PlaceSite

Inspired by Sean Savage's research of Wi-Fi cafés at Intel Research Seattle in 2004, we (along with Jon Snydal) made PlaceSite our final Masters project at UC Berkeley. Marti Hearst at Berkeley's School of Information Management & Systems was our project advisor.

In May 2005, we launched an embryonic PlaceSite service in a Berkeley café, as shown in Figure 5-21. For a month, we studied how people used it and what they thought of it.

We think we're on to something.

Figure 5-21. PlaceSite running at A'Cuppa Tea café in Berkeley, California


5.15.2. The Core Components.

Two pieces make up the core PlaceSite service: the node (a Linksys Wi-Fi router running PlaceSite software) and the server.

The software for both components is still under heavy development, and much of this information will change, but the following description applies to the PlaceSite codebase as of July 2005. As we wrote this, we were preparing the code for release. As you read this, the code might be available for download. Please visit http://www.placesite.com for the latest. The server.

We wrote the first version of the PlaceSite server code in JSP. The server requires the following code base:

  • Tomcat 5.0.28 (http://jakarta.apache.org/site/downloads/downloads_tomcat-5.cgi) or later
  • The latest stable release of MySQL 4.1 or greater (http://dev.mysql.com/downloads/mysql/4.1.html) The node.

The PlaceSite node is a Linksys WRT54G router (available off the shelf for about US$50 as of July 2005) whose firmware has been replaced by the PlaceSite node software, which includes:


A specific version of OpenWRT [Hack #67]

A Linux distribution designed for the WRT54G. The code is downloadable at http://www.ilesansfil.org/tiki-list_file_gallery.php?galleryId=3.

This is not the standard OpenWRT release. The WiFiDog project provides a specialized OpenWRT firmware image that must be used in order for WiFiDog, and PlaceSite, to function.



Open source captive portal software designed to let hotspot owners create splash pages, password prompts, and so on that appear when users hit their hotspots. The WiFiDog package can be found at http://old.ilesansfil.org/dist/WiFiDog.


Our modifications

They're under heavy development, but once they're stable, we'll make them available at http://placesite.com.

5.15.3. PlaceSite in Action

The modified router and server deliver location-specific content to every Wi-Fi client within range of that place's PlaceSite router.

When someone fires up a laptop in the place, starts a session, and opens a browser, the router informs the server of that person's presence. The server sends that place's current PlaceSite home page to the router, which transmits it to the person's browser. It's the first web page the person sees at the start of her session.

Figure 5-22 shows what this person might see in her browser.

Figure 5-22. A PlaceSite homepage as viewed by a new user

Now, the person can view message forums, create a profile, and view others' profiles. She can show and hide profile information from others on the fly, and she can specify that any piece of her information should be visible when she's present in the place but disappear when she's gone (i.e., when her Wi-Fi session in that place ends, as determined by a timeout triggered by a lack of activity). Figure 5-23 shows an example of how to reveal or hide information in a profile.

Figure 5-23. "Reveal" settings for personal information

Note that, in addition to user authentication (username/password login), the system provides place authentication: it serves up a node's content to everyone within range of that node's Wi-Fi router, and it serves that content only to those people. Currently, this authentication is performed via IP address, user token, and HTTP header validation. We are in the process of implementing a certificate-based authentication scheme. The router's contribution of simple place and presence data infuses traditional web services with powerful new benefits.

The real magic happens when many PlaceSite nodes talk to a single server, or to a federated group of servers that share live user and presence data. This forms a network of PlaceSite places and a platform that developers anywhere can build new location-based services on top of. Users can share their accounts across places, eliminating the need to reregister in each new place.

See http://www.placesite.com for the latest on how this fits in with federated identity systems.

Views and communication between places become possible. Traditional web services (social networking/dating applications, mapping applications, local content providers, etc.) can hook into the platform's location and proximity data to dramatically boost the fun and usefulness of their offerings.

5.15.4. Setting Up Your Own PlaceSite

Follow the instructions from "Upgrade Your Wireless Router" [Hack #67] to install the OpenWRT firmware obtained from the WiFiDog project page. Once you have your firmware up and running, select the latest stable version of WiFiDog and install it via ipkg:

	ipkg install http://old.ilesansfil.org/dist/WiFiDog/WiFiDog_1.1.1_mipsel.ipk

Once WiFiDog is installed, change the GatewayID option and setup an appropriate AuthServer section in the WiFiDog configuration file, /etc/wifidog.conf:

	GatewayID PlaceSite

	AuthServer {
		Hostname yourserver.com
		HTTPPort 8080
		Path /path/to/PlaceSite/

To get the PlaceSite server set up, please see http://www.placesite.com for details. Since the public release of the code is imminent, any instructions we'd give you here are going to be out of date.

5.15.5. Running the Hack

Make sure that Tomcat and MySQL are running on the server and fire up WiFiDog on the node:

	wifidog-init start

Associate your computer with the SSID of your WRT54G, open up your favorite web browser, and try to navigate to any web site. WiFiDog should grab your connection and redirect you to your own personal PlaceSite. Create an account, login, and have fun.

5.15.6. Troubleshooting the Hack

The first thing to check is whether or not WiFiDog can talk to your PlaceSite server. You can start up WiFiDog in a foreground mode with console debugging information to make sure that the connection is occurring correctly:

	wifidog -d 7 -f

If it fails to talk to the PlaceSite AuthServer, check the values in your /etc/wifidog.conf file. Any other troubleshooting is beyond the scope of this hack, so consult the documentation for the relevant application.

5.15.7. Hacking the Hack

Now, open up your network to your community and use PlaceSite to get to know your neighbors. There's no limit to the ways you can customize your PlaceSite and remix it with other web services and with people, places, and things. Dig in.

At the time of this writing, we have three critical requests:


Keep the nodes connected

The more nodes that are linked together, the more useful the network will be for everyone. We strongly encourage you to link any nodes that you create into the wider network. Please visit http://www.placesite.com for the latest on how to accomplish this.


Respect users' privacy

While there's no such thing as complete privacy or security, we strive to never reveal data provided at one of our PlaceSite nodes beyond that place (either in other places or to other services or organizations)until the user who owns the data specifically requests that it be shared in such a way. You're free to do what you wish, but we strongly recommend that you also follow this policy. If you choose not to, please don't use the PlaceSite name and branding with your services.


Check in at placesite.com

I know, we're starting to sound like broken records. But by the time you read this, there are sure to be all sorts of new goodies and capabilities available so swing by and see what's cooking.

Sean Savage and Damon McCormick

Bluetooth, Mobile Phones, and GPS

Network Discovery and Monitoring

Wireless Security

Hardware Hacks

Software Hacks

Do-It-Yourself Antennas

Wireless Network Design

Appendix A. Wireless Standards

Appendix B. Wireless Hardware Guide

Wireless Hacks
Wireless Hacks: Tips & Tools for Building, Extending, and Securing Your Network
ISBN: 0596101449
EAN: 2147483647
Year: 2004
Pages: 178

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net