need help connecting MPD Client to MPD

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I've made it through the process of setting up MPD on my Ubuntu machine to play to the ALSA Loopback device. From there I am streaming the audio, etc.

I installed an MPD Client (Gnome MPC) on the server and everything works great. Now I would like to use (another) cleint on my Android device (a tablet) to control playback on the server. I assume that is how it works, e.g. that the Android client is not streaming the music from the server to the Android and playing it there... So I installed first mpc and then MPDroid on my Android tablet and tried to get them to work as cleints. In both cases, the client cannot connect to the MPD instance on the server.

I have looked around the web for help and found various suggestions on edits to the mpd.conf file. These included setting bind_to_address to "localhost" or "127.0.0.1" and port to "6060", which seems to be the default port. I also opened port 6060 in my iptables to incoming tcp. On the clients I set up the MPD server IP (use the actual IP address of it, which is static) and port = 6060 but this has not resulted in connection.

I know that there are some users of MPD with various clients on this forum. Please help me figure this out or point me to resources that might help me. Thanks!
 
I have looked around the web for help and found various suggestions on edits to the mpd.conf file. These included setting bind_to_address to "localhost" or "127.0.0.1"

Such setting tells MPD to listen on localhost/127.0.0.1 only. I.e. it will accept only local connection from clients running on the machine. You need the exact opposite - listening on external IP address. Best is to keep the default value (listen to any interface).

and port to "6060", which seems to be the default port.

MPD default port is 6600 Ubuntu Manpage: mpd.conf - Music Player Daemon configuration file

The easiest way of testing TCP servers is to use telnet

telnet IP_ADDRESS PORT

You will see immediately if there is a service listening.
 
Just for posterity sake I thought I would post what I am using for settings in ALSA and MPD. In my setup, I want the player to send output to an ALSA loopback (installed with the snd-aloop module) so that I can route it to, and then through, another application.

A list of available ALSA devices looks like this (via aplay -l):
**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 7/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0

In MPD I have the following audio-related configuration settings:
audio_output {
type "alsa"
name "ALSA Output"
device "default"
format "48000:16:2"
auto_resample "no" # disables alsa resampling
mixer_type "software"
}

samplerate_converter "0" #Best Quality Sinc Interpolator

audio_buffer_size "512" #output buffer size in kB

Finally, I have an .asoundrc file in my home directory (used by ALSA) containing the following:
pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}

Before I set up the .asoundrc file that specifies the defaults I could not get volume control working in MPD (it would always be at 100%). I may have also been specifying MPD to use the ALSA device hw:0,0 (this is the loopback in my case) at the time. I found a suggestion on the web to instead tell MPD to use the "default" device, and then to specify that along with the default control in the .asoundrc file as I have shown above. That worked like a charm.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.