Howto: mpd and your iphone
In a previous article, I’ve been telling you about the powerful Music Player Daemon (mpd) and its wide range of possibilities. I briefly mentioned the use of your iphone or ipod touch as a remote control for your media station with mpd running. Today I’ve put it to the test and was amazed with how easy it was to set up.
I already explained setting up and running mpd. Only a few changes are worth mentioning. First of all you will have to change the bind address. By default it’s set to 127.0.0.1 so only the local host can connect to it. Since we will be connecting to mpd remotely with the iphone we have to change this value (the iphone will recognize 127.0.0.1 as itself). Open up ~/.mpdconf and make this change:
bind_to_address = any
I also suggest you enable password authentication in mpd as anyone with access to your network will be able to connect:
password "yourpasswordhere@read,add,control,admin"Remember that if you have a firewall blocking incoming connections (iptables doesn’t do this by default), you will have to allow tcp connections on port 6600. That’s it for the server side.
For the iphone, it’s even easier. There are a few mpd clients that exist for the iphone: impdclient and mpod. I tried the latter. It’s available in the app store (firmware 2.x required). Simply install it and an icon will appear in the home screen. Launch mpod and fill in the settings in its configuration menu. Pay extra attention to the ip address. When the server running mpd is using dhcp, the ip address might change. Therefore I recommend you use static ip addresses.
That’s pretty much it. You can now control your music remotely from your iphone. An ideal music center setup.