[cups.bugs] [MOD] STR #3965: Some USB printers do not like set_configuration and set_interface.

Henry Wong henry at stuffedcow.net
Sat Oct 22 07:07:34 PDT 2011


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

See http://blog.stuffedcow.net/2011/10/samsung-linux-cups-usb-printing/

Some printers (e.g., Samsung ML-2010, Samsung ML-1740) don't tolerate
being sent a SET_CONFIGURATION or SET_INTERFACE request after the printer
has already been configured. Sending these extra requests are legal under
the USB spec, but it causes my printer to often ignore subsequent print
jobs after the first one. These problems did not occur using usblp.

The libusb backend sends SET_CONFIGURATION and SET_INTERFACE requests
before every print job. Under usblp, these are not (verified by capturing
a USB trace).

This patch first makes the libusb backend first query whether sending
SET_CONFIGURATION and SET_INTERFACE are necessary before sending them,
bringing the behaviour closer to usblp. It also fixes the problems with my
Samsung printers.

With this patch, the only remaining difference between usblp and libusb is
that a GET_CONFIGURATION request is sent before each print job, whereas
usblp assumes without verification that the printer is already using the
correct configuration. The GET_CONFIGURATION request was added by this
patch because I wasn't comfortable with blindly assuming the
currently-selected configuration is correct.

This problem is probably related to STR #3964, and may also fix that
issue, without needing to do an intrusive USB reset.

Link: http://www.cups.org/str.php?L3965
Version: 1.6-current
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cups-1.6-r10087-usb-skip-interface-altsetting.patch
URL: <https://lists.cups.org/pipermail/cups/attachments/20111022/3326c614/attachment.ksh>


More information about the cups mailing list