Moode Audio Player for Raspberry Pi

Hi Tim,

I do have an Ethernet cable connected! Eth0 is configured to get a DHCP address, and it does, but it looks like the logger gives up waiting before the address is served. I'll configure eth0 for a static IP address and see if that changes anything.

I have a HDMI monitor attached to the Pi, along with a USB keyboard. I ran mlog.sh after the Pi got to the login prompt, then logged into the console directly (no ssh.) So I didn't initiate any inbound network traffic to the Pi.

Best Regards,

- Steve

Hi Steve,

Thats interesting. During startup Moode checks each interface for an IP address up to 3 times waiting 1 sec between each check for eth0 and 3 secs between each check for wlan0. On my network I never see more than 1 wait for eth0.

If u would like, I can show you in the code /var/www/command/worker.php where to bump the the wait value for eth0 check.

Regards,
Tim
 
Hi Tim,

Thats interesting. During startup Moode checks each interface for an IP address up to 3 times waiting 1 sec between each check for eth0 and 3 secs between each check for wlan0. On my network I never see more than 1 wait for eth0.

If u would like, I can show you in the code /var/www/command/worker.php where to bump the the wait value for eth0 check.

Well, I tried using a static IP address and that worked! My mlog.sh output now looks like:

Code:
20160705 131248 worker: Startup
20160705 131305 worker: Host (moode-PiFi1)
20160705 131305 worker: Hdwr (Pi-1B 512MB)
20160705 131305 worker: Arch (armv6l)
20160705 131305 worker: Krnl (4.4.8+)
20160705 131305 worker: OS   (moodeOS 1.0)
20160705 131306 worker: Rel  (Moode 2.6 2016-06-07)
20160705 131306 worker: MPD  (0.19.15)
20160705 131306 worker: Session loaded
20160705 131306 worker: Debug logging (on)
20160705 131306 worker: File check...
20160705 131310 worker: File check ok
20160705 131310 worker: Auto-shuffle deactivated
20160705 131311 worker: USB sources ()
20160705 131312 worker: MPD started
20160705 131313 worker: wlan0 does not exist
20160705 131313 worker: Audio (I2S audio device)
20160705 131313 worker: Audio (HIFI DAC)
20160705 131314 worker: ALSA outputs unmuted
20160705 131314 worker: ALSA mixer name (Digital)
20160705 131314 worker: MPD volume control (software)
20160705 131315 worker: Hdwr volume controller not detected
20160705 131316 worker: Volume level (89) restored
20160705 131316 worker: wlan0 address not assigned
20160705 131316 worker: eth0 exists
20160705 131316 worker: eth0 (192.168.1.7)
20160705 131316 worker: NAS sources (none configured)
20160705 131316 worker: MPD consume reset to off
20160705 131316 worker: Autoplay on
20160705 131316 worker: Watchdog started
20160705 131316 engine-mpd: Connect
20160705 131316 engine-mpd: Session loaded
20160705 131317 engine-mpd: Generating enhanced metadata
20160705 131317 engine-mpd: Metadata returned to client
20160705 131317 worker: End startup
20160705 131317 worker: Ready
20160705 131318 engine-mpd: Connect
20160705 131318 engine-mpd: Session loaded
20160705 131318 engine-mpd: Idle
20160705 131323 engine-mpd: Connect
20160705 131323 engine-mpd: Session loaded
20160705 131323 engine-mpd: Generating enhanced metadata
20160705 131323 engine-mpd: Metadata returned to client
20160705 131324 engine-mpd: Connect
20160705 131324 engine-mpd: Session loaded
20160705 131324 engine-mpd: Idle
20160705 131340 engine-mpd: Idle timeout event=(changed: player)
20160705 131340 engine-mpd: Generating enhanced metadata
20160705 131340 engine-mpd: Idle timeout event=(changed: player)
20160705 131340 engine-mpd: Generating enhanced metadata
20160705 131340 engine-mpd: Metadata returned to client
20160705 131340 engine-mpd: Metadata returned to client
20160705 131341 engine-mpd: Connect
20160705 131341 engine-mpd: Session loaded
20160705 131341 engine-mpd: Idle

For whatever reason I'm not getting a DHCP address for a really long time- like 10s of seconds. Once the login prompt comes up on the Pi, I can login and run 'ifconfig -a' several times before I see an IPv4 address. I have my Pi plugged into a gigE switch, and perhaps negotiating the link speed to 100Mbits is taking awhile. After switching back to DHCP, logging into the console, waiting until I do see an IPv4 address, then doing:

Code:
time dhcpcd --rebind --waitip eth0

I see that the command completes in at most 0.1 seconds. Although link speed negotiation has completed by now, I'm not sure this is the proper way to check for DHCP address acquisition time.

Best Regards,

- Steve
 
Also, I found the 3-second DHCP wait time in worker.php, and changed it to 30 seconds. After several reboots, it looks like the Pi is usually getting a DHCP address after 4-5 seconds.

Best Regards,

- Steve

Hi Steve,

U might also want to try Updater.sh and manually install the latest Moode Update. Its generally best to have the latest code :)

-Tim
 
Hi Tim,

U might also want to try Updater.sh and manually install the latest Moode Update. Its generally best to have the latest code :)

Hmm, the log still shows the original r26 original release date, but I did run the updater manually! It looks like it worked: I see the new radio stations and keyboard configuration features included in the 2016-06-27 update. And when I 'check for updates' in the GUI it claims I'm 'up to date.'

The function getMoodeRel() in playerlib.php appears to be looking for the 'Release' string in footer.php, but my Release string is "2.6 2016-07-07 ..." even after the update. Did the update not run properly?

Best Regards,

- Steve
 
Hi Tim,



Hmm, the log still shows the original r26 original release date, but I did run the updater manually! It looks like it worked: I see the new radio stations and keyboard configuration features included in the 2016-06-27 update. And when I 'check for updates' in the GUI it claims I'm 'up to date.'

The function getMoodeRel() in playerlib.php appears to be looking for the 'Release' string in footer.php, but my Release string is "2.6 2016-07-07 ..." even after the update. Did the update not run properly?

Best Regards,

- Steve

Hi Steve,

Look in Moode log (./mlog.sh) and on the About screen and u should see the release: 2.6 2016-06-07 and the update: (2016-06-27). Don't forget to refresh Browser.

-Tim
 
Hi Tim,

Look in Moode log (./mlog.sh) and on the About screen and u should see the release: 2.6 2016-06-07 and the update: (2016-06-27). Don't forget to refresh Browser.

I don't see this from mlog.sh or in the About screen. The About screen shows "Release: 2.6 2016-06-07" only. However, when I click the 'release notes' link that follows the release string I get:

Code:
========================================
RELEASE NOTES

Moode Audio Player, (C) 2014 Tim Curtis
[url=http://moodeaudio.org]moodeaudio.org[/url]
========================================

======================
[B]2.7 Release 2016-07-DD[/B]
======================

New features

- NEW: In-place software updater
- NEW: Cache PHP session data using memcache
- NEW: Sys config settings for kbd and layout

Media

- NEW: AddictedToRadio - Quiet Storm
- NEW: Positivly Baroque
- UPD: Zen FM stream link to mp3

Updates

- UPD: Improved watchdog monitoring
- UPD: Change MPD socket connection to use debugLog()
- UPD: Clean up wording on Net config and Restart screens
- UPD: Add 32/176.4, 32/352.8 sample rates to SoX list
- UPD: Bump NGINX fastcgi_read_timeout
- UPD: Use UNIX socket for PHP/NGINX interprocess comms

Bug fixes

- FIX: Remove circular symlinks for SDCARD and NAS
- FIX: Playback panel toolbar not visible on iPad Mini
- FIX: DHCP addr being assigned when eth0 set to static addr 
- FIX: Fail to get cover art embedded in AIFF format

followed by the release notes for the original 2.6 release.

I know there have been two updates since the original 2.6 release. This Pi was setup after the second update was available, so it never got the first update; I installed r26 and ran the updater manually. I assume that's OK and the second update included all previous updates too. Could that be part of the problem?

Best Regards,

- Steve
 
Hi Tim,



I don't see this from mlog.sh or in the About screen. The About screen shows "Release: 2.6 2016-06-07" only. However, when I click the 'release notes' link that follows the release string I get:

Code:
========================================
RELEASE NOTES

Moode Audio Player, (C) 2014 Tim Curtis
[url=http://moodeaudio.org]moodeaudio.org[/url]
========================================

======================
[B]2.7 Release 2016-07-DD[/B]
======================

New features

- NEW: In-place software updater
- NEW: Cache PHP session data using memcache
- NEW: Sys config settings for kbd and layout

Media

- NEW: AddictedToRadio - Quiet Storm
- NEW: Positivly Baroque
- UPD: Zen FM stream link to mp3

Updates

- UPD: Improved watchdog monitoring
- UPD: Change MPD socket connection to use debugLog()
- UPD: Clean up wording on Net config and Restart screens
- UPD: Add 32/176.4, 32/352.8 sample rates to SoX list
- UPD: Bump NGINX fastcgi_read_timeout
- UPD: Use UNIX socket for PHP/NGINX interprocess comms

Bug fixes

- FIX: Remove circular symlinks for SDCARD and NAS
- FIX: Playback panel toolbar not visible on iPad Mini
- FIX: DHCP addr being assigned when eth0 set to static addr 
- FIX: Fail to get cover art embedded in AIFF format

followed by the release notes for the original 2.6 release.

I know there have been two updates since the original 2.6 release. This Pi was setup after the second update was available, so it never got the first update; I installed r26 and ran the updater manually. I assume that's OK and the second update included all previous updates too. Could that be part of the problem?

Best Regards,

- Steve

Hi Steve,

My mistake, what you are seeing is correct. The NEXT update will include the references to the package date in Moode log and on the About screen.

Yes, updates are cumulative.

Regards,
Tim
 
I've seen than in the file worker.php are these lines:

// restore volume level
sysCmd('/var/www/vol.sh ' . $_SESSION['volknob']);
workerLog('worker: Volume level (' . $_SESSION['volknob'] . ') restored');


I'm controling volume with a encoder rotary but when I start the system always get a
worker: Volume level (0) restored

In the LCD I see the correct volume (with the comand mpc volume) but not in the browser pc (0%). How can I syncronize the two values?
 
Clicks, pops, distorsion PI + WaveIO USB

Hi Jean-Louis,

Moode uses mainline Linux kernels, and therefore the USB audio driver that is shipped in those kernels. As I may have mentioned in earlier posts, the kernel development branches contain references to many fixes to USB audio driver for UAC2 chipsets but so far an updated driver does not appear to have made it into the mainline kernels yet.

In Moode 2.6 the UAC2 fix is done from System config screen.

-Tim
Hi Kent, Tim and Zoot

Thanks for your suggestions at several steps. I did additional customizing tests, testing and checked logs, does not seem that Packets are lossed as I thought
- PI B+ + WaveIO + Volumio ( debian ) : same as moode
- PI B+ + WaveIO + Runeaudio ( archlinux) : still same problem but seems less strong
- Beaglebone Black + WaveIO + Runeaudio (legacy plateform) : problems totally gone, so i stick to it for now although i Highly appreciate TIM's support, and the fastness of sw development

If someone has succeeded with PI + WaveIO + Moode, please let me know so that I May do additional testing

BR
Jean-Louis
 
I've seen than in the file worker.php are these lines:

// restore volume level
sysCmd('/var/www/vol.sh ' . $_SESSION['volknob']);
workerLog('worker: Volume level (' . $_SESSION['volknob'] . ') restored');


I'm controling volume with a encoder rotary but when I start the system always get a
worker: Volume level (0) restored

In the LCD I see the correct volume (with the comand mpc volume) but not in the browser pc (0%). How can I syncronize the two values?

Hi,

Moode UI volume is separate from MPD and ALSA volume as a result of implementing the nice logarithmic curve feature for hardware volume controllers. What this means is that external apps that set MPD or ALSA volume directly must instead call either vol.sh or vol.php to set volume. These two Moode volume control interfaces will set MPD/ALSA volume and also update Moode UI volume level.

For rotary encoders, the encoder driver would need to be rewritten to call vol.sh or vol.php, or alternatively it could implement the same logic, mpd, amixer and sqlite calls as in vol.php code.

Regards,
Tim
 
Hi Kent, Tim and Zoot

Thanks for your suggestions at several steps. I did additional customizing tests, testing and checked logs, does not seem that Packets are lossed as I thought
- PI B+ + WaveIO + Volumio ( debian ) : same as moode
- PI B+ + WaveIO + Runeaudio ( archlinux) : still same problem but seems less strong
- Beaglebone Black + WaveIO + Runeaudio (legacy plateform) : problems totally gone, so i stick to it for now although i Highly appreciate TIM's support, and the fastness of sw development

If someone has succeeded with PI + WaveIO + Moode, please let me know so that I May do additional testing

BR
Jean-Louis

Hi Jean-Louis,

On the BBB, what is the Linux kernel version being used?

-Tim
 
Hi Kent, Tim and Zoot

Thanks for your suggestions at several steps. I did additional customizing tests, testing and checked logs, does not seem that Packets are lossed as I thought
- PI B+ + WaveIO + Volumio ( debian ) : same as moode
- PI B+ + WaveIO + Runeaudio ( archlinux) : still same problem but seems less strong
- Beaglebone Black + WaveIO + Runeaudio (legacy plateform) : problems totally gone, so i stick to it for now although i Highly appreciate TIM's support, and the fastness of sw development

If someone has succeeded with PI + WaveIO + Moode, please let me know so that I May do additional testing

BR
Jean-Louis

Interesting findings, Jean-Louis.

Your BBB result feeds my prejudice that boards like the BBB (rather more expensive) and recent Odroid C1+ or C2 (priced more in line with the RPis) are better starting points. I've used both in other application areas where I know what I'm doing, but there is so much less user support for them, especially in audio applications, that I choose to stick with the goodness of Moode Player and let Tim do all the hard lifting (Thanks, Tim!).

If you manage to borrow an RPi2B or 3B it would be interesting to see if you get the same results. Their CPUs have ARMv7 and ARMv8 architecture, respectively, rather than the ARMv6 architecture of the RPiB+ CPU, so the compiled kernel/drivers/apps are subtly different and the CPU clock speeds are faster too. None of which means anything until it's put to the test, of course.

Best of luck,
Kent
 
Should I be concerned..?

Logged into Moode via ssh and got this message....

$ ssh pi@moode
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for moode has changed,
and the key for the corresponding IP address xxxxxxxxx
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is....
ECDSA host key for moode has changed and you have requested strict checking.
Host key verification failed.
I have removed as instructed ....and then can ssh in normally.
Code:
ssh-keygen -f "/home/blunder/.ssh/known_hosts" -R moode

An abberation ? or should it be investigated further and if so any suggestions ?
Thanks.
 
That's normal behaviour of your OS, nothing to do with Moode, it's ssh security doing its job.

Thanks !
Yes, after a little more research it seems to have been triggered by having updated Moode but Ubuntu still expecting the previous versions host key and clearing the .ssh/known_hosts allows the new key to be stored.
It's not happened before when upgrading versions but has only appeared for the first ssh login following an in place update. Is this likely to happen after each update ?