Posts: 16
Threads: 2
Joined: Oct 2022
Reputation:
0
Hi Francesco
Apologies - the disc does spin (I can hear it) but nothing happens within moode.
ls -l /dev/sr* delivers:
brw-rw---- 1 root cdrom 11, 0 Oct 18 07:48 /dev/sr0
sudo eject succeeds in ejecting the CD
Posts: 6,024
Threads: 176
Joined: Apr 2018
Reputation:
235
@ felix
Aha, you have some Linux command-line skills.
Here's some nitty gritty details. Yours should be substantially similar in name, location, permissions, etc.
Preliminaries
1. The install script places two files in the directory /etc/systemd/system
Example from my player
Code: pi@m82x64b:~ $ ls -l /etc/systemd/system/*audiocd*.service
-rw-r--r-- 1 root root 138 Oct 15 22:38 /etc/systemd/system/addaudiocd.service
-rw-r--r-- 1 root root 137 Oct 15 22:38 /etc/systemd/system/remaudiocd.service
The script also places two files in the directory /usr/local/bin
Code: pi@m82x64b:~ $ ls -l /usr/local/bin/*audiocd*
-rwxr-xr-x 1 root root 503 Oct 15 22:38 /usr/local/bin/addaudiocd.sh
-rwxr-xr-x 1 root root 341 Oct 15 22:38 /usr/local/bin/remaudiocd.sh
When the USB CD drive is plugged in
The syslog ( /var/log/syslog) or dmesg output should show it has been recognized. Here is the relevant dmesg output when I plugged in the LG drive mentioned in the github README.
Code: [ 124.040149] usb 1-1.3: new high-speed USB device number 5 using xhci_hcd
[ 124.145609] usb 1-1.3: New USB device found, idVendor=0e8d, idProduct=1887, bcdDevice= 0.00
[ 124.145627] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 124.145633] usb 1-1.3: Product: Portable Super Multi Drive
[ 124.145639] usb 1-1.3: Manufacturer: Hitachi-LG Data Storage Inc
[ 124.145644] usb 1-1.3: SerialNumber: M03J3E12019
[ 124.149939] usb-storage 1-1.3:1.0: USB Mass Storage device detected
[ 124.151509] scsi host0: usb-storage 1-1.3:1.0
[ 125.185580] scsi 0:0:0:0: CD-ROM HL-DT-ST DVDRAM GP65NB60 PF00 PQ: 0 ANSI: 0
[ 125.202724] scsi 0:0:0:0: Attached scsi generic sg0 type 5
[ 125.223416] sr 0:0:0:0: Power-on or device reset occurred
[ 125.232137] sr 0:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[ 125.232152] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 125.238856] sr 0:0:0:0: Attached scsi CD-ROM sr0
Note that it is identified as sr0 and includes " cdda" (audio CD) and " tray" among its attributes.
Note also, the cdrom driver is invoked. When an audio CD is inserted in the drive, a new device link should appear. For my system
Code: pi@m82x64b:~ $ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 3 Oct 18 10:10 /dev/cdrom -> sr0
As you can see, it is a symlink to the correct drive.
When an audio CD is inserted in the drive
The addaudiocd.service should be invoked. Here is a snippet from my system log ( /var/log/syslog)
Code: Oct 18 10:10:25 m82x64b systemd[1]: /etc/systemd/system/addaudiocd.service:1: Unknown section 'UNIT'. Ignoring.
Oct 18 10:10:25 m82x64b systemd[1]: Started addaudiocd.service.
Oct 18 10:10:25 m82x64b systemd[1]: addaudiocd.service: Succeeded.
[Probably should fix the harmless UNIT issue but as the syslog shows, it's ignored.]
MPD proceeds to index the tracks on the audio CD.
Code: pi@m82x64b:~ $ mpc playlist
cdda:///1
cdda:///2
cdda:///3
cdda:///4
cdda:///5
cdda:///6
cdda:///7
cdda:///8
cdda:///9
cdda:///10
cdda:///11
cdda:///12
cdda:///13
cdda:///14
cdda:///15
cdda:///16
cdda:///17
cdda:///18
and that's what appears on the moOdeUI display.
Regards,
Kent
Posts: 16
Threads: 2
Joined: Oct 2022
Reputation:
0
Hello Kent
First - thank you for bearing with me.
Second, though I really have no Linux command line skills. I'm just doing what Fransesco told me to do!.
However, I can try to do the same from your kind email, but with limited success as follows:
1. /etc/ststemd/system directory
As you can see I cannot find an 'audiocd' file. Looking in the directory I can see 'addaudiocd.service'$\r.
But I do not understand what that means. I also don't know how to neatly embed the code like you do, so forgive a copy and paste readout below:
pi@moode:~ $ ls -l /etc/systemd/system/*audiocd*.service
ls: cannot access '/etc/systemd/system/*audiocd*.service': No such file or directory
pi@moode:~ $ cd /etc/systemd/system
pi@moode:/etc/systemd/system $ ls -l
total 80
-rw-r--r-- 1 root root 138 Oct 17 18:33 'addaudiocd.service'$'\r'
lrwxrwxrwx 1 root root 9 Oct 7 19:31 apt-daily.timer -> /dev/null
lrwxrwxrwx 1 root root 9 Oct 7 19:31 apt-daily-upgrade.timer -> /dev/null
-rwxr-xr-x 1 root root 274 Jun 5 16:16 bluealsa-aplay@.service
-rwxr-xr-x 1 root root 202 Jun 5 16:16 bluealsa.service
-rw-r--r-- 1 root root 188 Oct 4 19:50 camillagui.service
lrwxrwxrwx 1 root root 42 Oct 7 19:15 dbus-fi.w1.wpa_supplicant1.service -> /lib/systemd/system/wpa_supplicant.service
lrwxrwxrwx 1 root root 40 Oct 7 19:15 dbus-org.freedesktop.Avahi.service -> /lib/systemd/system/avahi-daemon.service
lrwxrwxrwx 1 root root 45 Oct 7 19:09 dbus-org.freedesktop.timesync1.service -> /lib/systemd/system/systemd-timesyncd.service
lrwxrwxrwx 1 root root 37 Oct 7 19:31 default.target -> /lib/systemd/system/multi-user.target
drwxr-xr-x 2 root root 4096 Oct 7 19:03 default.target.wants
drwxr-xr-x 2 root root 4096 Oct 7 19:15 dhcpcd.service.d
drwxr-xr-x 2 root root 4096 Oct 7 19:04 getty.target.wants
drwxr-xr-x 2 root root 4096 Oct 7 19:09 getty@tty1.service.d
drwxr-xr-x 2 root root 4096 Oct 7 19:13 halt.target.wants
drwxr-xr-x 2 root root 4096 Oct 7 19:52 multi-user.target.wants
drwxr-xr-x 2 root root 4096 Oct 7 19:05 network-online.target.wants
drwxr-xr-x 2 root root 4096 Oct 7 19:13 poweroff.target.wants
drwxr-xr-x 2 root root 4096 Oct 7 19:15 rc-local.service.d
drwxr-xr-x 2 root root 4096 Oct 7 19:13 reboot.target.wants
-rw-r--r-- 1 root root 137 Oct 17 18:33 'remaudiocd.service'$'\r'
drwxr-xr-x 2 root root 4096 Oct 7 19:15 remote-fs.target.wants
lrwxrwxrwx 1 root root 9 Oct 7 19:23 samba-ad-dc.service -> /dev/null
drwxr-xr-x 2 root root 4096 Oct 7 19:31 sockets.target.wants
lrwxrwxrwx 1 root root 31 Oct 7 19:14 sshd.service -> /lib/systemd/system/ssh.service
drwxr-xr-x 2 root root 4096 Oct 7 19:22 sysinit.target.wants
lrwxrwxrwx 1 root root 35 Oct 7 19:05 syslog.service -> /lib/systemd/system/rsyslog.service
drwxr-xr-x 2 root root 4096 Oct 7 19:22 sysstat.service.wants
drwxr-xr-x 2 root root 4096 Oct 7 19:31 timers.target.wants
2. /usr/local/bin directory
Here I can find the two folders:
pi@moode:/usr/local/bin $ ls -l /usr/local/bin/*audiocd*
-rwxr-xr-x 1 root root 503 Oct 17 18:33 '/usr/local/bin/addaudiocd.sh'$'\r'
-rwxr-xr-x 1 root root 341 Oct 17 18:33 '/usr/local/bin/remaudiocd.sh'$'\r'
3. dmesg output
The full output is long. I really *hope* is about to appear in a neat code box. If it doesn't I'll edit. *edit* is in attached doc. *edit* can't do that either hopefully the below is enough
But the bit at the end reads:
[80209.209593] usb 1-1.1: new high-speed USB device number 5 using xhci_hcd
[80209.312256] usb 1-1.1: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice= 6.63
[80209.312276] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[80209.312283] usb 1-1.1: Product: USB2.1 Hub
[80209.312288] usb 1-1.1: Manufacturer: GenesysLogic
[80209.313727] hub 1-1.1:1.0: USB hub found
[80209.317660] hub 1-1.1:1.0: 4 ports detected
[80209.425843] usb 2-1.2: new SuperSpeed USB device number 5 using xhci_hcd
[80209.447534] usb 2-1.2: New USB device found, idVendor=13fd, idProduct=3940, bcdDevice= 4.03
[80209.447558] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[80209.447564] usb 2-1.2: Product: INIC-3609
[80209.447570] usb 2-1.2: Manufacturer: Initio
[80209.447575] usb 2-1.2: SerialNumber: 30303030303030303030303030303030
[80209.452064] usb-storage 2-1.2:1.0: USB Mass Storage device detected
[80209.452464] usb-storage 2-1.2:1.0: Quirks match for vid 13fd pid 3940: 2000020
[80209.452595] scsi host0: usb-storage 2-1.2:1.0
[80210.475051] scsi 0:0:0:0: CD-ROM IBM RMBO0040502 SA63 PQ: 0 ANSI: 2
[80210.478764] sr 0:0:0:0: Power-on or device reset occurred
[80210.480890] sr 0:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[80213.224462] sr 0:0:0:0: [sr0] CDROM not ready. Make sure there is a disc in the drive.
[80213.225235] sr 0:0:0:0: Attached scsi CD-ROM sr0
[80213.225467] sr 0:0:0:0: Attached scsi generic sg0 type 5
Posts: 567
Threads: 5
Joined: Mar 2020
Reputation:
31
Hello Felix, hello Kent,
@ TheOldPresbyope
the problem is, probably due to the test on the old /var/www/command/moode.php that does not exists anymore.
@felix
try to do that:
Code: nano /home/pi/moOdeCDPlay-master/install.sh
moving with the arrow keys, add an "#" at the begin of each of the following lines:
Code: if [ ! -f /var/www/command/moode.php ]; then
echo
echo "I'm sorry, Dave, I'm afraid I can't do that."
echo "In case you didn't notice, this doesn't look like a moOde installatio>
exit 1
fi
in order to get:
Code: #if [ ! -f /var/www/command/moode.php ]; then
# echo
# echo "I'm sorry, Dave, I'm afraid I can't do that."
# echo "In case you didn't notice, this doesn't look like a moOde installati>
# exit 1
#fi
Then save the file (Ctrl "o" and Enter) and exit (Ctrl "x")
At this point repeat the installation:
Code: /bin/bash /home/pi/moOdeCDPlay-master/install.sh
Reboot:
try and let's know.
Good luck and best regards,
Francesco
Posts: 6,024
Threads: 176
Joined: Apr 2018
Reputation:
235
10-18-2022, 05:14 PM
(This post was last modified: 10-18-2022, 05:19 PM by TheOldPresbyope.
Edit Reason: font formatting
)
@ felix
Oh, dear, those weird filenames suggest to me that the moOdeCDPlay-master.zip file was unzipped on some other host running a different O/S and then its contents copied over to the moOde player (or the github repo was cloned to the other host and then the individual files were copied over).
Based on their sizes and locations, they appear to be the correct files, just with corrupted filenames (so, for example, your 'addaudiocd.service'&'\r' file is my addaudiocd.service file).
I overlooked another critical file which gets copied over to its proper directory by the install script
Code: pi@m82x64b:~ $ ls -l /etc/udev/rules.d/*srX.rules
-rw-r--r-- 1 root root 259 Oct 18 12:38 /etc/udev/rules.d/99-srX.rules
My guess is that on your system this file too has a weird name along the lines of '99-srX.rules'&'\r'
If it weren't for the file renaming, I think you'd be playing tracks.
So, what to do? The cleanest approach would be to delete all the offending files, reboot, and repeat the install instructions in the GitHub repo README. This includes downloading a fresh copy of the zip file and unzipping it directly on the moOde player.
The following commands should succeed in removing all the weirdly named files. These are to be entered from the command line of the moOde player and the asterisks are required.
Code: sudo rm /etc/systemd/system/*audiocd.service*
sudo rm /usr/local/bin/*audiocd.sh*
sudo rm /etc/udev/rules.d/*99-srX.rules*
NOTE: I have (finally!) updated the github repo to fix the install script so commenting out the lines containing the if statement is not required to install to a moOde 8.x player. As well, the update has fixed the harmless 'unknown' UNIT section message logged to syslog. Hence, I recommend downloading the moOdeCDPlay-master.zip file again.
Regards,
Kent
PS - a knowledgeable Linux user likely would just rename the offending files. Safer to assume the files are in fact not to be trusted.
Posts: 16
Threads: 2
Joined: Oct 2022
Reputation:
0
10-18-2022, 06:59 PM
(This post was last modified: 10-18-2022, 08:38 PM by felix.)
Kent - ah. Yes. That is exactly what I did. I can’t ‘see’ the pi on my network and I don’t know how to unzip in terminal. So I unzipped on my pc and transferred the unzipped folder using FileZilla.
Francesco - shall I try what Kent suggests and then turn to yours given that sounds like a smoking gun?
How best to unzip though, subtitles for the hard of thinking please…..?
Again, both - I cannot believe the amount of time you’re putting into a stranger’s (non real world) issues. Thank you.
Posts: 6,024
Threads: 176
Joined: Apr 2018
Reputation:
235
10-18-2022, 08:41 PM
(This post was last modified: 10-18-2022, 08:46 PM by TheOldPresbyope.)
@ felix
(Slightly different from my README) You can download the zip file and unzip it, all from the command line in moOde.
So, once you've SSH'ed to the moOde player and deleted the misnamed files enter the following commands (If you don't want to type lines in, you can copy and paste one line at a time or all of them at once from the code box to the command line, hitting return after each paste. The comment lines are no-ops.)
Code: # first, make sure we're in the home directory
cd
# download the current github master
wget https://github.com/TheOldPresbyope/moOdeCDPlay/archive/refs/heads/master.zip
# unzip it and change to the subdirectory moOdeCDPlay-master containing the desired files
unzip master.zip
cd moOdeCDPlay-master
# execute the install script
/bin/bash install.sh
# following the Done prompt, reboot
ETA - this works as-is on moOde 8.2.1.
Regards,
Kent
Posts: 16
Threads: 2
Joined: Oct 2022
Reputation:
0
I AM PLAYING TRACKS
Thank you both so much for your patience and your help.
The kindness of strangers....
I really don't know what to say. Other than to thank you. And to hope that some day something I can do can reciprocate.
Posts: 567
Threads: 5
Joined: Mar 2020
Reputation:
31
Hi Felix,
glad you are happy.
Best regards and thanks,
Francesco
Posts: 6,024
Threads: 176
Joined: Apr 2018
Reputation:
235
@ felix
Really glad to hear you succeeded. Like Tim’s signature line says, “enjoy the music!”
…and think about ripping those CDs to FLAC files
Regards,
Kent
PS- how far is “NW London” from somewhere I can still remember having been, like Speakers Corner in Hyde Park?
|