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

    Crystal Fontz 635 help!

    Scheduled Pinned Locked Moved Hardware
    31 Posts 4 Posters 10.4k 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

      The pfSense package uses lcdproc version 0.5.3.1, not the most recent. However the Crystal Fontz Packet driver has included support for the 635 since well before that so it should work.

      What is the output from usbconfig?

      Steve

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

        Here is how I have the package setup.

        here is the following for the output of usbconfig:

        ugen0.1: <ohci root="" hub="" ati="">at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
        ugen1.1: <ohci root="" hub="" ati="">at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
        ugen2.1: <ohci root="" hub="" ati="">at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
        ugen3.1: <ohci root="" hub="" ati="">at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
        ugen4.1: <ohci root="" hub="" ati="">at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
        ugen5.1: <ehci root="" hub="" ati="">at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
        ugen1.2: <generic usb="" hub="" alcor="">at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE
        ugen3.2: <crystalfontz cfa635-usb="" lcd="" crystalfontz="">at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
        ugen1.3: <usb trackball="" logitech="">at usbus1, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
        ugen1.4: <hp usb="" multimedia="" keyboard="" novatek="">at usbus1, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
        ugen1.5: <4 Port KVMSwicther No brand> at usbus1, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON

        and I add the following lines to the /usr/local/pkg/lcdproc.xml:

        <option><value>ugen3.2</value>
            <name>ugen3.2 (/dev/ugen3.2)</name></option>

        I also edited the /usr/local/pkg/lcdproc.inc as follows:

        case "ugen3.2":
            continue;
            break;

        and

        case "ugen3.2":
              $realport = "/dev/ugen3.2";
              break;

        The full lcdproc.xml can be found here sewellnj.dyndns-free.com/public_images/proclcd.xml.doc

        The full lcdproc.inc can be found here sewellnj.dyndns-free.com/public_images/proclcd.inc.doc

        The content of my logs show this:

        I have stopped the service and restarted it.

        The lcdproc.conf file is here sewellnj.dyndns-free.com/public_images/lcdproc.conf.doc
        Here is the output of dmesg sewellnj.dyndns-free.com/public_images/dmesg.doc

        Hardware that I'm running is the following:

        Motherboard: MSI FUZZY RS690T AMD ATI AM2+ MINI ITX HDMI MOTHERBOARD
        Processor    : AMD Athlon™ X2 Dual Core Processor BE-2350
        Memory      : 2GB DDR2
        NIC            : dual gigabit motherboard NICs + Dual Gigabit Intel PCI NIC
        LCD Screen: CrystalFontz 635
        Case          : NORCO RPC-230 2U Rackmount Server Case - OEM
        pfsense version: 2.0-RC3 (amd64)
        built on Wed Jul 27 13:16:07 EDT 2011

        My screen at the moment always looks like this:
        This is what my pfsense box looks like just in case others are interested:

        Thanks for any help you guys / gals can provide.</hp></usb></crystalfontz></generic></ehci></ohci></ohci></ohci></ohci></ohci>

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

          Sorry for large Pic I resized them on my website but they are still showing large pics in IE.

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

            Hmm, OK.
            So it looks like it's starting twice and then having a problem because it's using the same conf file.
            What does your lcdproc.sh file look like in /usr/local/etc/rc.d?

            Is either lcdd or lcdproc running? Use 'top' to view running processes.

            Steve

            1 Reply Last reply Reply Quote 0
            • C
              Cino
              last edited by

              I have the same issue with LCDproc double starting. I posted this a couple of weeks ago. Something change on how packages are started. I believe the package itself needs to be looked at to fix the issue. I was able to make it work on my box. If you dont mind editing files, i've put the steps below. It may not be the right way but it works for me.

              Make sure everything is correct in your LCDproc settings, the screens you and such. 'Enable LCDproc' it and Save. Go back and uncheck 'Enable LCDproc'
                  the above step makes sure settings are saved but by unchecking Enable, it wont start up..

              You can change folder locations if you want but this is what i did:

              create a folder called 'custom' under your root directory.
              put this file there with 755 permissions
              lcdclient.sh

              
              #!/bin/sh
              
              # script starts a lcd client and always keeps it active.
              counter=1
              while [ "$counter" -ne 0 ]
              do
              	# loop the client to drive the display
              	/usr/local/bin/php -f /usr/local/pkg/lcdproc_client.php
              	sleep 1
              done
              
              

              create a file under /usr/local/etc/rc.d called 'lcddisplay.sh' with 755 permissions

              
              #!/bin/sh
              # This file was automatically generated
              # by the pfSense service handler.
              
              rc_start() {
              
              if [ `ps auxw |awk '/LCD[d]/ {print $2}'| wc -l` != 0  ]; then
              	ps auxw |awk '/LCD[d]/ {print $2}'|xargs kill 
              	sleep 1	
              fi
              if [ `ps auxw |awk '/lcdclient.s[h]/ {print $2}'| wc -l` != 0  ]; then
              	ps auxw |awk '/lcdclient.s[h]/ {print $2}'|xargs kill
              	sleep 1	
              fi
              if [ `ps auxw |awk 'lcdproc {print $2}'| wc -l` != 0  ]; then
              	ps auxw |awk 'lcdproc {print $2}'|xargs kill
              	sleep 1	
              fi
              
              	/usr/local/sbin/LCDd -c /usr/local/etc/LCDd.conf
              	/root/custom/lcdclient.sh &
              	sleep 5
              	lcdproc
              
              }
              
              rc_stop() {
              
              if [ `ps auxw |awk '/LCD[d]/ {print $2}'| wc -l` != 0  ]; then
              	ps auxw |awk '/LCD[d]/ {print $2}'|xargs kill 
              	sleep 1	
              fi
              if [ `ps auxw |awk '/lcdclient.s[h]/ {print $2}'| wc -l` != 0  ]; then
              	ps auxw |awk '/lcdclient.s[h]/ {print $2}'|xargs kill
              	sleep 1	
              fi
              if [ `ps auxw |awk 'lcdproc {print $2}'| wc -l` != 0  ]; then
              	ps auxw |awk 'lcdproc {print $2}'|xargs kill
              	sleep 1	
              fi
              
              }
              
              case $1 in
              	start)
              		rc_start
              		;;
              	stop)
              		rc_stop
              		;;
              	restart)
              		rc_stop
              		rc_start
              		;;
              esac
              
              

              Then you can maunally start it by typeing '/usr/local/etc/rc.d/lcddisplay.sh start' from the cmd line.  When you reboot your box, LCDproc should also start byself since the lcddisplay.sh will be executed on startup

              Hope this helps!

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

                This is my lcdproc.sh:

                #!/bin/sh
                # This file was automatically generated
                # by the pfSense service handler.
                
                rc_start() {
                
                if [ `ps auxw |awk '/LCD[d]/ {print $2}'| wc -l` != 0  ]; then
                	ps auxw |awk '/LCD[d]/ {print $2}'|xargs kill 
                	sleep 1	
                fi
                if [ `ps auxw |awk '/lcdclient.s[h]/ {print $2}'| wc -l` != 0  ]; then
                	ps auxw |awk '/lcdclient.s[h]/ {print $2}'|xargs kill
                	sleep 1	
                fi
                
                	/usr/local/sbin/LCDd -c /usr/local/etc/LCDd.conf
                	/tmp/lcdclient.sh &
                
                }
                
                rc_stop() {
                
                if [ `ps auxw |awk '/LCD[d]/ {print $2}'| wc -l` != 0  ]; then
                	ps auxw |awk '/LCD[d]/ {print $2}'|xargs kill 
                	sleep 1	
                fi
                if [ `ps auxw |awk '/lcdclient.s[h]/ {print $2}'| wc -l` != 0  ]; then
                	ps auxw |awk '/lcdclient.s[h]/ {print $2}'|xargs kill
                	sleep 1	
                fi
                
                }
                
                case $1 in
                	start)
                		rc_start
                		;;
                	stop)
                		rc_stop
                		;;
                	restart)
                		rc_stop
                		rc_start
                		;;
                esac
                
                

                And this is the output of top:

                  PID USERNAME  THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
                41285 nobody      1  54    0  7936K  1648K nanslp  0 151:16 17.09% LCDd
                41650 root        1  66    0  8292K  1668K wait    0   0:33  0.00% sh
                58696 root        1  67    0  8292K  1668K wait    0   0:31  0.00% sh
                36313 root        1  64   20  5836K  1468K select  1   0:17  0.00% apinger
                12176 root        1  76   20  8292K  1720K wait    1   0:13  0.00% sh
                 2748 root        1  44    0 19152K  4772K select  0   0:06  0.00% racoon
                46700 dhcpd       1  44    0 13056K  7668K select  0   0:04  0.00% dhcpd
                39941 root        1  44    0   104M 29624K accept  0   0:04  0.00% php
                17548 root        1  44    0 14772K  2796K select  1   0:03  0.00% syslogd
                40227 root        1  76    0   104M 24436K accept  1   0:03  0.00% php
                36983 root        1  44    0 25764K  5364K kqread  0   0:02  0.00% lighttpd
                18570 root        1  44    0 11768K  3972K bpf     1   0:02  0.00% tcpdump
                18810 root        1  44    0  5832K  1016K piperd  1   0:02  0.00% logger
                53890 root        3  64   20  7216K  1652K nanslp  0   0:01  0.00% filterdns
                47579 nobody      1  44    0 10144K  2936K select  0   0:01  0.00% dnsmasq
                14608 _dhcp       1  44    0  5832K  1572K select  0   0:01  0.00% dhclient
                39886 _ntp        1  44    0  5832K  1456K select  0   0:00  0.00% ntpd
                38682 root        1  45    0   104M 22472K accept  0   0:00  0.00% php
                15207 root        1  44    0  7980K  1556K nanslp  0   0:00  0.00% cron
                39687 root        1  76    0   100M 12312K wait    0   0:00  0.00% php
                37349 root        1  76    0   100M 12308K wait    0   0:00  0.00% php
                

                I see that LCDd is running but I don't see that lcdproc is running and I'm assuming that you need both?
                Cino I have not tried your work around yet, taking a look at it now. Thanks for the quick responses.

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

                  The LCDproc package runs differently to the way I have it installed on my firebox so I could be wrong.
                  Looking at lcdproc.sh it appears the two processes you should see are lcdd and lcdclient.sh. You don't so it's not working.
                  However with lcdd running but no client I expect the display to show some lcdd server info as in this post.
                  The fact that is doesn't could indicate a driver problem. However I think you need to try Cino's fix above to make sure it's starting correctly. Or start the server manually at some point.

                  Steve

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

                    No luck guys, still seems that it doesn't work. Even with Cino's work around.

                    Here is my syslog information:


                    At this point I'm not even sure the screen works since I have never seen anything other then the demo text on it.
                    I am going to install windows on the box and see if I can get it to work that way. I still don't have a clear understanding on how the package works so let me take a try and you guys can tell me if I'm right.

                    In the FreeBSD there is a folder called /usr/local/etc/rc.d and anything that you put in there will autorun when the computer starts. Now the package LCDproc takes advantage of a demon called LCDd which gets its configuration information from LCDd.conf. LCDproc also uses LCDproc.inc and LCDproc.xml to get it's configuration information for such things as what text to display on the screen and also what driver to use and port, speed ect. Now the drivers are located in /usr/local/lib/lcdproc folder and have an extention of *.so. But the LCDd.conf addresses the driver without the extension, does this mean anyting? Also how is the LCDd.conf generated? I suspect it is generated from the lcdproc package. Below is my LCDd.conf

                    [server]
                    Driver=CFontzPacket
                    Bind=127.0.0.1
                    Port=13666
                    ReportLevel=3
                    ReportToSyslog=yes
                    WaitTime=5
                    User=nobody
                    ServerScreen=no
                    Foreground=no
                    DriverPath=/usr/local/lib/lcdproc/
                    GoodBye="Thanks for using"
                    GoodBye="    pfSense     "
                    ToggleRotateKey=Enter
                    PrevScreenKey=Left
                    NextScreenKey=Right
                    ScrollUpKey=Up
                    ScrollDownKey=Down
                    [menu]
                    MenuKey=Escape
                    EnterKey=Enter
                    UpKey=Up
                    DownKey=Down
                    [CFontzPacket]
                    Device=/dev/ugen3.2
                    Model=635
                    Size=20x4
                    Contrast=350
                    Brightness=1000
                    OffBrightness=50
                    Speed=115200
                    NewFirmware=yes
                    Reboot=yes
                    

                    Also does my port speed seem kind of high, I know typically serial devices use a port speed of 9600. My device is USB however just trying to think of all possibilities. I may also try to update to the lates version of lcdproc. One last thing it seems like I'm trying to connect to the LCDd on a different port than it's listening on but all of the config files say port=13666.

                    Thanks for all your help in advance. If anything I'm learning a whole lot about Unix (FreeBSD).

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

                      The system log looks a lot better though. It shows lcdd starting and listening for a client and then the client successfully connecting to it. So why is it not actually updating the screen?
                      Is it stuck in demo mode? It is set to the wrong baud rate?
                      The option Reboot=yes is supposed to be so that the screen resets itself and comes up in a known state. This implies it may be possible for it to setup wrong.

                      Override the default communication speed known for the selected model.

                      [default: depending on model; legal: 19200, 115200]

                      #Speed=115200

                      So maybe try 19200.

                      The Newfirmware=yes option is a bit confusing. If you look at the code at the lcdproc site it seems to imply there isn't any new firmware so this does nothing.  :-
                      In fact your display shows V1.6 and this option is V2.0 firmwares. Maybe try changing that to no.

                      Set the firmware version (New means >= 2.0) [default: no; legal: yes, no]

                      Currently this flag is not in use, there is no such thing as NewFirmware. ;=)

                      #NewFirmware=no

                      Edit: Actually 1.6 is the most recent. the above only applies to the 633.

                      Your explanation of how it works is mostly accurate. However this isn't a "normal" install of lcdproc.
                      In order to use the pfSense package system the lcdproc package does things a bit differently. For example it writes out the lcdproc.conf file when you setup the package. Usually you would just edit the file directly.
                      It doesn't use the standard lcdproc client instead using it's own client. Lcdproc is written as a client/server combination just to make it easy for people to write their own client software.

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • C
                        Cino
                        last edited by

                        I know a 635 with scab works on my box as I tried it a few weeks ago as a test. I didn't change any settings other then add the usb port to the config files and selected the packet driver… I do have one extra driver that you may not have. In the http://forum.pfsense.org/index.php/topic,23919.msg123663.html#msg123663 thread, there are steps to add 'libusb.so.2' I needed this to get my piclcd driver to work but I wonder if its needed for any USB LCD device as it was already on my box when I tested with my 635. It also talked about 'libkvm.so.5' but I found I didn't need it.

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

                          I installed the libkvm.5, libusb.so.2, picolcd.so and now I'm getting:

                          /libexec/ld-elf.so.1: /lib/libkvm.so.5: Shared object has no run-time symbol table
                          Error.
                          I have tried to erase the files now I am just getting this error on my terminal and I get this error when I try to run the top command and also if I try to execute the LCDd or lcdproc. I am finishing my basement so I will have to take the router off line for a couple of days also I am making some upgrades so I can switch from operating systems more efficiently and will try to update on my progress later on in the week. I have still not tried to get the LCD working in Windows just as a test.  I am also going to try to see if I can get the LCD to work in PfSense 1.2.3. I will update on my progress.

                          1 Reply Last reply Reply Quote 0
                          • C
                            Cino
                            last edited by

                            you dont need the libkvm.5, libusb.so.2, picolcd.so files. They are needed if you have a picolcd display. A firmware update should overwrite the libkvm.5 file.

                            try it on a windows box to make sure its working.. download ccontrol and the window drivers to get it working on a windows box.

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

                              Are you sure you don't need libusb?
                              Just the fact that something changed when it was added to the box implies that it's being used?

                              Steve

                              1 Reply Last reply Reply Quote 0
                              • C
                                Cino
                                last edited by

                                i think your right… libusb wasn't there on a fresh install and its needed for picolcd because it uses the usb interface.. the 635 may need it also since its attach via usb. libkvm, at first i did use that driver but after a few fresh installs, i found i didn't need it only libusb. I end up not installing the libkvm

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

                                  Okay so I installed Windows 7 32 bit on my box and was able to get the 635 to work with little issues. I did notice that there were two drivers for this screen. There was a USB Driver (I'm guessing that is the CFontzPacket in FreeBSD) but there is also a serial port driver (Not sure which driver does this in FreeBSD) that gets installed even though this screen connects through my motherboard via USB. I remember reading somewhere that this device is a serial device with an USB controller attached to it. If that is the case is there another driver that I have to install before this screen will work? Also in Windows there is a separate program that is responsible for putting the information on the screen (lcdproc I'm guessing is what does that in FreeBSD). I did find out in Windows the screen will not function unless you have the serial port speed set to the Max 115200. I feel like I'm getting closer, I think the issue is the serial port driver. Any ideas?
                                  I also notice that if I edit files with file manger a package I downloaded for PfSense I get all kind of errors trying to run LCDd but if I use the built in file editor then I don’t get the error. There may be a problem with File Manager. Not sure if anyone else has seen this.

                                  Here is a read out of my system logs:

                                  LCDd: LCDd version 0.5.3 starting
                                  Aug 11 21:56:32                  LCDd: Using Configuration File: /usr/local/etc/LCDd.conf
                                  Aug 11 21:56:32                  LCDd: Listening for queries on 127.0.0.1:13666
                                  Aug 11 21:56:38                  LCDd: Connect from host 127.0.0.1:11527 on socket 6
                                  Aug 11 21:56:39                  LCDd: error: huh? Too much data received… quiet down!
                                  Aug 11 21:56:39                  LCDd: Client on socket 6 disconnected

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

                                    The USB-Serial port driver, uftdi, is in the FreeBSD kernel and is loading correctly as you can see from your system logs.

                                    One thing that occurs to me is that you may have to point LCDd at the serial device rather than the usb port directly. E.g. at uftdi0

                                    If you plug the screen in after pfSense has booted and you have the console up what messages do you get? Does it show an extra com port for example?

                                    Steve

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

                                      The USB-Serial port driver, uftdi, is in the FreeBSD kernel and is loading correctly as you can see from your system logs.

                                      One thing that occurs to me is that you may have to point LCDd at the serial device rather than the usb port directly. E.g. at uftdi0

                                      If you plug the screen in after pfSense has booted and you have the console up what messages do you get? Does it show an extra com port for example?

                                      Steve

                                      I will try that, right now the system is down due to basement construction. I did forget to mention one thing. I was messing around with the LCDd.conf and I copied the LCDd.conf.sample to LCDd.conf without editing it. I then ran the LCDd and lcdproc and it put all the lcdproc information on my terminal window (I was sshed into the box at the time) So it seems that the lcdproc and LCDd are working and it is just a matter of getting the information to the screen. I will try what you said and report back soon.

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

                                        This makes for interesting reading, though it's an older version of FreeBSD and the com port labelling has changed since then:
                                        http://www.tnpi.net/computing/freebsd/crystalfontz.shtml

                                        Perhaps you need the ucom driver?

                                        Steve

                                        Edit: Further reading seems to show that the uftdi driver should automatically generate an extra com port which the CFontz packet driver can talk to. I don't see one in your dmesg from a while ago.

                                        Edit: The ucom driver doesn't seem to be in the 32 bit kernel, you using 64 bit?

                                        
                                        [2.0-RC3][root@pfsense.fire.box]/boot/modules(14): kldstat -v | grep ucom
                                        [2.0-RC3][root@pfsense.fire.box]/boot/modules(15): kldstat -v | grep uftdi
                                                        285 uhub/uftdi
                                        
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • M
                                          mikeisfly
                                          last edited by

                                          This makes for interesting reading, though it's an older version of FreeBSD and the com port labelling has changed since then:
                                          http://www.tnpi.net/computing/freebsd/crystalfontz.shtml

                                          Perhaps you need the ucom driver?

                                          Steve

                                          Edit: Further reading seems to show that the uftdi driver should automatically generate an extra com port which the CFontz packet driver can talk to. I don't see one in your dmesg from a while ago.

                                          Yeah I saw that post too, I think there is were I discovered that the LCD screen was really a serial device with a usb interface slapped on it or perhaps it would be more accurate to call it an serial LCD screen with a usb to serial device included?

                                          So I turned on the router and unplugged the usb from the motherboard. (Kind of tricky as it is all individual wires!) and I got this :

                                          ugen3.2 <crystalfontz>at usbus3 (disconnected)
                                          uftdi0: at uhub3, Port2, addr 2 disconnected

                                          When I plugged it back in I got:

                                          ugen3.2: <crystalfontz>at usbus3
                                          uftdi0: <crystalfontz cfa635-usb="" lcd="">on usbus3

                                          You may be correct. I ran the following command though I don't know what it means:

                                          kldstat -v|grep ucom

                                          and nothing was returned but the prompt.</crystalfontz></crystalfontz></crystalfontz>

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

                                            In FreeBSD drivers can be either built into the kernel or loaded as a module. The drivers that are built in are decided at compile time.
                                            kldstat usually lists the kernel modules that have been loaded with kldload or from /boot/loader.conf. kldstat -v lists modules that are compiled in, I think!

                                            I think you need to kldload the ucom.ko module but I only have the 32bit version to hand.

                                            Steve

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