[prog] Do I need to write a kernel module?

softwaregurl l_chix at softwaregurl.com
Thu Dec 31 14:46:02 UTC 2009


Hi,
Thanks for the info.  Good to know for future reference.  Interesting sounding module at the link.  This board has no return signal so it would not work.  I did a bunch of hunting to get anything on the board.  finally used FCC id number and called the manufacturer.  A very nice lady there got into the 'old system' and thats where I found out that it was custom for Walmart and capable of external control but nothing else usefull.  The control chip looks to be a PROM and the sticker on it is an internal number for that company that is not even in the 'old system'.  So I'm kind of on my own beyond that.  Even if there is an obscure module for it somewhere I would still like to go ahead and do this.  I have been putting off getting back into C and this makes a good excuse to do it.  I did some with Borland turbo C++ years ago for win 3.1x and the code on the links from Jan looks familiar.  I've done a little hacking code and compiling this year to.

As I have looked at what I can do from C some thoughts cross my mind.  In qbasic I was using some fudge factor because it does not need all the bits of eather the first or second bytes but ignores the leftovers.
 
It is a stand-alone board and has 3 banks of relays.  one can be on in each bank at one time or all off in any of the banks.  The first byte is the bank number and 1 bit for on or off, a delay, then the second byte is the relay number.

My thought is to use RTS or DTR instead of TxD for the output.  With the fine controls from C one of those 2 lines could be switched on and off with precise timing.  Give the board what it wants without any extra bits and not need to be root as long as the user has read/write access to the device.

I have been using http://www.aggsoft.com/rs232-pinout-cable/pinout-and-signal.htm as reference for pin out, signal levels and names.

Thanks
-SG

On Thu, 31 Dec 2009 11:36:28 +1100
Jacinta Richardson <jarich at perltraining.com.au> wrote:

> softwaregurl wrote:
> > experience writing web server
> > apps in Perl and some hardware and software experience back as far as the
> > AppleII series.  Still pretty inexperienced at bash (sh) and have only
> > dabbled in hacking C under Linux so far. 
> 
> There are some Perl modules for interfacing with serial and other such devices. 
>    I've never played with low level devices so I'm not sure what to point you at 
> specifically, but you might have some luck looking at:
> 
> http://search.cpan.org/~galileo/Hardware-PortScanner-0.51/PortScanner.pm
> 
> if you know the name of the device, you may even be lucky enough to find a 
> module already written to interface with it.
> 
> All the best,
> 
> 	J


-- 
softwaregurl <l_chix at softwaregurl.com>


More information about the Programming mailing list