tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

where is my ugen? (or uscanner and ulpt0 at same time?)



Some other details are in this netbsd-users thread:
http://mail-index.netbsd.org/netbsd-users/2008/04/17/msg000622.html 

I have a Canon MP150. It provides a scanner and printer via USB.

On NetBSD, the printer is detected:

ulpt0 at uhub4 port 5 configuration 1 interface 1
ulpt0: Canon MP150, rev 2.00/1.08, addr 2, iclass 7/1
ulpt0: using bi-directional mode

usbdevs -v shows:

 port 5 addr 2: high speed, self powered, config 1, MP150(0x1709), 
 Canon(0x04a9) , rev 1.08, serial 62948B

The scanner is not detected.

I patched usbdevs like:

 /* Canon, Inc. products */
+product CANON MP150            0x1709  PIXMA MP150

So rebooting into NetBSD 4.99.59 and had:

uscanner0 at uhub4 port 5
uscanner0: Canon MP150, rev 2.00/1.08,

But no ulpt0.

(That still didn't work for xsane as I had to patch sane-backends too -- 
see the thread above.)

Here is the device under Linux 2.6.22-14-386:

[244465.572000] usb 3-3: new high speed USB device using ehci_hcd and 
address 4
[244465.704000] usb 3-3: configuration #1 chosen from 1 choice
[244465.800000] 
/build/buildd/linux-source-2.6.22-2.6.22/drivers/usb/class/usblp.c: 
usblp0: USB Bidirectional printer dev 4 if 1 alt 0 proto 2 vid 0x04A9 pid 
0x1709

While that only shows the printer, the scanner works fine with xsane. Here 
is debugging showing it detected by xsane:

[sanei_usb] sanei_usb_init: found libusb device (0x04a9/0x1709) interface 
0  at libusb:003:004
[sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
[sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
[sanei_usb] sanei_usb_init: device 0x0000/0x0000 looks like a root hub
[sanei_usb] sanei_usb_init: found 1 devices
[dll] init: backend `pixma' is version 1.0.13
[sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x1709
[pixma] pixma_collect_devices() found Canon PIXMA MP150 at libusb:003:004
[sanei_usb] sanei_usb_open: trying to open device `libusb:003:004'
USB error: could not set config 1: Device or resource busy
[sanei_usb] sanei_usb_open: libusb complained: could not set config 1: 
Device or resource busy
[sanei_usb] Maybe the kernel scanner driver or usblp claims the interface? 
Ignoring this error...
[sanei_usb] sanei_usb_open: configuration nr: 0
[sanei_usb] sanei_usb_open:     interface nr: 0
[sanei_usb] sanei_usb_open:   alt_setting nr: 0
[sanei_usb] sanei_usb_open: endpoint nr: 0
[sanei_usb] sanei_usb_open: direction: 0
[sanei_usb] sanei_usb_open: address: 7 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-out endpoint (address 0x07)
[sanei_usb] sanei_usb_open: endpoint nr: 1
[sanei_usb] sanei_usb_open: direction: 128
[sanei_usb] sanei_usb_open: address: 8 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-in endpoint (address 0x08)
[sanei_usb] sanei_usb_open: endpoint nr: 2
[sanei_usb] sanei_usb_open: direction: 128
[sanei_usb] sanei_usb_open: address: 9 transfertype: 3
[sanei_usb] sanei_usb_open: found interrupt-in endpoint (address 0x09)
[sanei_usb] sanei_usb_open: configuration nr: 0
[sanei_usb] sanei_usb_open:     interface nr: 1
[sanei_usb] sanei_usb_open:   alt_setting nr: 0
[sanei_usb] sanei_usb_open: endpoint nr: 0
[sanei_usb] sanei_usb_open: direction: 0
[sanei_usb] sanei_usb_open: address: 1 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-out endpoint (address 0x01)
[sanei_usb] sanei_usb_open: we already have a bulk-out endpoint (address: 
0x07), ignoring the new one
[sanei_usb] sanei_usb_open: endpoint nr: 1
[sanei_usb] sanei_usb_open: direction: 128
[sanei_usb] sanei_usb_open: address: 2 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-in endpoint (address 0x02)
[sanei_usb] sanei_usb_open: we already have a bulk-in endpoint (address: 
0x88), ignoring the new one
[sanei_usb] sanei_usb_open: opened usb device `libusb:003:004' (*dn=0)
[sanei_usb] sanei_usb_control_msg: rtype = 0x80, req = 6, value = 256, 
index = 0, len = 18
[sanei_usb] 0000: 12 01 00 02 00 00 00 40 A9 04 09 17 08 01 01 02 
.......@........
[sanei_usb] 0010: 03 01                                           
................
[sanei_usb] sanei_usb_control_msg: rtype = 0x80, req = 6, value = 768, 
index = 0, len = 4
[sanei_usb] 0000: 04 03 09 04                                     
................
[sanei_usb] sanei_usb_control_msg: rtype = 0x80, req = 6, value = 771, 
index = 1033, len = 44
[sanei_usb] 0000: 0E 03 36 00 32 00 39 00 34 00 38 00 42 00 01 00 
..6.2.9.4.8.B...
[sanei_usb] 0010: 00 00 00 00 00 00 18 9F F0 B6 A4 00 00 00 00 80 
................
[sanei_usb] 0020: F0 B6 1C 2C 01 00 EC 93 F0 B6 FC AB             
...,............
[sanei_usb] sanei_usb_close: closing device 0

(I have a 30 MB, 424147 line xsane debugging log if that would be useful. 
It is from Linux where I successfully previewed, scanned, and saved one 
paper.)

I want to make sure NetBSD side works first before I ask sane developers 
for help.

I found missing "NetBSD" code in sane-backends which I patched (not 
committed yet) so I have doubts how it could ever work. But I was told by 
someone that USB scanner worked for them on NetBSD using ugen.

I want to try using ugen0. Any suggestions on how I can get NetBSD to 
provide a ugen device for this device?


  Jeremy C. Reed


Home | Main Index | Thread Index | Old Index