Moode Audio Player for Raspberry Pi

Hi Tim.
This morning I cleared the blocks for WIFI connection (ssid and password) and rebooted. The log showed that AP mode was activated but The Pi never broadcasted the moode access point for me to join.
I probably won't have much time to play with this until next week, I think I'll start exploring the external WIFI dongle route next.
more to come.
Graham
 
Hi Tim.
This morning I cleared the blocks for WIFI connection (ssid and password) and rebooted. The log showed that AP mode was activated but The Pi never broadcasted the moode access point for me to join.
I probably won't have much time to play with this until next week, I think I'll start exploring the external WIFI dongle route next.
more to come.
Graham

Hi Graham,

If log shows "AP mode activated" then "Moode" SSID is definitely being advertised.

If it doesn't show up on client (PC, Laptop, mobile) then the issue is external to Moode software for example a network or client issue. Also, sometimes it takes a while before SSID's show up in client.

-Tim
 
detect is Moode is idle og playing music

Hi I trying to get moode to work with an amplifier, and so far it is going great.

I have one obstacle though. The amplifier I use is an old 50W linear Linn amplifier, so it is not so great for resources but great for sound. I have a connected GPIO relay, that I would like to use to turn the amplifier off using a GIPO output after nothing has played for say 1 minute, and then on when music starts playing again. or somebody accesses Moode.

Is there any way I can use a python script to get a status if anything is playing or if moode is idle??

Hope someone has some good ideas.
 
Hi Bob,

Thanks for confirming the increased wait time works :) I'll bump eth0 to 3 which would allow up to 9 secs for that interface to get ip address before Worker finishes startup. That should cover most "slow DHCP" scenarios without bogging down the startup time too much Looking at the code I can see one other startup task that should probably happen after the interface checks. I think its this particular task that if there is no ip address present when it runs it causes the NaN (Not a Number) error in the time knob when client tries to connect.

Yes, "Wait 1... etc." in the log corresponds to the loop count. Each interface check loops 3 times, sleeping for N secs each iteration.

-Tim

Yes, the fix has worked over several reboots.
I wonder if it is slow DHCP as the op and I both have Pi2s that worked fine.
It was only our old PiBs that behaved badly.

I'm running a Fritzbox 7490 and tried a Billion 7800 neither of which are slouches in handing out DHCP leases and have no problems elsewhere on the network or with other devices.
Given the commonality of the PiB perhaps it's older hardware is the problem ? ........only a sample of 2 I accept

However,the fix works and autoplay is operational once again ! Bliss.
 
Last edited:
Tim,
I've just got new PlainDAC+ as a replacement of dead PlainDAC. This one has PCM5121 chip (same as 5122, just with 106dB dynamic instead of 112dB).
I think that the "5122 options" should also work for this chip (even on the manufacturer's site they're just called pcm512x). Any chance to activate additional settings also for 5121? Currently, they do not appear in the drop down box.

http://www.ti.com/lit/ds/slas763b/slas763b.pdf



Marek
 
Yes, the fix has worked over several reboots.
I wonder if it is slow DHCP as the op and I both have Pi2s that worked fine.
It was only our old PiBs that behaved badly.

I'm running a Fritzbox 7490 and tried a Billion 7800 neither of which are slouches in handing out DHCP leases and have no problems elsewhere on the network or with other devices.
Given the commonality of the PiB perhaps it's older hardware is the problem ? ........only a sample of 2 I accept

However,the fix works and autoplay is operational once again ! Bliss.

Hi Bob,

I don't experience the issue on my Pi-1B's so I'm quite sure whats going on. One way to gain some insight would be to open System config, clear syslogs, reboot then examine syslog.

After reboot completes, ssh and then cat /var/log/syslog and note the timestamps for the following sequence of messages:

1) Booting Linux on physical CPU 0x0
2) DHCPREQUEST (asking DHCP server to renew the lease)
3) DHCPOFFER
4) DHCPACK

Timings below are for one of my Pi-1B's with an EDIMax adapter.

17:10:56 Booting Linux on physical CPU 0x0
17:11:04 DHCPREQUEST
17:11:04 DHCPOFFER
17:11:04 DHCPACK

If the interface did not previously have an ip address lease then you would see DHCPDISCOVER instead of DHCPREQUEST. My Router hands out 6 day leases.

-Tim



-Tim
 
Tim,
I've just got new PlainDAC+ as a replacement of dead PlainDAC. This one has PCM5121 chip (same as 5122, just with 106dB dynamic instead of 112dB).
I think that the "5122 options" should also work for this chip (even on the manufacturer's site they're just called pcm512x). Any chance to activate additional settings also for 5121? Currently, they do not appear in the drop down box.

http://www.ti.com/lit/ds/slas763b/slas763b.pdf



Marek

Hi,

If ALSA picks up the chip options they will appear in the ALSAMIXER app. Let me know if they are there.

-Tim
 
Hi,

If ALSA picks up the chip options they will appear in the ALSAMIXER app. Let me know if they are there.

-Tim

Yes, they seem to be there :)
 

Attachments

  • alsa-pcm5121.jpg
    alsa-pcm5121.jpg
    49.5 KB · Views: 203
  • alsa-pcm5121-2.jpg
    alsa-pcm5121-2.jpg
    47.6 KB · Views: 200
Hi Tim and "BartR"

i have now tested MoodeAudio with fresh Image inkl. latest 2.6-Updates and RP-Kernel 4.4.15 with PI2 and PI3 Hardware for using with WiFi-Dongle:

- MoodeAudio on PI2 is running Wifi in Master Mode and also as AP Mode (for Airplay) without problems (WiFi-Dongle: Edimax 7811 and others).

- MoodeAudio on PI3 with internal WiFi is running Wifi only in AP Mode (for Airplay). In Master-Mode for connecting to other AP, the internal new WiFI Adapter is very unstable and connecting is 1 of 20 ok. I have now disable the internal WiFi-Adapter and use an external USB-WiFI-Dongle for the PI3 - and all is running ok (like an PI2).

- In using with an fresh Rasp-Jessie Image, all WiFi Modes (as Master-Mode or AP -Mode) run ok (example as AirPrint Server) - internal WiFI or external USB-Dongle is equal.

Fazit: For me it's interresting to see, it's different in using with WiFi between MoodeAudio Image and Rasp-Jessie Image.

Regards
Siegbert

You've made some huge assumptions, not least of which is that the Pi3 wifi is problematic.

For nearly every 'problematic' wireless device I have been shown, I can point to the router as the source of the problem. Which is why the Pi3 works fine in AP mode, but not, as you claim, in master mode.

On my network and the half-dozen others I have installed Pi3s into, it works just fine.

So, the difference between the Pi3s in successful implementations and yours is YOUR router.

I'm often surprised at just how crappy are people's home networks, and while they may spend thousands on wifi-capable devices, will still expect the PoS router their ISP gave them to perform flawlessly.

Buy a decent 802.11n or better router, configure it appropriately, then you can see just how good the Pi3 is.
 
I´m still looking for a smart, cheap analog PSU.

Lukas

How about a non-smart, simple ac-dc transformer?

If you have deep pockets, you could get a nice toroidal with exotic components, but a standard old 'box' type transformer should do just as well.

I use my bench D.C. supply for driving and testing everything from arduino to complex multi-board processors and it works just fine. Cost me $65 from AliExpress and delivers up to 35V at 10A.
 
Hi,

Moode 2.6 2016-07-28 update is available.

READ CAREFULLY

This update can take several minutes to complete due to components that are downloaded and installed from Jessie repo. After pressing INSTALL, if the message "Software update complete, Reboot required" appears immediately, just ignore it and wait several minutes. There is bug in Worker that prevents System config screen from auto-waiting before displaying the completion message. The bug is fixed in this update.

The update process can be monitored by ssh TOP to determine when its ok to reboot. Look for apt-get and mandb running. When they are both finished and no longer appear in list, its safe to reboot.

1) One of the updates installs html files that revert the knob colors to Emerald. Use Customize to set another color, then back to your favorite color, then refresh.

2) The wonderful Crossfeed DSP plugin is included in this update. IMPORTANT: To establish Crossfeed/MPD outputs its necessary to perform the steps below after reboot.

a) MPD config, APPLY
b) System config, set Crossfeed DSP to 725 Hz 4.5 dB then set it back to disabled.
c) The config can be verified by running the cmd below

pi@moode:~ $ mpc outputs
Output 1 (ALSA default) is enabled
Output 2 (ALSA crossfeed) is disabled
pi@moode:~ $

3) Several configuration changes are included that provide improved support for loading large collections into the Library panel.

Finally, it's always a good idea to BACKUP the SD Card before installing updates :)

Enjoy!

Regards,
Tim

Package contents

NEW: In-place software updater
NEW: Crossfeed DSP for headphone listening
NEW: Support Meridian Explorer 2 and MQA
NEW: Cache PHP session data using memcache
NEW: Restart.sh script for reboot/poweroff
NEW: Setting to turn off Pi-3 WiFi/BT adapter
NEW: Sys config settings for kbd and layout
NEW: AddictedToRadio - Quiet Storm
NEW: Buddah Radio
NEW: Positivly Baroque
NEW: Radio FM4

UPD: Zen FM stream link to mp3
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
UPD: Add update package date to Moode log and About
UPD: Clean up wording on MPD config screen
UPD: Add capability to install test updates
UPD: Add MPD outputs to Moode startup log
UPD: Add "no setup" to resp check in parseHwParams
UPD: Breakout airplay volume array for debug log
UPD: Bump PHP FPM max_execution_time to 180 secs
UPD: Get ALSA mixer name dynamically
UPD: Add vol.php to command/index.php
UPD: Add hover help to coverart links
UPD: Bump wait time for eth0 check during startup
UPD: Add mpd state to currentsong.txt

FIX: Remove circular symlinks in /mnt for NAS and SDCARD
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
FIX: Wrong encodedAT rate displayed for UPnP files
FIX: Wrong indextpl.html cp file in 2016-07-10 update
FIX: Audioinfo volume "disabled" not being displayed
FIX: ALSA mixer names with embedded spaces not parsed
 

Attachments

  • moode-r26-0728-fm4.png
    moode-r26-0728-fm4.png
    216.9 KB · Views: 347
  • moode-r26-0728-wifibt.png
    moode-r26-0728-wifibt.png
    103.2 KB · Views: 345
...
For nearly every 'problematic' wireless device I have been shown, I can point to the router as the source of the problem. Which is why the Pi3 works fine in AP mode, but not, as you claim, in master mode.

On my network and the half-dozen others I have installed Pi3s into, it works just fine.

So, the difference between the Pi3s in successful implementations and yours is YOUR router.
...

A simple test of this proposition suggests itself. Since slaukas has told us
- MoodeAudio on PI2 is running Wifi in Master Mode and also as AP Mode (for Airplay) without problems (WiFi-Dongle: Edimax 7811 and others).
he could bring up his RPi2B in Access Point Mode and try connecting to it with his RPi3B running in Station (aka Client) Mode, which he called Master Mode.

I just successfully performed this test with my RPi3B in Station Mode connecting to my RPi2B in Access Point Mode and my smart phone also connecting to it so as to give me a browser.

Of course, my RPi3B also works fine against my ASUS AP/router as I have reported earlier.

Regards,
Kent
 
I was confused by "AP Mode (for Airplay)"

AFAIK, Moode running in AP mode has nothing to do with AirPlay, it's providing an Access Point.

And unless I'm mistaken, the Edimax 7811 doesn't support AP mode on Jessie, as it uses the RTL8188CUS chip.

My point was, the RPi3 works perfectly with everything I've thrown at it, as I suspect it did for the guys that designed it.

If you have problems getting wifi working properly with something that has sold millions of units, with someung that other users have reported working fine with the same configuration and hardware, I would start my diagnosis somewhere else other than looking askance at the BCM43438.

I wasn't looking for a fight, just positing an evidence-based opinion, and with more than 30 years spent working with wireless and with 802.11x for as long as its been around. In my experience, unless the device is faulty, most wifi problems are either because of running too lightweight a router for your traffic or due to finger trouble while configuring. I've yet to find an isp that supplies a quality router for free :)

Your Asus is a fine router. Running stock firmware or aftermarket?


EDIT: The problems with the HifiBerry DAC Pro interfering with wifi seem to be sparse, but valid. As the Pro offers a MCLK for timing, I would suspect that the fact it uses the same DAC as the DAC+ and subsequently the same driver may indicate the driver doesn't, somehow, take account of the new timing framework.

This post from https://github.com/raspberrypi/linux/issues/1420 would indicate that's a good place to look:

the vc4 3d driver uses the new clock framework but the I2S driver hasn't been (back-)ported to that yet so ATM they can't be used together.

This is why you get that line in dmesg:
bcm2708-i2s 3f203000.i2s: can't request region for resource [mem 0x3f101098-0x3f10109f]

That region has already been registered by the clock framework, so the I2S driver can't request that, too.

msperl posted that his I2S/clk patches already landed in the 4.6rc kernel series, but I diidn't have time to test them yet
 
Last edited:
You've made some huge assumptions, not least of which is that the Pi3 wifi is problematic.

For nearly every 'problematic' wireless device I have been shown, I can point to the router as the source of the problem. Which is why the Pi3 works fine in AP mode, but not, as you claim, in master mode.

On my network and the half-dozen others I have installed Pi3s into, it works just fine.

So, the difference between the Pi3s in successful implementations and yours is YOUR router.

I'm often surprised at just how crappy are people's home networks, and while they may spend thousands on wifi-capable devices, will still expect the PoS router their ISP gave them to perform flawlessly.

Buy a decent 802.11n or better router, configure it appropriately, then you can see just how good the Pi3 is.


Dear Zootalaws,

we have tested the Pi3 with different Types of Routers (Netgear, Unify, ASUS, etc.). We have tested the PI3 also in AP-Mode, or as Bridge (eth0 - WiFI) or as Airprint-Server or only simple connected to an AP. With the normal Jessie-Image and different Kernel-updates, the PI3 works great in all WiFi Modes. We have seen, the PI3 has sometime Problem to connect with Routers in environment with 2.4G/5G. With the Moode-Image, the PI3 work great as Airplay-Server. But only in WiFi-Mode alone (no eth0 connected) we have some unexplainable effects. Using the PI3 with disabled internal WiFi and add an external USB-Wifi Adapter we have no problems - Thats All. The same problem we have also with Volumio.

Thanks to Tim to the new update, We have lot of fun with Moode.

Best Regards
Siegbert
 
How about a non-smart, simple ac-dc transformer?

...

It depends on what you expect or what you need. If you feel comfortabel with a device, that just works - fine. For me, the sound is most important. And a well-designed psu definetely makes a difference. In electronics it`s always current - no matter if the signal is "digital" or "analogue". And you get out, what you get in: therefore it´s so important for a pure sound to have a pure current. It´s that simple. :)

Luki
 
Here is a example of a basic shell script, you can modify or u can use python-mpc.
https://pypi.python.org/pypi/python-mpd/

Code:
#! /bin/sh
while : ; do
mpc idle
if mpc status | grep playing >/dev/null; then echo "playing";else 
echo "Not Playing"
fi
done

Cosmo61 - Thanks, wasn't aware of that module (but I'm pretty new to python, so ;-)

I have the following:

import mpd

client = mpd.MPDClient() # create client object
client.connect("localhost", 6600) # connect to localhost:6600
print client.mpd_version # print the mpd version
Status = client.status()
print Status['state']
client.close() # send the close command
client.disconnect() # disconnect from the server

which returns play, when playing and stop when nothing is playing. If I have to use that, I'm guessing that I'll have to use a while loop, that checks the status every minute, and then if the player stops, it turns the amp off and starts checking for example every half second if anything starts playing and then turns the amp on again.

While doable, it seems to be something that will consume some CPU, especially when the player is stopped, because the script has to check almost continously if the player has been started so the amp is not turned on too late.

Is there anyone who have a suggestion of how this could be made more efficient, especially the checkking when the player is stopped.
 
Dear Zootalaws,

we have tested the Pi3 with different Types of Routers (Netgear, Unify, ASUS, etc.). We have tested the PI3 also in AP-Mode, or as Bridge (eth0 - WiFI) or as Airprint-Server or only simple connected to an AP. With the normal Jessie-Image and different Kernel-updates, the PI3 works great in all WiFi Modes. We have seen, the PI3 has sometime Problem to connect with Routers in environment with 2.4G/5G. With the Moode-Image, the PI3 work great as Airplay-Server. But only in WiFi-Mode alone (no eth0 connected) we have some unexplainable effects. Using the PI3 with disabled internal WiFi and add an external USB-Wifi Adapter we have no problems - Thats All. The same problem we have also with Volumio.

Thanks to Tim to the new update, We have lot of fun with Moode.

Best Regards
Siegbert

Hi Siegbert,

When u say "normal Jessie image" which release date are you using?

1) On Pi-3, Airplay over Ethernet only works when the integrated WiFi/BT adapter is disabled. The most recent Moode update includes a setting on System config to do this.

2) When Moode is running in AP mode, Airplay does not work i.e., the Airplay service name is not advertised over wlan0, most likely due to an issue in mDNS (avahi).

Sounds like u have a network lab, what company do you represent?

-Tim
 
Hi Siegbert,

When u say "normal Jessie image" which release date are you using?

1) On Pi-3, Airplay over Ethernet only works when the integrated WiFi/BT adapter is disabled. The most recent Moode update includes a setting on System config to do this.

2) When Moode is running in AP mode, Airplay does not work i.e., the Airplay service name is not advertised over wlan0, most likely due to an issue in mDNS (avahi).

Sounds like u have a network lab, what company do you represent?

-Tim


Hi Tim,

no, no - i work only as IT-Crime Forensic. We have a small network lab. But for my hobby listening Music, i tried different kind of Music-Hardware. For my self interest i play with some RP Music Image-Provider (Moode, RuneAudio, Volumio, etc.). My goal was to play good quality of music (24Bit/96khz) over my RP3 with only connected the internal WLAN-Adapter to my Home-NAS. The RP send music over the HifiBerry Dac+ Pro to my headphone amplifier. In this constellation i have some problems with the RP3. In connection only with eth0, i have no problems. In connection with an external WiFi Adapter it's works also. Thats all.

Thanks for your work.

Regards
Siegbert