Hack 19 Controlling XMMS with Bluetooth

figs/expert.giffigs/hack19.gif

Use your Bluetooth device to control your music remotely under Linux.

If you have a mobile Bluetooth device that you'd like to use to control XMMS in Linux, you may be in luck. There are actually a couple of applications out there that use a WAP-like serial interface to Ericsson's T-series phones (including the T68i and the T39m) to configure them for use as XMMS remote controls.

The first of the two is a standalone Ruby-based application called bluexmms, which is available from http://linuxbrit.co.uk/bluexmms/. Make sure your phone is paired ([Hack #16]) with the Bluetooth interface on your computer. Install bluexmms, and then use rfcomm to bind an RFCOMM device to channel 2 on the T68i, which is (oddly) the T68's "generic telephony" service.

Next, run bluexmms /dev/rfcomm1 on your device, substituting the name of the RFCOMM device you just created. You should now be able to go to Accessories/XMMS Remote on your phone's menu, and voila!

A second, but very similar approach, involves an XMMS plugin called btexmms, which can be downloaded from http://www.lyola.com/bte/. Build and install the plugin, and create an RFCOMM device on channel 2, as just described. Then, go into the XMMS preferences menu, and under Effects General Plugins, enable and configure the BTE Control plugin. Set the device to whatever RFCOMM device you created for this purpose, and save your changes. Now you should be able to access the remote control from Accessories/XMMS Remote, as described above.

If you don't have an Ericsson T-series phone, you might try Bemused, which runs on SymbianOS devices, like the Nokia 3650/7650 and the Ericsson P800. Unlike the T68 apps just listed, which rely on the computer to establish a connection to the phone, Bemused instead uses a client that initiates the connection from your phone to a server running on your computer.

You can get the Bemused server and client from http://www.compsoc.man.ac.uk/~ashley/bemused/. First, unpack bemused.zip and upload and install the .sis file on your phone. Then download bemusedlinuxserver.tar.gz, and build and install it on your computer. You'll need to advertise Bluetooth serial port services on your laptop by running sdptool add --channel=10 SP, and then edit and configure /etc/bemused.conf appropriately. The Bemused README suggests using Bluetooth channel 10 on your computer, but any unused channel will do. Start X11, if you haven't already. Run bemusedserverlinux from the command line. At this point, you should be able to fire up the Bemused application on your phone and have the full power of XMMS at your fingertips, from clear across the room.

If you don't have one of these devices, don't fret nearly every Bluetooth device these days implements some kind of serial communications layer. Using examples from the projects just listed, you can probably create an XMMS remote control for your own phone or PDA. The hackability quotient of Bluetooth for this particular kind of application is pretty high.

Clearly, if you've made it this far, you're probably thinking that, with a wireless remote control for XMMS, you could plug a dedicated MP3 server running Linux into the hi-fi amplifier in your living room and never need a monitor or a keyboard for it. Or maybe you're considering plugging a low-power FM transmitter into your sound card, so you can listen to your music collection from any radio in the house. And you're absolutely right. With Bluetooth, you can do all of this, and probably more. Let the rockin' out commence!

Schuyler Erle



Wireless Hacks. 100 Industrial-Strength Tips and Techniques
Wireless Hacks. 100 Industrial-Strength Tips and Techniques
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 158

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net