Reading output for printer
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Reading output for printer




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Reading output for printer  
Peteris Krumins


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:33 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





[ Post a follow-up to this message ]



    Re: Reading output for printer  
Michael B Allen


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:33 PM

On Mon, 22 Dec 2003 15:51:04 -0500, Peteris Krumins wrote:

quote:
> 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.
Get kermit and get it to read the data. Then use lsof, strace, etc to determine what it's doing and then emulate that. Also kermit has some automation capability. Mike




[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:24 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register