[sane-devel] Epson Perfection 2480 Photo, permissions problems
Farrell Farahbod
upgrdman@mindspring.com
Sat, 01 Jan 2005 02:12:34 -0800
I have been searching the sane mailing-lists, and found quite a few
posts on my scanner, the Epson Perfection 2480 Photo scanner, and have
tried to get my scanner working, but the most I seem to get is a
permissions error from Xsane as root (I know, it says not to as root,
but as a normal user, I don't even get any error at all, but just a No
Scanners Found). I have my /etc/sane.d/snapscan.conf file setup:
firmware /etc/sane.d/Esfw41.bin
#-------------------------- SCSI scanners
----------------------------------
# These SCSI devices will be probed automatically
scsi AGFA * Scanner
scsi COLOR * Scanner
scsi Color * Scanner
scsi ACERPERI * Scanner
#--------------------------- USB scanners
-----------------------------------
# These USB devices will be probed automatically
# (This will currently work only on Linux)
[. . .]
# Epson Perfection 1670
usb 0x04b8 0x011f
# Epson Perfection 2480
usb 0x04b8 0x0121
After the first time I get any errors from xsane, or scanimage, after
that first time it won't even detect the scanner. Looking at my dmesg
output seems to hint at some errors. Heres the information:
farrell usb # sane-find-scanner
[. . .]
found USB scanner (vendor=0x04b8 [EPSON], product=0x0121 [EPSON
Scanner]) at libusb:001:009
[. . .]
farrell usb # export SANE_DEBUG_SNAPSCAN=255
farrell usb # scanimage -L
[sanei_debug] Setting debug level of snapscan to 255.
[snapscan] sane_snapscan_init
[snapscan] sane_snapscan_init: Snapscan backend version 1.4.40
[snapscan] add_usb_device(libusb:001:009)
[snapscan] add_usb_device: Detected (kind of) an USB device
[snapscan] snapscani_usb_open(libusb:001:009)
[snapscan] add_usb_device: Checking if 0x04b8 is a supported USB vendor
ID
[snapscan] snapscani_check_device()
[snapscan] mini_inquiry
[snapscan] snapscan_cmd
[snapscan] snapscani_usb_cmd(0,0x7fbfff5510,6,0x7fbfff54e0,0x7fbfff54d8
(36))
[snapscan] atomic_usb_cmd(0,0x7fbfff5510,6,0x7fbfff54e0,0x7fbfff54d8
(36))
[snapscan] usb_cmd(0,0x7fbfff5510,6,0x7fbfff54e0,0x7fbfff54d8 (36))
[snapscan] usb_cmd: cmdlen=6, datalen=0
[snapscan] usb_write: writing: 0x12 0x00 0x00 0x00 0x24 0x00
[snapscan] Written 6 bytes
[snapscan] usb_read: reading: 0xf9 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[snapscan] Read 8 bytes
[snapscan] usb_read: reading: 0x06 0x00 0x02 0x02 0x49 0x00 0x00 0x00
0x45 0x50 ...
[snapscan] Read 36 bytes
[snapscan] usb_read: reading: 0xfb 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[snapscan] Read 8 bytes
[snapscan] snapscani_check_device: Is vendor "EPSON" model "EPSON
Scanner1" a supported scanner?
[snapscan] snapscani_get_model_id(EPSON Scanner1, 0, 2)
[snapscan] snapscani_get_model_id: looking up scanner for ID
0x04b8,0x0121.
[snapscan] snapscani_get_model_id: scanner identified
[snapscan] snapscani_check_device: Autodetected driver: Perfection 2480
[snapscan] snapscani_usb_close(0)
[snapscan] 1st read 3 write 1
[snapscan] snapscani_usb_cmd(0,0x7fbfff5540,6,0x0,0x0 (0))
[snapscan] atomic_usb_cmd(0,0x7fbfff5540,6,0x0,0x0 (0))
[snapscan] usb_cmd(0,0x7fbfff5540,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 (0x7fbfff66c0, 0)
device `snapscan:libusb:001:009' is a EPSON EPSON Scanner1 flatbed
scanner
[snapscan] sane_snapscan_exit
farrell usb # dmesg
[. . .]
usb 1-6.1: new high speed USB device using address 9
usb 1-6.2: usbfs: USBDEVFS_CONTROL failed cmd sane-find-scann rqt 128 rq
6 len 2 ret -32
usb 1-6.2: usbfs: USBDEVFS_CONTROL failed cmd sane-find-scann rqt 128 rq
6 len 2 ret -32
usb 1-6.1: usbfs: USBDEVFS_BULK failed ep 0x81 len 1 ret -75
usb 1-6.1: usbfs: USBDEVFS_BULK failed ep 0x81 len 4 ret -75
farrell usb # xsane
[sanei_debug] Setting debug level of snapscan to 255.
[snapscan] sane_snapscan_init
[snapscan] sane_snapscan_init: Snapscan backend version 1.4.40
[snapscan] add_usb_device(libusb:001:009)
[snapscan] add_usb_device: Detected (kind of) an USB device
[snapscan] snapscani_usb_open(libusb:001:009)
[snapscan] add_usb_device: Checking if 0x04b8 is a supported USB vendor
ID
[snapscan] snapscani_check_device()
[snapscan] mini_inquiry
[snapscan] snapscan_cmd
[snapscan] snapscani_usb_cmd(0,0x7fbfff9fa0,6,0x7fbfff9f70,0x7fbfff9f68
(36))
[snapscan] atomic_usb_cmd(0,0x7fbfff9fa0,6,0x7fbfff9f70,0x7fbfff9f68
(36))
[snapscan] usb_cmd(0,0x7fbfff9fa0,6,0x7fbfff9f70,0x7fbfff9f68 (36))
[snapscan] usb_cmd: cmdlen=6, datalen=0
[snapscan] usb_write: writing: 0x12 0x00 0x00 0x00 0x24 0x00
[snapscan] usb_write Only 0 bytes written
[snapscan] Written 0 bytes
[snapscan] mini_inquiry: snapscan_cmd command failed: Error during
device I/O
[snapscan] snapscani_check_device: mini_inquiry failed with Error during
device I/O.
[snapscan] snapscani_usb_close(0)
[snapscan] 1st read 0 write 0
[snapscan] 2nd read 0 write 0
[snapscan] sane_snapscan_get_devices (0x7fbfffb150, 0)
[snapscan] sane_snapscan_exit
farrell usb #
[***This time xsane did not even detect the scanner, as after a wait of
maybe 30 seconds, it reported No Scanners Found. Perhaps this is because
I ran "scanimage -L"? So now I unplug my scanner, then plug it back it,
and try xsane again, this time not running "scanimage -L" first!***]
farrell usb # dmesg
[. . .]
usb 1-6.1: new high speed USB device using address 9
usb 1-6.2: usbfs: USBDEVFS_CONTROL failed cmd sane-find-scann rqt 128 rq
6 len 2 ret -32
usb 1-6.2: usbfs: USBDEVFS_CONTROL failed cmd sane-find-scann rqt 128 rq
6 len 2 ret -32
usb 1-6.1: usbfs: USBDEVFS_BULK failed ep 0x81 len 1 ret -75
usb 1-6.1: usbfs: USBDEVFS_BULK failed ep 0x81 len 4 ret -75
usb 1-6.1: bulk timeout on ep2out
usb 1-6.1: usbfs: USBDEVFS_BULK failed ep 0x2 len 6 ret -110
usb 1-6.1: bulk timeout on ep2out
usb 1-6.1: usbfs: USBDEVFS_BULK failed ep 0x2 len 2 ret -110
usb 1-6.1: usbfs: USBDEVFS_BULK failed ep 0x81 len 1 ret -75
usb 1-6.1: bulk timeout on ep2out
usb 1-6.1: usbfs: USBDEVFS_BULK failed ep 0x2 len 2 ret -110
usb 1-6.1: bulk timeout on ep2out
usb 1-6.1: usbfs: USBDEVFS_BULK failed ep 0x2 len 2 ret -110
usb 1-6.1: USB disconnect, address 9
usb 1-6.1: new high speed USB device using address 10
farrell usb #
[***Note that the lines for address 9, e.g. all but the last line, were
from the earlier connection. Now we're fresh, with a clean slate.***]
farrell usb # xsane
[sanei_debug] Setting debug level of snapscan to 255.
[snapscan] sane_snapscan_init
[snapscan] sane_snapscan_init: Snapscan backend version 1.4.40
[snapscan] add_usb_device(libusb:001:010)
[snapscan] add_usb_device: Detected (kind of) an USB device
[snapscan] snapscani_usb_open(libusb:001:010)
[snapscan] add_usb_device: Checking if 0x04b8 is a supported USB vendor
ID
[snapscan] snapscani_check_device()
[snapscan] mini_inquiry
[snapscan] snapscan_cmd
[snapscan] snapscani_usb_cmd(0,0x7fbfff9fa0,6,0x7fbfff9f70,0x7fbfff9f68
(36))
[snapscan] atomic_usb_cmd(0,0x7fbfff9fa0,6,0x7fbfff9f70,0x7fbfff9f68
(36))
[snapscan] usb_cmd(0,0x7fbfff9fa0,6,0x7fbfff9f70,0x7fbfff9f68 (36))
[snapscan] usb_cmd: cmdlen=6, datalen=0
[snapscan] usb_write: writing: 0x12 0x00 0x00 0x00 0x24 0x00
[snapscan] Written 6 bytes
[snapscan] usb_read: reading: 0xf9 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[snapscan] Read 8 bytes
[snapscan] usb_read: reading: 0x06 0x00 0x02 0x02 0x49 0x00 0x00 0x00
0x45 0x50 ...
[snapscan] Read 36 bytes
[snapscan] usb_read: reading: 0xfb 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[snapscan] Read 8 bytes
[snapscan] snapscani_check_device: Is vendor "EPSON" model "EPSON
Scanner1" a supported scanner?
[snapscan] snapscani_get_model_id(EPSON Scanner1, 0, 2)
[snapscan] snapscani_get_model_id: looking up scanner for ID
0x04b8,0x0121.
[snapscan] snapscani_get_model_id: scanner identified
[snapscan] snapscani_check_device: Autodetected driver: Perfection 2480
[snapscan] snapscani_usb_close(0)
[snapscan] 1st read 3 write 1
[snapscan] snapscani_usb_cmd(0,0x7fbfff9fd0,6,0x0,0x0 (0))
[snapscan] atomic_usb_cmd(0,0x7fbfff9fd0,6,0x0,0x0 (0))
[snapscan] usb_cmd(0,0x7fbfff9fd0,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 (0x7fbfffb150, 0)
[snapscan] sane_snapscan_open (libusb:001:010, 0x7fbfffcfd0)
[snapscan] find_device
[snapscan] sane_snapscan_open: Allocating 64512 bytes as scanner buffer.
[snapscan] sane_snapscan_open: allocated scanner structure at 0x74a210
[snapscan] open_scanner
[snapscan] snapscani_usb_open(libusb:001:010)
[snapscan] sane_snapscan_open: open_scanner failed, status: Device busy
[***Now I see a dialog window saying "Failed to open device `
snapscan:libusb:001:010 Access to resource has been denied". I have been
doing ALL of these commands as root, by the way. OK, so now I click the
only button in the dialog window, "Close".***]
[snapscan] sane_snapscan_exit
farrell usb #
OK so then I found this thread in the mailing lists, and tryed it out:
http://lists.alioth.debian.org/pipermail/sane-devel/2004-November/012561.html
[***OK, so to reset things again, I unplugged my scanner, then plugged
it back in.***]
farrell usb # cd /proc/bus/usb/
farrell usb # find -type f -exec chown root:scanner {} \;
farrell usb # find -type f -exec chmod 664 {} \;
farrell usb # xsane
[sanei_debug] Setting debug level of snapscan to 255.
[snapscan] sane_snapscan_init
[snapscan] sane_snapscan_init: Snapscan backend version 1.4.40
[snapscan] add_usb_device(libusb:001:011)
[snapscan] add_usb_device: Detected (kind of) an USB device
[snapscan] snapscani_usb_open(libusb:001:011)
[snapscan] add_usb_device: Checking if 0x04b8 is a supported USB vendor
ID
[snapscan] snapscani_check_device()
[snapscan] mini_inquiry
[snapscan] snapscan_cmd
[snapscan] snapscani_usb_cmd(0,0x7fbfff9f90,6,0x7fbfff9f60,0x7fbfff9f58
(36))
[snapscan] atomic_usb_cmd(0,0x7fbfff9f90,6,0x7fbfff9f60,0x7fbfff9f58
(36))
[snapscan] usb_cmd(0,0x7fbfff9f90,6,0x7fbfff9f60,0x7fbfff9f58 (36))
[snapscan] usb_cmd: cmdlen=6, datalen=0
[snapscan] usb_write: writing: 0x12 0x00 0x00 0x00 0x24 0x00
[snapscan] Written 6 bytes
[snapscan] usb_read: reading: 0xf9 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[snapscan] Read 8 bytes
[snapscan] usb_read: reading: 0x06 0x00 0x02 0x02 0x49 0x00 0x00 0x00
0x45 0x50 ...
[snapscan] Read 36 bytes
[snapscan] usb_read: reading: 0xfb 0x00 0x00 0x00 0x00 0x00 0x00 0x00
[snapscan] Read 8 bytes
[snapscan] snapscani_check_device: Is vendor "EPSON" model "EPSON
Scanner1" a supported scanner?
[snapscan] snapscani_get_model_id(EPSON Scanner1, 0, 2)
[snapscan] snapscani_get_model_id: looking up scanner for ID
0x04b8,0x0121.
[snapscan] snapscani_get_model_id: scanner identified
[snapscan] snapscani_check_device: Autodetected driver: Perfection 2480
[snapscan] snapscani_usb_close(0)
[snapscan] 1st read 3 write 1
[snapscan] snapscani_usb_cmd(0,0x7fbfff9fc0,6,0x0,0x0 (0))
[snapscan] atomic_usb_cmd(0,0x7fbfff9fc0,6,0x0,0x0 (0))
[snapscan] usb_cmd(0,0x7fbfff9fc0,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 (0x7fbfffb140, 0)
[snapscan] sane_snapscan_open (libusb:001:011, 0x7fbfffcfc0)
[snapscan] find_device
[snapscan] sane_snapscan_open: Allocating 64512 bytes as scanner buffer.
[snapscan] sane_snapscan_open: allocated scanner structure at 0x74a2b0
[snapscan] open_scanner
[snapscan] snapscani_usb_open(libusb:001:011)
[snapscan] sane_snapscan_open: open_scanner failed, status: Device busy
[snapscan] sane_snapscan_exit
farrell usb #
[***And again, I get that error about permissions.***]
And in case I did not mention it earlier, I started my hotplug deamon at
the begining, because after looking at some pages online about my 2480
and Linux, it seem'd like I am supposed to use hotplug. I would rather
not use hotplug, unless someone can give me a really good reason. The
scanner will always be plugged into this computer, so I don't see much
need for using a hotplugging daemon.
And some info: I'm using Gentoo Linux, on my AMD64 CPU, in 64bit mode.
Kernel: 2.6.9-gentoo-r12
sane-backends: 1.0.15
sane-frontends: 1.0.13
xsane: 0.96-r1
Sorry about the long post, and I sincerely thank you for you time.
--Farrell F.