mpdPup - Simplified MPD Music Server/Jukebox - v0.9.3

For talk and support relating specifically to Puppy derivatives
Message
Author
User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#361 Post by tallboy »

Hi DenisP.
I don't use the application in question, but have you looked for a script in /root/Startup/?

I think /usr/sbin/delayedrun is used for several purposes, so it is maybe a file you should be careful about modifying, unless you know exactly what you do... 8)

tallboy
True freedom is a live Puppy on a multisession CD/DVD.

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

#362 Post by DenisP »

tallboy wrote: I don't use the application in question, but have you looked for a script in /root/Startup/?

I think /usr/sbin/delayedrun is used for several purposes, so it is maybe a file you should be careful about modifying, unless you know exactly what you do... 8)
I've checked the "Startup" folder, it's not there...

As for modifying something that I don't know, I don't think there's much danger in this case.

This line of script automatically invokes the "MPDwizard", which is a script for setting up the MPD server - which is exactly what I want to avoid (i.e. I don't want it to start automatically!).

It's not like I'm disabling the automatic start of the MPD server... Wizard is a different thing, and I can start it whenever I want, by just entering "mpdwizard" on the command line.
So, if I disable its automatic start, the system still functions without any changes.

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

#363 Post by DenisP »

A couple of suggestions for Idolse:

I see you're "slurping" neompc and web10mpc from your site during installation, so perhaps you could add/change the following:

in neompc, when used on some smartphones, e.g. iphone, the volume slider doesn't work. I've found a patch online, and it enables you to "tap" the volume bar to change volume. A bit clumsy, but better than nothing. Here is the additional code - goes towards the bottom of the "neompc.js" file in "/var/www/neompc/lib/js":

Code: Select all

// this addition takes care of volume slider problems on some smartphones, e.g. iPhone
	
	$('#slider_container').click(function(event){
		ajax_control('volume', pos_to_volume(event.pageY-($('#volume_slider').outerHeight()/2)-$('#slider_container').offset().top));
	});

// end of addition for smartphones
Also, it would be nice if the web10mpc came already set for showing the volume on the page - it is changed in "control.ini.php", in "var/www/web10mpc/include"

it says:

Code: Select all

show_volume_controls = false
Just change it to "true"... I guess most of the people who use smartphone GUI also want to have the volume control :)

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

#364 Post by DenisP »

And, as an aside, what is the "proper" (or recommended) way to properly configure "client175" and have it start automatically when the machine is powered on?

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

#365 Post by DenisP »

I think there's something amiss with client175 configuration.

Having installed client175 using mpdwizard, I was surprised that it did not start automatically (see my question above).

After some searcing, I found an entry for "client175" in /etc/init.d:

it's under "37.client175" - but its size (and contents) are the same as for "30.empcd" - which is obviously not as it should be - and is the obvious reason why "client175" is not actually autostarting.

Could someone provide a valid /etc/init.d file for client175?

Idolse?

Thanks!

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#366 Post by ldolse »

Good catch - I think I ran out of steam as I was testing/integrating non-PHP clients - I actually thought I had removed client175 support at the last minute, but may have been one of the other clients I was testing. I'll need to re-install it in order to create an init script - the empcd script is the most generic of the init scripts so I use it as a template.

Regarding the to PHP clients, I can go ahead and integrate those tweaks.

Glad you figured out mpdwizard - can't remember why I used delayedrun instead of the startup folder, but seems to me startup didn't work right...

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

#367 Post by DenisP »

bonalux wrote: I've not listed the ir receiver but it's already connected, i've to try to dump some ir codes to see if it's working correctly, then, if the only other config to be done it's in the empcd.conf file the trick is done, but i see that this file is referring to "eventdevice /dev/input/imon_remote", got to look even at it. Maybe lirc remote codes are sent to some input device (have no idea of what are event0, event1 ecc..), i'll try to find out...
Bonalux, any luck with setting up lirc with something else besides imon?

This is my next step, and I'm stuck :(

I'm using a simple serial IR receiver, and the first thing that happens when I try to add "modprobe lirc_serial" is:

Code: Select all

FATAL: Module lirc_serial not found.
:(
So, I'd really like to know how you are getting along :)
I have (just barely) succeeded in making this receiver work on my other Linux box (opensuse 12.1), where it does show some results when I press buttons on the remote... but even that one wasn't easy!
And on mpdPup, I don't even know where to start...

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

#368 Post by DenisP »

Again, I need a BIG favour:

could someone tell me how to compile the appropriate "lirc_serial" module and have it load properly, so that I can try to configure my homebrew serial IR receiver?

I've tested the IR serial receiver under windows, using winlirc, and it works properly, no problems at all... So, the receiver works as it should with the remote I've tested.

However, I'm at a loss when trying to set it up in mpdPup: I've tried downloading "lirc" and "lirc_modules" using Puppy package manager in X, but to no avail: I don't know what has to be done to enable "lirc_serial" module :(

Today I tried another approach: I downloaded the lirc source tgz package, and tried compiling it (I've loaded "devx" and "kernel" sfs packages, and have the kernel sources etc. available).
The "lirc" program itself compiled OK, but the executables were put in other directories - so I deleted old "lircd" and "lircmd" from /usr/sbin and replaced those with the newly compiled ones. I've also added newly built "lirc_serial.ko" to /lib/modules/2.6.39/misc (which already contains the original "lirc_dev.ko" which comes already installed with mpdPup - so I thought that might be the proper location).

When I try lirc with "lircd -H ?" to get the list of available modules, I get only "default" as available/supported driver.

I even tried to get the "lirc_serial" loaded at boot time, using boot manager: I get "lirc_serial" offered in the left pane as loadable module, can get it added to modules loaded at boot time, and everything seems OK. However, upon next boot, module is not there:

Code: Select all

# lsmod | grep lir
ir_lirc_codec           2608  0 
rc_core                 9120  7 ir_lirc_codec,ir_sony_decoder,ir_jvc_decoder,ir_rc6_decoder,ir_rc5_decoder,imon,ir_nec_decoder
lirc_dev                7156  1 ir_lirc_codec
# 

When I try "modprobe lirc_serial", I get the following:

Code: Select all

FATAL: Error inserting lirc_serial (/lib/modules/2.6.39/misc/lirc_serial.ko): Device or resource busy
So, could anyone be so kind as to try to find out what I'm doing wrong - and perhaps suggest the proper locations for newly built executables and the "lirc_serial" module, and where to put it, so that it can be found and activated at boot time.... or any other way possible to get the serial IR receiver working properly? (Maybe there's another Puppy package that can be installed, which might have all the necessary stuff already - i.e. "lirc_serial" driver?)

TIA,

Denis

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#369 Post by ldolse »

Most of the lirc documentation on the Internet is out of date, as the project lived outside the kernel source tree until about 2 years back. When it finally did get integrated into kernel a lot of things changed which made all the old how-to information obsolete for newer kernels. Installing lirc has better odds of screwing up your installation than helping you.

I don't have step by step instructions for you, but I recommend reading through the LIRC developer's blog and article on 2.6.35+:
http://wilsonet.com/?page_id=95
http://wilsonet.com/

It's more accurate than just about anything Google will give you at random.

If I understand what's been done correctly, once it's working the rc_core drivers basically just turn your remote into a keyboard as far as Linux is concerned, I don't believe lircd is needed - empcd can take over from there. I'm not sure if lirc_serial is still required...

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

#370 Post by DenisP »

ldolse wrote: If I understand what's been done correctly, once it's working the rc_core drivers basically just turn your remote into a keyboard as far as Linux is concerned, I don't believe lircd is needed - empcd can take over from there. I'm not sure if lirc_serial is still required...
Thanks for the quick reply :)

I'm not sure how everything is supposed to work just by using empcd... It requires some kind of driver, I think - at least that's what it says in empcd.conf ("eventdevice" line)....

So, do I just disregard lirc completely, and see if it will work with empcd, by putting "eventdevice /dev/input/event0" into empcd.conf?

From what I understand, empcd uses input events, and I should find which "event" my serial IR receiver is (most likely "event0"), and then try to decipher which button does what.... thus bypassing lirc and its settings, modules and whatnot?

Will try that, sure - and I'll be back soon to report on my progress :)

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#371 Post by ldolse »

Well you can pretty much disregard the user-space LIRC pieces, they're not needed for MPD control. That said they could help you for debugging. I haven't built my own serial receiver yet to do any of what you're attempting to do and didn't include the user space binaries in the builds to save space - I'll probably integrate them with the devx in a future release to simplify the debugging and testing side of things.

The drivers on the other hand you do need - I don't see an lirc_serial driver in the kernel modules that are bundled with mpdPup, my assumption is that this is deprecated in favor of some newer modules, but I can't find any good documentation to back this up. You also need to configure the keymap for your remote control so the LIRC driver correctly converts it's IR codes to keyboard commands, and I don't know how a specific keymap is loaded and tied to an event device.
Last edited by ldolse on Wed 24 Apr 2013, 14:30, edited 1 time in total.

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#372 Post by ldolse »

Here is an article where someone posted some detailed information on how to get this working for newer kernels:

http://forum.xbmc.org/showthread.php?tid=104541

You would want to follow the steps which discuss using the kernel drivers only.

Note I think this guide may be specifying some user-space LIRC tools for debugging purposes. ir-keytable is frequently referenced but that's not something bundled today - I assume it's part of the lirc user space tools. If you know the exactly what config file goes with your remote you may not need it. I have a hunch this might still be a bit easier than this poster is making it sound, but as he notes in his article, documentation is extremely sparse.

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

#373 Post by DenisP »

Idolse, thanks for the help!

But...

I don't think I'll be able to do it "the new way", using just the kernel.

Namely, my serial receiver is not recognized as input, there are no "events" for it, and /dev/input/event0 or any other "event" does not generate anything.

From what I've read in the articles you've linked (and some others), it seems that for the homebrew serial IR receiver in this case it would be best if I disabled everything from the new kernel stuff and do it "the old way", with lirc, which is, for example, also explained here:
http://www.linurs.org/linux/InfraredRemoteControl.html
My 8250 module for the serial port is listed OK (it was added to boot modules parameter in /etc/rc.d/MODULESCONFIG automagically), and I guess I now have to see how to disable the new kernel stuff with input/events, and go step by step to get lirc up and running in the old way...
On the machines I'm using, the serial port isn't used for anything else, anyway, so... IR serial would be the best way to go in my situation. The receivers can be made cheaply (I already have parts for several), and used with cheap "universal" remotes...
Imon displays with remotes would be the best, and could be used "out of the box" without tinkering, since that is the what you've set up mpdPup, but the price of such an imon unit would more than exceed the unit cost of the existing PC machines I'm tinkering with :) Besides, it wouldn't fit :)
Here's what I'm playing with:
http://www.parkytowers.me.uk/thin/Igel/3210/index.shtml (note those are NOT my pages...)
- a perfect machine for a totally quiet headless music server: I've already set up several for some of my friends who are into hifi (and who have rather serious hifi equipment at home) - and evey single one of them praises its sound quality :)
So, I also have to extend their praise to you, since I actually have nothing with it - I'm just setting these up with mpdPup installation (somewhat customised), and at their homes I set up the local wifi network stuff, connecting to DAC and setting their mobile phone clients, etc. for remote management...

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

#374 Post by ldolse »

Huh - that first link is interesting. The article you linked is basically saying the kernel needs to be re-compiled with a flag to pass IR to the user space LIRC. What's weird though is this advice is contrary to the various posts and emails to the LIRC list from the main developer (the blog I linked earlier), this is all supposed to work with the in kernel drivers.

I think the biggest issue here is the lack of documentation - in his blog post in 2010 he mentioned a FAQ on the in kernel updates would come out but then nothing ever did. Almost all the documentation on the lirc.org site dates from 2010 and earlier so no help there either. I suspect if you have the patience to wade through the LIRC mailing list archives most of the needed info is hiding there.

If compiling the kernel with a special flag is really the only way to get serial working then I can look into this when I get around to re-building the whole system on a 3.x kernel, but hopefully there is a way to get this working using the in-kernel drivers and standard event devices. I guess I really need to break out my soldering iron and put together the homebrew serial receiver pieces I picked up.

Another option if you're trying to do this on a budget is to see if any of the cheap USB IR receivers will work - based on what I've read most of the cheap receivers that present themselves as an MCE remote should work similarly to iMon.

Those iGel units look nice - looks like a similar class of hardware to the PC Engines Alix but nicer packaging and DVI. Glad to hear you're having good luck with them.

luisb
Posts: 25
Joined: Sun 30 Sep 2012, 13:52

#375 Post by luisb »

Hi DenisP
Do you see any advantage using Igel 5/4 with a more powerfull CPU?. It also has an external power supply. Prices are great at Ebay.
Regards

lugili
Posts: 16
Joined: Sun 24 Feb 2013, 21:07

Updated mpd database does not save

#376 Post by lugili »

Hi all,
I ran into a weird problem. When I put new music on my music server and update the mpd database I can see and play the new files in all the clients I use. Great. But when I shut down the music server and start it up the next time, I cannot see the new files anymore. Meaning, although all files are recognized by mpd, no new entries are stored in the db-file anymore.

What is even more strange is that all was working fine for some months until now. Anyone has an idea what this bug could be and how to fix it?

Thanks
lugili

ldolse
Posts: 367
Joined: Fri 23 Oct 2009, 16:33

Re: Updated mpd database does not save

#377 Post by ldolse »

lugili wrote:Hi all,
I ran into a weird problem. When I put new music on my music server and update the mpd database I can see and play the new files in all the clients I use. Great. But when I shut down the music server and start it up the next time, I cannot see the new files anymore. Meaning, although all files are recognized by mpd, no new entries are stored in the db-file anymore.

What is even more strange is that all was working fine for some months until now. Anyone has an idea what this bug could be and how to fix it?
I can only see this happening for one of two reasons:
  • Your thumbdrive is being mounted read-only for some reason so MPD can't write the database changes to disk - maybe a filesystem repair in needed.
  • somehow you moved the MPD database into the Pupply Linux filesystem, which doesn't persist across shutdowns unless you shutdown gracefully
Of the two scenarios the first one seems the most likely.
Last edited by ldolse on Tue 30 Apr 2013, 01:03, edited 1 time in total.

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

#378 Post by DenisP »

luisb wrote:Hi DenisP
Do you see any advantage using Igel 5/4 with a more powerfull CPU?. It also has an external power supply. Prices are great at Ebay.
Regards
No need for the more powerful machine: Igel 3/4 plays everything just fine - as long as you don't start the X window system and try to play 24/192 HD music - then it starts to hiccup :)
As long as you dont start X or try running several other programs simultaneously, everything (including 24/192) playback runs just fine - on a 600MHz machine, with 256MB RAM, and everything running from 128MB CF card (!).
However, if you can get igel 5/4 cheap, by all means go for it - it might be usable for other stuff, too :)

I like this one (igel 3/4) because it has built-in power supply (a good one!), which does not produce any interference (hum,buzz, etc.). All in all, a very compact and totally silent machine.
And thanks to Idolse, quite capable of running as a very good (headless) music server!

DenisP
Posts: 56
Joined: Mon 25 Mar 2013, 22:17
Location: Croatia

Re: Updated mpd database does not save

#379 Post by DenisP »

ldolse wrote: Of the two scenarios the first one seems the most likely.
I tend to agree - happens to me every once in a while. Usually fixed by a reboot, though...

luisb
Posts: 25
Joined: Sun 30 Sep 2012, 13:52

#380 Post by luisb »

Thanks DenisP
It means that you must run Igel 3/4 from command line. So a program like putty will work without problems? I prefer battery power supply so i believe 5/4 will be more suitable. In my settings i must have the cleanest usb connection possible.
Regards

Post Reply