[cups.development] RFC: Adding smarts to handle Canon Sephy dyesub printers

Michael R Sweet msweet at apple.com
Wed Jan 4 07:48:25 PST 2012


You'll need a custom USB backend for this. Future versions of the libusb-based backend should add support for backchannel data but given that these printers do not actually correctly implement the USB print class I doubt that it will help - you backend would seem to need to know the details of each model... :(

Sent from my iPhone

On Jan 4, 2012, at 7:06 AM, Solomon Peachy <pizza at spam.shaftnet.org> wrote:

> Howdy!
> 
> To make a long story short, newer Canon Selphy printers (all ES-series 
> and the newer CP-series) require an intelligent print spooler, because 
> if you just blindly dump the raw data to the printer, it will lock up.
> 
> The rough sequence is as follows:
> 
> Wait for "ready to print" readback 
> Dump init sequence (first 12-16 bytes of print job, depending on model)
> Wait for a "ready for first plane" readback
> Dump first image plane (header + plane data)
> Wait for a "ready for next plane" readback 
> [repeat for all planes]
> Wait for "all planes complete" readback
> Write footer sequence (only some models)
> 
> All readbacks are 12 bytes, and vary based on model family.  The various 
> headers are embedded in the print job, and are distinct enough to 
> identify the model family.  I've identified five families so far.
> 
> I wrote a standalone tool [1] that interfaces directly to Linux's 
> /dev/usblpX chardev and uses stdio to read/write the appropriate chunks.  
> However this is non-portable and isn't properly integrated into the rest 
> of the system.  I was thinking of rewriting it to use libusb, but the 
> proper solution is to write a CUPS filter that will do the appropriate 
> buffering/readbacks so that it JustWorksWhenYouPlugItInAndHitPrint(tm).
> 
> I'm not sure how it would all tie together but I'm guessing we'd just 
> bundle the filter with gutenprint and modify gutenprint's ppd file to 
> reference the filter where necessary.  (I'm assuming that's feasible)
> 
> Unfortunately there's a bit of a problem:
> 
> In backend/usb-unix.c, the backchannel from Canon USB printers is 
> explicitly disabled.  This would have to be changed, but both 
> whitelisting and blacklisting aproaches have their downsides.  (Also, it 
> doesn't seem to call cupsBackChannelWrite() anywhere..)
> 
> backend/usb-libusb.c doesn't seem to support backchannels at all.
> 
> And finally, backend/usb-darwin.c seems to support the backchannel, 
> without the explicit disabling of all Canon USB printers.
> 
> So, how should I proceed from here?  I can start writing a CUPS filter 
> that assumes the various USB backends work properly, but that's not 
> going to get me very far since I wouldn't have a good way of testing it.
> 
> [1] http://www.shaftnet.org/~pizza/es_print_assist.c
> 
> Thanks,
> 
> - Solomon
> -- 
> Solomon Peachy                       pizza at shaftnet dot org     
> Melbourne, FL                          ^^ (mail/jabber/gtalk) ^^
> Quidquid latine dictum sit, altum viditur.
> _______________________________________________
> cups-dev mailing list
> cups-dev at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups-dev





More information about the cups mailing list