Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide 128x64 OLED with Song Status and Spectrum Display on Raspberry Pi
Awesome!
Spectrum works with Spotify.
Thanks Adrian  Big Grin
Reply
Hello adrii,

can you help me please? After update moode to 7.3, mpd_oled not working. I also tried a new installation of moode and mpd_oled. It worked for me before the update.


Code:
● mpd_oled.service - MPD OLED Display
   Loaded: loaded (/etc/systemd/system/mpd_oled.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Fri 2021-07-02 23:11:53 CEST; 1s ago
  Process: 2618 ExecStartPre=/usr/local/bin/mpd_oled_launch_test (code=exited, status=0/SUCCESS)
  Process: 2628 ExecStart=/usr/local/bin/mpd_oled -o 1 -r 24 -D 27 -b 21 -g 1 -f 15 -c alsa,plughw:Loopback,1 (code=killed, signal=SEGV)
 Main PID: 2628 (code=killed, signal=SEGV)

Jul 02 23:11:52 moode systemd[1]: Starting MPD OLED Display...
Jul 02 23:11:53 moode systemd[1]: Started MPD OLED Display.
Jul 02 23:11:53 moode systemd[1]: mpd_oled.service: Main process exited, code=killed, status=11/SEGV
Jul 02 23:11:53 moode systemd[1]: mpd_oled.service: Failed with result 'signal'.


Thanks
Reply
Hi Lucius

Thank you for reporting the issue. Your output indicates that mpd_oled has crashed on startup, but I have been unable to reproduce this. I don't have your particular OLED, but I have an SSH1106 SPI screen, which I have connected to the same pins as yours. I started with a fresh copy of Moode 7.3, installed mpd_oled from source, and ran with the options you are using (apart from using -o 7 insead of -o 1). Everything is working fine for me


Code:
pi@moode217a:~ $ sudo systemctl status mpd_oled
● mpd_oled.service - MPD OLED Display
   Loaded: loaded (/etc/systemd/system/mpd_oled.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2021-07-03 10:38:09 CEST; 3min 7s ago
  Process: 304 ExecStartPre=/usr/local/bin/mpd_oled_launch_test (code=exited, status=0/SUCCESS)
 Main PID: 450 (mpd_oled)
    Tasks: 5 (limit: 881)
   CGroup: /system.slice/mpd_oled.service
           ├─ 450 /usr/local/bin/mpd_oled -o 7 -r 24 -D 27 -b 21 -g 1 -f 15 -c alsa,plughw:Loopback,1
           ├─3454 sh -c mpd_oled_cava -p /tmp/cava_config_GLwJni
           └─3455 mpd_oled_cava -p /tmp/cava_config_GLwJni

Jul 03 10:37:50 moode217a systemd[1]: Starting MPD OLED Display...
Jul 03 10:38:09 moode217a systemd[1]: Started MPD OLED Display.
Jul 03 10:41:09 moode217a mpd_oled[450]: open file /tmp/cava_fifo_450 for writing raw output

I am unsure what is causing the issue, and can only make some general suggestions for troubleshooting.

Have you changed anything at all regarding the screen wiring or configuration from whan the sceen was working (I recommend reviewing the connections, even if you have not changed them)? Could you say a bit more about your hardware. Do you have any devices that might be using the same pins that you are using for the display? Are there any clues in the logs (e.g. error messages that might relate to SPI or GPIO)?


Code:
moodeutl -l | less
less /var/log/messages
dmesg | less


If you are not using any other SPI devices you could try removing the line 'dtparam=spi=on' from '/boot/config.txt'.

Try running mpd_oled on the command line, in case there are any extra messages


Code:
sudo systemctl stop mpd_oled
sudo /usr/local/bin/mpd_oled -o 1 -r 24 -D 27 -b 21 -g 1 -f 15 -c alsa,plughw:Loopback,1

Adrian.
Reply
I'm using the Audiophonics RaspDAC Mini with RPi 3B and haven't made any changes to the display wiring.

There are no error messages in the logs regarding SPI and GPIO.

After removing 'dtparam=spi=on' from '/boot/config.txt' I get this:


Code:
pi@moode:~ $ sudo /usr/local/bin/mpd_oled -o 1 -r 24 -D 27 -b 21 -g 1 -f 15 -c alsa,plughw:Loopback,1
Segmentation fault

Thanks
Reply
Hi Lucius

It is going to be difficult for me to help with this. If you know how to program on the Raspberry Pi with C++ then you could try to track down where the segfault is occuring in the mpd_oled code, and it might suggest a solution.

Is it possible that the Moode upgrade included some software that is also accessing your display (as it is part of a kit)?

Just to note, mpd_oled accesses the hardware SPI bus directly, rather than through the kernel driver (e.g. /dev/spidev0.0). However, if you get the same result after disabling the kernel driver  (removing 'dtparam=spi=on') then the issue shouldn't be due to a conflict with this.

To anybody else using an SSD1306 (or SSD1309) SPI screen (-o 1)  with mpd_oled on Moode 7.3, could you please confrm if it is working correctly?

Adrian.
Reply
Hi adrii,

Sorry for the late reply, but I've been away.
I don't know how to program on the Raspberry Pi with C++ and yes, the display is part of a kit.

When I tried a fresh copy of Moode 7.3, installed mpd_oled, the display works properly:

Code:
● mpd_oled.service - MPD OLED Display
   Loaded: loaded (/etc/systemd/system/mpd_oled.service; enabled; vendor preset:  enabled)
   Active: active (running) since Sun 2021-07-11 15:00:26 CEST; 9s ago
  Process: 2286 ExecStartPre=/usr/bin/mpd_oled_launch_test (code=exited, status=0/SUCCESS)
 Main PID: 2296 (mpd_oled)
    Tasks: 2 (limit: 2063)
   CGroup: /system.slice/mpd_oled.service
           └─2296 /usr/bin/mpd_oled -o1 -r24 -D27 -b 21 -g 1 -f 15 -R -c alsa,plughw:Loopback,1

Jul 11 15:00:25 moode systemd[1]: Starting MPD OLED Display...
Jul 11 15:00:26 moode systemd[1]: Started MPD OLED Display.


But after the Moode reboot, not anymore. I get the same error:


Code:
● mpd_oled.service - MPD OLED Display
   Loaded: loaded (/etc/systemd/system/mpd_oled.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Sun 2021-07-11 15:03:23 CEST; 23s ago
  Process: 413 ExecStartPre=/usr/bin/mpd_oled_launch_test (code=exited, status=0/SUCCESS)
  Process: 1042 ExecStart=/usr/bin/mpd_oled -o1 -r24 -D27 -b 21 -g 1 -f 15 -R -c alsa,plughw:Loopback,1 (code=killed, signal=ILL)
 Main PID: 1042 (code=killed, signal=ILL)

Jul 11 15:02:33 moode systemd[1]: Starting MPD OLED Display...
Jul 11 15:03:23 moode systemd[1]: Started MPD OLED Display.
Jul 11 15:03:23 moode systemd[1]: mpd_oled.service: Main process exited, code=killed, status=4/ILL
Jul 11 15:03:23 moode systemd[1]: mpd_oled.service: Failed with result 'signal'.

I tried Moode 7.2.1 again and it doesn't work there either and it behaves the same as on Moode 7.3.0.

Sorry for my english Smile

Edit: After removing 'dtparam=spi=on' from '/boot/config.txt' I get now this:

Code:
pi@moode:~ $ sudo /usr/bin/mpd_oled -o 1 -r 24 -D 27 -b 21 -g 1 -f 15 -c alsa,plughw:Loopback,1
Illegal instruction
Reply
Hi Lucius

Can you start mpd_oled manually, by running the following command, after it has failed to start at boot?

Code:
sudo systemctl start mpd_oled

If you can start mpd_oled manually after boot then it may be possible to start it at boot by adding an extra delay.

Adrian.

P.S. I have just seen your edit. Please add the line 'dtparam=spi=on' back into config.txt before testing with the command above.
Reply
I can't start it manually. I get the same output:

Code:
● mpd_oled.service - MPD OLED Display
   Loaded: loaded (/etc/systemd/system/mpd_oled.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Sun 2021-07-11 20:04:21 CEST; 1s ago
  Process: 13587 ExecStartPre=/usr/bin/mpd_oled_launch_test (code=exited, status=0/SUCCESS)
  Process: 13603 ExecStart=/usr/bin/mpd_oled -o1 -r24 -D27 -b 21 -g 1 -f 15 -R -c alsa,plughw:Loopback,1 (code=killed, signal=ILL)
 Main PID: 13603 (code=killed, signal=ILL)

Jul 11 20:04:20 moode systemd[1]: Starting MPD OLED Display...
Jul 11 20:04:21 moode systemd[1]: Started MPD OLED Display.
Jul 11 20:04:21 moode systemd[1]: mpd_oled.service: Main process exited, code=killed, status=4/ILL
Jul 11 20:04:21 moode systemd[1]: mpd_oled.service: Failed with result 'signal'.

Edit: Now after rebooting Moode I got this output:

Code:
● mpd_oled.service - MPD OLED Display
   Loaded: loaded (/etc/systemd/system/mpd_oled.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Sun 2021-07-11 20:23:30 CEST; 1min 14s ago
  Process: 404 ExecStartPre=/usr/bin/mpd_oled_launch_test (code=exited, status=0/SUCCESS)
  Process: 1083 ExecStart=/usr/bin/mpd_oled -o1 -r24 -D27 -b 21 -g 1 -f 15 -R -c alsa,plughw:Loopback,1 (code=killed, signal=ILL)
Main PID: 1083 (code=killed, signal=ILL)

Jul 11 20:22:59 moode systemd[1]: Starting MPD OLED Display...
Jul 11 20:23:26 moode mpd_oled_launch_test[404]: Error: database is locked
Jul 11 20:23:26 moode mpd_oled_launch_test[404]: Error: database is locked
Jul 11 20:23:26 moode mpd_oled_launch_test[404]: /usr/bin/mpd_oled_launch_test: line 16: test: =: unary operator expected
Jul 11 20:23:30 moode systemd[1]: Started MPD OLED Display.
Jul 11 20:23:30 moode systemd[1]: mpd_oled.service: Main process exited, code=killed, status=4/ILL
Jul 11 20:23:30 moode systemd[1]: mpd_oled.service: Failed with result 'signal'.
Reply
Hi Lucius

I can't think why you would be able to start mpd_oled when you first install it, but not after it has crashed after a reboot.

I also can't currently think of anything else to try, except maybe that you could try different GPIO pins for DC and Reset.

I have a development version of mpd_oled that uses different code for the OLED driver, and also uses the linux device driver for SPI (and has more configuration options for SPI). This version may solve the issue for you. I'll see if I can review the documentation and create a repository for it sometime this week.

Adrian.
Reply
Hi Lucius

The extra messages about the database aren't relevant to the issue you have. mpd_oled checks the Moode database using a script to see if it Moode has finished starting up, but he database might be locked by another process, and the script will wait and try again The 'test: =: unary operator expected' also represents a failure to read the database at a particular moment, but the script needs changing so this isn't reported as an error.

Adrian.
Reply


Forum Jump: