Page 1 of 1

Parallel port control

PostPosted: Fri Nov 13, 2009 11:19 am
by yelsewno
This is a pretty specific question regarding a specialized application, so here goes. Built a relay circuit a while back that interfaces with the parallel port and allows you to turn the relays on and off by setting the data bits on and off for the parallel port. I'm trying to use "parashell" to control the port from a script on my Freesco box, but it acts like it is missing a required library file or something. When I try to run the file I get the message "No such file or directory". This happens with ./parashell in the directory containing the file.

I assume it's probably looking for a gcc library file in the path, but I have no idea which one, or where I should put it. I know this is out in left field, but any help or insight would be appreciated.

The end goal is to use parashell in a script to monitor the internet connection, and power cycle the cable modem if it goes down, as an attempt to heal itself.

Thank you,
Wes

Re: Parallel port control

PostPosted: Fri Nov 13, 2009 1:13 pm
by dingetje
Where did you obtain parashell?
To find out the library requirements you can try command:
Code: Select all
ldd parashell


in the directory where parashell is installed. You may have to install the utils add-on package to get the ldd command.

Instead of using parashell, you may want to give paralle a try, see http://lewys-spot.dyndns.org/packages/0 ... n-package/
Code: Select all
Paralle Port Control Program version 0.3
This Program Can Control Paralle Port Data Line From Pin 1 to pin 8.
It Set Data Pin On (+5v) or Off
Use This Program to Contral The PARALLE PORT RELAY CONTROLLER.
Or You Can Just Use it Tt Fun!


Userage: paralle -pin on/off -p port

        -h --help                 this help file
        -p port                   the default port is 0x378
        -a all on/off             turn all Data Pin on or off
        -1 on/off                 turn the Data Pin 1 on or off
        -2 on/off                 turn the Data Pin 2 on or off
        -3 on/off                 turn the Data Pin 3 on of off
        -4 on/off                 turn the Data Pin 4 on or off
        -5 on/off                 turn the Data Pin 5 on or off
        -6 on/off                 turn the Data Pin 6 on or off
        -7 on/off                 turn the Data Pin 7 on or off
        -8 on/off                 turn the Data Pin 8 on or off
        -c                        clean

If you need to restart/turn off your computer, you need to use -c option to remove some logs.  -a off do same thing

Re: Parallel port control

PostPosted: Fri Nov 13, 2009 1:23 pm
by dingetje
Ok, I've found parashell on sourceforge, but when I tried the included binary on FREESCO:

Code: Select all
[root@Freesco] ldd parashell
FATAL: kernel too old


I will try if it compiles on zipslack 3.9 but don't get your hopes up. I think, from what I read about parashell, that paralle is very very similar.

Re: Parallel port control

PostPosted: Fri Nov 13, 2009 1:37 pm
by dingetje
Well it compiled, but I haven't tested it with real hardware.
If you want it, you can download the non-package (you know how to unpack a tarball?) from my FREESCO box:

http://dingetje.homeip.net/packages/0.3 ... 2.2.tar.gz

or download the attached tarball.

The libc5 binaries for use on FREESCO are in the bin/Linux folder. Just place these in the /pkg/bin directory of your FREESCO and you're good to go.
The parashell command can be used to write to the parallel port, and the pin command can be used to read from it.

Re: Parallel port control

PostPosted: Fri Nov 13, 2009 2:35 pm
by yelsewno
Thank you very much, dingetje! It works great. You went above and beyond. I greatly appreciate it!

Thank you,
Wes