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

    Firebox LCD Driver for LCDProc

    Scheduled Pinned Locked Moved Hardware
    398 Posts 97 Posters 466.9k 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

      Thanks for that!  :)

      Most of the hard work was done by others before me though.
      Coding by ridnhard19 and jjgoessens.

      Steve

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

        Since it's now a very long thread and the code is somewhat spread out here are the source files for the sdeclcd driver.

        Producing a driver file from these is not simply a matter of invoking gcc! I hope I have noted all the steps I took to do it here.

        Steve

        sdeclcd.c.png
        sdeclcd.h.png

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

          Thanks to fmertz the driver now correctly supports the front panel buttons on the X-E boxes.  ;D

          Attached to this post is v1.05 sdeclcd driver with reworked keyboard code.

          the sdeclcd.so file should be 13522 Bytes.

          There is no advantage to X-Core or X-Peak box users so you can continue using the old version in the tarball. Of course if you want to test that this new version doesn't break your box that would be great.  ;)
          I have tested it on the X-E and X-Peak boxes.

          Please report any problems.

          Steve

          sdeclcd.c.png
          sdeclcd.so.png

          1 Reply Last reply Reply Quote 0
          • F
            fmertz
            last edited by

            @stephenw10:

            Thanks to fmertz the driver now correctly supports the front panel buttons on the X-E boxes.  ;D

            In the spirit of facilitating getting folks involved in contributing to this driver, I decided it was time to put all this code in one place. The long term plan would certainly be to merge this driver with the upstream lcdproc project. For now, I gathered everyone's contributions and put them in public version controlled project on github.

            The setup is as follows: The master branch contains the code from upstream lcdproc. It is the 0.5dev version, the current development area. I created the sdec branch to capture all the changes necessary for the Watchguard Firebox LCD driver. There are various commits on that branch, one for each contribution, attributed by author as best as I could. The branch captures changes to the sources, makefiles and documentation. The idea is that someone wanting to build this driver from source would be a few commands away from doing so by using this repo.

            The github repository for the sdeclcd is at https://github.com/fmertz/sdeclcd

            To build this driver from source:

            
            to be updated...
            git clone ...
            cd ...
            ./autogen.sh --enable-drivers=sdeclcd
            make
            
            

            Feedback welcome.

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

              I'm not sure you can do that in one step, I certainly didn't.

              
              ./autogen.sh
              ./configure --enable-drivers=sdeclcd
              make
              
              

              The requirements for getting the code into lcdproc upstream seemed tough to meet to me.

              Steve

              1 Reply Last reply Reply Quote 0
              • F
                fmertz
                last edited by

                @stephenw10:

                I'm not sure you can do that in one step

                Commands:

                
                git clone -b sdec git://github.com/fmertz/sdeclcd.git
                cd sdeclcd/
                ./autogen.sh
                ./configure --enable-drivers=sdeclcd
                make
                
                

                In FreeBSD:

                
                [fcm@BSDDev /usr/home/fcm]$ uname -a
                FreeBSD BSDDev.localdomain 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
                [fcm@BSDDev /usr/home/fcm]$ git clone -b sdec git://github.com/fmertz/sdeclcd.git
                Cloning into sdeclcd...
                remote: Counting objects: 628, done.
                remote: Compressing objects: 100% (499/499), done.
                remote: Total 628 (delta 90), reused 627 (delta 89)
                Receiving objects: 100% (628/628), 992.04 KiB | 191 KiB/s, done.
                Resolving deltas: 100% (90/90), done.
                [fcm@BSDDev /usr/home/fcm]$ cd sdeclcd/
                [fcm@BSDDev /usr/home/fcm/sdeclcd]$ ./autogen.sh 
                Running aclocal ...
                Running autoheader...
                Running automake  ...
                configure.in:75: installing `./compile'
                configure.in:10: installing `./config.guess'
                configure.in:10: installing `./config.sub'
                configure.in:6: installing `./install-sh'
                configure.in:6: installing `./missing'
                clients/lcdexec/Makefile.am: installing `./depcomp'
                Running autoconf ...
                [fcm@BSDDev /usr/home/fcm/sdeclcd]$ ./configure --enable-drivers=sdeclcd
                checking for a BSD-compatible install... /usr/bin/install -c
                checking whether build environment is sane... yes
                checking for a thread-safe mkdir -p... ./install-sh -c -d
                checking for gawk... no
                checking for mawk... no
                checking for nawk... nawk
                checking whether make sets $(MAKE)... yes
                checking build system type... i386-unknown-freebsd8.2
                checking host system type... i386-unknown-freebsd8.2
                checking whether to enable debugging... no
                checking for gcc... gcc
                checking whether the C compiler works... yes
                checking for C compiler default output file name... a.out
                checking for suffix of executables... 
                checking whether we are cross compiling... no
                checking for suffix of object files... o
                checking whether we are using the GNU C compiler... yes
                checking whether gcc accepts -g... yes
                checking for gcc option to accept ISO C89... none needed
                checking for style of include used by make... GNU
                checking dependency style of gcc... gcc3
                checking how to run the C preprocessor... gcc -E
                checking for ranlib... ranlib
                checking whether gcc and cc understand -c and -o together... yes
                checking for xmlto... no
                checking CFLAGS for gcc -Wno-unused-function... -Wno-unused-function
                checking CFLAGS for gcc -ftrampolines... no, unknown
                checking for gethostbyname... yes
                checking for connect... yes
                checking for inet_aton... yes
                checking for kstat_open in -lkstat... no
                checking for nanosleep in -lposix4... no
                checking for getloadavg... yes
                checking for swapctl... no
                checking for grep that handles long lines and -e... /usr/bin/grep
                checking for egrep... /usr/bin/grep -E
                checking for ANSI C header files... yes
                checking for sys/types.h... yes
                checking for sys/stat.h... yes
                checking for stdlib.h... yes
                checking for string.h... yes
                checking for memory.h... yes
                checking for strings.h... yes
                checking for inttypes.h... yes
                checking for stdint.h... yes
                checking for unistd.h... yes
                checking procfs.h usability... no
                checking procfs.h presence... no
                checking for procfs.h... no
                checking sys/procfs.h usability... yes
                checking sys/procfs.h presence... yes
                checking for sys/procfs.h... yes
                checking sys/loadavg.h usability... no
                checking sys/loadavg.h presence... no
                checking for sys/loadavg.h... no
                checking utmpx.h usability... no
                checking utmpx.h presence... no
                checking for utmpx.h... no
                checking for kvm_open in -lkvm... yes
                checking sched.h usability... yes
                checking sched.h presence... yes
                checking for sched.h... yes
                checking for sys/types.h... (cached) yes
                checking machine/pio.h usability... no
                checking machine/pio.h presence... no
                checking for machine/pio.h... no
                checking machine/sysarch.h usability... yes
                checking machine/sysarch.h presence... yes
                checking for machine/sysarch.h... yes
                checking sys/cpuvar.h usability... no
                checking sys/cpuvar.h presence... no
                checking for sys/cpuvar.h... no
                checking machine/apm_bios.h usability... yes
                checking machine/apm_bios.h presence... yes
                checking for machine/apm_bios.h... yes
                checking for System V IPC headers... yes
                checking for union semun... yes
                checking for machine/cpufunc.h... yes
                checking for sched_setscheduler... yes
                checking for sched_setscheduler in -lposix4... no
                checking for sched_setscheduler in -lrt... yes
                checking for i386_get_ioperm in -li386... no
                checking for i386_get_ioperm in -lc... yes
                checking for iopl... no
                checking for ioperm... no
                checking sys/io.h usability... no
                checking sys/io.h presence... no
                checking for sys/io.h... no
                checking for a parallel port... yes
                checking linux/i2c-dev.h usability... no
                checking linux/i2c-dev.h presence... no
                checking for linux/i2c-dev.h... no
                checking for dirent.h that defines DIR... yes
                checking for library containing opendir... none required
                checking for ANSI C header files... (cached) yes
                checking fcntl.h usability... yes
                checking fcntl.h presence... yes
                checking for fcntl.h... yes
                checking sys/ioctl.h usability... yes
                checking sys/ioctl.h presence... yes
                checking for sys/ioctl.h... yes
                checking sys/time.h usability... yes
                checking sys/time.h presence... yes
                checking for sys/time.h... yes
                checking for unistd.h... (cached) yes
                checking for sys/io.h... (cached) no
                checking errno.h usability... yes
                checking errno.h presence... yes
                checking for errno.h... yes
                checking limits.h usability... yes
                checking limits.h presence... yes
                checking for limits.h... yes
                checking kvm.h usability... yes
                checking kvm.h presence... yes
                checking for kvm.h... yes
                checking sys/param.h usability... yes
                checking sys/param.h presence... yes
                checking for sys/param.h... yes
                checking sys/dkstat.h usability... yes
                checking sys/dkstat.h presence... yes
                checking for sys/dkstat.h... yes
                checking for sys/sysctl.h... yes
                checking for sys/pcpu.h... yes
                checking for SA_RESTART... yes
                checking for an ANSI C-conforming const... yes
                checking for inline... inline
                checking for size_t... yes
                checking whether time.h and sys/time.h may both be included... yes
                checking whether struct tm is in sys/time.h or time.h... time.h
                checking for uid_t in sys/types.h... yes
                checking whether gcc needs -traditional... no
                checking return type of signal handlers... void
                checking for select... yes
                checking for socket... yes
                checking for strdup... yes
                checking for strerror... yes
                checking for strtol... yes
                checking for uname... yes
                checking for cfmakeraw... yes
                checking for snprintf... yes
                checking for getopt... yes
                checking for your mounted filesystem table... /etc/fstab
                checking for fcntl.h... (cached) yes
                checking sys/dustat.h usability... no
                checking sys/dustat.h presence... no
                checking for sys/dustat.h... no
                checking for sys/param.h... (cached) yes
                checking sys/statfs.h usability... no
                checking sys/statfs.h presence... no
                checking for sys/statfs.h... no
                checking sys/fstyp.h usability... no
                checking sys/fstyp.h presence... no
                checking for sys/fstyp.h... no
                checking mnttab.h usability... no
                checking mnttab.h presence... no
                checking for mnttab.h... no
                checking mntent.h usability... no
                checking mntent.h presence... no
                checking for mntent.h... no
                checking utime.h usability... yes
                checking utime.h presence... yes
                checking for utime.h... yes
                checking sys/statvfs.h usability... yes
                checking sys/statvfs.h presence... yes
                checking for sys/statvfs.h... yes
                checking sys/vfs.h usability... no
                checking sys/vfs.h presence... no
                checking for sys/vfs.h... no
                checking sys/filsys.h usability... no
                checking sys/filsys.h presence... no
                checking for sys/filsys.h... no
                checking sys/fs_types.h usability... no
                checking sys/fs_types.h presence... no
                checking for sys/fs_types.h... no
                checking for sys/mount.h... yes
                checking for getmntinfo... yes
                configure: checking how to get filesystem space usage...
                checking for statvfs... yes
                checking module extension... .so
                checking for dlopen in -ldl... no
                checking for shl_load in -ldld... no
                checking if libusb support has been enabled... yes
                checking for pkg-config... /usr/local/bin/pkg-config
                checking pkg-config is at least version 0.9.0... yes
                checking for LIBUSB... no
                checking if libftdi support has been enabled... yes
                checking for LIBFTDI... no
                checking if libhid support has been enabled... yes
                checking for LIBHID... no
                checking if PNG support has been enabled... yes
                checking for libpng-config... /usr/local/bin/libpng-config
                checking whether libpng is present and sane... yes
                checking if freetype support has been enabled... yes
                checking for freetype-config... /usr/local/bin/freetype-config
                checking for FreeType -- version >= 7.0.1... yes
                checking if ethlcd support has been enabled... yes
                checking for doxygen... no
                configure: checking which drivers to compile...
                ---------------------------------------
                LCDd will be compiled with the drivers:
                    -  sdeclcd
                ---------------------------------------
                configure: creating ./config.status
                config.status: creating Makefile
                config.status: creating shared/Makefile
                config.status: creating server/Makefile
                config.status: creating server/commands/Makefile
                config.status: creating server/drivers/Makefile
                config.status: creating clients/Makefile
                config.status: creating clients/lcdproc/Makefile
                config.status: creating clients/lcdexec/Makefile
                config.status: creating clients/lcdvc/Makefile
                config.status: creating clients/examples/Makefile
                config.status: creating clients/metar/Makefile
                config.status: creating docs/Makefile
                config.status: creating docs/Doxyfile
                config.status: creating docs/lcdproc-dev/Makefile
                config.status: creating docs/lcdproc-user/Makefile
                config.status: creating docs/lcdproc-user/drivers/Makefile
                config.status: creating scripts/Makefile
                config.status: creating scripts/init-LCDd.LSB
                config.status: creating scripts/init-lcdproc.LSB
                config.status: creating scripts/init-lcdexec.LSB
                config.status: creating scripts/init-lcdvc.LSB
                config.status: creating scripts/init-LCDd.debian
                config.status: creating scripts/init-lcdproc.debian
                config.status: creating scripts/init-lcdexec.debian
                config.status: creating scripts/init-lcdvc.debian
                config.status: creating scripts/init-LCDd.rpm
                config.status: creating scripts/init-lcdproc.rpm
                config.status: creating config.h
                config.status: executing depfiles commands
                [fcm@BSDDev /usr/home/fcm/sdeclcd]$ make
                make  all-recursive
                Making all in shared
                ...
                [fcm@BSDDev /usr/home/fcm/sdeclcd]$ ls -l server/drivers/sdeclcd.so
                -rwxr-xr-x  1 fcm  fcm  13522 Dec  6 21:51 server/drivers/sdeclcd.so
                
                
                1 Reply Last reply Reply Quote 0
                • M
                  mmiller
                  last edited by

                  Does anyone have this in a package yet for pfsense?  I would build it my self except I don't currently have a freebsd VM or test machine to test on.

                  1 Reply Last reply Reply Quote 0
                  • F
                    fmertz
                    last edited by

                    @fmertz:

                    The github repository for the sdeclcd is at https://github.com/fmertz/sdeclcd

                    The code was updated. Check the sdec branch of the project:

                    https://github.com/fmertz/sdeclcd/tree/sdec

                    The changes are:

                    • Rewrite of driver code
                    • Suppressed user parameter in configuration file to preserve back light
                    • Added support for more icon codes
                    • Restored heart beat
                    • Fixed initialization
                    • Updated documentation

                    This is based on the 0.5dev version of the lcdproc upstream project.

                    The primary purpose of this effort is to submit a working driver to the upstream project. This is why it is a branch off of the latest dev branch.

                    In parallel, mdima has packaged lcdproc-dev for pfSense. It is based off of lcdproc-0.5.4. This latest driver code is included in mdima's package (I compiled it separately). The discussion is here: http://forum.pfsense.org/index.php/topic,44034.0.html. Big thanks to Stephenw10 and Spy Alelo for live testing on actual hardware, and confirming that the driver works. Basically, if you install the lcdproc-dev package on your Firebox, you should have a working LCD. As simple as that. Feedback most welcome.

                    PS: The button mapping in the LCDd.conf file might need an adjustment, but should be fixed shortly.

                    1 Reply Last reply Reply Quote 0
                    • F
                      fmertz
                      last edited by

                      @fmertz:

                      The code was updated. Check the sdec branch of the project:

                      https://github.com/fmertz/sdeclcd/tree/sdec

                      The primary purpose of this effort is to submit a working driver to the upstream project.

                      The code was updated again: housekeeping and bug fix.

                      A little while back, I submitted this code for inclusion into the upstream lcdproc project. I am happy to report that the code was accepted. This means this SDEC driver for Fireboxes is now a part of the official lcdproc project!

                      1 Reply Last reply Reply Quote 0
                      • F
                        fmertz
                        last edited by

                        The code was updated again for supporting LEDs. Details here:

                        http://forum.pfsense.org/index.php/topic,44034.msg276249.html#msg276249

                        1 Reply Last reply Reply Quote 0
                        • D
                          drdyno
                          last edited by

                          So I installed with the new LCDproc-dev.. All I can get the lcd to do is say "Thanks for using pfSense".
                          I have different screens checked on the screens tab but can't get it to do anything… buttons don't work.

                          I had this working at one time.. now I am frustrated with it...

                          Dyno

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

                            There is a problem with the start sequence. Once your box is up if you go to Status: Services: and restart the lcdproc service it will run correctly.

                            Steve

                            1 Reply Last reply Reply Quote 0
                            • B
                              Brak
                              last edited by

                              I rewrote the startup script that lcdproc.inc outputs and fixed the boot issue on Fireboxes and my own units.

                              You guys will need to check my work and make sure nothing is getting messed up by my changes, but it appears start/stop/restart are working as intended. Something was wrong with the "if X running then kill X" statements. Not sure why the bug was inconsitent with different hardware, but I got it working.

                              I'll post it when I get home, stuck at work. I've been so busy I haven't even been able to test the xCore-e changes.  :-\

                              1 Reply Last reply Reply Quote 0
                              • D
                                drdyno
                                last edited by

                                Steve,

                                Is there anyway to fix this other than having to do that each time it reboots? This is a firebox for my best friend that I am building to help conserve space in his office.

                                Dyno

                                ** Nevermind on reboot it works properly now!

                                Now to find a better and quieter cpu cooler…

                                1 Reply Last reply Reply Quote 0
                                • B
                                  Brak
                                  last edited by

                                  Here is the "fixed" lcdproc.inc

                                  Not sure if this will work for everyone or if it isn't working right, but let me know how it could be improved.

                                  lcdproc.inc.png

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    drdyno
                                    last edited by

                                    Brak,

                                    I stumbled upon your ebay listings again today looking for a X-E box  ;D

                                    you boxes look nice.

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      Brak
                                      last edited by

                                      @drdyno:

                                      Brak,

                                      I stumbled upon your ebay listings again today looking for a X-E box  ;D

                                      you boxes look nice.

                                      Thanks bud!

                                      I'd probably sell my X-E boxes with pfsense on them, but I'm waiting for 2.1 so the driver is supported properly. So sad that 4 gigabit NICs are basically useless atm! I have 3 fully maxed upgraded ones just looking pretty in a rack :(

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

                                        Try the patched driver. I've put a few 10s of Gigs through mine and hasn't crashed yet. Though I still haven't found a reliable way to crash it with the standard driver.  ::)

                                        Steve

                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          flecom
                                          last edited by

                                          how can I disable the backlight timer?

                                          I have the backlight set to on, the brightness to 100% and the off-brightness to 100%… tried adding
                                          BackLight=yes
                                          Backlight_Timer=0

                                          to the lcdd.conf and still turns off after 30 seconds or so  ???

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

                                            If you are using the most recent re-written driver there is a hard coded backlight timer which can't be disabled. Fmertz did it deliberately as the the backlight has a finite (and not that long) life and has already been run for many hours on most peoples boxes. We had a number of failure reports.

                                            Steve

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