already a member? Login

Overview

The Sixsense client architecture enables any desktop application to use sixsense services to discover other users nearby via Wi-Fi and Bluetooth. Currently we provide a Firefox extension as one such application. Unlike other extensions which use built-in XPCOM components to access native services, our extension uses a local sixsense web service (that is, only applications running on your own computer can access this service). Any application can take advantage of the sixsense web service by making REST-like requests over HTTP. The service runs as a separate "sixsense_helper" process. You can think of it as a tiny local web server. In fact, you can just use any web browser as a front-end application. To get some very basic functionality simply access the service URL:

http://localhost:6600/?out=html

API Methods

Anyone can write their own program to present select sixsense user data (like images, blasts, profiles) in new and different ways. To take full advantage of the sixsense web service, an application can use our open REST-like Application Programming Interface (API). REST is the simplest response format - it's a simple XML block. The following methods are available:

Get Results (returns list of nearby users)

Application should GET the following URL to get data about the nearby users that sixsense has discovered:

http://localhost:6600/get
Example response:
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<results>
<result name="B-Board" server="u1.sixsense.com"
token="b2xkeQAHAAFndy40MmU0YTEwMTAwMDAwYzA3YWMwMQABAP8BARpS_1RODndsS5c-"
date="Sep 6, 3:56 PM" etime="1157583386" range="2"/>
</results>
<sensors>
<bt avail="0" ison="0"/>
<ether avail="1" ison="1"/>
</sensors>
<prefs>
<visible value="on"/>
<maxrange value="3"/>
</prefs> </rsp>

See the Using Results Data section on how to use these results. In case of an error, the Error Response is returned.

Optional Arguments
bt
Use/don't use Bluetooth as a proximity sensor.
Possible values: on off
vis
Hide/unhide current user.
Possible values: on off
range
Reduce/increase discovery range.
Possible values: 2 3

Authentication

Application should GET the following URL to get data about the nearby users that sixsense has discovered:

http://localhost:6600/auth?name=[username]&password=[password]
The required arguments [username] and [password] are URL-encoded sixsense user name and password (it's OK to pass password in clear because the transmission is local to your computer). Upon success the Results xml is returned (see example above) with possibly an empty "results" section. In case of an error, the Error Response is returned.

Sign Out

Application should GET the following URL to log out the current user:

http://localhost:6600/logout
Upon success the Results are returned (see example above) with empty "results" section. In case of an error, the Error Response is returned.

Terminate Service

This is only needed if your application bundles the "sixsense_helper" and needs to be upgraded/uninstalled. Application should GET the following URL to terminate the sixsense service:

http://localhost:6600/exit

Error Response

If an application request fails for any reason, the sixsense service responds with this special XML block:

<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="fail">
<error code="[error-code]" msg="[error-message]"/>
</rsp>

Possible error codes:
1: Bad Request
2: Bad Argument
4: REST Method Not Supported
5: Authentication Required
7: Internal Error

If the application gets error code "5" (Authentication Required), it needs to authenticate itself using the "auth" method.

Using The Result Data

Each result item in the results list has the following format:

<result name="[username]" server="[server]" token="[token]"
date="[date]" etime="[timestamp]" range="[range]"/>

You can access the user's profile page by constructing the following URL:
http://[server]/rs?[token]
The user's blast can be fetched from the following URL:
http://[server]/b?[token]
The user's "avatar" pictures can be fetched by using the following URLs:
http://[server]/i[size]?[token]
Here [size] is the picture size from 0 to 2 (smallest to largest). For example, to fetch the smallest image:
http://[server]/i0?[token]
Other result attributes:
[date]
date and time when user was discovered (e.g., "Sep 6, 3:56 PM")
[etime]
same date and time represented in unix time format (seconds since midnight, January 1, 1970, Universal Time)
[range]
approximate range (this is an "order of magnitude" value).
Possible values:
1: within 10 meters or so
2: within 100 meters or so
3: within 1000 meters or so

Getting Started

If you already have the Sixsense Firefox extension, you already have the "sixsense_helper". If you would like to package the helper with your own application, please contact us!

Home | FAQ | About | Blog | Contact | Terms & Policies | Developers

Copyright ©2006 6th Sense Communications, Inc. All rights reserved. Patent pending.