The pfSense Store

Author Topic: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED  (Read 37816 times)

0 Members and 1 Guest are viewing this topic.

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8155
  • Karma: +5/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #105 on: February 13, 2012, 01:56:21 pm »
I agree, now we have red, green and off for all the boxes it would be best to do anything else in software.
I think for most people simply having the LED go green at boot time will be sufficient. Anything else can be done with a separate lcdproc client that only controls the led.

Another completely different idea would be to follow JimP's suggestion and have a separate FreeBSD led driver. This allows for all sorts of interesting possibilities, you can send data to /dev/led directly and have it flash a message in morse code for example.  :) It's how the LEDs on the ALIX box are handled.

Steve

Offline fmertz

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
    • Github
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #106 on: February 13, 2012, 02:09:34 pm »
Anything else can be done with a separate lcdproc client that only controls the led.

separate FreeBSD led driver.
Maybe we can talk mdima into adding calls to output()  in the existing php client. That client captures a range of things as it is.

Going down the driver path throws portability out the window. The code becomes FreeBSD only, and a completely separate implementation would be required for Linux. I have done neither, but, in the end, the purpose is to learn.

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8155
  • Karma: +5/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #107 on: February 14, 2012, 11:48:39 am »
I hadn't considered portability.
Looking at the geode led driver they use the oem_bios function to indentify the different models. I guess this might be FreeBSD only.

Steve

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8155
  • Karma: +5/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #108 on: June 21, 2012, 08:17:31 pm »
Just realised I posted the most recent version of this in the X700 thread and forgot to include it here.
Same as previous versions but includes an option to switch the LCD backlight if you aren't running LCDproc with the firebox driver.
Find it attached with the source.

Code: [Select]
[2.0.1-RELEASE][root@pfsense.fire.box]/conf(8): ./WGXepc
Found Firebox X-Peak
WGXepc Version 0.5 13:2:2012 stephenw10
WGXepc can accept two arguments:
 -f (fan) will return the current fan speed or if followed
    by a number in hex, 00-FF, will set it.
 -l (led) will set the arm/disarm led state to the second argument:
    red, green, red_flash, green_flash, red_flash_fast, green_flash_fast, off
 -b (backlight) will set the lcd backlight to the second argument:
    on or off. Do not use with LCD driver.
Not all functions are supported by all models

Steve

Offline mike56

  • Newbie
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #109 on: June 22, 2012, 06:54:50 am »
More good work.  What is anyone using for a fan speed setting?  I have upgraded to the SL7EG CPU, run powerd and still have the original fans in my X750E.

Thanks!
Mike

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8155
  • Karma: +5/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #110 on: June 22, 2012, 08:04:56 am »
I'm using 64. However my test box is rarely loaded at all and it's sat on my desk not in a hot rack.
I have run them at 16 with no problems and barely any detectable temperature rise.
You can test it with cpuburn and mbmon.

Steve

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8155
  • Karma: +5/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #111 on: May 16, 2013, 06:12:29 pm »
There is a new version of WGXepc.
Find it attached to this thread along with the source code.
As before remove the .png extension and chmod it 0755 once it's on the box.

It now supports the XTM5 series boxes with LED and fan control (of sorts!).
I have tested it on all the known boxes with 2.0.x and 2.1beta but my testing is limited, let me know if it misbehaves.

Code: [Select]
[2.0.3-RELEASE][root@pfsense.fire.box]/root(7): /conf/WGXepc
Found Firebox X-Peak
WGXepc Version 0.8 14/5/2013 stephenw10
WGXepc can accept two arguments:
 -f (fan) will return the current and minimum fan speed or if followed
    by a number in hex, 00-FF, will set it.
 -l (led) will set the arm/disarm led state to the second argument:
    red, green, red_flash, green_flash, red_flash_fast, green_flash_fast, off
 -b (backlight) will set the lcd backlight to the second argument:
    on or off. Do not use with LCD driver.
Not all functions are supported by all models

Steve

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8155
  • Karma: +5/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #112 on: June 28, 2013, 08:46:20 pm »
I added an option to read the cpu temperature sensor on the X-e box since it was trivial to do and mbmon seemed to giving some errors.

Code: [Select]
[2.1-RC0][root@pfsense.localdomain]/conf(3): ./WGXepc
Found Firebox XTM5
WGXepc Version 0.9 28/6/2013 stephenw10
WGXepc can accept two arguments:
 -f (fan) will return the current and minimum fan speed or if followed
    by a number in hex, 00-FF, will set it.
 -l (led) will set the arm/disarm led state to the second argument:
    red, green, red_flash, green_flash, red_flash_fast, green_flash_fast, off
 -b (backlight) will set the lcd backlight to the second argument:
    on or off. Do not use with LCD driver.
 -t (temperature) shows the current CPU temperature reported by the
    SuperIO chip. X-e box only.
Not all functions are supported by all models

Steve

Offline rhombus

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #113 on: July 05, 2013, 12:30:07 am »
I added an option to read the cpu temperature sensor on the X-e box since it was trivial to do and mbmon seemed to giving some errors.

Code: [Select]
[2.1-RC0][root@pfsense.localdomain]/conf(3): ./WGXepc
Found Firebox XTM5
WGXepc Version 0.9 28/6/2013 stephenw10
WGXepc can accept two arguments:
 -f (fan) will return the current and minimum fan speed or if followed
    by a number in hex, 00-FF, will set it.
 -l (led) will set the arm/disarm led state to the second argument:
    red, green, red_flash, green_flash, red_flash_fast, green_flash_fast, off
 -b (backlight) will set the lcd backlight to the second argument:
    on or off. Do not use with LCD driver.
 -t (temperature) shows the current CPU temperature reported by the
    SuperIO chip. X-e box only.
Not all functions are supported by all models

Steve

I used your latest Ver 0.9 and edited the /usr/local/www/includes/functions.inc.php file (find and modify these entries in the file):

function has_temp() {

   /* no known temp monitors available at present */
   
   /* should only reach here if there is no hardware monitor */
   /* return false; */
        return true;
}


function get_temp() {

$temp_out = "";
   exec("/conf/WGXepc -t | /usr/bin/awk 'NR==3{print;exit}'", $dfout);
        $temp_out = trim($dfout[0]);

        return $temp_out;
}

Now the temp displays on the Dashboard pulling from WGXepc.

Tested on Firebox X550e


Online stephenw10

  • Hero Member
  • *****
  • Posts: 8155
  • Karma: +5/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #114 on: July 05, 2013, 05:02:54 am »
Nice.  :)
Let me know if it seems stable. It should be identical to mbmon but like I said another user found mbmon giving bad numbers after several days. Also mbmon has 0.5C accuracy but I didn't both reading that register so it's only 1C accurate.  ::)

Steve

Offline browntown

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #115 on: July 05, 2013, 12:26:57 pm »
Sweet, thanks for the code, it worked like a charm, appears within 2 degrees of mbmon at any one point.  Looks like I need to throw some arctic silver on the heatsink.  This is fan at 32



Offline rhombus

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #116 on: July 05, 2013, 02:37:48 pm »
Sweet, thanks for the code, it worked like a charm, appears within 2 degrees of mbmon at any one point.  Looks like I need to throw some arctic silver on the heatsink.  This is fan at 32




I had my fan set at 52 on a Pentium M 735 and at 37C. On high load, it will come up to 50. Im not worried about the $7 processor so much as having the system lock up when I am away. lol
« Last Edit: July 05, 2013, 06:54:45 pm by rhombus »

Offline Gabri.91

  • Full Member
  • ***
  • Posts: 122
  • Karma: +0/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #117 on: July 06, 2013, 06:31:55 am »
Very nice, many thanks!

Offline browntown

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #118 on: July 11, 2013, 02:07:40 am »
I'm building my wgxepc script for reboot.  Can I pass two parameters in one command?
/usr/local/bin/WGXepc -l green -f 30

or do I pass each argument on its own line?
#!/bin/sh
#
/usr/local/bin/WGXepc -l green
/usr/local/bin/WGXepc -f 30

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8155
  • Karma: +5/-0
    • View Profile
Re: [As Good As Solved!] Watchguard Firebox Arm/Disarm LED
« Reply #119 on: July 11, 2013, 05:03:13 am »
Only one parameter at a time. My coding skills very limited.  ;)
I use the shellcmd package instead of an RC script. It is stored in configuration file so it survives a firmware update.

Steve