Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    LCD4LINUX - PicoLCD

    Scheduled Pinned Locked Moved Hardware
    14 Posts 2 Posters 1.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      You definitely don't want to have both daemons running so if you installed lcd4linux somehow then disable it at least.

      You can start the lcddproc client and server from Shellcmds:
      https://www.netgate.com/docs/pfsense/development/executing-commands-at-boot-time.html#shellcmd-option

      If you install the lcdproc package you will need to leave it disabled to prevent it trying to run automatically.

      Then call the sever pointing to your custom lcdd.conf file with the driver configured. And call the client with whatever options you want. There are not as many available as via the php client in the package but it will get you up and running.

      Steve

      M 1 Reply Last reply Reply Quote 0
      • M
        mhswa @stephenw10
        last edited by

        @stephenw10

        Okay i have added the glcd driver name in LCDd.conf (see below) But do i need to change the dimensions? and in shellcmd what is the command i need to add to call the server and make it start up?

        i tried to manually run LCDd.conf with ./LCDd.conf but i get premission denied then i tried to sudo and its not installed or freebsd doesnt have sudo....?

        [server]
        DriverPath=/usr/local/lib/lcdproc/
        Driver=glcd
        Bind=127.0.0.1
        Port=13666
        ReportLevel=3
        ReportToSyslog=yes
        User=nobody
        Foreground=no
        ServerScreen=no
        GoodBye="Thanks for using"
        GoodBye="    pfSense     "
        WaitTime=1
        ToggleRotateKey=Enter
        PrevScreenKey=Left
        NextScreenKey=Right
        ScrollUpKey=Up
        ScrollDownKey=Down
        [menu]
        MenuKey=Escape
        EnterKey=Enter
        UpKey=Up
        DownKey=Down
        [picolcd]
        driverpath=/usr/local/lib/lcdproc/
        Device=/dev/ugen0.2
        Size=20x4
        KeyTimeout=500
        Contrast=1000
        Brightness=1000
        OffBrightness=0
        Blacklight_Timer=60
        Keylights=on
        Key0Light=on
        Key1Light=off
        Key2Light=off
        Key3Light=off
        Key4Light=off
        Key5Light=off
        
        
        1 Reply Last reply Reply Quote 0
        • M
          mhswa
          last edited by

          just tried /usr/local/etc/rc.d/lcdproc.sh restart

          didnt work, i know the LCD is sitting on /dev/ugen0.2

          1 Reply Last reply Reply Quote 0
          • M
            mhswa
            last edited by

            @mhswa said in LCD4LINUX - PicoLCD:

            /usr/local/etc/rc.d/lcdproc.sh

            Looks like this is in the logs

            
            Aug 28 09:11:46	php		lcdproc: Start client procedure. Error counter: (0)
            Aug 28 09:11:45	LCDd		Critical error while initializing, abort.
            Aug 28 09:11:45	LCDd		There is no output driver
            Aug 28 09:11:45	LCDd		Could not load driver glcd
            Aug 28 09:11:45	LCDd		Driver [glcd] init failed, return code -1
            Aug 28 09:11:45	LCDd		glcd: normal_font missing in configuration
            Aug 28 09:11:45	LCDd		Listening for queries on 127.0.0.1:13666
            Aug 28 09:11:45	LCDd		Waittime should be at least 2 (seconds). Set to 2 seconds.
            Aug 28 09:11:45	LCDd		Using Configuration File: /usr/local/etc/LCDd.conf
            Aug 28 09:11:45	LCDd		LCDd version 0.5.7 starting
            
            1 Reply Last reply Reply Quote 0
            • M
              mhswa
              last edited by

              This is my new Config still not working, i took the glcd from the sample and added them

              [server]
              DriverPath=/usr/local/lib/lcdproc/
              Driver=glcd
              Bind=127.0.0.1
              Port=13666
              ReportLevel=3
              ReportToSyslog=yes
              User=nobody
              Foreground=no
              ServerScreen=no
              GoodBye="Thanks for using"
              GoodBye="    pfSense     "
              WaitTime=1
              ToggleRotateKey=Enter
              PrevScreenKey=Left
              NextScreenKey=Right
              ScrollUpKey=Up
              ScrollDownKey=Down
              [menu]
              MenuKey=Escape
              EnterKey=Enter
              UpKey=Up
              DownKey=Down
              ## glcd generic graphical display driver
              [glcd]
              # Select what type of connection. See documentation for types.
              ConnectionType=t6963
              
              # Width and height of the display in pixel. The supported sizes may depend on
              # the ConnectionType. [default: 128x64; legal: 1x1 - 640x480]
              Size=128x64
              
              # Width and height of a character cell in pixels. This value is only used if
              # the driver has been compiled with FreeType and it is enabled. Otherwise the
              # default 6x8 cell is used.
              CellSize=12x16
              
              # If LCDproc has been compiled with FreeType 2 support this option can be used
              # to turn if off intentionally. [default: yes; legal: yes, no]
              useFT2=no
              
              # Path to font file to use for FreeType rendering. This font must be monospace
              # and should contain some special Unicode characters like arrows (Andale Mono
              # is recommended and can be fetched at http://corefonts.sf.net).
              #normal_font=/usr/local/lib/X11/fonts/TTF/andalemo.ttf
              
              # Some fonts miss the Unicode characters used to represent icons. In this case
              # the built-in 5x8 font can used if this option is turned off. [default: yes;
              # legal: yes, no]
              fontHasIcons=no
              
              # Set the initial contrast if supported by connection type.
              # [default: 600; legal: 0 - 1000]
              Contrast=600
              
              # Set brightness of the backlight if the backlight is switched 'on'.
              # [default: 800; legal: 0 - 1000]
              Brightness=1000
              
              # Set brightness of the backlight if the backlight is switched 'off'. Set this
              # to zero to completely turn off the backlight. [default: 100; legal: 0 - 1000]
              OffBrightness=0
              
              # Time (ms) from first key report to first repeat. Set to 0 to disable repeated
              # key reports. [default: 500; legal: 0 - 3000]
              KeyRepeatDelay=500
              
              # Time (ms) between repeated key reports. Ignored if KeyRepeatDelay is disabled
              # (set to zero). [default: 300; legal: 0 - 3000]
              KeyRepeatInterval=300
              
              # Assign key strings to keys. There may be up to 16 keys numbered 'A' to 'Z'.
              # By default keys 'A' to 'F' are assigned Up, Down, Left, Right, Enter, Escape.
              KeyMap_A=Up
              KeyMap_B=Down
              KeyMap_C=Enter
              KeyMap_D=Escape
              
              1 Reply Last reply Reply Quote 0
              • M
                mhswa
                last edited by

                Looks like the issue is the normal_font location since pfsense remove all of that

                glcd: Creation of font '/usr/local/lib/X11/fonts/TTF/andalemo.ttf' failed

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  Ok, you want to copy the generated LCDd.conf file to somewhere permanent like /root. Then you can edit it without it being overwritten accidentally.

                  Then you can start LCDd referencing it:
                  /usr/local/sbin/LCDd -c /root/LCDd.conf

                  You can put that in a Shellcmd to make it run at boot. Somewhat like I described here.

                  The conf file needs to be configured correctly so looking at this:
                  http://lcdproc.sourceforge.net/docs/lcdproc-0-5-7-user.html#glcd-config

                  You need to set the connection type to picolcdgfx
                  The size to 256x64

                  If you have useFT2 set to no I don't expect it to require a font path. But some fonts are available in /usr/local/www/css/fonts/
                  I've never tried using that though.

                  Running from the command line should give more useful errors. Setting the report level setting differently might give better output.

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • M
                    mhswa
                    last edited by

                    Setting any settings like size and wait time in LCDd.con doesnt work or change things but im starting it manually without a lcd.conf file which may be why the text is small with not many screens. but the hello and goodbye screens work when i change them in lcdd.conf

                    1 Reply Last reply Reply Quote 0
                    • M
                      mhswa
                      last edited by

                      it seems that even starting it with the -c option running it like this /usr/local/etc/rc.d/lcdproc.sh -c /root/LCDd.conf it doesnt use the .conf file and reverts back to the original in /usr/local/etc/LCDd.conf and it ignores the wait time and size, and useFT2 doesnt work the LCD will only work with that option set to no

                      Isnt there a lcd.conf somewhere that needs to have some settings? i did find a lcd-sample.conf or lcdproc-sample

                      1 Reply Last reply Reply Quote 0
                      • M
                        mhswa
                        last edited by

                        Okay so after testing a few things I found out

                        When starting lcdproc via /usr/local/etc/rc.d/lcdproc.sh start it ignores most if LCDd.conf variables like wait time and most of the screens dont show.

                        When I run

                        /usr/local/sbin/ LCDd
                        /usr/local/sbin/ lcdproc

                        Those commands sepretly it uses the variables in the LCDd.conf and shows way more screens. I just need to figure out the best text and icon size as it looks horrible and unreadable at the moment.

                        I will have to add those into shellcmd this seems like the way you need to start it manually.

                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          Yes, exactly you can't use the shell script to start it as that just calls the standard files created by the package. You need to call the binary directly as I wrote above.

                          Be sure to check the post I linked above too. The actual commands you want to use in the shellcmd are:

                          /usr/bin/nice -20 /usr/local/sbin/LCDd -c /root/LCDd.conf > /dev/null &

                          and

                          /usr/bin/nice -20 /usr/local/bin/lcdproc C T U &

                          Assuming your customised LCDd.conf file is in /root.

                          Steve

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.