X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org X-ME-UUID: 20071017071744562 DOT 89460700008F AT mwinf2b17 DOT orange DOT fr Message-ID: <4715B71B.1090707@prologue.fr> Date: Wed, 17 Oct 2007 09:17:47 +0200 From: patrick ficheux User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: problem with SANE : scanimage freeze Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi, I try to use SANE on cygwin with USB scanner (agfa snapscan 1212U) but scanimage doesn't work sane-find-scanner.exe works fine, it detects my scanner $ sane-find-scanner.exe ... found USB scanner (vendor=0x06bd [AGFA ], product=0x2061 [SNAPSCAN]) at libusb:bus-0:\\.\libusb0-0003--0x06bd-0x2061 ... but when I try to list available scanner : $ scanimage -L device `snapscan:libusb:bus-0:\\.\libusb0-0003--0x06bd-0x2061' is a AGFA SNAPSCAN flatbed scanner scanimage displays correct information but it never returns I must kill scanimage (scanimage takes 100% CPU) when I set debug trace on, I get the following message : $ scanimage -L [sanei_debug] Setting debug level of dll to 128. [dll] sane_init: SANE dll backend version 1.0.12 from sane-backends 1.0.18 [dll] sane_init: reading dll.conf [dll] add_backend: adding backend `snapscan' [dll] sane_get_devices [dll] load: searching backend `snapscan' in `/usr/local/lib/sane' [dll] load: trying to load `/usr/local/lib/sane/cygsane-snapscan-1.dll' [dll] load: dlopen()ing `/usr/local/lib/sane/cygsane-snapscan-1.dll' [dll] init: initializing backend `snapscan' [sanei_debug] Setting debug level of snapscan to 128. [snapscan] sane_snapscan_init [snapscan] sane_snapscan_init: Snapscan backend version 1.4.53 [sanei_debug] Setting debug level of sanei_usb to 128. [sanei_usb] sanei_usb_init: Looking for kernel scanner devices [sanei_usb] sanei_usb_init: Looking for libusb devices LIBUSB_DLL: info: usb_os_find_busses: found bus-0 LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0001--0x413c-0x2005 on bus-0 LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0002--0x046d-0xc016 on bus-0 LIBUSB_DLL: info: usb_os_find_devices: found \\.\libusb0-0003--0x06bd-0x2061 on bus-0 [sanei_usb] sanei_usb_init: device 0x413c/0x2005, interface 0 doesn't look like a scanner (0/3) [sanei_usb] sanei_usb_init: device 0x413c/0x2005: no suitable interfaces [sanei_usb] sanei_usb_init: device 0x046d/0xc016, interface 0 doesn't look like a scanner (0/3) [sanei_usb] sanei_usb_init: device 0x046d/0xc016: no suitable interfaces [sanei_usb] sanei_usb_init: found libusb device (0x06bd/0x2061) interface 0 at libusb:bus-0:\\.\libusb0-0003--0x06bd-0x2061 [sanei_usb] sanei_usb_init: found 1 devices [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x1a20 [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x1a26 [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x2022 [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x1a2a [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x2040 [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x2060 [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x207e [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20be [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20c0 [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20b0 [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20de [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20f8 [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20fc [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x20fe [sanei_usb] sanei_usb_find_devices: vendor=0x04a5, product=0x2137 [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x0002 [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x0001 [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2061 [snapscan] add_usb_device(libusb:bus-0:\\.\libusb0-0003--0x06bd-0x2061) [snapscan] add_usb_device: Detected (kind of) an USB device [snapscan] add_usb_device: before snapscani_usb_shm_init() [snapscan] snapscani_usb_shm_init USE_PTHREAD [snapscan] add_usb_device: after snapscani_usb_shm_init() [snapscan] snapscani_usb_open(libusb:bus-0:\\.\libusb0-0003--0x06bd-0x2061) [sanei_usb] sanei_usb_open: trying to open device `libusb:bus-0:\\.\libusb0-0003--0x06bd-0x2061' [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: 128 [sanei_usb] sanei_usb_open: address: 1 transfertype: 2 [sanei_usb] sanei_usb_open: found bulk-in endpoint (address 0x01) [sanei_usb] sanei_usb_open: endpoint nr: 1 [sanei_usb] sanei_usb_open: direction: 0 [sanei_usb] sanei_usb_open: address: 2 transfertype: 2 [sanei_usb] sanei_usb_open: found bulk-out endpoint (address 0x02) [sanei_usb] sanei_usb_open: endpoint nr: 2 [sanei_usb] sanei_usb_open: direction: 128 [sanei_usb] sanei_usb_open: address: 3 transfertype: 3 [sanei_usb] sanei_usb_open: found interrupt-in endpoint (address 0x03) [sanei_usb] sanei_usb_open: opened usb device `libusb:bus-0:\\.\libusb0-0003--0x06bd-0x2061' (*dn=0) [sanei_usb] sanei_usb_get_vendor_product: device 0: vendorID: 0x06bd, productID: 0x2061 [snapscan] add_usb_device: Checking if 0x06bd is a supported USB vendor ID [snapscan] snapscani_check_device() [snapscan] mini_inquiry [snapscan] snapscan_cmd [snapscan] snapscani_usb_cmd(0,0x22c740,6,0x22c710,0x22c70c (36)) [snapscan] atomic_usb_cmd(0,0x22c740,6,0x22c710,0x22c70c (36)) [snapscan] usb_cmd(0,0x22c740,6,0x22c710,0x22c70c (36)) [snapscan] usb_cmd: cmdlen=6, datalen=0 [snapscan] usb_write: writing: 0x12 0x00 0x00 0x00 0x24 0x00 [sanei_usb] sanei_usb_write_bulk: trying to write 6 bytes [sanei_usb] 0000: 12 00 00 00 24 00 ....$........... [sanei_usb] sanei_usb_write_bulk: wanted 6 bytes, wrote 6 bytes [snapscan] Written 6 bytes [sanei_usb] sanei_usb_read_bulk: trying to read 8 bytes [sanei_usb] 0000: F9 00 00 00 00 00 00 00 ................ [sanei_usb] sanei_usb_read_bulk: wanted 8 bytes, got 8 bytes [snapscan] usb_read: reading: 0xf9 0x00 0x00 0x00 0x00 0x00 0x00 0x00 [snapscan] Read 8 bytes [sanei_usb] sanei_usb_read_bulk: trying to read 36 bytes [sanei_usb] 0000: 06 00 02 02 49 00 00 00 41 47 46 41 20 20 20 20 ....I...AGFA [sanei_usb] 0010: 53 4E 41 50 53 43 41 4E 20 20 20 20 20 20 20 20 SNAPSCAN [sanei_usb] 0020: 30 31 30 30 0100............ [sanei_usb] sanei_usb_read_bulk: wanted 36 bytes, got 36 bytes [snapscan] usb_read: reading: 0x06 0x00 0x02 0x02 0x49 0x00 0x00 0x00 0x41 0x47 ... [snapscan] Read 36 bytes [sanei_usb] sanei_usb_read_bulk: trying to read 8 bytes [sanei_usb] 0000: FB 00 00 00 00 00 00 00 ................ [sanei_usb] sanei_usb_read_bulk: wanted 8 bytes, got 8 bytes [snapscan] usb_read: reading: 0xfb 0x00 0x00 0x00 0x00 0x00 0x00 0x00 [snapscan] Read 8 bytes [snapscan] snapscani_check_device: Is vendor "AGFA" model "SNAPSCAN" a supported scanner? [snapscan] snapscani_get_model_id(SNAPSCAN, 0, 2) [sanei_usb] sanei_usb_get_vendor_product: device 0: vendorID: 0x06bd, productID: 0x2061 [snapscan] snapscani_get_model_id: looking up scanner for ID 0x06bd,0x2061. [snapscan] snapscani_check_device: Autodetected driver: SnapScan [snapscan] snapscani_usb_close(0) [snapscan] 1st read 3 write 1 [sanei_usb] sanei_usb_get_vendor_product: device 0: vendorID: 0x06bd, productID: 0x2061 [sanei_usb] sanei_usb_close: closing device 0 [snapscan] snapscani_init_device_structure() [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2093 [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2091 [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2095 [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x2097 [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x208d [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x20ff [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x208f [sanei_usb] sanei_usb_find_devices: vendor=0x06bd, product=0x20fd [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0114 [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x011f [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0121 [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x0122 [sanei_usb] sanei_usb_find_devices: vendor=0x04b8, product=0x080c [dll] init: backend `snapscan' is version 1.4.53 [snapscan] sane_snapscan_get_devices (0x22ca48, 0) [dll] sane_get_devices: found 1 devices device `snapscan:libusb:bus-0:\\.\libusb0-0003--0x06bd-0x2061' is a AGFA SNAPSCAN flatbed scanner [dll] sane_exit: exiting [dll] sane_exit: calling backend `snapscan's exit function [snapscan] sane_snapscan_exit [dll] sane_exit: finished << --- It never returns ! I suspect that the problem is in libusb or in USB stack of the sane snapscan backend : maybe the USB driver isnt' correctly closed (any overlapped I/O are still pending ?) Do you know if SANE works correctly on Cygwin ? Many thanks, -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/