Bluetooth server
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/trunk btio</bash>
Prerequisites
These aren't all strictly necessary, but they're awfully convenient:
- Sun Java Wireless Toolkit
- Eclipse
- EclipseME (Eclipse plugin for MIDlet development)
- Nokia PC Suite