This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LCD Display for UTM v9 Software Home Licence?

Hello,

i read that in earlier UTM versions there was lcd4linux included so it was possible to add a HD44780 compatible LCD display to a homebrew box.
However i cannot find lcd4linux on v9, does anybody know if it's still possible to add a LCD display to v9?

Cheers,
Olaf


This thread was automatically locked due to age.
Parents Reply Children
  • OK, so here's my little How-To:

    What you need:

    • An HD44780 compatible LCD with 16x2 characters (not tested if any other size will work but i doubt regarding the patched lcd4linux)
    • An old printer cable (just for the parallel 25pin male connector and the cables)
    • An USB cable (for the power supply, or whatever is needed to get +5V to the LCD for backlight and operation)
    • An iso of the Astaro Software 8.305 (to extract the lcd4linux rpm)
    • Shell access for root on your Astaro Installation
    • Some soldering and Linux skills


    What to do:

    First, solder the connectors to the LCD. Here are the pinouts and how to connect them, i chose the so called "Winamp"-Wiring:

    Connect your LCD to the parallel port

    (Sorry this article is in german, but most important are the pictures with the connections anyway. You can find the same information in the lcd4linux wiki.)

    This is the most important picture:



    Check, double check and triple check the wiring. Use a 100R between backlight anode (usually pin15 of LCD, might also be missing or somewhere else. Check datasheet) and power supply. Connect the GND's of the printer port with GND of power supply for the LCD. Use a (variable) resistor between pin3 of the LCD and GND to adjust contrast (higher resistor value means lower contrast). I personally used a fix value. Same goes for backlight brightness (Use a resistor with higher value between anode and power supply to reduce brightness).

    Connect the LCD to power (i.e. USB) and parallel interface.

    Extract the lcd4linux-0.10.1-10.g30326a2.i686.rpm from the software iso image, transfer it (with wget or SCP for example, SFTP is not active) to your Astaro computer and install as root with 
    rpm -ivh lcd4linux-0.10.1-10.g30326a2.i686.rpm


    If you want to use the provided start script, create a file /etc/asg with the text LCD4LINUX_HW="HD44780" and modify the init script by changing the two LCM-162 entries to HD44780. This way you prevent the symbolic link for the UTM9 lcm-162 in rc3.d to start the lcm-162 daemon and allow the lcd4linux to fire up.

    Use joe or vi to create a /etc/lcd4linux.conf file with the following display section:

    Display HD44780 {

        Driver 'HD44780'
        Model 'generic'
        Bus 'parport'
        Port '/dev/parport0'
        Bits 8
        Size '16x2'
        UseBusy 1
        asc255bug 0
        
        # This is for Winamp-wiring - use different values for different wiring
        Wire {
            RW              'AUTOFD'
            RS              'INIT'
            ENABLE          'STROBE'
            ENABLE2         'GND'
            BACKLIGHT       'GND'
            GPO             'GND'
            POWER           'GND'
        }

        Timing {
            fuzz      100
        }
    }



    Chose your Widgets from the lcd4linux.conf posted earlier in this thread. If you want to use bars, make sure to give them a "length 16" parameter. Bars only work when they're filling one complete row. Don't mix a bar with anything else in one row. Not every bar widget works, while the BusyBar works fine for me, the Eth0Bar doesn't work correctly at all.

    Make your layout with your widgets, following the rules that there have to be exactly 6 rows - not less - and each row filled with data. Any row above 6 seems be omitted, tho i didn't try with more than 8.

    Start 
    lcd4linux -vFv
     on the CLI and watch the output for errors and the LCD for activity.

    If everything works fine, end lcd4linux debug mode with Ctrl-C and start the daemon with the init script (/etc/init.d/lcd4linux start)

    Find more information in the lcd4linux wiki - but be aware that the "Astaro-lcd4linux" is heavily patched and does not offer all features and behaviours of the genuine version. There are some functions missing like i2c_sensors, execute, netinfo and maybe more, i didn't try them all. Also the Astaro-version uses a kind of swapper, which generates 3 "screens" that change periodically every 5-6 seconds. First "screen" consists of row1/row2, second is row3/4 and last 5/6. The downside of this is, that bar widgets don't work properly. So better avoid them.

    Autostart:

    The installer adds a start script to /etc/init.d/lcd4linux and symlinks in rc3.d
    With the changes mentioned above it starts at boot (runlevel 3).

    My lcd4linux.conf

    For those interested, this is my complete lcd4linux.conf. This one is working flawlessly for me:

    ### Display
    #####################
    Display HD44780 {

        Driver 'HD44780'
        Model 'generic'
        Bus 'parport'
        Port '/dev/parport0'
        Bits 8
        Size '16x2'
        UseBusy 1
        asc255bug 0 

        Wire {
        RW 'AUTOFD'
    RS 'INIT'
    ENABLE 'STROBE'
    ENABLE2 'GND'
    BACKLIGHT 'GND'
    GPO 'GND'
    POWER 'GND'
        }
        
        Timing {
            fuzz      100
        }
    }



    ### Widgets
    #####################

    Widget RAM {
        class  'Text'
        expression meminfo('MemTotal')/1024
        postfix ' MB RAM'
        width  11
        precision 0
        align  'R'
        update tick
    }

    Widget Free {
        class  'Text'
        prefix '    '
        expression meminfo('MemFree')/1024
        postfix 'MB free'
        width  16
        precision 0
        align  'R'
        update tick
    }

    Widget Used {
        class  'Text'
        expression (meminfo('MemTotal')-meminfo('MemFree'))/1024
        postfix 'MB used   '
        width  16
        precision 0
        align  'R'
        update tick
    }

    Widget MemPercent {
        class 'Text'
        prefix 'MEM used '
        expression (100-(((meminfo('MemFree')+meminfo('SwapFree'))*100)/((meminfo('MemTotal')+meminfo('SwapTotal')))))
        postfix '%'
        width 16
        precision 1
        align 'R'
        update tick
    }

    Widget Busy {
        class 'Text'
        expression proc_stat::cpu('busy', 500)
        prefix 'CPU busy '
        postfix '%'
        width 16
        precision 1
        align 'R'
        update tick
    }


    Widget Eth0 {
        class 'Text'
        expression (netdev::fast('eth0', 'Rx_bytes', 500)+netdev::fast('eth0', 'Tx_bytes', 500))/128
        prefix 'eth0'
        postfix ' kbps'
        width 16
        precision 0
        align 'R'
        update tick
    }

    Widget Eth1 {
        class 'Text'
        expression (netdev::fast('eth1', 'Rx_bytes', 500)+netdev::fast('eth1', 'Tx_bytes', 500))/128
        prefix 'eth1'
        postfix ' kbps'
        width 16
        precision 0
        align 'R'
        update tick
    }

    Widget Eth0in {
        class 'Text'
        expression (netdev::fast('eth0', 'Rx_bytes', 500))/128
        prefix '>'
        postfix ' kbps'
        width 16
        precision 0
        align 'R'
        update tick
    }

    Widget Eth0out {
        class 'Text'
        expression (netdev::fast('eth0', 'Tx_bytes', 500))/128
        prefix '



    The message displayed is the hardcoded splash screen of lcd4linux, to skip this run lcd4linux with parameter -q


    eth0 is my internet uplink, so this shows Rx/Tx traffic.




    Be happy and enlightened [:)]