The pfSense Store

Author Topic: LCDProc 0.5.4-dev  (Read 71079 times)

0 Members and 1 Guest are viewing this topic.

Offline fmertz

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
    • Github
Re: LCDProc 0.5.4-dev
« Reply #420 on: June 06, 2012, 10:13:39 am »
Tried the a.out file, I keep getting "/a.out: Exec format error. Binary file not executable." Am I doing something stupid here, or is it not working?
Strange, this a.out file works for me (in the Virtualbox VM) both in 32 bit and 64 bit. I re-downloaded it from github to be sure, with wget, directly from within the VM. Are you using ASCII ftp with Windows? Also, this is compiled for FreeBSD 8.2 i386, not sure what version of FreeBSD your install of pfSense is based off of. Run "chmod 755 a.out" to be sure.

Offline Brak

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Re: LCDProc 0.5.4-dev
« Reply #421 on: June 06, 2012, 08:20:14 pm »
Tried the a.out file, I keep getting "/a.out: Exec format error. Binary file not executable." Am I doing something stupid here, or is it not working?
Strange, this a.out file works for me (in the Virtualbox VM) both in 32 bit and 64 bit. I re-downloaded it from github to be sure, with wget, directly from within the VM. Are you using ASCII ftp with Windows? Also, this is compiled for FreeBSD 8.2 i386, not sure what version of FreeBSD your install of pfSense is based off of. Run "chmod 755 a.out" to be sure.

Okay, tried fetching it, no change on the 64bit pfsense install... But then I tried it on my 32bit install on the same hardware and the program works in the sense that it ran, but the LED does not do anything at all. That's probably not much help tho. :/

Offline stephenw10

  • Hero Member
  • *****
  • Posts: 8177
  • Karma: +12/-0
    • View Profile
Re: LCDProc 0.5.4-dev
« Reply #422 on: June 06, 2012, 08:40:39 pm »
But it prints to the console: "Status LED: Green" etc?

Steve

Offline Brak

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Re: LCDProc 0.5.4-dev
« Reply #423 on: June 06, 2012, 08:45:08 pm »
Yep, then Yellow, then Dark. Doesn't actually flip the LEDs tho.  :-\

Offline fmertz

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
    • Github
Re: LCDProc 0.5.4-dev
« Reply #424 on: June 06, 2012, 10:01:59 pm »
Okay, tried fetching it, no change on the 64bit pfsense install... But then I tried it on my 32bit install on the same hardware and the program works in the sense that it ran, but the LED does not do anything at all. That's probably not much help tho. :/
That is what I figured. That code doesn't reconcile with any of the SuperIO documentation I have seen, or even the code's own comments. Hopefully, the code comments will be enough to be able to come up with something...

Offline stephenw10

  • Hero Member
  • *****
  • Posts: 8177
  • Karma: +12/-0
    • View Profile
Re: LCDProc 0.5.4-dev
« Reply #425 on: June 07, 2012, 06:15:53 am »
I think we should take this to a separate thread. This one is already massive and LED control on a particular Lanner box is not helpful for most people reading it.

Steve

Offline Brak

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Re: LCDProc 0.5.4-dev
« Reply #426 on: June 08, 2012, 08:45:30 am »
I think we should take this to a separate thread. This one is already massive and LED control on a particular Lanner box is not helpful for most people reading it.

Steve

Agreed, but honestly, it's probably not worth worrying about the LED in it at all.

Only thing I think we can keep from this side-tracking is that the 64-bit SDECLCD works, but it is hard-coded as 16x2 status screens still.

Offline fmertz

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
    • Github
Re: LCDProc 0.5.4-dev
« Reply #427 on: June 08, 2012, 11:01:26 am »
Only thing I think we can keep from this side-tracking is that the 64-bit SDECLCD works, but it is hard-coded as 16x2 status screens still.

You can ask LCDd what it thinks the width is:

Code: [Select]
telnet <pfSense host ip or name> 13666
hello
connect LCDproc 0.5.4 protocol 0.3 lcd wid 20 hgt 2 cellwid 5 cellhgt 8

Offline Brak

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Re: LCDProc 0.5.4-dev
« Reply #428 on: June 08, 2012, 09:02:50 pm »
Only thing I think we can keep from this side-tracking is that the 64-bit SDECLCD works, but it is hard-coded as 16x2 status screens still.

You can ask LCDd what it thinks the width is:

Code: [Select]
telnet <pfSense host ip or name> 13666
hello
connect LCDproc 0.5.4 protocol 0.3 lcd wid 20 hgt 2 cellwid 5 cellhgt 8

Output:
Code: [Select]
[2.0.1-RELEASE][root@fringebox.blizzard]/root(4): telnet 127.0.0.1 13666
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
hello
connect LCDproc 0.5.5 protocol 0.3 lcd wid 20 hgt 2 cellwid 5 cellhgt 8

Examples: (Kinda bad example, but it at least shows the screens are shortened. I know things are getting cut off since I can't change the "pfsense shutting down" to be any bigger without losing the extra 8 characters on the end. The Lanner-LCM hacked driver can write the shutdown line on all the 20x2 characters just fine)

Off center, not showing screens to be big enough:


Clearly addresses the extra characters with other displays:

Offline stephenw10

  • Hero Member
  • *****
  • Posts: 8177
  • Karma: +12/-0
    • View Profile
Re: LCDProc 0.5.4-dev
« Reply #429 on: June 08, 2012, 09:10:09 pm »
Not a driver problem then.
Are you sure it ever shows more characters than that? The screens are always drawn from the left side.
E.g.



Steve
« Last Edit: June 08, 2012, 09:13:48 pm by stephenw10 »

Offline fmertz

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
    • Github
Re: LCDProc 0.5.4-dev
« Reply #430 on: June 09, 2012, 03:16:05 pm »
Brak,

If you want to point me to the hacked Lanner code again, I can have a quick look. Without hardware available to me though, this is quickly becoming unproductive. I am in the mid-atlantic US, maybe you should look up shipping rates and mail me a stripped down box for development. I could probably get the full LCD and LED control coded in the driver for 32 and 64 bit. Up to you.

Offline Brak

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Re: LCDProc 0.5.4-dev
« Reply #431 on: June 24, 2012, 11:35:18 am »
I think the issue was just with my implementation. No use you guys wasting time on my hardware.

I did notice the issue with lcdproc crashing on the initial boot, then later restarting into just the LCDd server/client menu. Once I start the service once, it's seemingly good forever (at least until an unlucky interface up/down!)

Is there anything I should try and look at to see why it's failing at the initial boot?

Also, is there any way we could get LCDExec to be included in the package (both 32bit/64bit, 32bit does NOT work on 64bit in my experience - makes no sense?), and have it check for an lcdexec.conf (and if it exists, start the process running that config right after lcdproc starts?) My menu system would be more easily implemented if we could get everyone already have a working lcdexec install. 80% of my installation scripts are just hacking in the lcdexec install.
« Last Edit: June 25, 2012, 08:33:56 am by Brak »

Offline Brak

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Re: LCDProc 0.5.4-dev
« Reply #432 on: June 28, 2012, 07:03:44 am »
There has to be something wrong with the rc.d or PHP scripts, but I just can't find it. Could it be the interface up/downs on boot causing this crash?

Offline Brak

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Re: LCDProc 0.5.4-dev
« Reply #433 on: July 17, 2012, 08:01:26 am »
Alright, nevermind on the lcdexec stuff, I'm an idiot. It's already in /usr/bin/ for everyone.

But, as for the service crashing on boot, it still appears to happen. I've noticed it does not happen on full (x64) installs, but my nanoBSD installs require a service restart to get working after boot.

Any ideas?

Offline fmertz

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
    • Github
Re: LCDProc 0.5.4-dev
« Reply #434 on: July 20, 2012, 12:37:18 pm »
Time for a code release:

I just posted the ledsupport branch of the lcdproc package source code on github:

https://github.com/fmertz/sdeclcd/tree/ledsupport

Basically, this code adds driver support for known Firebox LED arrangements, from X-Core to X-Core-e to X-Peak and finally XTM. The code identifies the particular Intel Southbridge/ICH, and matches it up with specific GPIO pins as posted on this forum. It deals with ICH and SuperIO GPIO. As I only own an X-Core-e, it is not all completely tested.

There is a binary here: https://github.com/downloads/fmertz/sdeclcd/sdeclcd.so

If you can assist in the testing, replace your copy of the driver with this one, and give it a try:

Code: [Select]
telnet localhost 13666
hello
connect LCDproc 0.5.5 protocol 0.3 lcd wid 20 hgt 2 cellwid 5 cellhgt 8
output 1 <—Should start blinking red, rare short blink
success
output 2 <—Should start blinking green, rare short blink
success

 
The output logic is this: we have 32 bit to work with, and we need 3 states (Red, Green and off). This is 2 bits. So, in 32 bits, we have 16 time slots to work with. So, basically, code in the sequence of colors you want to see (Red, Green or off) and keep shifting to fill in the bits.
 
Worksheet:
XXXX XXXX XXXX XXXX
X is 1, 2 or 0
 
0000 0000 0000 0001 is slow quick blink red
0101 0101 0101 0101 is fast quick blink red
0011 0011 0011 0011 is medium medium blink red
0000 1111 0000 1111 is slow long blink red
0000 2222 0000 1111 is slow blink alternating between red and green
 
etc... The binary needs to be made decimal for the “output” command. Sequence lasts about 4 seconds.

As we know, there is no client yet that exercises this driver "output" feature. If this works with various models, I'll submit a pull request with the pfSense team so that new package installations will get this binary.

Anyone wants to add LED support to the PHP client? Something like controlling the LED based on availability of internet access, or the ISP's DNS server would be nice...