Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: programming PC hardware Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
seattlechris
Groupie
Groupie


Joined: June 29 2002
Location: United States
Online Status: Offline
Posts: 49
Posted: January 10 2003 at 18:31 | IP Logged Quote seattlechris

I've been looking for a way to program an ISA watchdog
board that I'm installing. Basically I only need to poke
a few values into the port addresses. I don't see a direct
way to do this from powerhome, so I'm asking for help.
Perhaps there is an obvious way to do this, and I just
missed it. The goal is to have the watchdog board reset
the PC if powerhome (or h/w or o/s) stops running.

Here are my thoughts so far on how this might be done:

1) Write a program that sets these values, and have
powerhome launch it periodically. This sounds simple
enough, but I wanted to avoid the hassle
of setting up a compiler and writing my own programs,
even simple ones.

2) Use sendkeys and an existing public domain
application that can set these port values,
using the sendkeys command to specify what to set.

3) Use windows scripting host-- but do any of the WSH
languages allow you to program port values?

Back to Top View seattlechris's Profile Search for other posts by seattlechris
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 12 2003 at 00:35 | IP Logged Quote dhoward

Chris,

I did a bit of research and vbscript has no support for directly accessing the hardware.  Your only options at this point would be 1 and 2.  I could add this functionality directly within PowerHome via function commands but it would only work on Windows 9X and not 2000, NT, or XP since they prohibit directly accessing hardware.  I know there are some third party utilities out there that can be run that will allow direct hardware access within NT, etc. but have not looked too closely at these.

I'll look into building these functions into PowerHome but they would not be available until the next release and if you're running NT, etc. you'll probably need some additional software to allow it too work.

Dave.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
seattlechris
Groupie
Groupie


Joined: June 29 2002
Location: United States
Online Status: Offline
Posts: 49
Posted: January 12 2003 at 15:23 | IP Logged Quote seattlechris

Thanks for the info Dave.  I wouldn't bother adding it to powerhome, unless there's reason to believe that others might need that capability as well.  I'm running windows 98, so I'll just write a small program and have ph launch it.
Back to Top View seattlechris's Profile Search for other posts by seattlechris
 
seattlechris
Groupie
Groupie


Joined: June 29 2002
Location: United States
Online Status: Offline
Posts: 49
Posted: January 21 2003 at 11:22 | IP Logged Quote seattlechris

It turns out that this ISA watchdog board can monitor
i/o to ISA port addresses, and use that to reset the
watchdog timer. For those interested, these types of
boards can be useful additions to your powerhome host
machines, especially if they're dedicated full time to
running powerhome and you want them to automatically
reboot if they freeze (we're talking windows after all
).

One vendor is here: http://www.berkprod.com/isa_pc_watchdog.htm

That is, for example, have powerhome automatically send
an x10 code every minute to an unused address, and set up
the watchdog board to reset the PC if that doesn't happen
within 5 minutes.

One more question for you Dave: for bizarre reasons
related to this, I'd like to know if any of the x10 or
IR controllers are write-only. That is, I want to reset
the watchdog timer by writing to a serial port or parallel
port, with no actual device present. I tried by trial
and error but didn't have any luck, it seemed that all
serial or parallel port devices needed to be physically
present for powerhome to boot properly. True?

Back to Top View seattlechris's Profile Search for other posts by seattlechris
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 21 2003 at 11:39 | IP Logged Quote dhoward

Chris,

The CIR device is write only and can have commands sent to it without the device actually being present.  It however wont work with NT, 2000, or XP.

The CM17A device is also write only and can be addressed without physically being there.  It however does not "write" to the port and instead twiddles the RTS and DTR lines which may or may not be able to monitored by the watchdog board.

In the above scenarios however, the actual device does not have to be present but the actual port must be.

I'd be interested in hearing if the watchdog can actually monitor the CM17A transmission.  In the current version, it would require having an extra serial port, however in the next release, the CM17A will be able to share a port with an existing device.

Dave.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
seattlechris
Groupie
Groupie


Joined: June 29 2002
Location: United States
Online Status: Offline
Posts: 49
Posted: January 22 2003 at 10:24 | IP Logged Quote seattlechris

Dave,

Thanks for the advice.  Pretending to have a CM17A on an unused serial port did the trick-- the watchdog board detected the memory access to the 8 byte region associated with the port, and would reset its timer.  I use a powerhome timed event to send a fake message to the CM17A every minute, and have the watchdog timer set to timeout in five minutes.  If by some chance the computer freezes up, it will automatically reboot (note that windows has to be configured to skip the network logon for this to work).  Since I use powerhome to supplement my x10 alarm system, I wanted it to be as robust as possible.

Nice program you've developed, by the way. 

Back to Top View seattlechris's Profile Search for other posts by seattlechris
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 22 2003 at 12:39 | IP Logged Quote dhoward

Chris,

Glad to hear it worked !!  I wasn't sure if the watchdog would see the DTR/RTS lines, but it looks like a success!  I'll do some investigation and see if I can make this an integral function.

Dave.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 22 2003 at 13:49 | IP Logged Quote TonyNo

Hmmm. Did some searching and found a nice, cheap ($39) watchdog that can monitor serial data using a pass-through, or, a digital signal...

http://www.industrologic.com/uwdtdesc.htm

Tony

Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
seattlechris
Groupie
Groupie


Joined: June 29 2002
Location: United States
Online Status: Offline
Posts: 49
Posted: January 22 2003 at 14:19 | IP Logged Quote seattlechris

That's an excellent choice as well. It's a little more
limited, but serves the core purpose of resetting a frozen
machine. It also has the advantage of not being bus specific--
you can have a PCI, ISA, or laptop for that matter. On
the other hand it's another board that needs to be enclosed
(ideally) and another power cord, but still a good choice.
It's quite cheap too (but don't worry, I didn't spend the
retail price on the berkshire board-- I got it off ebay
for $15).
Back to Top View seattlechris's Profile Search for other posts by seattlechris
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 22 2003 at 19:34 | IP Logged Quote TonyNo

$15 is a steal! That $39 one also needs space for yet another wall-wart. Of course, I could probably whip one up for less than that...

Tony

Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum