Volumio with HD44780 display: no connection to lcdproc

Hi all,

after running Volumio on several RPi’s for the last months, I would now like to move one step further and add a display to one of the machines. I bought a HD44780 16x2 display and followed AndyPi’s tutorial step for step, but can’t get it to work. mpdlcd cannot connect to lcdproc, no matter what I try. I tried different Pi models (B, B+ and 2B), result is always the same. During reboot after the installation, I already get a message that mpdlcd is unable to connect to lcdproc. LCDd is running, mpdlcd is running, mpd is running, but the display shows nothing but a row of white blocks. When I try to run the extra command that is added to the bootmisc.sh manually, this is what I get:

root@volumio:~# su pi -c "mpdlcd --no-syslog &" root@volumio:~# WARNING mpdlcd Connection failed: [Errno 111] Connection refused WARNING mpdlcd Connection failed: [Errno 111] Connection refused WARNING mpdlcd Connection failed: [Errno 111] Connection refused ERROR mpdlcd Unable to connect to lcdproc localhost:13666.
I tried several other tutorials (Bob Rathbone, Schnatterente and others), they all work fine and the included testscripts display exactly what they are supposed to, so I can assume thet the display itself is working fine. Unfortunately, I am not a developer and therefore not able to adjust one of those scripts to display informations from Volumio.

I have no clue how to get this solved, I searched and retried for weeks, but I am totally lost now. Any hint on how to trace the issue and get it working is highly appreciated.

Thanks in advance!

Hi,
Try to connect to your Pi with user PI (ssh pi@IPADRESS) and type

mpclcd --no-syslog

or if needed

sudo mpdlcd --no-syslog

Thanks for the quick reply. Just tried that, but it results in the same error:

pi@volumio:~$ sudo mpdlcd --no-syslog WARNING mpdlcd Connection failed: [Errno 111] Connection refused WARNING mpdlcd Connection failed: [Errno 111] Connection refused WARNING mpdlcd Connection failed: [Errno 111] Connection refused ERROR mpdlcd Unable to connect to lcdproc localhost:13666.
Very strange, especially because I seem to be the only one having this issue in Volumio (looking at the Google results for the error message). :frowning:

Hi, I have the exact same fault:
su pi -c “mpdlcd --no-syslog &”
root@volumio2:/# WARNING mpdlcd Connection failed: [Errno 111] Connection refused
WARNING mpdlcd Connection failed: [Errno 111] Connection refused
WARNING mpdlcd Connection failed: [Errno 111] Connection refused
ERROR mpdlcd Unable to connect to lcdproc localhost:13666.

I’m using the latest mldlcd code and the patch from the AndyPi website. All on a RPi 2???

Help please :slight_smile:

Hi All,
I have found the solution. The problem was that LCDproc was not up and running. There were 3 reasons for this:

  1. The HD44780 driver needs to be updated to support an RPi2
  2. The settings in the LCDd.conf need to be correct.
    3.I had the mapping of LCD connections incorrect.

I used the instructions in the AndyPi website http://andypi.co.uk/?p=334, but there are a couple of snags to fix to make it work:

  1. Make sure the fixed driver is installed in the correct directory. Actually the directory is pointed at by the config file. I am consistent with the original build directory. The working file for an RPi 2 can be found here http://ehc.ac/p/lcdproc/patches/21/#b8f3. Paul Webster has kindly posted a link to the hd44780.so file on the site. You can grab it using this command:
wget -O /usr/lib/ arm-linux-gnueabihf/lcdproc/hd44780.so http://ehc.ac/p/lcdproc/patches/_discuss/thread/4c659fe3/b8f3/attachment/hd44780.so 
  1. Next there is a bug in the AndyPi LCDd.conf file. Here is the file in full. Use an editor to set it up like the file pasted in below. This must go into /etc/LCDd.conf. Best to reboot the RPi after changing it.

  2. I have read numerous posts that have different mappings of LCD pins to GPIO pins. With various changes in HW over the years. All that matters is that the LCDd.conf correctly captures how your LCD is connected to the RPi GPIO pins. The defaults are shown in my file below

All the other points on the AndyPi website are OK and getting the mpdlcd to run is as it says.

Have fun!
baloothebear4

[code]## LCDd.conf - base configuration file for LCD display server

Setup for use with an HD44780 16x2 display on an Raspberry Pi 2

For use with Volumio v1.55

v1.0 Baloothebear4 4/6/15

[server]
#… Note this is where the HD44780 driver needs to go ==>
DriverPath=/usr/lib/arm-linux-gnueabihf/lcdproc/
Driver=hd44780
ServerScreen=no

Heartbeat=off
Hello=“Welcome to\n”
Hello=“Volumio”

NextScreenKey=Right
PrevScreenKey=Left
ReportToSyslog=yes
ToggleRotateKey=Enter

[menu]
DownKey=Down
EnterKey=Enter
MenuKey=Escape
UpKey=Up

Hitachi HD44780 driver

[hd44780]

Port where the LPT is. Usual values are 0x278, 0x378 and 0x3BC

Port=0x378

Select what type of connection. See documentation for types.

ConnectionType=raspberrypi

If you have a keypad connected.

You may also need to configure the keypad layout further on in this file.

Keypad=no

If you have a switchable backlight.

Backlight=no

If you have the additional output port (“bargraph”) and you want to

be able to control it with the lcdproc OUTPUT command

OutputPort=no

Specifies if the last line is pixel addressable or it controls an

underline effect. [default: true (= pixel addressable); legal: yes, no]

#Lastline=true

Specifies the size of the LCD.

In case of multiple combined displays, this should be the total size.

Size=16x2

For multiple combined displays: how many lines does each display have.

Vspan=2,2 means both displays have 2 lines.

#vspan=2,2

If you have a KS0073 or an other ‘almost HD44780-compatible’, set this

flag to get into extended mode (4-line linear).

This flag is NOT the old obsolete Extended option.

#ExtendedMode=yes

If your display is slow and cannot keep up with the flow of data from

LCDd, garbage can appear on the LCDd. Set this delay factor to 2 or 4

to increase the delays. Default: 1.

#DelayMult=2

You can reduce the inserted delays by setting this to false.

On fast PCs it is possible your LCD does not respond correctly.

Default: true.

DelayBus=false

If the display is connected to non-default GPIO pins, the driver can

recognise these with pin assignment commands.

commented out as these are the defaults

#D7=18
#D6=23
#D5=24
#D4=25
#RS=7
#EN=8[/code]

Hi Baloo,

sounds good, thanks for the update. I will give it a try in the weekend. Really curious to see if it works for the earlier models as well, as there should be no driver issues with those. I’ll let you know if it worked.

Cheers!

Edit: I can confirm Baloo’s solution works fine on a RPi 2B. I did not yet have the time to try on an older model, will do asap.

I have the same issue - Raspberry Pi B (not 2), tried two different LCDs with HD44780 driver (20x2, 20x4), followed AndiPi instructions - everything went well and no errors. When I re-boot RPi the display whows one line “full” (all pixels highlighted) and the second line dark.
When I use commad:

pi@volumio:~$ sudo mpdlcd --no-syslog

I get an error message:

WARNING mpdlcd Connection failed: [Errno 111] Connection refused
WARNING mpdlcd Connection failed: [Errno 111] Connection refused
WARNING mpdlcd Connection failed: [Errno 111] Connection refused
ERROR mpdlcd Unable to connect to lcdproc localhost:13666.

I double checked the pinout of the LCD, changed the pin config in “sudo nano /etc/LCDd.conf” properely - pind + GPIOs. It seems to be ok.
I have also tried the modifications recommended here for RPi 2 but it doesn’t work and I’m still receiving the same error message.

It seems that the installation went well (no errors) and I can modify the configuration / files mpdlcd.conf and LCDd.conf.

Any idea what can be wrong? I’m not a SW guy so I would appreciate any help.

Thanks

Just a thought,
is lcdproc running ?
I can’t remember exactlly but something like sudo service lcdproc start should do it.
And after try to launch mpdlcd

Thanks for your help. I’m not sure what is the difference between LCDd and LCDproc but I tried to start both and it seems LCDproc doesn’t work:

root@volumio:~# sudo service LCDd start
Starting LCDd: LCDd.
root@volumio:~# sudo service lcdproc start
lcdproc: unrecognized service

It says unrecognized service. Hmm, Am I doing anything wrong?

Try LCDproc
Édit : have a look hère :http://m.instructables.com/id/How-to-Add-a-MatrixOrbital-VFD-Display-to-your-Lin/step10/Start-LCDd-and-lcdproc/

You mean with capital LCD as it can be case sensitive?
I tried:

root@volumio:~# sudo service LCDd start
Starting LCDd: LCDd.
root@volumio:~# sudo service LCDproc start
LCDproc: unrecognized service
root@volumio:~# sudo mpdlcd --no-syslog
WARNING mpdlcd Connection failed: [Errno 111] Connection refused
WARNING mpdlcd Connection failed: [Errno 111] Connection refused
WARNING mpdlcd Connection failed: [Errno 111] Connection refused
ERROR mpdlcd Unable to connect to lcdproc localhost:13666.

But it seems LCDd is ok but LCDproc and mpdlcd still doesn’t work. I also tried LCDProc, lcdproc and LcdProc :slight_smile: Still the same :frowning:

Is your display connected by i2C ? (seems no).

Actually it is connected using D4-D7, 4 data signals as described here:

andypi.co.uk/?p=334
andypi.co.uk/?p=300

I have followed exactly the guideline and everything was ok, now errors. But it simply doesn’t work and I’m not sure why.
I have several times checked the wiring and it seems to be ok as well as the data signals ssigned to GPIOs in the LCDd.conf file.
I have also replaced the display wih the other one (both using HD4480 driver). Still the same - not working.

It seems I have made some progress - I have tried this example: pi-fidelity.blogspot.ca/2013/05/ … t-two.html
and it works! I have tried the python code from this web as well as run sudo mpdlcd --no-syslog and both work well - I can the text on the display.

So what is the difference between AndyPi guide (that doesn’t work ) and above mentioned guide (that work)?
I found one difference and it is that the lcdproc is located in different placed in both examples:

/home/pi/lcdproc/ (AndyPi example - doesn’t work for me now)
/usr/lib/lcdproc/ (PiFidelity example - works for me)

Can it be that this is the reason why the code from AndyPi example doesn’t work with Volumio and RPi B?

Thanks

Facing another problem now. With Baloo’s solution, I managed to get the display running in combination with a RPi 2B. Now I want to connect an ES9023 DAC using wiring as described here: 2nd-volumio-project-kitchen-radio-t2820.html

For the display, I tried using the default pins (those that were commented out in Baloo’s LCDd.conf at first):
D7=18
D6=23
D5=24
D4=25
RS=7
EN=8

GPIO 18 is also in use by the DAC, so I tried changing D7 to 17 and connected the cable to pin 11, but after restart, display shows only the famous row of white blocks. Same thing happens with other ports as well. Do I have to change any other file in order to make this work?

Display and DAC work great when running alone, combining them does not seem to work so far…

Hi All,

Help me Please!
My project:
Raspberry Pi 2 + Volumio 1.55 + LCD 16x2 (hd44780)
I did as Andypi project and modify like baloothebear4 's guide but the result as below:

root@volumio:~# sudo mpdlcd --no-syslog &
[1] 5522
root@volumio:~# WARNING mpdlcd Connection failed: [Errno 111] Connection refused
WARNING mpdlcd Connection failed: [Errno 111] Connection refused
WARNING mpdlcd Connection failed: [Errno 111] Connection refused
ERROR mpdlcd Unable to connect to lcdproc localhost:13666.

[1]+ Exit 1 sudo mpdlcd --no-syslog

Who show me what mistake in my procedure?

root@volumio:~#
sudo apt-get update
sudo apt-get install lcdproc

sudo cp /usr/lib/arm-linux-gnueabihf/lcdproc/hd44780.so /usr/lib/arm-linux-gnueabihf/lcdproc/hd44780.so.bak
sudo rm /usr/lib/arm-linux-gnueabihf/lcdproc/hd44780.so
wget -O /usr/lib/arm-linux-gnueabihf/lcdproc/hd44780.so ehc.ac/p/lcdproc/patches/_discus … d44780.so*

cd /home/pi
mkdir /home/pi/lcdproc
cd lcdproc
wget -O /home/pi/lcdproc/raspidrivers.tar.gz andypi.co.uk/downloads/raspdrivers.tar.gz
tar xzvf raspidrivers.tar.gz

root@volumio:~#
cp /etc/LCDd.conf /etc/LCDd.old
rm /etc/LCDd.conf
wget -O /etc/LCDd.conf andypi.co.uk/downloads/LCDd-VOLUMIO.conf

sudo apt-get install python-mpd
sudo apt-get install python-pip
sudo pip install mpdlcd
wget -O /etc/mpdlcd.conf andypi.co.uk/downloads/mpdlcd.conf

sudo update-rc.d LCDd defaults

rm /etc/init.d/bootmisc.sh
wget -O /etc/init.d/bootmisc.sh andypi.co.uk/downloads/bootmisc.sh**

Note:

  • The newest modified for Pi 2 I download from here: ehc.ac/p/lcdproc/patches/21/#b8f3
    ** The working version of AndyPi: andypi.co.uk/downloads/bootmisc.sh
    LCDd.conf: I delete all content of AndyPi and using code of baloothebear4
    Mappings of LCD pins to GPIO pins ok
    For the display, I tried using the default pins (those that were commented out in Baloo’s LCDd.conf at first):
    D7=18
    D6=23
    D5=24
    D4=25
    RS=7
    EN=8

Any help/assistance would be appreciated.

Thanks All!
Huanvu

I had the same problem. Try to start LCDd manually and check the output:

LCDd -c /etc/LCDd.conf

Mine had errors in config file /etc/LCDd.conf, not sure why, but I suspect encoding of the file.

Example:

' on line 1189 of /etc/LCDd.conf

I removed the config file and copy pasted from my local text editor the contents of http://andypi.co.uk/downloads/LCDd-VOLUMIO.conf

sudo rm /etc/LCDd.conf
sudo nano /etc/LCDd.conf
[copy paste content from http://andypi.co.uk/downloads/LCDd-VOLUMIO.conf]

At least the LCDd is able to start now, but I have another problem: mpdlcd does not see any info from mpd (so soes not see playing state/song info etc).
See https://volumio.org/forum/problem-displaying-playing-now-16x2-lcd-t3392.html for the output of my display.

hey man, i had have this situation just totally like you. finally i found the answer.

the question is, your LCDd.conf did have right config of DriverPath.

try to type in your terminal:
lcdproc (or) sudo lcdproc , you would got the error message. it’s because your system did not found this application.

try:
sudo nano /etc/LCDd.conf
then find:
DriverPath=/location/
check this folder, it should not exist.
then, search your raspberry, which folder “lcdproc” dose live in “/usr/lib/_______/lcdproc/”
copy it. then paste it in your LCDd.conf. reboot, it shall done.

Thanks for the hint. I have to admit I gave up in the meantime, but will give it another try in the weekend!

Hi all, i have the same problem, i followed Andy tutorial

http://andypi.co.uk/2013/09/19/andypi-lcd-with-raspyfi/

and after reboot all i heve is lcd showing one orw of bars.

When i manualy start the lcdproc

sudo service lcdproc start lcdproc: unrecognized service

LCDd starts with no problem

when i want to start mpdlcd

WARNING mpdlcd Connection failed: [Errno 111] Connection refused WARNING mpdlcd Connection failed: [Errno 111] Connection refused WARNING mpdlcd Connection failed: [Errno 111] Connection refused ERROR mpdlcd Unable to connect to lcdproc localhost:13666.

Any advice pls?