FOAF Presence with Bluetooth devices

Version 1.1
20th September 2003.
Previous version
Jim Ley,

The Idea

Find out where people are based on the bluetooth addresses of their mobile device. Jim Hughes of the Mobitopians knew about the idea before me, and probably others to, see FoafMobile for more info.

Required Elements

Bluetooth detection points. These can be any device which is capable of detecting bluetooth devices, and then send the information over HTTP to the central mapper. They also need to know their own location, any Bluetooth PC, or PDA, or even many mobile phones are capable of this.

Mapping server. The mapping server needs to collate the information from the various devices, and plot the locations on the map, all very simple.

Tieing people to their bluetooth device Bluetooth devices all have unique addresses, similar to an ethernet mac-address. If users include the address of their bluetooth devices in their FOAF files, then we get to tie all the information to the device. However there is little to be gained by having the address freely available, so a SHA1 hash of the address is more appropriate to avoid spoofing. The address should be in all lower-case, and use a : as a seperator e.g. 00:40:05:aa:77:de

The FOAF file

The bluetooth address is introduced into the file with a address_sha1sum in the Bluetooth namespace - Example RDF/XML snippet:

  <foaf:name>Jim Ley</foaf:name>
  <foaf:mbox rdf:resource=""/>

The Detection Point Protocol

The detection points will register themselves to the central server by sending an RDF file by HTTP post, similar to:

<RDF xmlns=""
  <foaf:Person foaf:mbox_sha1sum="35022e505e6a64c05837eccf4beb5d8f981a4e5a"/>

This says there is a detection point with a bluetooth address, which will alos be unique and can therefore be used to uniquely identify the detection point. The posX/posY/posZ properties can be used in place of the lat/long properties for when the detection point is inside a building or otherwise not easily locatable globally, an agreement on which co-ordinate space these points were defined in would need to be agreed, that's currently an open issue. Range is the range of the device, so as to tell exactly how close the devices might be.

The Discovery Protocol

When a detection discovers a new device, it should send an HTTP post to the server with an RDF document similar to:

<RDF xmlns="" 

This announces the new bluetooth device, and the time it was discovered, when the device is lost, a similar document should be posted, but using BT:deviceLost. Since we cannot rely on recieving any packets on the server, there may be a case for deviceStillHere packets being sent to allow the server to know that the device is still there, when a person doesn't move for some time. This is another open-issue.

The Server

The server will use FOAF data, from an appropriate data source, and tie this with the bluetooth data to plot the locations of people.

Still to do