
Recently, a co-worker of mine, Val from thisisportable.com, showed me a great use of a free Bluetooth server and Flash. Some of you may have seen the server in action at FITC Amsterdam. The server is called Roomware. It is a free Bluetooth server that will run on your Mac or PC. After brainstorming a bit we came up with the idea of a ThemeSong server. Basically, we thought it would be awesome to walk into a room and have our own theme song be played.
After some work, I have an initial release of ThemeSong available fo those interested in using it for themselves. ThemeSong is written in Adobe AIR and leverages the Roomware Server in order to detect Bluetooth devices in proximity. ThemeSong provides the ability for you to remember devices (mostly phones) and to assign entrance and exit theme songs that you would like to have played when that device is present (discoverable) or absent (undiscoverable). My distribution of the Roomware Server uses a modified config file to make the server poll the list of devices more often than it does by default. You will however, be at the mercy of your computer’s hardware limitations for the number of queries it can do in a given amount of time.
Enough Talk – How Do I Install this Thing?
What You Need:
- A computer with Bluetooth capabilities (most Macs have this built-in these days – you can try a Bluetooth dongle though they seem spotty with the Roomware Server)
- Bluetooth devices to detect (your cell phone with the Bluetooth on and set to discoverable)
- Some MP3s to assign to devices
- Some speakers on your computer
- If on a PC you may need to install a JRE
- The Adobe AIR Runtime
- Download ThemeSong with the bundled Roomware Server
How to get the Roomware Server Running:
The download consists of a zip file containing both an .air and .zip file. Please unzip the roomware-server.zip to a folder on your desktop or somewhere you will remember the location. This should give you a folder on your desktop called roomware-server. Inside of the roomware-server folder there is a README that will let you get the Bluetooth server up and running using the Terminal or the Command Line. Once the server is running you should see it processing any Bluetooth devices in the area. Below are screenshots of what you would need to type to get the server running on your Mac and PC:


Installing and Using ThemeSong:
Next, install the AIR application and press connect. It should query the devices in the area and eventually assign the Friendly name to them in the list. You can click a device in the list and pick and entrance and exit mp3 sound that will play when that device is seen (someone walks within 30 feet of your computer with their phone) or goes away (someone leaves the area with their phone).

The mp3 is copied and stored by ThemeSong. ThemeSong does what the name implies. It plays the ThemeSong assigned to a device. Make sure to hit Remember This Device’s Settings to store the info and to remember the device for when you run the server later.

Configuring The Server
The default update time for the Roomware Server to poll for new and absent devices is a bit high for an application like this. To make it function more quickly you can edit the roomware.conf file within the roomware-server > conf folder. You can play around with the two lines that look like this:
bluetooth-update-interval-time: 2
bluetooth-device-clear-time: 5
You should be able to tweak these and get the performance you are looking for.
Conclusion
I hope you enjoy ThemeSong. It has been a lot of fun in the office to hear the Imperial March play whenever I walk into the room. This was a proof of concept we wanted to do so please don’t take it too seriously.
Just like the Roomware Server, this software is released as follows:
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.