• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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.
  • S
    stephenw10 Netgate Administrator
    last edited by Aug 4, 2011, 4:42 PM

    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 Aug 5, 2011, 11:36 AM

      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
      • S
        stephenw10 Netgate Administrator
        last edited by Aug 12, 2011, 10:49 AM Aug 5, 2011, 11:58 AM

        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 Aug 5, 2011, 1:29 PM Aug 5, 2011, 1:27 PM

          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 Aug 8, 2011, 10:11 PM

            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 Aug 8, 2011, 10:48 PM

              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
              • S
                stephenw10 Netgate Administrator
                last edited by Aug 8, 2011, 11:49 PM

                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 Aug 9, 2011, 12:24 AM

                  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 Aug 12, 2011, 2:22 AM

                    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
                    • S
                      stephenw10 Netgate Administrator
                      last edited by Aug 12, 2011, 11:04 AM

                      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 Aug 12, 2011, 12:47 PM

                        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
                        • S
                          stephenw10 Netgate Administrator
                          last edited by Aug 12, 2011, 4:09 PM Aug 12, 2011, 2:44 PM

                          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 Aug 12, 2011, 4:34 PM

                            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
                            • S
                              stephenw10 Netgate Administrator
                              last edited by Aug 12, 2011, 5:44 PM

                              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
                              • M
                                mikeisfly
                                last edited by Aug 12, 2011, 6:17 PM

                                That's good because I have re-installed PfSense and used the 32bit version. I wanted to see if 64 bit was the cause of my troubles and just decided to keep it because I wasn't sure what 64 bit gave me other than the ability to address more memory. I would just need the driver and instructions on how to install it.

                                1 Reply Last reply Reply Quote 0
                                • S
                                  stephenw10 Netgate Administrator
                                  last edited by Aug 12, 2011, 9:28 PM Aug 12, 2011, 7:23 PM

                                  Edit: Don't bother with this see below!  ;)

                                  Hmm, looks like I was wrong about the kldstat command. Trying to load ucom on my system gives:

                                  
                                  [2.0-RC3][root@pfsense.fire.box]/root(1): kldload ucom.ko
                                  kldload: can't load ucom.ko: File exists
                                  
                                  

                                  This implies it's already in the kernel. It's probably worth trying though on your system.

                                  I've attached the ucom.ko module from FreeBSD 8.1. Remove the .png suffix.
                                  The file should be 20,607 Bytes.
                                  Upload the file to /boot/modules then from the command line:
                                  cd /boot/modules
                                  kldload ucom.ko

                                  Steve

                                  ucom.ko.png

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    stephenw10 Netgate Administrator
                                    last edited by Aug 12, 2011, 9:27 PM

                                    Forget all that!  ::)

                                    I'm not sure why, perhaps the logging level is set differently, but the ucom driver output does not show up when you connect a device. However the resulting com port is created.

                                    I happened to have an FTDI device to hand (it's a USB ODBII reader) so I gave it a go.

                                    
                                    [2.0-RC3][root@pfsense.fire.box]/dev(36): dmesg | grep ftdi
                                    uftdi0: <ft232r usb="" uart="">on usbus0
                                    [2.0-RC3][root@pfsense.fire.box]/dev(37): ls /dev/cua??
                                    /dev/cuaU0 /dev/cuau0 /dev/cuau1</ft232r> 
                                    

                                    As you can see the device cuaU0 is created. The capital U is important it indicates a USB connected com port. It also appears as ttyU0.

                                    Just use that in the lcdproc config page instead of ugen3.2.

                                    Steve

                                    1 Reply Last reply Reply Quote 0
                                    • M
                                      mikeisfly
                                      last edited by Aug 15, 2011, 3:11 AM

                                      Success! Adding the serial port and not the USB port was the key. Here is what I did.

                                      1. Complete reinstall (Wanted to start clean)
                                      2. Edited the lcdproc.xml file and added ttyU0
                                      3. Edited the lcdproc.inc file and added ttyU0 in that file as well.

                                      The screen was showing 0 Clients, 0 Screens but after looking at some things I noticed that I didn't have a lcdproc.conf so I just cp lcdproc.conf.sample lcdproc.conf . Now everything seems to be running ok. I have not tried to restart the system to see if it will start automatically. I will report back on my finding. I just want to thank Stephenw10 and Cino, and all others in previous post. Without you guys I would have never figured this thing out.

                                      1 Reply Last reply Reply Quote 0
                                      • C
                                        Cino
                                        last edited by Aug 15, 2011, 2:50 PM

                                        Good to hear!! I was going to get back to you on this but glad you got it to work… Strange you had to use that... I wonder if its because when I tested this a few weeks ago, i had the LCD with SCAB built in.

                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          fireman039
                                          last edited by Dec 12, 2011, 12:05 PM

                                          @mikeisfly:

                                          Success! Adding the serial port and not the USB port was the key. Here is what I did.

                                          1. Complete reinstall (Wanted to start clean)
                                          2. Edited the lcdproc.xml file and added ttyU0
                                          3. Edited the lcdproc.inc file and added ttyU0 in that file as well.

                                          The screen was showing 0 Clients, 0 Screens but after looking at some things I noticed that I didn't have a lcdproc.conf so I just cp lcdproc.conf.sample lcdproc.conf . Now everything seems to be running ok. I have not tried to restart the system to see if it will start automatically. I will report back on my finding. I just want to thank Stephenw10 and Cino, and all others in previous post. Without you guys I would have never figured this thing out.

                                          Hi,

                                          I order an CrystalFontz LCD for my Pfsense box
                                          Can you explain step by step what you do you get it working (clarify)

                                          Thanks

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received