Bluetooth server

From University of Washington - Ubicomp Research Page
Revision as of 01:43, 7 June 2008 by Ryan Libby (talk | contribs) ((init) brief description of bluetooth server, how and why to use it.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Bluetooth server is a Java MIDlet intended to handle bluetooth connections to bt-listener (on the IMote) so that other programs don't have to.

How do I use it?

First run the midlet.

Then connect to the host on TCP port 6684 (ASCII 'B' 'T'; clever, huh?).

You might want to hunt down the options to disable all the MIDlet security checks.

Why?

bt-listener is inconvenient to deal with. It uses RFCOMM. It sends and expects to receive heartbeats.

Bluetooth server handles all that. All you need to do is open the socket and read.

It also enables having multiple simultaneous connections to bt-listener. This is useful for e.g. debugging: have one program do its (sketchy) thing; have another reading the bluetooth traffic and displaying it; or maybe just log it.

Read? Not write?

Not yet anyway. Lack of asynchronous I/O in Java ME surprisingly makes this a pain.

Source

Subversion

<bash>svn co svn+ssh://bicycle.cs.washington.edu/projects/ubicomp/uwar/subversion/btio</bash>

Prerequisites

These aren't all strictly necessary, but they're awfully convenient: