LCDProc 0.5.4-dev
-
Ok, it's simply the values are the wrong way around in the code:
case LPC_DEVICE_82801GBGR: /* XTM: W83627THG SuperIO */ shift = 0x48; /* offset for GPIO BASE */ level = SIO_EFIR; /* SuperIO chip is hard wired */ level2 = SIO_EFDR; /* to LPC ports 2E and 2F */ p->red_bit = 0x10; p->grn_bit = 0x20; break;
My original findings:
@stephenw10:Then the led can be controlled via CRF1:
Control Register F1 Bit5 Bit4 Arm/Disarm LED 0x00 0 0 Off 0x10 0 1 Green 0x20 1 0 Red 0x30 1 1 Off
Easy fix! :)
Steve
Thanks for the heads up. I'll update the code accordingly. Not a bad first run, really, considering this was coded "off the spec"…
-
There is nothing obvious in the driver that might be introducing a delay. I have to say that reading through François' code is a joy. Compared to my own feeble efforts his is so professional. ::)
Thanks for the kind words about the code. The idea was to make it clean enough to make it acceptable for the upstream project, and make it available to all, whether I am the maintainer or not. It seemed like a shame to have all that gold information posted on this forum in terms of discoveries, and the countless hours of research that to go with them, without someone collecting it and regurgitating it in proper code form so it never goes extinct. Glad to hear someone is actually reading through it, though. ;)
Altogether, the LCD spec called for a very specific initialization sequence that takes more time. FWIW, the old code did not seem to properly reset the LCD when things went wrong, and a full reboot was necessary to clear things up. When this new sequence was implemented in the new code, just restarting the LCDproc package was enough to reset the LCD. The new delay is coded as:
sdec_exec_wait(SDEC_FN_FUNCTION_SET | SDEC_OPT_8_BIT, 15000);
15000 micro seconds, 15ms.
Altogether, drivers control hardware, and should be allowed to have whatever timing quirks are required by the device they control. This includes slow initialization sequences, etc. Maybe the controller code needs to be looked at again. The errors from the driver code complaining of not being able to release the I/O ports might indicate there are multiple copies of this driver in memory…
-
Stephen & Francois, glad to have you 2 brilliant minds working on this.
I haven't tried the new driver with the new delay and value order yet, running some development projects behind the pfsense box and need it up and stable for a few more weeks.
Stephen, did you get a chance to test to see if this corrects the SDECLCD driver boot initialization errors?
Francois, has the new SDECLCD driver reached a point where it can be committed to the next point release of lcdproc-dev?
Thanks guys
-
It's been accepted upstream so I don't see why not.
I still haven't been able to get it to start cleanly and reliably. To work around this I proposed running the new driver but starting it using the shellcmd package. This avoids more than one start. I've been running several boxes like that for a few weeks with no issues. See: http://forum.pfsense.org/index.php/topic,7920.msg344513.html#msg344513Steve
-
The SDECLCD driver is in the current lcdproc-dev package after I bumped it this week by request. I don't have one any LCDs to try it with, but the correct binary appears to be there now (on 32 and 64 bit) included in the main lcdproc binaries, not pulled in separately anymore.
-
I can confirm the latest LCDProc-Dev/Watchguard SDECLCD driver release available through the official PFSense package install still suffers from the same issues. Key mapping is not correct on the Watchguard XTM5 series and the service fails to start on boot.
I'm not sure if the binary jimp is referring to has been pushed to the official package yet, but I will tinker and report back.
Stephen,
I'm having some trouble getting the right shellcmd to start/restart the LCDProc service. Would you mind sharing that ShellCmd?
Thanks,
-
It's detailed in the post I linked to above.
Two interesting developments have happened recently that may help here.
JimP's watchdog package. It may be able to restart the service correctly after boot and if it fails. Though I suspect it only monitors the daemon and not the client.
The rc startup patches may help lcdproc-dev start correctly at boot.Steve
-
I have the CrystalFontz 735 Display which emulates the 635 and will go Graphic here in the very near future.
I am wondering why the LED's on the display don't light using LcdProc. What can I do?
-
You mean the backlight or some other LEDs?
Steve
-
You mean the backlight or some other LEDs?
Steve
The leds down the side of the front of the unit.
I have the CrystalFontz 735 Display which emulates the 635 and will go Graphic here in the very near future.
I am wondering why the LED's on the display don't light using LcdProc. What can I do?
You can get them to work.
I am still using this process/edits to the files and mine work. Not sure if much is diff between the 635/735 besides different type of lcd..You may be able to apply this to get them to work.
http://forum.pfsense.org/index.php/topic,44034.msg302352.html#msg302352
-
There is 4 dual color LED's on the left side of the 735 that I have. In PFSENSE LCDPROC I see :
Enable Output LEDs
Enable the Output LEDs present on some LCD panels. This feature is currently supported by the CFontz633 driver only.
Each LED can be off or show two colors: RED (alarm) or GREEN (everything ok) and shows:
LED1: NICs status (green: ok, red: at least one nic down);
LED2: CARP status (green: master, red: backup, off: CARP not implemented);
LED3: CPU status (green < 50, red > 50%);
LED4: Gateway status (green: ok, red: at least one gateway not responding, off: no gateway configured).The cFontz633 is no longer included in LCDProc builds, so I use the Crystalfontz packet. This works good, buttons work and display shows information. But the 4 LED's on the left side do not show any thing.
-
I found the fix.. In /usr/local/pkg/lcdproc_client.php
down near line 469 you see the following
function outputled_enabled_CFontz633(){
global $config;
$lcdproc_config = $config['installedpackages']['lcdproc']['config'][0];
$value = $lcdproc_config['outputleds'];
if (is_null($value))
{return false;}
else
{
if ($value && $lcdproc_config['driver'] == "CFontz633")
{return true;}
else
{return false;}
}Change the
if ($value && $lcdproc_config['driver'] == "CFontz633")
to
if ($value && $lcdproc_config['driver'] == "CFontzPacket")that makes them work
I know this is just fooling it to think it is the 633 driver when your using the Packet one. I am not the developer or maintain this but could make all the changes needed to make it right and submit if need.it does seem to not be perfect though. All lan /wan is up and red shows for that LED and all gateways up but no LED .. sometimes the gateway one lights up then the lan/wan one will go green.. so some bug in code maybe?
-
I got it going for most part. I can't get result from Gateway #4 LED just green it lights always. But others work. Fixed some typos in the lcdproc_client.php file. I submitted it to github and here is link
https://github.com/pfsense/pfsense-packages/pull/532
I did not change the code in major way or the what LED does what.. Just made it work.
http://www.youtube.com/watch?v=uYdyLdrT_PI
-
Nice. :)
You almost certainly shouldn't have a gateway on LAN, off topic though. Do you have another thread going to discuss that?Steve
-
I do not put gateway on lan.. I only do on Wan.. I think the checking code in there is what is not right. I am use to tools to see variable values and debugging tools.. I don't have any for doing this kind of work so makes it harder to know the failure.
Off topic. will look for or create for the problem I have with Gateway issue
-
Please forgive my ignorance but I would like to get a few lines added to this package. When ever I upgrade my system or reinstall which isn't all the time admittedly, but I have to manually add the port necessary to get my crystal fontz 635 to work. It's kind of a pain in the you know what and it would be cool if it was there natively. I would love to have the following lines added:
/usr/local/pkg/lcdproc.inc:
case "ttyU0": continue; break;
and
case "ttyU0": $realport = "/dev/ttyU0"; break;
/usr/local/pkg/lcdproc.xml:
<option><value>ttyU0</value> <name>USB Com port 3 alternate (/dev/ttyU0)</name></option>
I'm thinking some kind of commit is necessary but not sure of the process. I have no knowledge of github or am I over thinking the process?
-
That doesn't work with cuaU0 then? Odd.
Steve
-
That doesn't work with cuaU0 then? Odd.
Steve
Nope. I just stopped the service and tried that port. But when I try to restart the service it won't restart. I remember you helped awhile ago to discover ttyU0 was the port that I needed to use. I'm not sure if my screen is special but it's not usb its serial but connects to a USB port. When I connected to Windows that's when I discovered that it had some kind of USB to Serial adapter built into it. The screen is just a CrystalFontz 635 that I bought directly from CrystalFontz. If I use the crystalfontz 633 driver I get a blank screen, I have to use the crystalfontz packet driver. It is my understanding that I can only get the LED on the left side of the screen to work if I use the crystalfontz 633 driver. Would be nice to have those working.
Just for my knowledge what is the difference between cuaU0 and ttyU0? I tried to do a little searching but I'm not getting any answers.
-
As far as I know (and I'm a bit unsure on this) it's just a terminology difference. Older versions of FreeBSD used tty for serial ports, newer versions use cua but tty is kept for compatibility. In both cases the capital 'U' indicates a USB connected device.
Steve
-
Yes, CrystalFontz Packet driver is what you need to use. As far as those LED's on the left edge the code I put up here makes those work.
https://github.com/pfsense/pfsense-packages/pull/532
Mike, Couple messages back I explained some you might be interested in seeing those (end of page 32)