Moode Audio Player for Raspberry Pi

Hi Tim,

My NAS mount issue on the pi zero isn't solved, but here's a clue:

20160515 143311 worker: Volume level (0) restored
20160515 143311 worker: wlan0 (172.24.1.1)
20160515 143311 worker: eth0 does not exist
20160515 143311 worker: eth0 (172.24.1.1)
20160515 143313 worker: NAS sources (mountall initiated)


pi@moode:~ $ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:13:ef:06:0b:0d brd ff:ff:ff:ff:ff:ff
inet 172.24.1.1/24 brd 172.24.1.255 scope global wlan0
valid_lft forever preferred_lft forever
inet 192.168.1.99/24 brd 192.168.1.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::6526:671d:54aa:d98f/64 scope link
valid_lft forever preferred_lft forever

To recap, pi zero with usb wifi.

SD card flashed with TR4, and your example moodecfg.txt added to boot partition with wifi ssid and psk added. Still have entries from AP mode in the moodecfg.txt file.

/etc/dhcpcd.conf has a static entry for wlan0 of 172.24.1.1, created by moode on first run?

Because of that bogus static entry, there is no wait for wlan0 to get an IP address, so the NAS mounts fail.

Cheers,

Phil
 
If I do the above but go into the network settings page and save, then reboot, all works properly.

So it's looking like a bug in the AutoConfig logic.

20160515 152810 worker: Volume level (0) restored
20160515 152810 worker: wlan0 (192.168.1.99)
20160515 152810 worker: eth0 does not exist
20160515 152810 worker: eth0 (192.168.1.99)
20160515 152812 worker: NAS sources (mountall initiated)


pi@moode:~ $ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:13:ef:06:0b:0d brd ff:ff:ff:ff:ff:ff
inet 192.168.1.99/24 brd 192.168.1.255 scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::6526:671d:54aa:d98f/64 scope link
valid_lft forever preferred_lft forever

Cheers,

Phil
 
Last edited:
If I do the above but go into the network settings page and save, then reboot, all works properly.

So it's looking like a bug in the AutoConfig logic.

20160515 152810 worker: Volume level (0) restored
20160515 152810 worker: wlan0 (192.168.1.99)
20160515 152810 worker: eth0 does not exist
20160515 152810 worker: eth0 (192.168.1.99)
20160515 152812 worker: NAS sources (mountall initiated)

Cheers,

Phil

Hi Phil,

A quick scan of the TR4 code base and release config indicates a config issue and a bug.

1) Since TR4 was built on a Pi-3, dhcpcd.conf has static entry for wlan0 uncommented as a result of AP mode being activated. It needs to be commented out on a fresh image otherwise the issue u are experiencing happens because of #2 below. This is a config issue and a step needs to be included in my final prep for images.

2) Auto-config is not resetting dhcpcd.conf file. BUG

3) The following is also due to a BUG but is only cosmetic
20160515 152810 worker: eth0 does not exist
20160515 152810 worker: eth0 (192.168.1.99)


Email tim at moodeaudio dot org and I'll make a TR5 image this afternoon that u can test.

Thanks for finding this!

-Tim
 
Last edited:
Hi Kent,

If u want to support multiple links in a pls and still get the logo to display just add the additional urls to cfg_radio and specify the logo as images/radio-logos/name_of_logo.png. similar to how the BBC 320K stations use the logo for the regular BBC stations.

-Tim

Oh, Duh. If only I would remember to drink coffee before posting, not after, I might not have missed this (or embarrassed myself so publicly!). Thanks.

Regards,
Kent
 
Hi Phil,

A quick scan of the TR4 code base and release config indicates a config issue and a bug.

1) Since TR4 was built on a Pi-3, dhcpcd.conf has static entry for wlan0 uncommented as a result of AP mode being activated. It needs to be commented out on a fresh image otherwise the issue u are experiencing happens because of #2 below. This is a config issue and a step needs to be included in my final prep for images.

2) Auto-config is not resetting dhcpcd.conf file. BUG

3) The following is also due to a BUG but is only cosmetic
20160515 152810 worker: eth0 does not exist
20160515 152810 worker: eth0 (192.168.1.99)


Email tim at moodeaudio dot org and I'll make a TR5 image this afternoon that u can test.

Thanks for finding this!

-Tim

Hi Tim,

I reflashed, hashed out the static IP config in /etc/dhcpcd.conf in the image, then repeated my steps.

All working correctly now.

Thanks,

Phil
 
Last edited:

I started with the first of these. The .pls file defines two streams, as I described. I grabbed an appropriate logo icon from a third-party site but subsequently made my own from a transparent banner on the BBC site. Moode says the detected stream rate is 48kbs.

Thanks to your diligence, I now realize the first (and the third, which defines the same stream) likely is for domestic consumption (hence the trailing "uk" in the stream name, perhaps), while the second likely is for world consumption (hence the trailing "ws", perhaps, and the stream tag "BBC World Service English News"). I'm alternating between them right now. A live UK Premier League football game is being broadcast on the uk stream while a discussion of religion is being broadcast on the ws stream. Interesting.

Will push them to Tim along with TSF Jazz (Paris), Jazz.FM91 (Toronto), and several American jazz stations.

Too bad the structure of the underlying software components forces us to spread radio data across .pls files in one location, icons in another, and entries in the player.db sql database. This makes it hard to package a station for others to add or update stations individually as they desire. Can't speak for Tim, but I'd hate to be the one to manage the ever growing list of stations he distributes with his releases.

Regards,
Kent
 
Raspberry Pi Shutdown Switch

Gentle persons:

I think I've muttered before about the RPi designers not providing any onboard buttons and microcode to effect an orderly shutdown or reboot sequence. Well, I just stumbled across a blog entry that now has me muttering "why didn't I think of that"...

https://matthew.mceachen.us/blog/give-your-raspberry-pi-a-shutdown-switch-for-free-1397.html

I've already picked up a short USB extension cable to bring a port out to a connector on a case so unplugging a USB device (doesn't have to be a WiFi adapter, obviously) would be easy and wouldn't wear out the onboard connectors unnecessarily, and now I'm thinking I could wire up a switch to avoid even the physical unplugging.

This udev trick easily could be exploited for other purposes as well.

Why do this instead of exploiting a spare GPIO line or two? No new code or wiring required.

Regards,
Kent
 
Hi,

Below is current bugfix list for TR4. The first bug can prevent wlan0 from getting an IP address in certain scenarios.

1) BUG: /etc/dhcpcd.conf static wlan0 address not commented out on fresh image
2) BUG: incorrect worker log message when eth0 does not exist
3) BUG: cfg_radio missing 1st record
4) BUG: /lib/systemd/system/mpd.service and .socket have +x 0755 and should be 0644

Regards,
Tim
 
Hi,

On my TR4 systems with configured NAS source(s) the log shows ok startup.

20160514 220731 worker: NAS sources (mountall initiated)
20160514 220731 worker: MPD consume reset to off
20160514 220731 worker: End startup
20160514 220731 worker: Ready


The log u posted shows nothing after trying to mount NAS source(s).

Very odd.

-Tim

I am mounting my NAS using NFS, does that make a difference?
 
Hi,

Yes it would be NAS.

On Moode NAS config screen, Remote directory should be set to volume1/folder_containing_music. NOTE no forward slash on "volume1".

-Tim

sorry but volume1 is likely not a folder, I can see the flac files by ftp:// on a browser, but can't seem to configure with NAS, does the attached picture give any clue?
 

Attachments

  • moode1.png
    moode1.png
    125 KB · Views: 293
I've already picked up a short USB extension cable to bring a port out to a connector on a case so unplugging a USB device (doesn't have to be a WiFi adapter, obviously) would be easy and wouldn't wear out the onboard connectors unnecessarily, and now I'm thinking I could wire up a switch to avoid even the physical unplugging.
Regards,
Kent

If you're bringing out a USB extension cable to put a usb device on to then take it off to cause one action why not just leave a usb dongle for a wireless keyboard there and use the keyboard for shutdown and all manner of other 'remotey' things.
 
I am mounting my NAS using NFS, does that make a difference?
Hi,

Shouldn't make any diff.

I think you might be experiencing bug #1 below from the list of TR4 bugs I posted earlier. It can prevent wlan0 from getting an IP address in certain scenarios which would cause NAS mounts to fail.

1) BUG: /etc/dhcpcd.conf static wlan0 address not commented out on fresh image


-Tim
 
If you're bringing out a USB extension cable to put a usb device on to then take it off to cause one action why not just leave a usb dongle for a wireless keyboard there and use the keyboard for shutdown and all manner of other 'remotey' things.

Certainly can. Indeed, I was doing that when I was first playing with various RPi-based players. It works, but I didn't like "flying blind". Somehow not being able to see what I am typing makes me much more susceptible to typing errors. I suppose I could define a couple of simple scripts named "S" for shutdown and "R" for reboot, etc., but I want to move that keyboard among different projects :)

Regards,
Kent
 
thanks for a nice app, enjoying it with my RP2.

I like to access my USB stick on my router (192.168.0.1) and am having some difficulty, the music is in /volume1 folder...

should it be considered a NAS attachment?

What do you mean "having some difficulty"?

I know Tim suggests in a later reply you possibly are running into a known bug at the networking level, but that diagnosis assumes you have successfully configured MPD for your NAS.

When you first configured your Moode Player to add a new NAS source, did you end up with an entry for it under List of configured NAS sources (on the Music Source Configuration page) with a green checkmark or a red X? If a red X, did you then click on the entry to edit so you could see the reported error message?

I can post example screen captures if you wish to see them.

Regards,
Kent
 
Hi,

Shouldn't make any diff.

I think you might be experiencing bug #1 below from the list of TR4 bugs I posted earlier. It can prevent wlan0 from getting an IP address in certain scenarios which would cause NAS mounts to fail.

1) BUG: /etc/dhcpcd.conf static wlan0 address not commented out on fresh image


-Tim

Actually, I am using a wired connection on eth0.
I will try commenting out wlan static IP to see if it helps.
 
Actually, I am using a wired connection on eth0.
I will try commenting out wlan static IP to see if it helps.

Hi,

Can u mount the NFS share manually via ssh?

Also, if symptom is: "NFS NAS mount appears to work but mount point cannot be accessed" then"

Cause: NFS server replaces Gid=root with Gid=some_other_user for the mount point
Fix: add the "no_root_squash" flag to the NFS export on the server

-Tim
 
Hi,

Shouldn't make any diff.

I think you might be experiencing bug #1 below from the list of TR4 bugs I posted earlier. It can prevent wlan0 from getting an IP address in certain scenarios which would cause NAS mounts to fail.

1) BUG: /etc/dhcpcd.conf static wlan0 address not commented out on fresh image


-Tim

Actually, I am using a wired connection on eth0.
I will try commenting out wlan static IP to see if it helps.