Moode Audio Player for Raspberry Pi

My second moOde streamer build (moOde 2) :D

digital output part is HiFiBerry digi+ pro, linking to PI3B by using GPIOs 2-3(for configuration), GPIOs 18-21(i2s sound interface) and GPIO16(reserved by HiFiBerry), document here https://goo.gl/zhN3sW

dac output part is Audiophonics TDA1387, using direct i2s link from HiFiBerry digi+ pro P6(bck, lrck, data)


sound result:

1. moOde 3.7 select Audiophonics TDA1387 driver

dac(TDA1387) work like a charm, sound is very good and clear.
digital part output nothing (off).

2. moOde 3.7 select HiFiBerry digi+ pro driver, using digital BNC cable link to my External TDA1541A

digital part (output from External TDA1541A DAC) sounds not good, a lot of pops, not very loud, but can be heard, so bad.
TDA1387 part output sound at the same time, same as digital part, there is a lot of pops, I thinks the pops is from digi+ pro.

3. moOde 3.7 select USB driver, using USB cable link to my External TDA1541A

digital part (output from External TDA1541A) sound is very good and clean. very nice sound.


Waiting for the next moOde version with new kernel to fix digi+ pro pops :D


moOde 2 build
attachment.php
 
Hi,

Next level rig :)

Are your I2S cables U.FL? Maybe the audio glitches are caused by RFI.

-Tim

Thanks, Tim,

I think it's not caused by RFI, because when I changed driver to TDA1387, sound output is very very clean, no more audio glitches. Then I change driver to digi+ pro, a lot of audio glitches out. same hardware setup.

tuning :confused:
 
Last edited:
I didn't notice that. Yes of course, host names can't have embedded spaces. The spec for host names is below.

Length 3-63 chars, A-Z, a-z, 0-9, and hyphen (-) are allowed

-Tim

Agreed that a space in a name is tricky/illegal.
The thing is that this NAS really exists and has actually worked with this Pi. Albeit in another network (not my own network).

This issue is easily reproducible with a name of a non-existing NAS.

It is not a big deal: i will reflash the SD Card and je carefull to use the right NAS name.

Cheers,
Martin
 
Agreed that a space in a name is tricky/illegal.
The thing is that this NAS really exists and has actually worked with this Pi. Albeit in another network (not my own network).

This issue is easily reproducible with a name of a non-existing NAS.

It is not a big deal: i will reflash the SD Card and je carefull to use the right NAS name.

Cheers,
Martin

Try the IP address instead, although not your issue you also cannot have the word NAS in name as well.
 
With runeaudio I still fix it with FileZilla. Filezilla usage is intuitive and simpler. Can you show me how to use it on fileZila?
Thanks
There's a reason why Raspbian Jessie doesn't let you log in as root.

So you're best advised to set up filezilla to login as pi/raspberry, copy to a directory in which the pi user has full permissions, then ssh in as pi and use sudo cp to copy to the required destination.

Cheers,

Phil
 
Hi,
I made my Moode streamer (Two SMPSUs – Pi3 and powered HUB, two linear PSUs, Dual DACs – ES9023 for music and USB/SPDIF for video, USB HDD ) about a half year ago. It sound superb – big thanks to Tim and all who wrote here.
But sometimes I want to watch movies , so I need to swap SD cards to boot KODI – in my case this is very hard work (all is mounted in the case from old Philips CDI220 player). I finally managed to have dualbooting from one SD card - Moode and LibreElec. I have two existing SD cards with Moode 3.1 (on 8GB) and LibreElec 8.0.2/17.3 (on 32GB). I’m new in Linux, but finaly I was able to do Dual booting Moode and LibreElec, using these steps posted on another forum. I made small guide here if You want to do the same.
You need to do these steps (originaly this is wrote for RooneAudio and OpenElec - I swapped LE to OE and Rune to Moode and made some small changes to have them to working whit Moode OS)
RuneAudio and OpenElec on one SD card : Raspberry Pi • RuneAudio Forum

Prepare one new SD card:
(I have been able to create a single SD card containing both RuneAudio and OpenElec using RPi3 based on existing installations of both systems. To do this I use one SD card (8 GB min) and create three partitions using Gparted):
part1: 256 MB FAT16 (flags: boot, lba) # in my case 560 MB
part2: appr. 3.5 GB ext4 # in my case 16.5 GB
part3: appr. 3.5 GB ext4 # in my case 14 GB
----------------------------------------------------
(In my case (I used Ubuntu: on my Windows 10 machine under VMplayer) - I Resized and Backuped the SDCards with Ubuntu: on my Windows 10 machine using this tutorial):
https://www.htpcguides.com/easy-resize-and-back-up-raspberry-pi-sd-card-with-ubuntu/
In my case there are: one 16GB (for Moode), one new 8GB (for Kodi - from 32GB Back up-ed & Gparted to 6GB, and a 32GB- for dual boot OS-es)
-----------------------------------------------------
In Linux OS login as root:
make 4 dirs for mounting the SD card partitions and 4 directories to retain the copied contents of these partitions:
PHP:
 mkdir leboot moodeboot leroot mooderoot
 mkdir lebootnew moodebootnew lerootnew mooderootnew

Insert the LibreElec SD card (in my case - sdb) in the USB SD card reader and mount both partitions:
PHP:
 mount /dev/sdb1 leboot
 mount /dev/sdb2 leroot
Copy the contents of the LibreElec SD card partitions to your computer (dont forget the "." after the "/" !):
PHP:
 cp -a leboot/. lebootnew/
 cp -a leroot/. lerootnew/
Unmount the LibreElec SD card:
PHP:
 umount leroot leboot

Remove the USB SD card , replace the LibreElec SD card with the Moode SD card and Mount both partitions:
PHP:
mount /dev/sdb1 moodeboot
 mount /dev/sdb2 mooderoot
Copy the contents of the Moode SD card partitions to your computer:
PHP:
 cp -a moodeboot/. moodebootnew/
 cp -a mooderoot/. mooderootnew/
Unmount the Moode SD card:
PHP:
 umount moodeboot mooderoot

Remove the USB SD card, replace the Moode SD card with the newly partitioned empty SD card and put it back in the USB port of your computer. Create 2 directories in the leboot directory:
PHP:
 mkdir lebootnew/libreelec lebootnew/moodeaudio
Copy the contents of the moodebootnew directory to the newly created moode directory
PHP:
 cp -a moodebootnew/. lebootnew/moodeaudio/
Edit the contents of the Moode cmdline.txt file with the editor of your choice (nano or gedit)
PHP:
 nano lebootnew/moodeaudio/cmdline.txt
and replace root=/dev/mmcblk0p2 with root=/dev/mmcblk0p3 and leave the rest of the file as it is
Save the file. Mount the new SD card
PHP:
 mount /dev/sdb1 leboot
 mount /dev/sdb2 leroot
 mount /dev/sdb3 mooderoot
Copy the contents of three directories back to the SD card
PHP:
 cp -a lebootnew/. leboot/
 cp -a lerootnew/. leroot/
 cp -a mooderootnew/. mooderoot/
Umount the new SD card
PHP:
 umount leboot leroot mooderoot


Now the new SD card is ready to be placed in the Raspberry Pi's SD slot. Put it there and reconnect power. If all is well the RPi should start in LibreElec's Kodi. Please check if Kodi works as it should.

Now we have to create two scripts to be able to switch between LibreElec and Moode. In order to switch you should use SSH to log in into either system.
1. Log into LibreElec using SSH (e.g. ssh root@openelec.local or ssh root@<ip address of LibreElec system>)
2. Your current directory should be .storage as seen in the prompt
3. Create a script called "moode" using nano
PHP:
 nano moode
Insert the following code :
PHP:
#!/bin/sh
mount -o remount,rw /flash            #OpenElec mount its boot partition read-only so needs to be remounted
cd /flash
find . -path './*' -prune -type f -exec mv -f {} libreelec \;
mv overlays libreelec/                                                         
sync     
mv moodeaudio/* /flash/
sync     
reboot
Save the script with Ctrl-X and make it executable
PHP:
 chmod +x moode

Some explanation: the "find..." command moves all files except directories (to prevent the moode directory to be moved as well), just in case I move overlays also as there might be different overlay versions...?. I also use "sync" a lot to prevent file corruption (maybe I could skip the first sync, paranoia?). I use move instead of copy to prevent SD card wear out.
Run the "moode" script
PHP:
 ./moode
The RPi should boot up with Moode this time. Please check if everything works as it should.

Now we need to create the script to be able to switch back to LibreElec.
Log into Moode using SSH (e.g. ssh pi@runeaudio.local or ssh pi@<ip address of Moode system>)
1. Your current directory should be /home/pi (not /root) as seen in the prompt
2. Create a script called "libreelec" using nano. Insert the following :
PHP:
#!/bin/sh
cd /boot
sudo find . -path './*' -prune -type f -exec mv -f {} moodeaudio \;
sudo mv overlays moodeaudio/
sudo sync
sudo mv libreelec/* /boot/
sudo sync
sudo mpc stop
# sudo umount -f /mnt/NAS/Music  		 #this is just an example, see below
# sudo umount -f /media/Seagate Expansion Drive/Music  	 #this is my case, I’m not shure about unmounting USB
sudo reboot
Save the script with Ctrl-X and make it executable
PHP:
 chmod +x libreelec
To prevent "stop jobs" during reboot which take appr. 1 minute and 30 seconds I used the "umount" command in this script. This command may be omitted or changed to unmount any music directory configured in the Sources page of the Moode web interface
Attention - Did this work ? - Check step by step first for errors!!! I made all those things two times, because for the first try LE didn’t boot.
Finaly test the script by running it:
PHP:
 ./libreelec
The Raspberry Pi should now reboot into LibreElec again.
Run ./moode to go back to Moode etc. etc. etc.

For those who don't want to mess around with terminals and SSH, or actually for your convenience, there is an Android app available in the Play Store to start the scripts "moode" and "libreelec" as mentioned in tutorial above with the press of a button. I use it myself parralleled whit Rii i8 USBkbd - which is on hand.
Just download the SSH Button app and configure like shown in the lines below:

SSH Button app:
https://play.google.com/store/apps/details?id=com.pd7l.sshbutton&hl=en

I have wireless USB kbd - Rii mini i8. It work fantastic in KODI LibreElec, and I wanted from it to work whit Moode. I red many forums and finaly I found a good solution.
My choise was: triggerhappy. It's integrated in Moode OS - just use it.
some info:
Ubuntu Manpage:

thd -- triggerhappy global hotkey daemon

http://www.filewatcher.com/p/triggerhappy_0.3.4-2_powerpc.deb.31364/usr/share/man/man1/th-cmd.1.gz.html

To make Rii to work in Moode follow these steps:
Used keys.
SSH pi@moode:
PHP:
thd --dump /dev/input/event*
look at output:
PHP:
EV_KEY  KEY_RIGHT       1       /dev/input/event1
# KEY_RIGHT     1       command
EV_KEY  KEY_RIGHT       0       /dev/input/event1
# KEY_RIGHT     0       command
EV_KEY  KEY_PREVIOUSSONG        1       /dev/input/event2
# KEY_PREVIOUSSONG      1       command
EV_KEY  KEY_PREVIOUSSONG        0       /dev/input/event2
# KEY_PREVIOUSSONG      0       command
EV_KEY  KEY_NEXTSONG    1       /dev/input/event2
# KEY_NEXTSONG  1       command
EV_KEY  KEY_NEXTSONG    0       /dev/input/event2
# KEY_NEXTSONG  0       command
EV_KEY  KEY_PLAYPAUSE   1       /dev/input/event2
# KEY_PLAYPAUSE 1       command
EV_KEY  KEY_PLAYPAUSE   0       /dev/input/event2
# KEY_PLAYPAUSE 0       command
so in
mpc.conf, You need to define --triggers:
PHP:
sudo nano /etc/triggerhappy/triggers.d/mpc.conf
put this lines:
PHP:
KEY_PREVIOUSSONG      1       /usr/bin/mpc prev
KEY_NEXTSONG  1       /usr/bin/mpc next
KEY_PLAYPAUSE 1       /usr/bin/mpc toggle
save and exit - done

/etc/init.d/triggerhappy - was moded to "pi" user !!! I'm not shure about this, but I made it. I don't check this whit originally --user nobody.
done

make a script to start it from rc.local whit:
PHP:
/home/pi/thdstart
and insert this line before "exit 0" at end of rc.local

the script:
PHP:
#!/bin/sh
sleep 5
/usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ /dev/input/event2
done,
and make it executable:
PHP:
sudo chmod +x /home/pi/thdstart
done
time to reboot :)

You can define key combination to boot from Moode to OpelElec and vise versa via USBkbd. Just add some line for key combination in /etc/triggerhappy/triggers.d/mpc.conf to run ./libreelec script.

Happy dual booting :), and sorry for my english.

PPS - Please, if someone of You know if there are a better way to do all these things, your comments are wellcome. I second my words - I'm newby in Linux.
 
Last edited:
hi@ TimCurtis .
I am using Moode Audio 3.7. But I can not interfere with Moode's code via FileZila to install the 14X2 LCD. It does not let me save the file.
Do you have any way to help me how to install LCD 14X2

Hi,

To what location are u trying to save the files?

The dir /var/www is implemented as a compressed squashfs (read-only) file system. This provides improved reliability and performance.

-Tim