libreELEC + lcdPROC + CFtontz uart display

  • Hello all,

    I'm sorry that my very first post is in support thread but i've been struggling to get this display working under libreELEC. Or any display for that matter.My setup work under raspbian btw.

    I will provide info as the thread progresses if it does :P but for now I would like to know which LCDd.conf the addon is loading by default?


    Problem: LCD display trows garbled characters until it stops.

    Expect: LCD to work in UART mode


    I have this location /storage/.kodi/userdata/addon_data/http://service.lcdd/LCDd.conf

    and

    /storage/.kodi/addons/http://service.lcdd/config/LCDd.conf

    neither one are loaded or partially loade at the very least. Kodi trows an "Empty driver information reply"

    My guess is /storage/.kodi/addons/http://service.lcdd/config/LCDd.conf since it's the one that is deleted but I saw on some forum that new versions should load from /storage/.kodi/userdata/addon_data/service.lcdd/

    I tested LCDd.conf with the binary LCDd and it loads fine but all variables are empty if i run lcdd.start.

    it's getting pretty confusing for a setup that took about 5 minutes under raspbian...

    this is a fresh install btw nothing else is installed appart from XMBClcd

    Code
    2020-11-27 14:36:13.579 T:2881561456  NOTICE: ### [XBMC LCDproc] - Connected to LCDd at 127.0.0.1:13666, Protocol version 0.3 - Geometry 16x2 characters (96x16 pixels, 6x8 pixels per character)
    2020-11-27 14:36:13.608 T:2881561456  NOTICE: ### [XBMC LCDproc] - Empty driver information reply
    2020-11-27 14:36:13.778 T:2881561456  NOTICE: ### [XBMC LCDproc] - Loading settings from /storage/.kodi/addons/script.xbmc.lcdproc/resources/LCD.xml.defaults
    2020-11-27 14:36:13.802 T:2881561456  NOTICE: ### [XBMC LCDproc] - Loading settings from /storage/.kodi/userdata/LCD.xml

    As I see this right now it is suppose to load


    everyway I tried I get the same logs from kodi except if i kill the lcd process and run it manually then kodi trows another error that I sould check pins configurations or whatnot...

    same as previous but with

    variables loaded from lcdd.start

    I can't say it never worked though On my previous build I had the 4 bit mode working for an hitachi lcd display. I will have to test it back to see but i recall it wasn't as straight forward as raspbian i still had to ssh in the box. I can't remember what I did now :P anyways i'll keep testing this out if it can help others and at the same time get this to load I would be happy.

    This is the output log if I reboot with

    Code
    2020-11-27 15:31:24.890 T:2776916848  NOTICE: ### [XBMC LCDproc] - Connected to LCDd at 127.0.0.1:13666, Protocol version 0.3 - Geometry 16x2 characters (96x16 pixels, 6x8 pixels per character)
    2020-11-27 15:31:24.935 T:2776916848  NOTICE: ### [XBMC LCDproc] - Empty driver information reply
    2020-11-27 15:31:25.121 T:2776916848  NOTICE: ### [XBMC LCDproc] - Loading settings from /storage/.kodi/addons/script.xbmc.lcdproc/resources/LCD.xml.defaults
    2020-11-27 15:31:25.139 T:2776916848  NOTICE: ### [XBMC LCDproc] - Loading settings from /storage/.kodi/userdata/LCD.xml


    this is my second day on this now I think i'll be able to join the lcdproc dev team in two or three days :)

    config.txt

    Code
    dtoverlay=uart2
    enable_uart=1




    uname -a

    Code
    Linux LibreELEC4 4.19.127 #1 SMP Sat Oct 24 15:01:22 EDT 2020 armv7l GNU/Linux
    Code
    LCDd 0.5dev, LCDproc Protocol 0.3

    If anyone has a clue on how to load this i'd be happy.

    thank you

  • i have this issue on my other raspberry pi

    empty driver response????!!!!

    other rpi other fresh install which i had working the other day lol

    here:

    Code
    LibreELEC1:~/.kodi/addons/service.lcdd/bin # ps | grep LCD
    902 nobody    0:05 LCDd -f -c /storage/.kodi/userdata/addon_data/service.lcdd/LCDd.conf -d hd44780
    923 root      0:00 grep LCD

    i have a 4bit display hooked up which i am 100% sure was working with my old install.

    i guess it's user error wth

    edit: yes hook up error on my second pi now everthing works again but i learned something that i need to test with my cfontz display.

    Edited once, last by dbsix (November 28, 2020 at 6:26 AM).

  • Right now this is what have that works on my raspbian partition.

    This works 100% with only one pin (RX) from the display to GPIO of uart2 TX pin. Same config in libreelec doesn't.

    This is the same config except the driver path, I will need to reboot to get that LCD.conf but yeah i resetted everything yesterday and let kodi pick the driver i choose from the menu I saw that the user_data/conf was generated after that. That is the file i now edit to be certain.


    I'm trying to find why. I tought it was the empty response i saw in kodi's log but it seems the CFontz variable is pushed anywais even if I don't change the driver in


    /storage/.kodi/userdata/addon_data/http://service.lcdd/LCDd.conf

    So no problem there but still all I get on the display is garbled data. Until it crashes.

    Edited once, last by dbsix: multiple typos. (November 28, 2020 at 11:58 PM).

  • So you need to edit the [hd44780] section in /storage/.kodi/userdata/addon_data/http://service.lcdd/LCDd.conf to match your specific UART display's HW.

    You may also find some info here:

    RE: LCDproc problem

    oh i see? even if it's a CFontz? plus mine is really old (632) Those are particular since they are driven by another uC.We need to pâss it certain command. I will try though I have nothing to lose if it works i'll report back.

  • Yes as you can see in your PS output there's the -d hd44780 parameter which forces this driver to be used (see the comments at beginning of LCDd.conf file regarding to -d parameter).

    Change that in LCDproc add-on Configuration settings first to use another (CFontz or whatever you like) instead of default hd44780 driver.

    Edited 5 times, last by ghtester (November 29, 2020 at 4:07 AM).

  • Yes as you can see in your PS output there's the -d hd44780 parameter which forces this driver to be used (see the comments at beginning of LCDd.conf file regarding to -d parameter).

    Change that in LCDproc add-on Configuration settings first to use another (CFontz or whatever you like) instead of default hd44780 driver.

    I think I confused the thread with my second raspberry wich is running fine with my hd44780. The output i provided was from another rpi with another display sorry about his.

    The only issue is with the crystalfontz display. Whatever what I try all I get is garbled data on the LCD which is running fine under raspbian. same driver almost same config apart from the driver path.

    ps output is not accessible at the moment but it's definintly Cfontz last time i grepped..

  • OK, I understand. So please don't mix too many things together and focus on LE.

    I think LCDproc works on LE as same as on Rpi OS if properly configured, just the config file location / driver folder location is different. I can recommend to do / check these steps in LE:

    1) Put the appropriate necessary options to /flash/config.txt and check if the display is properly attached, check if there's no HW / SW conflict on UART

    2) Install the LCDproc add-on and configure it in GUI to select the correct driver. Then reboot LE and check if the LCDd is running with proper parameters using ps | grep LCD

    3) Edit the appropriate LCDd.conf config file located in accordance with ps | grep LCD output to put necessary preferrences to correct display section

    4) Reboot LE again and then install and configure the XBMC LCDproc add-on properly.

    I don't have any experience with Cfontz display as I am using hd44780 connected through i2c but I believe it should work fine as well.

    You can also run the LCDd in foreground to test quickly with any preferred config file but make sure you don't run more instances at the same time.

    Edited once, last by ghtester (November 29, 2020 at 10:12 AM).

  • I will debug with this thanks. Yesterday I copied over the driver from raspian installation sionce it wasn't the same size i figured something must have changed in the LE version. I migh need to compile outside the box and test again.

    1.

    Code
    LibreELEC4:~ # grep uart /flash/config.txt
    # enable uart for LCD display
    #dtoverlay=uart1
    dtoverlay=uart2
    enable_uart=1

    &



    2.

    Code
    LibreELEC4:~ # ps aux | grep -i lcd
    1293 root      0:00 /bin/sh /storage/.kodi/addons/service.lcdd/bin/lcdd.start
    1306 nobody    0:01 LCDd -f -c /storage/.kodi/userdata/addon_data/service.lcdd/LCDd.conf -d CFontz



    /storage/.kodi/userdata/addon_data/http://service.lcdd/LCDd.conf



    i reinstalled from scratch. Still garbled data


    This cfontz driver isns't the same as the one in the raspbian distro.

    Code
    ldd /storage/.kodi/addons/service.lcdd/lib/lcdproc/CFontz.so
    ldd: $warning: you do not have execution permission for `/storage/.kodi/addons/service.lcdd/lib/lcdproc/CFontz.so.old'
    linux-vdso.so.1 (0xbef98000)
    /usr/lib/libarmmem-v7l.so (0xb6ec4000)
    libc.so.6 => /usr/lib/libc.so.6 (0xb6d89000)
    /usr/lib/ld-linux-armhf.so.3 (0xb6ed9000)


    Code
    LibreELEC4:~ # ldd /storage/.kodi/addons/service.lcdd/lib/lcdproc/CFontz.so.test
    ldd: $warning: you do not have execution permission for `/storage/.kodi/addons/service.lcdd/lib/lcdproc/CFontz.so'
    linux-vdso.so.1 (0xbefbe000)
    /usr/lib/libarmmem-v7l.so (0xb6f90000)
    libdl.so.2 => /usr/lib/libdl.so.2 (0xb6f7d000)
    libc.so.6 => /usr/lib/libc.so.6 (0xb6e42000)
    /usr/lib/ld-linux-armhf.so.3 (0xb6fba000)


    That explains the driver size. What does this libdl.so.2 suppose to do?

  • Well, forget the libraries and double check your configuration again instead.

    Why don't you try the same (earlier working on RPi OS) display settings in LCDd.conf?

    I see you changed the Speed parameter from 19200 Bd to 115200. Some displays have the DIP switch to select the preferred speed so if you did not set that properly, the garbage on your display is the logical result.

  • nevermind speed issue ffs thank you man

    You saw it i don't know why I wrote 115200 in this conf. the other box is set at 19200 baud. ffs. you can close this

    Edited once, last by dbsix (November 30, 2020 at 2:52 AM).