PDA

View Full Version : Reading output for printer


Peteris Krumins
12-22-2003, 12:52 PM
Hello,

I am interested how to read data from a 3rd party device which
has Parallel port output and outputs data for printer.
(that is, if i connect a printer to it, the printer would print
everything the device outputs).

I have to do the same, just read the data in my program.
I have finished the program, hoping, the data would be easly read
(fopen("/dev/lp0","r"), then just select()ing and waiting fd to
unblock) after loading the appropriate, parallel port
(parport, parport_pc) drivers and lp driver but it is not that
easy..

I have tried connecting the device to computers Parallel port,
both with serial and null cabels but unfortunately i was not able
to get anything read.
(I tried reading /dev/lp0, both when lp driver was in polling and
interrupt driven modes)

Could anyone help me how to get it done? What should be done
to read the data coming from a special device which outputs
data via Parallel port for a printer?
Maybe if i connected
DB25 (to the special device) -> DB9 (serial, to pc) it could be done?

(talking about linux, tho if it could be done under BSDs, i'd also
appriciate your suggestion(s))


Thanks,
P.Krumins


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service