CFontzPacket 635 not writing white spaces

  • zeroeth

    zeroeth - 2012-09-24

    When the LCDProc server comes up some of the previous text that was on the display is still there.

    Some because it seems that any leading white spaces that are sent show up and overwrite whatever character was there from the previous screen, but not any trailing spaces.

    I start LCDd and I see the boot screen for the 635. 
    The server screen then appears but the trailing character are unchanged. 

    I editing the Goodbye message in LCDd.conf to pad the line with white spaces but they don't show up.  However if I use another character say "*" for example they do show up and write out.

    I pulled down the CystalFontz CLI code from their website and modified the output so that it would send out white spaces at the end of the line (instead of "<<<") and that works.

    My conclusion then is that the CFontzPacket driver isn't handling trailing white spaces.  Has anyone else run into this?


  • Markus Dolze

    Markus Dolze - 2012-09-24

    I have just checked with my CFA-635 and do not see this behaviour.

    LCDd uses two buffers for drawing that are filled with space characters initially. LCDd only sends changed portions of a line skipping any leading / trailing identical parts (with are spaces on startup).

    But if the skipped portions of the screen are actually not empty, they are not erased.

    But this should not happen because LCDd does issue a 'hardware_clear' command before drawing anything on the screen. If I remove that line from the code, I see the behaviour you describe.

    So, which version of LCDproc are you using? And how old is your device?

  • zeroeth

    zeroeth - 2012-09-25

    LCDd - LCDproc Server Daemon, 0.5.2

    Let me pull down the source and build it.  Also I just purchases this device.  v1.1 is printed on the board.

  • zeroeth

    zeroeth - 2012-09-25

    I pulled down the source and followed the instructions to build a .deb file.  My os  is Linux version is Debian 7.0 Wheezy.

    I'm now running:
    LCDd - LCDproc Server Daemon, 0.5.5

    However I'm still experiencing the same issue.  All I changed in the config was:

    ## CrystalFontz packet driver (for CFA533, CFA631, CFA633 & CFA635) ##
    # Select the LCD model [default: 633; legal: 533, 631, 633, 635]
    # Select the output device to use [default: /dev/lcd]
    # Set the initial contrast [default: 560; legal: 0 - 1000]
    # Set the initial brightness [default: 1000; legal: 0 - 1000]
    # Set the initial off-brightness [default: 0; legal: 0 - 1000]
    # This value is used when the display is normally
    # switched off in case LCDd is inactive
    # Reinitialize the LCD's BIOS on driver start. [default: no; legal: yes, no]
    # Enable the USB flag if the device is connected to an USB port. For
    # serial ports leave it disabled. [default: no; legal: yes, no]
    # Very old 633 firmware versions do not support partial screen updates using
    # 'Send Data to LCD' command (31). For those devices it may be necessary to
    # enable this flag. [default: no; legal: yes, no]
    # Override the LCD size known for the selected model. Usually setting this
    # value should not be necessary.
    # Override the default communication speed known for the selected model.
    # Default value depends on model [legal: 19200, 115200]

    There was an issue with the init.d script where grep wanted [] not  however for my testing I was just executing /usr/sbin/LCDd -f

    Thanks for your help :)

  • zeroeth

    zeroeth - 2012-09-25

    So there's some progress:
    I'm back the version in the Debian repository 0.5.2. 

    I have two init scripts that run on start up.  One is the LCDd and the other is a script for my client perl script.

    After a reboot I see the LCD boot screen and then it goes right into the client screen with the same issue with some characters not starting.

    Now a work around was to enable the Hello message and put a character in ever spot of the LCD.  If I start my script after the Hello screen appears then characters get written correctly and no character from the previous screen stick around.

    However on bootup this message never gets a chance to show up before my client screen starts drawing right away.

    One more thing is that I change the ServerScreen to blank and if I stop my client script some of the character from the boot menu remain even on the blank screen!  It seems that the ONLY character that like to stick around are the ones from the LCD boot screen.  Are they special?

  • Markus Dolze

    Markus Dolze - 2012-09-25

    Putting something in the Hello message is one way of doing this by configuration. It should be sufficient to put some other character then 'space' into the very first and very last column.

    If you can build LCDproc from source you may also change in file 'server/drivers/CFontzPacket.c' the line

    memset(p->backingstore, ' ', p->width * p->height);

    to something like

    memset(p->backingstore, 'x', p->width * p->height);
  • Markus Dolze

    Markus Dolze - 2012-09-25

    If possible you can do another test on windows:

    1. Install any necessary driver for the display.
    2. Go to and dowload 635_WinTest.exe
    3. When running the program, it will tell you the hardware / firmware version of your device.
    4. In the 'Packet Debugger' you can select '6 = Clear LCD Screen' command and send that packet.

    This is the command that LCDproc issues after initializing the driver. If this command does not clear the screen then something is wrong with display settings or even worse.

  • zeroeth

    zeroeth - 2012-09-27

    I'll try these suggestions in the next few weeks to see if they fix the issue.  So far displaying a Hello message is working for now.

    If anyone else has this issue and are trying to get their client screen to execute on startup using update-rc.d it doesn't work to well.  It seems like although LCDd starts and the client screen gets added shortly after I was still getting characters sticking around because the Hello message wouldn't be displayed in time before the first screen showed up.

    My solution was just remove the startup service "update-rd.d -f LCDd remove" which I did to my script as well. Then I just added them to the rc.local file with some generous sleeps in between to be sure the Hello message displayed before the first screen showed up.

    I'll report back when I've tried your suggestions.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks