Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read from Parallel port

Status
Not open for further replies.

Norberto

IS-IT--Management
Jun 13, 2000
46
0
0
PT
My server (SCO5.0.2)send report.log to printer every events changed by users or system. At the end of day we have a lot of paper.Can I read output parallel port and write on text file in diferent computer???

P.S. I can't connect to another computer by eth0 because this system are connected to Automations PLC's, so I only can read from Parallel port.
 
I use a parallel to serial converter to capture data off the parallel port, then read it into a dos based system using gwbasic off the serial port.
The converter takes care of all the handshaking both ways. Ed Fair
efair@atlnet.com

Any advice I give is my best judgement based on my interpretation of the facts you supply.

Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.

 
If that's the only use of the parallel port, you could simply remove /dev/lp0 and let it become an ordinary file. Whatever your system send there would end up in the file /dev/lp0 instead.

Or, this system may be configured by way of syslog. Look at /etc/syslog.conf - if you see "/dev/lp0" in there, then that's how it was done, and you can change that to be a file of your liking.

And, of course, Ed's suggestion will work nicely to any other computer. If you don't have the skills to write a Basic program, you could use almost any terminal emulation software that will let you record a log file.

Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
Edfair Doesn't work :-(
I used a LPT to serial convert, but I have an error on spooler. "Unable to print, check is offline, paper out, cables, etc..." I can't read data from LPT to a serial COM1.

pcunix I can't change that, because we can't connect this automations servers to other computer we only have data to printer but I want read on diferent terminal without printer.

think like this: If LPT1 the server send data to printer can I read that data in a diferente computer with a hyperterminal or some like that???
 
>think like this: If LPT1 the server send data to printer
> can I read that data in a diferente computer with a
> hyperterminal >or some like that???


That's what Ed suggested- and it WILL work- you configured something incorrectly, hardware or software.

Whatever the serial converter was set to on the RS232 side has to match in software (baud, bits, stop bits and handshake method)- also, your wiring for this connection might not be correct- the converter might be straight thru or crossover and you have to provide the crossover (null modem) if it is straight through.

See if you need help with that part.


Or, if you have serial ports, skip the converter by changin /dev/lp0 to be one of the com ports and just use a cossover cable. Just rm /dev/lp0 and use mknod to recreate it using the major/minor numbers from /dev/tty1a or 2a.

BTW, you said "spooler"- if this really is going through the spooler, you could just change the device for the printer to serial:

/usr/lib/lpadmin -p printername -v /dev/tty1a

(you'd need to do a /usr/lib/lpshut; /usr/lib/lpsched for the change to take effect






Tony Lawrence
SCO Unix/Linux Resources tony@pcunix.com
 
The converter wasn't giving the parallel port the right signals for handshaking. You may have one that doesn't work but it will be a hardware fault with the converter if it has problems.
What other I/O devices do you have. Floppy? You could dump to there. But probably better to follow Tony's idea to put it on the hard drive. You can dump later to whereever you need it.
And does the logger allow you to change the destination? If so , you don't even need to bother changing the existing printer stuff. Ed Fair
efair@atlnet.com

Any advice I give is my best judgement based on my interpretation of the facts you supply.

Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top