[lug] talking directly to a printer

Hugh Brown hugh at math.byu.edu
Wed Jan 8 18:07:31 MST 2003


On Wed, 2003-01-08 at 19:34, Peter Hutnick wrote:
> Hugh Brown said:
> > I have a printer that whose manual claims that if you send it a hex
> > number it will respond with a status byte.  Is there a way to do this
> > under linux and get the output (I can use cat to write to the device
> > file, or I can use cat to read from the device file but not both at the
> > same time) without hacking on the kernel?
> 
> You certainly won't have to hack the kernel.  You might have to cut some
> code.  Check out http://www.elitecoders.de/mags/cscene/CS4/CS4-02.html . 
> It leads in with a bunch of DOS stuff, but then brings in the UNIXy
> goodness.
> 
> I'm not a systems programmer, but I would assume that there is some
> buffered I/O system function to allow you to just write to the port then
> read whatever comes back.
> 


It's a usb printer.  There isn't some sort of fun /proc interface or a
way to use a fifo or something like that is there?

Hugh







More information about the LUG mailing list