Skip to content

Some USB printers do not like set_configuration and set_interface. #3965

@michaelrsweet

Description

@michaelrsweet

Version: 1.5-current
CUPS.org User: henry128

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions