My HackDay hack – see where your friends are

Today was IBM HackDay 6 – an internal HackDay run across IBM‘s many labs – and I managed to spend a bit of today hacking something together.

PhotobucketIn a nutshell, it’s kinda like Plazes, brightkite, dodgeball and others… find out where your friends currently are. And see where they are from your mobile.

The twist is that it gives you quite precise locations for friends within a known indoor campus – such as Hursley Park.

Hursley, like many IBM locations, is a campus, with thousands of employees in a 100 acre site.

What if you’re trying to find someone? Say you’re in a meeting, and a colleague hasn’t turned up yet. Where are they? Are they on their way?

Or you’ve arranged to meet a colleague for lunch or a coffee, and you seem to keep missing each other.

The idea of this hack was to build on the Hursley Maps tool to come up with some way for you to be able to quickly check where your friends are while you’re at work.

Okay… so it’s a fairly flimsy scenario. 🙂

But I’ve enjoyed playing with location-based services ideas before, and thought this would be an interesting twist. Plus, it was an excuse to play with Django which I’ve wanted to try since hearing about it at BathCamp.

Thinking of technologies…
GPS wouldn’t do it – this needed to be something that would work indoors.

Cell-IDs don’t give enough accuracy.

I’ve played with using Bluetooth for location-based ideas before – this seemed like the best fit for this hack.

I considered writing a mobile client for this, as I did for cell IDs – so that we could have mobiles reporting where they are to a central Fire Eagle-style web service. But the problem with this is that it’d rely on people installing stuff on their phones for the system to work. The massive variety in mobile environments make this tougher to support in a one-day hack!

PhotobucketHow it works
Hursley has a lot of computers. Desktops and laptops are everywhere, really.

The idea was to use this to create a network of clients which report the mobiles they can see to a central service.

If a computer knows roughly where it is, and it knows it can “see” the Bluetooth id for Bob’s phone, then it can report this to a web service. This is enough for the web service to know where Bob is.

With enough computers spread around the whole site reporting what Bluetooth devices it can see, and a central web service mapping that to owners, you could have a quick-and-easy way to find out where your friends are.

PhotobucketFinishing a hack in one day
The plan was for the desktop client to use it’s IP address to be able to work out where it is. Unfortunately, I didn’t get to that, so had to resort to getting the client to prompt the user to enter the computer’s location.

But apart from that, it’s pretty much finished.

There is a website to manage what Bluetooth devices you own, and who you want to follow.

And a desktop client written in Python (so it should run on Windows or Linux) which sits in the background polling for Bluetooth devices and submitting them to the web service.

The flaws in the plan…
It’s only useful if:

  • enough people run the desktop client
  • enough people have their phone’s (or laptop, or… other device) Bluetooth id set to discoverable
  • enough people sign up to the website to say what their Bluetooth device ids are

Even without asking people to install stuff on their phones, this could be a big ask.

No matter – it was fun to play with Django, and I thought the idea was interesting. If anyone fancies giving it a try, it’d be good to see how it handles a few more users thrown at it!

Visit for more.

Tags: , , , , , ,

One Response to “My HackDay hack – see where your friends are”

  1. James Taylor says:

    Sounds good. You mention Plazes, brightkite and dodgeball; I’ve just gone back to look at brightkite and it seems the last time I updated it was four months ago, so it would be great if this hack could be extended with links to the less accurate services!