Re: ulpt problem (USB_ERR_IOERROR)

From: Hans Petter Selasky <hselasky_at_c2i.net>
Date: Sun, 12 Jul 2009 09:52:29 +0200
On Saturday 11 July 2009 23:26:35 Patrick Lamaiziere wrote:
> Le Tue, 7 Jul 2009 20:39:26 +0200,
>
> Hans Petter Selasky <hselasky_at_c2i.net> a écrit :
> > There was a small bug in my patch. Could you post-patching edit
> > /sys/dev/serial/ulpt.c
> >
> > urlpt_open(struct usb_fifo *fifo, int fflags)
> > ulpt_open(struct usb_fifo *fifo, int fflags)
>
> Well, as I must use the unlpt device, I think this does not change
> anything.
>
> If I understand well, with /dev/unlpt0, ulpt.c calls unlpt_open(), not
> ulpt_open() nor unlpt_open()?
>
> Just in case, I've tried to change unlpt_open() with
> static int
> unlpt_open(struct usb_fifo *fifo, int fflags)
> {
>         struct ulpt_softc *sc = usb_fifo_softc(fifo);
>
>         if (sc->sc_fflags & fflags) {
>                 return (EBUSY);
>         }
>
>         /* set defrag write mode */
>
>         if (fflags & FWRITE) {
>                 printf("unlpt_open: using defrag write mode\n");
>                 usb_fifo_set_write_defrag(fifo, 1);
>         }
> ...
>
> But the printer hangs after the first job (the data led on the printer
> stay on):
> unlpt_open: using defrag write mode
> ulpt_write_callback:237: state=0x0 actlen=0
> ulpt_write_callback:237: state=0x1 actlen=32768
> ulpt_write_callback:237: state=0x1 actlen=32768
> ulpt_write_callback:237: state=0x1 actlen=32768
>

The prints look good.

Did you restart/repower the printer, before trying to print?


What document format is being used on /dev/ulpt? Maybe you have to use another 
format. Did you use the correct PPD file for your printer? I have a brother 
printer here which uses USB, and claims to support PCL 6, but whenever I print 
something in PCL 6, it's not recognized. I found out I had to download a 
special PPD file, and install foomatic-rip, for cups. Then it worked using the 
GDI protocol.

--HPS
Received on Sun Jul 12 2009 - 05:52:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:51 UTC