Bug 14689 - Snapscan USB scanner assigned new device after reconnecting
Summary: Snapscan USB scanner assigned new device after reconnecting
Status: CLOSED WILL_NOT_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: All Linux
: P1 high
Assignee: Greg Kroah-Hartman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-25 19:12 UTC by Zenith88
Modified: 2010-06-30 15:19 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.32-rc8
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Zenith88 2009-11-25 19:12:23 UTC
Notice how in the log below the scanner is at device usb6. If I disconnect and reconnect, it will move to usb7, usb8 and so on, until the reboot. After reboot it starts from where it began - at usb4. As a result there is no device name that can be supplied to snapscan.conf for SANE to use. Thus scanner is not recognized in any SANE based scanning program.

Any attempt to specify current USB device in spapscan.conf results in that after running scanimage and it times out, scanner disappears from the system until it's powered off and back on.

Running Fedora12 with custom built 2.6.32-rc8 and KDE.

# sane-find-scanner

found USB scanner (vendor=0x04a5 [Color], product=0x20b0 [ FlatbedScanner 22]) at libusb:002:006

# lsusb
Bus 002 Device 006: ID 04a5:20b0 Acer Peripherals Inc. (now BenQ Corp.) S2W 3300U/4300U

# SANE_DEBUG_SNAPSCAN=128 scanimage -L

[snapscan] snapscani_usb_open(libusb:002:006)
[snapscan] snapscani_mutex_open: using IPC key 0x20b00206 for device libusb:002:006 (pid 0x20b0, bus 0x02, dev 0x06)
[snapscan] add_usb_device: Checking if 0x04a5 is a supported USB vendor ID
...
[snapscan] snapscani_check_device: Is vendor "Color" model "FlatbedScanner22" a supported scanner?
[snapscan] snapscani_get_model_id(FlatbedScanner22, 1, 2)
[snapscan] snapscani_get_model_id: looking up scanner for ID 0x04a5,0x20b0.
[snapscan] snapscani_check_device: Autodetected driver: Acer4300 (42 bit)
[snapscan] snapscani_usb_close(1)
[snapscan] 1st read 3 write 1
[snapscan] snapscani_usb_cmd(1,0xbfaa7556,6,0x0,0x0 (0))
[snapscan] atomic_usb_cmd(1,0xbfaa7556,6,0x0,0x0 (0))
[snapscan] usb_cmd(1,0xbfaa7556,6,0x0,0x0 (0))
[snapscan] usb_cmd: cmdlen=6, datalen=0
[snapscan] usb_write: writing:  0x00 0x00 0x00 0x00 0x00 0x00
[snapscan] Written 6 bytes
[snapscan] usb_read: reading:  0xfb 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[snapscan] Read 8 bytes
[snapscan] 2nd read 4 write 2
[snapscan] snapscani_init_device_structure()
[snapscan] sane_snapscan_get_devices (0xbfaa878c, 0)
device `snapscan:libusb:002:006' is a Acer FlatbedScanner22 flatbed scanner
[snapscan] sane_snapscan_exit
Comment 1 Andrew Morton 2009-11-25 19:56:57 UTC
reassigned to usb
Comment 2 Greg Kroah-Hartman 2009-11-25 20:03:12 UTC
That's the way that USB has always worked, this is just the USB device id that
the usb core internally uses.

Write a SANE rule based on something that is unique, like the vendor id / product id and/or the serial number.

Again, this is as-designed, please read the USB spec :)
Comment 3 Zenith88 2009-11-25 21:36:37 UTC
Is disappearing device and inability of snapscan to read from it part of USB specification too?

You don't seem eager to help, just to close the bug as quickly as you can. I bet you did not even read half of it.
Comment 4 Greg Kroah-Hartman 2009-11-25 22:13:44 UTC
The device electrically disconnecting from the system is a symptom of the
device, not the system's fault, this is an electrical thing.  You don't show
the kernel logs for that, so I assumed this was an expected way your
device works.

If you think the disconnects should not be happening, please reopen the bug and post the logs showing them.

As for eagerness, I find it interesting that you can judge this from a bug
report response.
Comment 5 Zenith88 2009-11-25 23:15:24 UTC
(In reply to comment #4)
> The device electrically disconnecting from the system is a symptom of the
> device, not the system's fault, this is an electrical thing.  You don't show
> the kernel logs for that, so I assumed this was an expected way your
> device works.

It does not do it under Windows. So it's possible to get it working.

> If you think the disconnects should not be happening, please reopen the bug
> and
> post the logs showing them.

# sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x0ac8 [Vimicro Corp.], product=0x303b [PC Camera]) at libusb:004:002
found USB scanner (vendor=0x04a5 [Color], product=0x20b0 [ FlatbedScanner 22]) at libusb:002:009
found USB scanner (vendor=0x2304, product=0x021a) at libusb:001:003
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.
# scanimage -L
device `snapscan:libusb:002:009' is a Acer FlatbedScanner22 flatbed scanner
# scanimage
scanimage: open of device snapscan:libusb:002:009 failed: Error during device I/O
# scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
# sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x0ac8 [Vimicro Corp.], product=0x303b [PC Camera]) at libusb:004:002
found USB scanner (vendor=0x04a5, product=0x20b0) at libusb:002:009
found USB scanner (vendor=0x2304, product=0x021a) at libusb:001:003
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.
Comment 6 Greg Kroah-Hartman 2009-11-25 23:27:55 UTC
That is not the kernel log messages.

Please attach the output of 'dmesg' after doing this sequence.
Comment 7 Zenith88 2009-11-26 03:56:48 UTC
There is nothing generated in there in the process. Neither in dmesg nor in messages
Comment 8 Greg Kroah-Hartman 2009-11-26 04:19:46 UTC
No, "this device was disconnected" type thing?

If not, then this is a SANE issue, have you asked the authors of this driver
about it?
Comment 9 Zenith88 2009-11-26 15:35:24 UTC
Good point, Greg! I kind of assumed that it was USB subsystem that 'lost' the way of talking to the scanner. Although Snapscan@sourceforge looks kind of abandoned, I'll try to contact them.
Comment 10 Zenith88 2009-12-02 20:25:42 UTC
I think snapscan is abandoned. Although it is strange that same piece of hardware that is reported as compatible by the project authors (Acer 4300U) does not work under 2.6.32, I can live with having to reboot into Windows for scanning.
Comment 11 Greg Kroah-Hartman 2009-12-02 22:32:34 UTC
Ok, thanks for trying, closing out now.
Comment 12 Zenith88 2010-06-30 15:19:33 UTC
I object with closing this as INVALID. This is a valid bug, as Snapscan was reported to work with my particular scanner in the past.

Note You need to log in before you can comment on or make changes to this bug.