lsusb -v shows this for the Epson Printer:

Bus 002 Device 003: 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 J4FG004754
  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

----------------------------------------------------------------------

I have been able to do usblp recognize it changing this more lines in
usblp.c.


/* Analyze and pick initial alternate settings and endpoints. */
protocol = usblp_select_alts(usblp);
if (protocol < 0) {
        dbg("incompatible printer-class device 0x%4.4X/0x%4.4X",
                le16_to_cpu(dev->descriptor.idVendor),
                le16_to_cpu(dev->descriptor.idProduct));
        goto abort;
}

here i change "if (protocol < 0) {" for "if (protocol < -2000) {" 

----------------------------------------------------------------------

/* Setup the selected alternate setting and endpoints. */
if (usblp_set_protocol(usblp, protocol) < 0)
       goto abort;

here i change "(usblp_set_protocol(usblp, protocol) < 0)" for
"(usblp_set_protocol(usblp, protocol) < -2000)"

----------------------------------------------------------------------

when i compile the module and install with insmod dmesg gives me this
output.

drivers/usb/class/usblp.c: usblp0: USB Unidirectional printer dev 3 if 0
alt -1 proto 0 vid 0x04B8 pid 0x0202
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver


and i have the "/dev/usb/lp0" device but when i try to print anything.


"echo test > /dev/usb/lp0" it fails and gives me this errors in dmesg:

BUG: unable to handle kernel NULL pointer dereference at virtual address
00000000
 printing eip:
c0281e4b
*pde = 00000000
Oops: 0002 [#1]
SMP 
Modules linked in: usblp nvidia ppdev lp button ac battery ipv6
dm_snapshot dm_mirror dm_mod loop tsdev snd_intel8x0 snd_ac97_codec
snd_ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_timer parport_pc
parport psmouse snd rtc floppy i2c_i801 serio_raw soundcore i2c_core
snd_page_alloc pcspkr intel_agp shpchp pci_hotplug agpgart evdev ext3
jbd mbcache raid10 raid456 xor raid1 raid0 multipath linear md_mod
ide_disk generic 8139too piix ide_core 8139cp mii ehci_hcd uhci_hcd
usbcore thermal processor fan
CPU:    0
EIP:    0060:[<c0281e4b>]    Tainted: P      VLI
EFLAGS: 00010246   (2.6.18-4-686 #1) 
EIP is at iret_exc+0x55f/0x782
eax: 00000000   ebx: f74a33c0   ecx: 00000005   edx: 080f5c08
esi: 080f5c08   edi: 00000000   ebp: 00000000   esp: dfcf3f38
ds: 007b   es: 007b   ss: 0068
Process bash (pid: 2918, ti=dfcf2000 task=c1967550 task.ti=dfcf2000)
Stack: 00000005 00000005 f8ad7a3c 080f5c08 f8ad7c82 00000005 080f5c08
f50dc5c0 
       00000005 00000000 00000000 00000000 00000000 00000000 dfc87b58
f50dc5c0 
       f8ad7a3c 080f5c08 00000005 c015a5db dfcf3fa4 f50dc5c0 fffffff7
080f5c08 
Call Trace:
 [<f8ad7a3c>] usblp_write+0x0/0x30e [usblp]
 [<f8ad7c82>] usblp_write+0x246/0x30e [usblp]
 [<f8ad7a3c>] usblp_write+0x0/0x30e [usblp]
 [<c015a5db>] vfs_write+0xa1/0x143
 [<c015abcb>] sys_write+0x3c/0x63
 [<c0102c11>] sysenter_past_esp+0x56/0x79
Code: f3 ff 01 c1 e9 95 91 f3 ff 8d 0c 88 e9 8d 91 f3 ff 01 c1 e9 be 91
f3 ff 8d 0c 88 e9 b6 91 f3 ff 01 c1 eb 03 8d 0c 88 51 50 31 c0 <f3> aa
58 59 e9 da 91 f3 ff ba f2 ff ff ff e9 60 92 f3 ff 8d 0c 
EIP: [<c0281e4b>] iret_exc+0x55f/0x782 SS:ESP 0068:dfcf3f38


hehehe i would be better long away from kernel code i think :).

Regards Miguel Angel.





El jue, 08-03-2007 a las 11:08 -0500, Alan Stern escribió:
> On Thu, 8 Mar 2007, Linos wrote:
> 
> > Hello i am trying to make work an Epson Receipt Printer M129C with usb
> > cable, well i have searched in the list but i have not found a solution,
> > usblp seems to not detect the printer so i have no /dev/usb/lp0 device
> > and i cant access the printer.
> > 
> > 
> > lsusb:
> > 
> > Bus 004 Device 003: ID 0bda:8187 Realtek Semiconductor Corp. 
> > Bus 004 Device 002: ID 05e3:0606 Genesys Logic, Inc. 
> > Bus 004 Device 001: ID 0000:0000  
> > Bus 003 Device 010: ID 04b8:0202 Seiko Epson Corp. Receipt Printer M129C
> > Bus 003 Device 001: ID 0000:0000  
> > Bus 002 Device 009: ID 04f9:011e Brother Industries, Ltd 
> > Bus 002 Device 004: ID 1130:cc00 Tenx Technology, Inc. 
> > Bus 002 Device 001: ID 0000:0000  
> > Bus 001 Device 001: ID 0000:0000  
> > 
> > 
> > when i disconnect and reconnect it i get this from dmesg:
> > 
> > drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
> > usb 3-1: USB disconnect, address 10
> > usb 3-1: new full speed USB device using uhci_hcd and address 11
> > usb 3-1: configuration #1 chosen from 1 choice
> > 
> > I have been searching in google, reading all i have found about this
> > problem but i cant get it works, i has been so frustrated with that
> > problem that i have been searching the mode to force usblp to detect it
> > but it doesnt works, i have added the last line to this struct in
> > usblp.c:
> > 
> > static struct usb_device_id usblp_ids [] = {
> >         { USB_DEVICE_INFO(7, 1, 1) },
> >         { USB_DEVICE_INFO(7, 1, 2) },
> >         { USB_DEVICE_INFO(7, 1, 3) },
> >         { USB_INTERFACE_INFO(7, 1, 1) },
> >         { USB_INTERFACE_INFO(7, 1, 2) },
> >         { USB_INTERFACE_INFO(7, 1, 3) },
> >         { USB_DEVICE(0x04b8, 0x0202), }, /* Seiko Epson Corp. Receipt
> > Printer M129C */
> >         { }                                             /* Terminating
> > entry */
> > };
> > 
> > recompile module and install it but now i have this error on printer
> > reconnect:
> > 
> > usblp: probe of 3-1:1.0 failed with error -5
> > usb 3-1: device_add(3-1:1.0) --> -5
> > 
> > anyone on the list can help me please? i would like very pleased, thanks
> > in advance.
> 
> What does "lsusb -v" show for the printer?
> 
> Alan Stern
> 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to