Subsections


1.1 LCD4Linux - Display Of Status Informations On A LC-Display

1.1.1 Introduction

With this package it is possible to connect a LCD module via different interfaces to the fli4l (parallel and USB are available directly from the fli4l configuration, serial must be configured via the ``expert'' mode, see the appropriate section below).

This will display information such as date, external IP address, the current load values and of course the ISDN or DSL throughput for up- and download in kb/s and an indication bar.

Animated icons can be freely defined by the user, permanent or only when reaching definable thresholds (eg, a flash at high CPU load).

It is possible to display bars (even two bars in a row) which can move in any direction (left, right, top or bottom).

The design has virtually no limits - beside the size of the display.

In addition, the display can be extended with plugins almost without limit.

An IMON plugin exists that will query status information - that is, duration of online connection, transfer rate and quantity, a.s.o.

A software called lcd4linux is used to achieve all this.

On the homepage of the project (https://ssl.bulix.org/projects/lcd4linux) some images of supported displays and detailed information can be found for the respective configuration options in 'expert' mode.


1.1.2 Configuration Of The Display Driver

If you want to use the LCD4Linux package, the following variables have to be set:

        OPT_LCD4LINUX='yes'  (Default Setting: OPT_LCD4LINUX='no')

First, the desired display with its respective possible additional options and, if possible, the connection is configured. After that, what should appear on the display - and where.

If you have a display that is not predefined but is suported by lcd4linux (see above Web site of the project), you can activate the 'expert' mode and make changes directly in the actual lcd4linux configuration.

LCD4LINUX_DRV

Chooses the desired driver.

  Possible drivers are:
    HD44780      - Hitachi HD44780 based displays and compatible
    LCD2USB      - LCD2USB - http://www.harbaum.org/till/lcd2usb/
    GLCD2USB     - GLCD2USB - http://www.harbaum.org/till/glcd2usb/
    HP12542R     - Hyunday HP12542R-DYO
    CTINCLUD     - http://www.ct-maeusekino.de/
    FW8888       - Allnet FW8888 internal Display
    DPF          - Patched Digital Photo Frame http://geekparadise.de/tag/ax206/
    EA232Graphic - Some RS232 Graphic Displays made by Electronic Assembly
    M50530       - Mitsubishi M50530 mit z.B. 24x8 digits

LCD4LINUX_DRV_MODEL

Which display model do we have?

  For the driver HD44780 the following models can be chosen:

  generic	- Standard HD44780 Display (standard)
  Noritake	- Like generic but with backlight setting via software
  Soekris	- Special interface for Soekris-PC's with Busy-Check in 4-Bit mode
  HD66712	- Like HD44780 but with slightly changed Ram layout. Also for KS0073
  LCM-162	- Special interface in Nexcom Blade Servers

  For the driver EA232Graphic the following models can be chosen:

  GE120-5NV24	120x32
  GE128-6N9V24	128x64
  GE128-6N3V24	128x64
  GE128-7KV24	128x128
  GE240-6KV24	240x64
  GE240-6KCV24	240x64
  GE240-7KV24	240x128
  GE240-7KLWV24	240x128
  GE240-6KLWV24	240x64
  KIT120-5	120x32
  KIT129-6	128x64
  KIT160-6	160x80
  KIT160-7	160x128
  KIT240-6	240x64
  KIT240-7	240x128
  KIT320-8	320x240

LCD4LINUX_DRV_PORT

Sets the port to be used.

  For the driver HD44780 the following ports exist:

  parports/0 to parports/2 to address the parallel port over the Linux parport API.
  0x278, 0x378, 0x3BC to address the parallel port directly
  i2c-0 bis i2x-9 for I2C Bus driven displays.

  To use i2c LCD4LINUX\_DRV\_BUS='i2c' has to be set.

  The drivers EA232Graphic, FW8888, HP12542R can have the following parport settings:

  ttyS0 a.s.o. for local serial ports (Legacy, PCI)
  ttyUSB0 a.s.o. for serial port over USB.

LCD4LINUX_DRV_SPEED

Sets the speed of the serial interface.

  Possible values:

  1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200

  EA232Graphic has a default of 115200 Baud.

LCD4LINUX_DRV_WIRE_TYPE

Specifies the wiring of HD44780 and M50530 displays.

  Possible values for HD44780:

  generic	# also called LCD4Linux wiring (very often)
  winamp	# also a very common wiring
  soekris	# special wiring for the Soekris boards

  Possible values for M50530:

  simple	# like in the example at: http://ssl.bulix.org/projects/lcd4linux/wiki/M50530
  rw		# the same but with RW on INIT (default)
  usebusy	# like 'rw' but with busy flag check. Very slow

LCD4LINUX_DRV_BUS

Bus type for HD44780 displays

  Possible values:

  parport	# Parallel-Port (default)
  i2c		# I2C

If you select I2C, the I2C bus already must have been initialized prior to the start of lcd4linux by another opt.

LCD4LINUX_DRV_DEVICE

Device on the I2C bus for HD44780 displays

This is a bus ID which has to be set on the hardware.

LCD4LINUX_DRV_ROTATE
- The 'serdisplib' has an interesting feature, the possibility to turn the display on the screen. This is currently used by the displays CTINCLUD and HP12542R.

LCD4LINUX_DRV_CONTRAST

Specifies the contrast level. Possible values are from 0 to 255, on some displays less.

Currently supported by LCD2USB, HP12542R and some EA232Graphic and HD44780.

LCD4LINUX_DRV_BRIGHTNESS

Specifies the brightness level. Possible values are from 0 to 255, on some displays less.

Currently used by LCD2USB, GLCD2USB and some HD44780.

LCD4LINUX_DRV_BACKLIGHT

Turns on the backlight. Possible values: 'yes' or 'no'.

Currently used by HP12542R and some HD44780.

LCD4LINUX_DRV_ASC255BUG

Some HD44780 compatible displays have a bug and show an inverted 'P' or '{' instead of solid 'Blocks'. In this case, specify 'yes' here.

LCD4LINUX_DRV_CONTROLLERS
HD44780 displays can only display a maximum of 80 characters. In order to achieve more (for example, 40x4) two controllers have to be connected to one display. But also smaller displays can be equipped with 2 controllers. In such case specify '2' here.

LCD4LINUX_DRV_BITS

HD44780 displays can be operated in 4- or 8-bit mode. So specify '4' or '8' here depending on the wiring. The default is '8 'if nothing is specified.

LCD4LINUX_DRV_USEBUSY

To use the busy flag of a HD44780 display, set 'yes' here.

LCD4LINUX_DRV_OPTION_N

Number of manually assigned driver options

LCD4LINUX_DRV_OPTION_N

Here you can specify your own options, which are not yet directly implemented by the OPT.

  For example, a larger font with graphic displays:

  LCD4LINUX\_DRV\_OPTION\_N='1'
  LCD4LINUX\_DRV\_OPTION\_1='Font'
  LCD4LINUX\_DRV\_OPTION\_1\_VALUE='12x16'

1.1.3 Configuration Of The Display Layout

LCD4LINUX_ICONS
- LCD4Linux offers the possibility of animated icons, eg a beating heart or even a flash. These icons can be configured over the layout, however, the program needs some storage which it must reserve at startup to load the icons. Enter the number of desired icons (max. 8). If you configure more icons in the layout than you reserved space for, the 'additional' ones are not displayed.

LCD4LINUX_DISPLAY_SIZE
- The size of the display. Indicate in length (characters) x height (rows). If your display is able to show 20 characters in 4 lines, please write '20x4'.

LCD4LINUX_DSL_SPEED_IN
- The download speed of your DSL connection. Used to calibrate the the download bar display.

LCD4LINUX_DSL_SPEED_OUT
- The upload speed of your DSL connection. Used to calibrate the the upload bar display.

LCD4LINUX_LAYOUT_N
- The most interesting part of the package, because it is about the actual presentation - what should appear where on the screen. Enter the number of layout configuration rows.

LCD4Linux uses a concept called 'widgets'. These are basically small independent functions which do something then.

With 'LCD4LINUX_LAYOUT_x' this functions are assigned to their position. 'Row1.Col1 :Info:' means that the scrolling info text (explanation of the widget will be done later in the text) starts on the first position of the first line, and since the info text occupies the whole line nothing else fits. If you like a small icon in front of the info-text you have to change the configuration slightly.

i.e. to:

        LCD4LINUX_LAYOUT_1='Row1.Col1  :Lightning:'
        LCD4LINUX_LAYOUT_2='Row1.Col2  :Info:'

Please note that in this example the last character of the scrolling text is 'cut off', i.e., it can not be shown, because the display is not large enough. That's not a bad thing in the case of the running text, because the characters scroll by anyway. Only with other widgets that are static and do not scroll some characters could be missing.

The widgets currently possible are listed in table 1.1. (the Info_Tel_x widgets have an alternating display if a 'last number' exists, this is why there is an 'OR')

Table 1.1: Overview of possible widgets
Typ Information Character Width
:Info: Scrolling text with name and IP 20
:Info2: Scrolling text with name , version, Ram and CPU 20
:Date_dd_mm_yyyy: Date with four digits for year 10
:Date_dd_mm_yy: Date with two digits for year 8
:Time_hh_mm_ss: Time 8
:ImonDSLQuantity_In: DSL In Quantity 10
:ImonDSLQuantity_Out: DSL Out Quantity 9
:ImonDSLRate_In: DSL In Rate 9
:ImonDSLRate_Out: DSL Out Rate 9
:ImonDSLRate_Bar: DSL Rate Balken 20
:ImonDSLOnline_Time: DSL Online Time 20
:ImonDSL_IP: DSL IP or Offline 19
:ImonDSL_IP_2: DSL IP or Date, Time 20
:ImonDSLName: DSL Circuit Name 20
:ImonDSLCharge: DSL Online Costs 17
:ImonISDN1Status: ISDN Circuit Name 20
:ImonISDN2Status: ISDN Circuit Name 20
:ImonISDN1Name: ISDN Circuit Name 20
:ImonISDN2Name: ISDN Circuit Name 20
:ImonISDN1Rate_Bar: ISDN Circuit Name 20
:ImonISDN2Rate_Bar: ISDN Circuit Name 20
:ImonISDN1Rate_In: ISDN Circuit Name 20
:ImonISDN2Rate_In: ISDN Circuit Name 20
:ImonISDN1Rate_Out: ISDN Circuit Name 20
:ImonISDN2Rate_Out: ISDN Circuit Name 20
:ImonISDN1Charge: ISDN Circuit Name 20
:ImonISDN2Charge: ISDN Circuit Name 20
:ImonISDN1_IP: ISDN Circuit Name 19
:ImonISDN2_IP: ISDN Circuit Name 19
:ImonISDN1Online_Time: ISDN Circuit Name 20
:ImonISDN2Online_Time: ISDN Circuit Name 20
:ImonISDN1Quantity_In: ISDN Circuit Name 15
:ImonISDN2Quantity_In: ISDN Circuit Name 15
:ImonISDN1Quantity_Out: ISDN Circuit Name 15
:ImonISDN2Quantity_Out: ISDN Circuit Name 15
:Info_Tel_1: No Call! -OR- Number, Date, Time 20
:Info_Tel_2: No Call, DSL Online Time -OR- Number, Date, Time, DSL Online Time 20
:Info_Tel_3: DSL Onl.time -OR- Call number 20
:TelNr: Call Number last Call 20
:TelDate: Date of last Call 8
:TelTime: Time of last Call 8
:OS: Display Operating System 20
:CPU: Display CPU Version 9
:RAM: Display total RAM 11
:RAM_FREE: Display free RAM 16
:Busy: CPU Usage 9
:BusyBar: CPU Usage Bar 10
:Load: PC Load 10
:LoadBar: PC Load Bar 10
:Eth0: Volume on Eth0 10
:Eth0Bar: Rate on Eth0 14
:PPP: Volumen on a PPP connection 9
:Uptime: Time since last Reboot 20
:VarText1: text -> /etc/lcd_text1.txt max 20
:VarText2: text -> /etc/lcd_text2.txt max 20
:VarText3: text -> /etc/lcd_text3.txt max 20
:VarText4: text -> /etc/lcd_text4.txt max 20
:Lightning: Icon: Lightning 1
:Heartbeat: Icon: Heartbeat 1
:Heart: Icon: Heart 1
:Blob: Icon: Bubble 1
:Wave: Icon: Wave 1
:Squirrel: Icon: Squirrel 1
:Rain: Icon: Rain(drops) 1

LCD4LINUX_START_STOP_MSG
- If this option is set to 'yes', then at system startup and during shutdown text messages will be issued.

If configuring the LCD in expert mode (LCD4LINUX_EXPERT_MODE='yes') four additional layouts have to be created: Startup, Halt, Poweroff and Reboot. See the example config at 'opt \etc \lcd4linux')

LCD4LINUX_EXPERT_MODE
- if this option is set to 'yes' the complete configuration is ignored and the file 'lcd4linux.conf' from the directory 'config \etc \lcd4linux \' (directory must be created, an example config can be found at 'opt \etc \lcd4linux') will be copied to the router. This file has to be adapted to your needs.

LCD4LINUX_TEST
- this option can be used for testing the configuration 'lcd4linux.conf'.

The lcd4linux daemon will not be started automatically, instead you have to connect to the router console (via ssh or directly) and start the daemon in debug mode - you can check any error messages and the daemon does not run as a background service, but can be stopped by 'ctrl+c'.

If you have installed an editor on the fli4l (i.e. e3) you may change /etc/lcd4linux/lcd4linux.conf to correct the configuration.

The call for the LCD4Linux debug mode is:

  'lcd4linux -f /etc/lcd4linux/lcd4linux.conf -Fvv'

1.1.4 Pin Wiring Of A LCD Module At The Parallel Port

   13 _____________________________ 1 Onsight on the
      \ o o o o o o o o o o o o o /   parallel port,
       \ o o o o o o o o o o o o /    backside PC
     25 ------------------------- 14

The connection of an LCD module to the router is separated as follows:

 
 Parallel Port Pin  Description    LCD Module    LCD Pin
         18-25      GND                             --|
                    GND                          1  --|- Bridge
                    R/W                          5  --|
                    +5V                          2
             1      STROBE         EN(1)         6
             2      D0             D0            7
             3      D1             D1            8
             4      D2             D2            9
             5      D3             D3           10
             6      D4             D4           11
             7      D5             D5           12
             8      D6             D6           13
             9      D7             D7           14
            14      Autofeed       RS            4
            17      Select In      EN(2)         ? (for LCDs with 2 Controllers)

  For Displays with Background Lighting:
                                   HG+          15 (with Resistor 20 Ohm)
                                   GND          16

At Pin 3 the driver of a a >= 20kOhm potentiometer between +5V and GND may be connected to adjust the contrast of the display. In my display (Conrad) Pin 3 is connected directly to ground and everything can be read properly.

  
  +5V ---+
         /
         \ <--+
         /    |
         \    |
  GND ---+    +--- VL (Pin 3 - driver input)

1.1.5 Connection Of A 4x40 Display

Since the connection of a 4x40 display is different from other displays, here is an example (Conrad - NLC 40x4x05):

Parallel Port Pin  Description    LCD Module    LCD Pin
        18-25                                             --|
                   GND                                13  --|- Bridge
                   R/W                                10  --|
                   +5V                                14
            1      STROBE         EU (Enable-Upper)    9
            2      D0             D0                   8
            3      D1             D1                   7
            4      D2             D2                   6
            5      D3             D3                   5
            6      D4             D4                   4
            7      D5             D5                   3
            8      D6             D6                   2
            9      D7             D7                   1
           14      Autofeed       RS                  11
           17      Select In      ED (Enable-Down)    15

At Pin 12 the driver of a >= 20kOhm potentiometer between +5V and GND may be connected to adjust the contrast of the display. It may be sufficient to connect pin 12 directly to ground to read everything properly.

  +5V ---+
         /
         \ <--+
         /    |
         \    |
  GND ---+    +--- VL (Pin 12 - driver input)

Unfortunately, there is no standard for the pinout of the parallel port on the motherboard. For internal use of LCD modules consult the documentation of the motherboard concerning pin wiring.

The required power supply is unfortunately not found at the parallel port because the power consumption of a LCD module is too high. Suitable for this are the connectors for mouse (PS/2), keyboard (DIN, PS/2), game port, USB, or a free connection from the PC power supply. Because some sound card manufacturers generate special signals on the game port there is no guarantee that it works in any combination. Take care and always measure before!

© 2001-2016 The fli4l-Team - 16 February 2016