Friday, November 18, 2005

Remote control Winamp from your mobile phone

i had long wished to test out the application Bemused which allows one to control the Winamp media player remotely using one's mobile device(atleast series 60 and UIQ devices, see below). yesterday i did it. except the connection part, everything else is a breeze on windows. the server provided for gnu/linux OS, which controls the XMMS media player, did not compile on my system - will give it another try sometime.

here is how bemused can be used for Windows OS. first download the entire package from sourceforge.net for your preferred platform. the package contains a README file with detailed instructions about how to use it.

this is what i did to get it working on my Nokia 3660 mobile phone. i first installed the bemused.sis file on the mobile device using Nokia PC Suite. this is the bemused client that runs on the mobile device and sends requests to the PC. then i executed the BemusedServer.exe file on Windows OS(which is the bemused server and needs to be executed on the PC to recieve the instructions from the client running on the mobile phone). entered some basic info in the startup wizard, like the location of songs on my hard disk, location of the Winamp executable and the COM port to listen on for the incoming requests from the bemused client. after entering this information(COM port can be left blank for now, if it is not known), a new .ini file was created in the current directory with all the information stored in it.
in the main window, i first tried auto detection of the COM port(by clicking 'Find') but it failed. I knew COM4 is used to establish a connection between my 3660 and the PC Suite, so i tried that next. i got the error that the COM port is already in use. I then tried with the next COM port available - COM5. the server successfully bound to COM5 and started listening on it. now i needed to connect to COM5 from the bemused client on my mobile device.

from the mobile device, i launched the bemused client, which has the icon of a musical note, and selected Options->Refresh List. I got the error that "maximum bluetooth connections are already in use." after a lot of attempts using trial and error, i got it working this way. the mobile device for some reason was allowing only one bluetooth connection, and that was already in use with Nokia PC Suite. so i closed PC Suite, disconnected the mobile phone from COM4(using the bluetooth driver interface), tried to access the server from the mobile phone, and noted down the COM port on which it is sending the requests. my bluetooth driver interface flashed a message saying "connection request recieved on COM7." so i closed the bemused server, closed the bemused client on the mobile device, restarted the bemused server, bound it to COM7 this time, and finally, started the bemused client on 3660. the client got connected to the server, downloaded the playlist and was ready to be used as 'remote control' for the Winamp player. when i played some songs, the player was automatically started on my PC by the server and i could see all the albums and their songs on my 3660. the interface looks nice and is very easy to use( additional skins are available through author's website or - google). how to bind to a specific COM port depends on bluetooth adapter in use and instructions are present in the README file for WIDCOMM drivers. here are some pics to give you more idea.

Bemused started as a way to remotely control the Winamp media player, but today it is a general client-server framework to control many applications. you can see some examples on the author's website. It has also been ported to many mobile device architectures: google 'bemused' for your architecture to see if your mobile device is supported or not (yet). For gnu/linux users, this article might be helpful(note:most of the links on the page are broken).