Package: cups Version: 1.5.0-13 Severity: normal Tags: upstream patch Hi,
The USB receipt printer Epson/Seiko TM-T88IV (M129C) is not recognized by the cups usb backend. This printer returns to Vendor-Specific values for bInterfaceClass and bInterfaceSubClass USB attributes which prevents it to be properly dretected as a 'regular' printer. The output of 'lsusb -v' for such a printer is attached. It's correctly detected by usblp, since several years, thanks to this patch: http://www.spinics.net/lists/linux-usb-devel/msg03603.html. I've made and tested successfully the same kind of patch for backend/usb- libusb.c of the original source tree of cups 1.5.0. A related drawback is that this device doesn't have any IEEE-1284 device ID, so the output of backend/usb is something like direct usb://Unknown/(null)?serial=J4LG008211 "/(null)?serial=J4LG008211""/(null)?serial=J4LG008211" "" "" It could also be fixed using hard-wire values, but I haven't done such additions in my patch. This device ID problem doesn't prevent the printer to work perfectly. Let me know if you want me to do additional tests - I really need this printer to be recognized properly by cups. (I have tested the lastest debian cups version 1.5.0-16, and the problem is still there) I filled the same bug report in the cups bug tracker some months ago, but they refuse to fix it, as they don't want to support non-standard printers. IMHO it's still a regression caused by the transition from usblp to libusb, but anyway ... Thanks -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (700, 'testing'), (650, 'stable'), (600, 'unstable') Architecture: i386 (i686) Kernel: Linux 3.1.0-1-686-pae (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages cups depends on: ii adduser 3.113 ii bc 1.06.95-2 ii cups-client 1.5.0-13 ii cups-common 1.5.0-13 ii cups-ppdc 1.5.0-13 ii debconf [debconf-2.0] 1.5.41 ii ghostscript 9.04~dfsg-3 ii libavahi-client3 0.6.30-6 ii libavahi-common3 0.6.30-6 ii libc6 2.13-24 ii libcups2 1.5.0-13 ii libcupscgi1 1.5.0-13 ii libcupsdriver1 1.5.0-13 ii libcupsimage2 1.5.0-13 ii libcupsmime1 1.5.0-13 ii libcupsppdc1 1.5.0-13 ii libdbus-1-3 1.4.16-1 ii libgcc1 1:4.6.2-11 ii libgnutls26 2.12.16-1 ii libgssapi-krb5-2 1.10+dfsg~beta1-2 ii libijs-0.35 0.35-8 ii libkrb5-3 1.10+dfsg~beta1-2 ii liblcms1 1.19.dfsg-1+b1 ii libldap-2.4-2 2.4.28-1.1 ii libpam0g 1.1.3-6 ii libpaper1 1.1.24+nmu1 ii libpoppler13 0.16.7-2+b1 ii libslp1 1.2.1-7.8 ii libstdc++6 4.6.2-11 ii libusb-0.1-4 2:0.1.12-20 ii lsb-base 3.2-28 ii poppler-utils 0.16.7-2+b1 ii procps 1:3.2.8-11 ii ssl-cert 1.0.28 ii ttf-freefont 20100919-1 ii zlib1g 1:1.2.3.4.dfsg-3 Versions of packages cups recommends: ii avahi-daemon 0.6.30-6 ii colord 0.1.15-3 ii cups-driver-gutenprint 5.2.7-4 ii foomatic-filters 4.0.9-1 ii ghostscript-cups 9.04~dfsg-3 ii printer-driver-gutenprint [cups-driver-gutenprint] 5.2.7-4 Versions of packages cups suggests: ii cups-bsd <none> ii cups-pdf 2.6.1-5 ii foomatic-db 20111206-1 ii hplip <none> ii smbclient 2:3.6.1-3 ii udev 175-3 -- Configuration Files: /etc/cups/cupsd.conf [Errno 13] Permission denied: u'/etc/cups/cupsd.conf' -- debconf information:
--- orig/cups-1.5.0/backend/usb-libusb.c 2011-11-01 02:28:20.000000000 +0100 +++ cups-1.5.0/backend/usb-libusb.c 2011-11-02 00:54:05.000000000 +0100 @@ -339,9 +339,11 @@ * 1284.4 (packet mode) protocol as well. */ - if (altptr->bInterfaceClass != USB_CLASS_PRINTER || - altptr->bInterfaceSubClass != 1 || - (altptr->bInterfaceProtocol != 1 && /* Unidirectional */ + if (( altptr->bInterfaceClass != USB_CLASS_PRINTER || altptr->bInterfaceSubClass != 1 ) && + /* Ugly patch for Epson Receipt Printer M129C */ + ( device->descriptor.idVendor != 0x04b8 && device->descriptor.idProduct != 0x0202 ) ) + continue; + if ((altptr->bInterfaceProtocol != 1 && /* Unidirectional */ altptr->bInterfaceProtocol != 2) || /* Bidirectional */ altptr->bInterfaceProtocol < protocol) continue; @@ -383,8 +385,7 @@ if (!open_device(&printer, data != NULL)) { - if (!get_device_id(&printer, device_id, sizeof(device_id))) - { + get_device_id(&printer, device_id, sizeof(device_id)); make_device_uri(&printer, device_id, device_uri, sizeof(device_uri)); @@ -402,7 +403,6 @@ bEndpointAddress; return (&printer); } - } close_device(&printer); } @@ -609,7 +609,7 @@ mfglen = strlen(mfg); - if (!strncasecmp(mdl, mfg, mfglen) && _cups_isspace(mdl[mfglen])) + if ( mdl && !strncasecmp(mdl, mfg, mfglen) && _cups_isspace(mdl[mfglen])) { mdl += mfglen + 1;
Bus 006 Device 004: ID 04b8:0202 Seiko Epson Corp. Receipt Printer M129C Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x04b8 Seiko Epson Corp. idProduct 0x0202 Receipt Printer M129C bcdDevice 1.00 iManufacturer 1 EPSON iProduct 2 TM-T88IV iSerial 3 J4LG008211 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 32 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 2mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 2 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Device Status: 0x0001 Self Powered