On Mon, 13 Mar 2006 05:19:41 -0800 (PST), John Carlson <[EMAIL PROTECTED]> 
wrote:

> [...]  It generally comes down to internal priority
> issues in the printer.  The internal usb controller
> has a higher then some time critical process and will
> cause that process to timeout if data is sent/received
> at a high data rate.  When that process times out, the
> printer basically hangs for printing purposes.  To
> work around these problems it becomes necessary to
> throttle the sending/receiving of data.   It would be
> nice if the company I work for would provide this
> information so that we could handle these problem
> printers without having to experiment with data rates.

Right. Printer firmware essentially has to support hard
real time, because of the head movements.

I think that in our case, Jan should start with something like this:

--- foo2zjs/foo2zjs.c   2005-12-23 15:37:41.000000000 -0800
+++ foo2zjs-4rychter/foo2zjs.c  2006-03-13 10:38:45.000000000 -0800
@@ -310,12 +310,14 @@ chunk_write_rsvd(unsigned long type, uns
 {
     ZJ_HEADER  chunk;
 
+    usleep(10*1000);
     chunk.type = be32(type);
     chunk.items = be32(items);
     chunk.size = be32(sizeof(ZJ_HEADER) + size);
     chunk.reserved = be16(rsvd);
     chunk.signature = 0x5a5a;
     fwrite(&chunk, 1, sizeof(ZJ_HEADER), fp);
+    fflush(fp);
 }
 
 static void

Don't forget that you have to run "foo2zjs > /dev/usb/lp0" for
the above to have any effect.

If the patch works, we can think about adding necessary autodetection
with fileno() and ioctl() - no need to slow down printing into
a data stream. If it does not, well, it can be something else.

Jan, would you mind hashing this out with Rick? I think it's out
of the kernel area.

-- Pete


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to