pfSense Gold Subscription

Author Topic: Firebox LCD Driver for LCDProc  (Read 94173 times)

dotdash and 1 Guest are viewing this topic.

Offline TaNk

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #180 on: July 22, 2011, 02:17:13 pm »
Thanks for reply.

I'm runing 2.0 Rc3 its a full hd install on x700. when i try to do chmod it say's command not found?

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8159
  • Karma: +5/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #181 on: July 22, 2011, 03:51:50 pm »
Hmm, well that seems very weird.
I don't have a full install to test right now but I can't believe that there's no chmod in it. It's certainly present in the nanoBSD install of RC3.
Are you experiencing any other problems?
The script is intended for embedded installs and may cause a problem with mounting the filesystem RO on a full install. However as you haven't managed to run it yet it can't be that.  ???

Steve

Offline TaNk

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #182 on: July 22, 2011, 11:43:36 pm »
Hey

just like to confirm that it work's with full HDD install aswell

this is what i did

 $ chmod 0755 ./install-embed2.lcdd.sh
 $  /usr/local/etc/rc.d/lcdd.sh

VOLA it works :)


Thanks again for your help ...

Offline xleox

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #183 on: July 25, 2011, 03:16:56 pm »
Hello stephenw10,

thank you for lcdd4.tar, it work quit well on my Firebox X700.

It is possible to disable/enable/blink the "Arm/Disarm"-LED in the BIOS (permanent).

One think could be enhanced: to extend the lcd-driver to set the "Arm/Disarm"-LED to green on init and to red on exit.
I don't have the source code, but I think it should be simple and would be the icing on the cake.

xleox


Online stephenw10

  • Hero Member
  • *****
  • Posts: 8159
  • Karma: +5/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #184 on: July 25, 2011, 03:22:58 pm »
It wasn't at all simple!  ::)
Read the entire thread to discover just how not simple or go straight to this post to get the resulting program to set the led.

Steve

Offline woc38

  • Jr. Member
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #185 on: July 26, 2011, 08:32:02 am »
I'm currently in the proces of migrating to pfSense 2.0. I installed a full 2.0RC3 version on a HD and installed Steve's LCD and LED packages on a WG Firebox X700. Just like on 1.2.3 it looks like it is running fine. I once encounterd a problem with the LCD driver only displaying "LCDproc Server" but couldn't reproduce.

Today I booted my Firebox for configuring and directly after bootup the LCD is "locked up" (see picture).
Arrow up shows "next", down shows "prev", right does nothing, left enters the menu with: options, screens, test menu. There is no system data like uptime, mem usage etc.

  • version: 2.0-RC3 (i386) built on Sun Jul 24 19:17:15 EDT 2011
  • did not install the package LCDproc via packages, only Steve's tarball
  • Serial console shows a normal startup of the lcdd script

Code: [Select]
Starting CRON... done.
 Starting /usr/local/etc/rc.d/WGXepc.sh...done.
 Starting /usr/local/etc/rc.d/lcdd.sh...done.
Bootup complete

What is going on here? Strange thing is it doesn't happen every time I boot or reboot the firewall...
I have little knowledge of FreeBSD, but is it possible to restart the lcdd service via the terminal? How?

Thanks for your info and help!

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8159
  • Karma: +5/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #186 on: July 26, 2011, 09:53:02 am »
LCDproc is in two parts. lcdd is the server half that talks to the screen. lcdprocc is the client that tells lcdd what to put on the screen. If you only have the server half running you get what you are seeing.
Got to the console and run 'top' you should see both lcdd and lcdproc:
Code: [Select]
[2.0-RC3][root@pfsense.fire.box]/root(1): top
last pid:  8157;  load averages:  0.01,  0.01,  0.00   up 35+01:07:41  15:50:32
44 processes:  1 running, 43 sleeping
CPU:  4.8% user,  0.0% nice,  0.0% system,  0.0% interrupt, 95.2% idle
Mem: 52M Active, 20M Inact, 62M Wired, 128K Cache, 59M Buf, 352M Free
Swap:

  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
18701 nobody      1  64   20  3364K  1424K nanslp  51:51  0.00% LCDd
19029 root        1  64   20  3352K  1216K nanslp  28:42  0.00% lcdproc
q to stop.

You can start lcdproc manually by running:
Code: [Select]
/usr/local/etc/rc.d/lcdd.sh
Though it will try to start both server and client. It's hard to say why it stopped working reliably, disk errors?  :-\

Steve
« Last Edit: August 23, 2011, 01:39:57 pm by stephenw10 »

Offline woc38

  • Jr. Member
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #187 on: July 26, 2011, 10:07:25 am »
I issued "/usr/local/etc/rc.d/lcdd.sh" earlier and indeed, now it is working.
Top shows LCDd and lcdproc.

My /usr/local/etc/rc.d/lcdd.sh contains:
Code: [Select]
#!/bin/sh
#
/usr/bin/nice -20 /usr/local/share/lcdd/LCDd -r 0 -c /usr/local/share/lcdd/LCDd.conf > /dev/null 2>&1 &
/usr/bin/nice -20 /usr/local/share/lcdd/lcdproc C T U &

Thanks for our explanation: now I understand the server (lcdd) and the client (lcdprocc) both need to be running.
What I don't understand is why the client part wasn't running after boot, even though the lcdd.sh script was executed.

<edit>
Didn't see your edit before posting. Hmm, diskerrors, don't know. Didn't see any other errors.
Is there a sort of "chkdsk" tool/command for freebsd?
I will keep an eye on this...

<edit2>
I booted in single user mode (i guess?) and issued fsck -y /dev/ad2s1a. It gave no errors.
« Last Edit: July 26, 2011, 10:56:19 am by woc38 »

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8159
  • Karma: +5/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #188 on: August 23, 2011, 01:51:10 pm »
As part of my effort to produce a package for the Watchguard lcd I recompiled the driver. Until I get a proper package out anyone installing fresh might as well use this new set of programs. This for 2.0 only, it won't work on 1.2.x. Installation is as before.
Download the attached file and remove the .png extension.
Upload lcdd5.tar via the web GUI, Diagnostics: Command Prompt: Upload, this puts it in /tmp.
Then open a command line via serial or SSH or whatever and:
Code: [Select]
[2.0-RC3][root@pfSense.localdomain]/root/tmp(3): cd /tmp
[2.0-RC3][root@pfSense.localdomain]/tmp(4): tar xvf lcdd5.tar
x install3.sh
x lcdd/
x lcdd/LCDd.conf
x lcdd/lcdd.sh
x lcdd/lcdproc
x lcdd/LCDd
x lcdd/drivers/
x lcdd/drivers/sdeclcd.so
[2.0-RC3][root@pfSense.localdomain]/tmp(5): ./install3.sh
[2.0-RC3][root@pfSense.localdomain]/tmp(6): /usr/local/etc/rc.d/lcdd.sh
And your display should be working.  :)

Changelog:
Renamed the install script to make it easier to type!
The programs, lcdproc and LCDd, are now V0.53 compiled against FreeBSD 8.1-Release.
The driver, sdecldec, was giving a lot of warnings when I tried to compile it. These have been corrected.

The new version seems to obey the LCDd.conf file better such that the option heartbeat=no now works removing the ugly error on the right hand side of the display.

The key mapping is still incorrect for X-e boxes.  :(

I had no response to my question as to whether anyone uses the big clock or vertical histogram functions. Personally I would rather have the heartbeat functioning but it's a choice in the driver. Any opinions?

Steve
« Last Edit: August 23, 2011, 02:19:43 pm by stephenw10 »

Offline generious

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #189 on: November 28, 2011, 08:24:21 am »
Hi Steve,

I am in the middle of setting up a X500 got it today :) and just used your script for the LCD and it worked flawless the instructions are bang on no problems at all!!
Many Thanks for all your hard work put into this I'm sure it wasn't a easy time and time consuming to say the least so thank you.



Online stephenw10

  • Hero Member
  • *****
  • Posts: 8159
  • Karma: +5/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #190 on: November 28, 2011, 08:33:15 am »
Thanks for that!  :)

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

Steve

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8159
  • Karma: +5/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #191 on: November 28, 2011, 01:45:37 pm »
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

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8159
  • Karma: +5/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #192 on: December 03, 2011, 02:33:19 am »
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
« Last Edit: December 03, 2011, 02:48:54 am by stephenw10 »

Offline fmertz

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
    • Github
Re: Firebox LCD Driver for LCDProc
« Reply #193 on: December 06, 2011, 03:57:08 pm »
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:
Code: [Select]
to be updated...
git clone ...
cd ...
./autogen.sh --enable-drivers=sdeclcd
make

Feedback welcome.

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8159
  • Karma: +5/-0
    • View Profile
Re: Firebox LCD Driver for LCDProc
« Reply #194 on: December 06, 2011, 04:27:23 pm »
I'm not sure you can do that in one step, I certainly didn't.
Code: [Select]
./autogen.sh
./configure --enable-drivers=sdeclcd
make

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

Steve