DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#51 2010-09-29 23:49:24

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Mpd music daemon with Iphone remote control and airtunes playback

bigwebb83 wrote:

karlrado wrote:

bigwebb83 wrote:

now i get an error that says failed to load database: database corupted.  I created a file called database in /mnt/HD_a2/ using the vi commnad.  Is there anything that i need to copy into the file contents to get it to work correctly?

I don't think that you need to create that file.  I don't think that you even could create that file.  The daemon usually creates it.  Try deleting the file and trying the "create db" command that you mentioned in this thread.  Make sure you delete the file referred to by the db_file setting in the config file.

I did that and when i try to creat the db using the command it says opt/var/lib/mpd/mpd.pid is not an absolute path
config: error parsing "pid_file" at line 43 aborted

You need to say:

/opt/var/lib/mpd/mpd.pid

not:

opt/var/lib/mpd/mpd.pid

Pathnames that start with a '/' are absolute; otherwise they are relative.

So, in this case, the error message was absolutely correct and even helpful.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#52 2010-09-30 18:21:29

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

thank you so much for being patient with me while i learn.  I did that and that particular error message went away but now it says failed to listen on 192.168.2.10 address already in use.  I have repeated the command to kill the service but it continues to say that.

Offline

 

#53 2010-09-30 18:37:25

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

ok I went in and killed all the PID's and now its telling me the same thing as before, "daemon: could not create pid file /opt/var/lib/mpd/mpd_pid": permission denied

Offline

 

#54 2010-09-30 18:41:41

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

reset permissions and got rid of permission error, now its back to saying address is already in use.  I'm at a loss.

Offline

 

#55 2010-09-30 19:13:39

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

it seems that when I kill the processes that I can either create the db sucessfully and then not start the service (getting an error that address any is already in use) or I can successfully start the service first but then if i try to create the database it wont let me (giving the same error). 

Also, I have my home ip address linked to a dyndns domain name so that I can easily connect.  Does this work for mpd as well?  I am trying through an mpd client on my android phone as well as mozilla's mpd client and I'm am putting in the host as xxxxx.dyndns.org

Offline

 

#56 2010-09-30 19:54:32

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Mpd music daemon with Iphone remote control and airtunes playback

OK, I went ahead and installed it as described in this thread - just a plain old optware install.

I copied the config file:

cp /opt/share/doc/mpd/mpdconf.example /opt/etc/mpd.conf

I created a dir:

mkdir /opt/var/lib/mpd
chmod 777 /opt/var/lib/mpd   (not positive this is needed but OK to do anyway)

I made the following changes to /opt/etc/mpd.conf:

Code:

13c13
< #music_directory              "~/music"
---
> music_directory               "/mnt/HD_a2/Music"
20c20
< #playlist_directory           "~/.mpd/playlists"
---
> playlist_directory            "/opt/var/lib/mpd/playlists"
28c28
< #db_file                      "~/.mpd/database"
---
> db_file                       "/opt/var/lib/mpd/database"
37c37
< #log_file                     "~/.mpd/log"
---
> log_file                      "/opt/var/lib/mpd/log"
43c43
< #pid_file                     "~/.mpd/pid"
---
> pid_file                      "/opt/var/lib/mpd/pid"
50c50
< #state_file                   "~/.mpd/state"
---
> state_file                    "/opt/var/lib/mpd/state"
72c72
< #bind_to_address              "~/.mpd/socket"
---
> bind_to_address               "/opt/var/lib/mpd/socket"
173a174,179
> audio_output {
>       type            "fifo"
>       name            "My Fifo"
>       path            "/tmp/mdpfifo"
>       format          "44100:16:2"
> }

The lines starting with '<' were in the original file.  The lines starting with '>' are my changes and additions.

I basically pointed to my Music directory and changed all the refs to "~/.mpd" to "/opt/var/lib/mpd".  I also added the audio_output stanza as shown.

Then,

mpd --create-db /opt/etc/mpd.conf

I think it complained about a missing playlists directory, so:

mkdir /opt/var/lib/mpd/playlists

mpd --kill /opt/etc/mpd.conf
mpd --create-db /opt/etc/mpd.conf

and its up and running with no errors.  There are a couple of warnings in the log that I may look into.

I cannot tell yet if it is actually working.  I'll have to see when I get home.

So I think your woes were caused by not setting up the mpd directory correctly and maybe missing the "bind_to_address" change.  Remember to remove the leading # in any config files line that you want to have an effect.

The default settings for all but the music_directory would probably have actually worked.  But the ~/.mpd directory is really in the root's home directory and would not survive a reboot unless you moved root's home dir someplace else.  But changing the config file to put the files on the hard disk in /opt/var/lib/mpd is just as good a solution.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#57 2010-09-30 21:37:14

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

thanks!  after that it appears to be running but I can't get any music to stream via my phone or fireforx mpd client.  How do I view the logs for errors?

Offline

 

#58 2010-09-30 21:49:54

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

i looked in the log file and it says avahi: Failed to create client: Daemon not running

Offline

 

#59 2010-09-30 22:06:22

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Mpd music daemon with Iphone remote control and airtunes playback

It turns out I am trying to get it working with a firefox client too (minion).

The avahi error has to do with running a process that announces service information.  I think that it helps your playback devices "find" your music server on your network.  You might be able to get by without it if you can or are willing to point your client right at your server.

I changed zeroconf_enabled to "no" to remove that message.  My log is clean now.

If you need avahi running, you'll have to configure it.  (man avahi-daemon).  I do not know how to do that (yet).

Minion is almost working for me.  It connects to the mpd daemon and fetches all the music library information.

I can start a song playing, but there is no audio.  When I tried to set the volume control, there was an error reported in the bottom of the minion pane and the volume control snapped back to zero.

I fixed that by setting the mixer_type to "software" in the mpd config file.

So, it all seems to work, but no audio.  The song progress bar moves when I play a song, so almost there.

I have both the fifo and httpd audio_outputs enabled, and still no luck.  I'm trying to figure out how to get the audio.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#60 2010-09-30 22:25:45

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

do I need to install mpc?

Offline

 

#61 2010-09-30 22:27:13

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

karlrado wrote:

It turns out I am trying to get it working with a firefox client too (minion).

The avahi error has to do with running a process that announces service information.  I think that it helps your playback devices "find" your music server on your network.  You might be able to get by without it if you can or are willing to point your client right at your server.

I changed zeroconf_enabled to "no" to remove that message.  My log is clean now.

If you need avahi running, you'll have to configure it.  (man avahi-daemon).  I do not know how to do that (yet).

Minion is almost working for me.  It connects to the mpd daemon and fetches all the music library information.

I can start a song playing, but there is no audio.  When I tried to set the volume control, there was an error reported in the bottom of the minion pane and the volume control snapped back to zero.

I fixed that by setting the mixer_type to "software" in the mpd config file.

So, it all seems to work, but no audio.  The song progress bar moves when I play a song, so almost there.

I have both the fifo and httpd audio_outputs enabled, and still no luck.  I'm trying to figure out how to get the audio.

are you inside the same lan as your nas?  I'm at work and my nas is at home...

Offline

 

#62 2010-10-01 00:35:36

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

ok I've got it appearing to work on both my phone and computer now.  However I'm having the same problem as you...  It appears to play but no volume.  Anyone have any idea what could be causiing this?  Minion says setvol: problems setting volume

Offline

 

#63 2010-10-01 01:07:19

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Mpd music daemon with Iphone remote control and airtunes playback

I'm not on the same LAN as the NAS.  I opened an SSH session to the DNS 323, tunneling port 6600, which lets me talk to the daemon at localhost:6600.  I do strongly suspect a port issue causing the problem and plan on trying it on the same LAN so I can determine if ports are the issue.

I made the "setvol" message go away by setting mixer_type to "software" in the mpd config file.  I don't know if that is the correct setting or not.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#64 2010-10-01 01:34:13

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

when you generate the startup script for raop play

raop_play <YourAirtunesIPAdress) /tmp/mpdfifo > /tmp/raop.log 2>&1 < /dev/null &


what goes in yourairtunesaddress?  is that the ip address of the box?  If I try to create the startup script by plugging that address in, it says "pattern not found"

Offline

 

#65 2010-10-01 01:35:57

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

karlrado wrote:

I'm not on the same LAN as the NAS.  I opened an SSH session to the DNS 323, tunneling port 6600, which lets me talk to the daemon at localhost:6600.  I do strongly suspect a port issue causing the problem and plan on trying it on the same LAN so I can determine if ports are the issue.

I made the "setvol" message go away by setting mixer_type to "software" in the mpd config file.  I don't know if that is the correct setting or not.

it was a port issue i thought i had 6600 opened up on the router but i didn't.  I'm guessing I need to get raop play going to actually hear anything.  is that correct?

Offline

 

#66 2010-10-01 01:42:25

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Mpd music daemon with Iphone remote control and airtunes playback

bigwebb83 wrote:

when you generate the startup script for raop play

raop_play <YourAirtunesIPAdress) /tmp/mpdfifo > /tmp/raop.log 2>&1 < /dev/null &


what goes in yourairtunesaddress?  is that the ip address of the box?  If I try to create the startup script by plugging that address in, it says "pattern not found"

I'm not using airtunes or raop, so I cannot help.  All I want to do is stream, over http I suppose, to Minion.  I may put mpod on an iPod Touch later.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#67 2010-10-01 01:46:17

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Mpd music daemon with Iphone remote control and airtunes playback

bigwebb83 wrote:

karlrado wrote:

I'm not on the same LAN as the NAS.  I opened an SSH session to the DNS 323, tunneling port 6600, which lets me talk to the daemon at localhost:6600.  I do strongly suspect a port issue causing the problem and plan on trying it on the same LAN so I can determine if ports are the issue.

I made the "setvol" message go away by setting mixer_type to "software" in the mpd config file.  I don't know if that is the correct setting or not.

it was a port issue i thought i had 6600 opened up on the router but i didn't.  I'm guessing I need to get raop play going to actually hear anything.  is that correct?

Well yes of course for 6600.  I was talking about the possible need to forward other ports, possibly for http streaming.

I really do not know much about streaming, so I am just figuring this out now.  And I'm not planning to use raop.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#68 2010-10-01 01:50:48

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

this thing is making me pull my hair out!!!  Now, after making some changes, and trying to start the service back up using the same command I did before /opt/bin/mpd --create-db /opt/etc/mpd.conf it says /ffp/bin/sh: /opt/bin/mpd: not found

What the hell?

Offline

 

#69 2010-10-01 01:52:52

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

karlrado wrote:

bigwebb83 wrote:

karlrado wrote:

I'm not on the same LAN as the NAS.  I opened an SSH session to the DNS 323, tunneling port 6600, which lets me talk to the daemon at localhost:6600.  I do strongly suspect a port issue causing the problem and plan on trying it on the same LAN so I can determine if ports are the issue.

I made the "setvol" message go away by setting mixer_type to "software" in the mpd config file.  I don't know if that is the correct setting or not.

it was a port issue i thought i had 6600 opened up on the router but i didn't.  I'm guessing I need to get raop play going to actually hear anything.  is that correct?

Well yes of course for 6600.  I was talking about the possible need to forward other ports, possibly for http streaming.

I really do not know much about streaming, so I am just figuring this out now.  And I'm not planning to use raop.

from what the op says it sounds like you wont hear anything with mpd alone.

Offline

 

#70 2010-10-01 02:16:37

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

could it have something to do with me restarting the unit?

Offline

 

#71 2010-10-01 02:45:57

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Mpd music daemon with Iphone remote control and airtunes playback

bigwebb83 wrote:

do I need to install mpc?

Maybe you should go look up mpc and decide if you want it.  It is a command line program that runs on the same machine as mpd and lets you control mpd.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#72 2010-10-01 02:57:46

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Mpd music daemon with Iphone remote control and airtunes playback

bigwebb83 wrote:

karlrado wrote:

bigwebb83 wrote:

it was a port issue i thought i had 6600 opened up on the router but i didn't.  I'm guessing I need to get raop play going to actually hear anything.  is that correct?

Well yes of course for 6600.  I was talking about the possible need to forward other ports, possibly for http streaming.

I really do not know much about streaming, so I am just figuring this out now.  And I'm not planning to use raop.

from what the op says it sounds like you wont hear anything with mpd alone.

Right.

But I was hoping that Minion would be able to catch the http streaming music and play that.  I just don't know enough about Minion and may be expecting too much.  Perhaps there is a way to make it do what I want.  So instead I try another streaming music client.  Perhaps the intention here is to use Minion to control MPD and use some other player to catch the stream.

The Good News is that I did get a few seconds of music by using Windows Media Player and pointing it to http://localhost:8000.  I have only the httpd audio output enabled with the LAME encoder.  The Orbis encoder crashes.  And of course I had to forward port 8000.  But the DNS is slammed both CPU-wise and memory-wise and I suspect that the long network delays are not helping.  I will try on the local LAN later, both with Minion and WMP.  It is possible that Minion was not playing anything for the same reasons why I only got a few secs of music with WMP.

I have a SheevaPlug on the same network.  Perhaps MPD may run better there.  What's weird is that the "few seconds" of music that I hear comes across after I kill mpd.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#73 2010-10-01 03:09:33

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

bigwebb83 wrote:

this thing is making me pull my hair out!!!  Now, after making some changes, and trying to start the service back up using the same command I did before /opt/bin/mpd --create-db /opt/etc/mpd.conf it says /ffp/bin/sh: /opt/bin/mpd: not found

What the hell?

why do you think i'm getting this error all of a sudden?

Offline

 

#74 2010-10-01 03:45:09

bigwebb83
Member
Registered: 2010-09-21
Posts: 49

Re: Mpd music daemon with Iphone remote control and airtunes playback

had to execute some of the original optware commands again after restarting

Offline

 

#75 2010-10-01 12:04:21

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Mpd music daemon with Iphone remote control and airtunes playback

bigwebb83 wrote:

when you generate the startup script for raop play

raop_play <YourAirtunesIPAdress) /tmp/mpdfifo > /tmp/raop.log 2>&1 < /dev/null &


what goes in yourairtunesaddress?  is that the ip address of the box?  If I try to create the startup script by plugging that address in, it says "pattern not found"

I believe that's the IP address for your Apple Express (maybe a mac computer can act as one too?? don't know).  I gave mine a static IP address on the router of course.

I'll check my settings for raop_play when I get home and post them up to see if there's anything interesting.

Note:  I've only controlled playing with Iphone and Android apps MPOD (on both) and MPDroid (android).....hmm actually not true, also via something on ubuntu....maybe it was rythmbox...or a specific mpd client, can't remember.

I'm not using it much, but just demonstrated to my dad and worked well.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB