Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
epson scanner and libusb
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Wed Feb 09, 2005 9:36 am    Post subject: Reply with quote

Do you print with sane/libusb???? I never knew that would be possible, I'm
using cups...
_________________
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
Back to top
View user's profile Send private message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Wed Feb 09, 2005 1:21 pm    Post subject: Reply with quote

OOps, also my scanner is working, I just savd device info in xscanimage
and then it gives me glibc error if the scanner is off.
_________________
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Wed Feb 09, 2005 5:53 pm    Post subject: Reply with quote

sane is a scanner interface, I dont use it for printing.

libusb is a usb library which I do need to use my usb printer.

Trouble is this got blown out by a crappy update about a month ago and I have been unable to find out exactly what screwed it up.

Net result I dont print with Gentoo. Great desktop system without print capability.

Just installed win2k to have printing since I have wasted enough time on flakey cups/a2sp/ghostscript or whatever the hell has crapped out this time.

Bah ! :evil:
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
nx12
Apprentice
Apprentice


Joined: 14 Jan 2004
Posts: 193

PostPosted: Sat May 28, 2005 3:39 pm    Post subject: Reply with quote

Somebody had any success in running xsane with epkowa backend?
_________________
signature sucks
Back to top
View user's profile Send private message
aricaldeira
n00b
n00b


Joined: 04 Mar 2004
Posts: 6
Location: Brasil

PostPosted: Wed Jun 01, 2005 2:23 pm    Post subject: Reply with quote

Hi All,

I just got a Stylus CX4500 to work, both to print and scan. Printing was easy, I just installed pips-scx4500_4600-cups-2.6.2-2.i386.rpm (since I couldn't compile it from source), and the printer just worked. I use cups and kde.

Scanning was a bit harder, but I just checked out and there is a new version of iscan at http://www.avasys.jp/english/linux_e/dl_spc.html

Just downloaded it, installed it with
Code:
rpm -ivh --replacefiles --nodeps iscan-1.14.0-3.i386.rpm

and iscan just started to work. It didn't work here with previous versions of iscan without some modifications, that maybe help you if:

1. Edit /etc/sane.d/dll.conf and comment out the line epson
2. Edit /etc/sane.d/epkowa.conf and add the following line:
Code:
usb 0x04b8 0x080d

You can find those values by running sane-find-scanner, they are the vendor and product codes
3. Edit /etc/hotplug/usb/libsane.usermap and add the following line:
Code:
libusbscanner 0x0003 0x04b8 0x080d 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000

4. Turn the printer off an on again, and make sure your user is in the scanner group

And that was it. Hope it works for you guys too.
Back to top
View user's profile Send private message
David916
n00b
n00b


Joined: 11 Dec 2002
Posts: 60
Location: My basement

PostPosted: Thu Jul 07, 2005 4:06 pm    Post subject: Occam's Razor Reply with quote

I don't know if this was mentioned previously, but if anyone has the problem where sane-find-scanner, scanimage, sane, etc only work as root, check to see if there is a scanner group and add yourself to it if there is. I found that the permissions on the scanner device were as follows:
Code:
-rw-rw----  1 root scanner 57 Jul  7 10:51 /proc/bus/usb/002/003

Code:
# lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 005: ID 04b8:010f Seiko Epson Corp. Perfection 1250
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

Code:
# sane-find-scanner

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

found USB scanner (vendor=0x04b8 [EPSON], product=0x010f [EPSON Scanner 010F], chip=LM9832/3) at libusb:002:005
  # 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.

Code:
# scanimage -L
device `plustek:libusb:002:005' is a Epson Perfection 1250/Photo USB flatbed scanner

All I had to do was add myself to the scanner group, logout and login again, and my scanner worked perfectly. I can even unplug it, plug it in another port, and it still works. No mods to any of the sane files or anything, just emerged sane and left it alone. Yay for simple solutions.

System:
ASUS A7V8X-X Socket A (Socket 462) VIA KT400 Motherboard
2.6.11-gentoo-r9
EPSON Perfection 1250
_________________
-David Wahl
dmwahl at wisc dot edu

$ man woman
No manual entry for woman
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Thu Jul 07, 2005 5:26 pm    Post subject: Reply with quote

Check this for setting up permissions so non-root users can access devices when using libusb.
https://forums.gentoo.org/viewtopic-p-2545791.html#2545791

Depending on your versions of software and what scanner, this may or may not already be setup for you.
This guide should work when your next device that uses libusb isn't setup automatically, or you want to change or make a different group other than "scanner"
Back to top
View user's profile Send private message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Mon May 08, 2006 12:58 pm    Post subject: Reply with quote

The only-root-access for libusb was there another time, my hackish fix is at https://forums.gentoo.org/viewtopic-p-3305680.html#3305680
_________________
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
Back to top
View user's profile Send private message
picklestix
n00b
n00b


Joined: 15 Jan 2005
Posts: 72

PostPosted: Tue May 09, 2006 5:12 am    Post subject: Reply with quote

Thanks for your suggestions. Apparantly there is still issue with this scanner and libusb.

I posted something to sane-devel list and they told me to just get a firewire cable.

For anyone else with this scanner, it's the way to go.
Back to top
View user's profile Send private message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Tue May 09, 2006 9:51 am    Post subject: Reply with quote

picklestix wrote:
Thanks for your suggestions. Apparantly there is still issue with this scanner and libusb.

I posted something to sane-devel list and they told me to just get a firewire cable.

For anyone else with this scanner, it's the way to go.


Well, the issue I described waswith udev usb permissions, not sane.....
_________________
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
Back to top
View user's profile Send private message
radio_flyer
Guru
Guru


Joined: 04 Nov 2004
Posts: 318
Location: Northern California

PostPosted: Wed May 31, 2006 10:47 pm    Post subject: Epson 2450 Scanner, sane, libusb, hotplug, ad naseum Reply with quote

I see this thread has been going on for, what, 2 years? I am in exactly the same boat as Picklestix. I have a USB Epson 2450 scanner that worked *perfectly* on an old Debian 2.4 system. It absolutely refuses to function correctly on my stable x86 2.6.16 Gentoo system. I have been all over the web looking for the 'solution', and nobody seems to have a clue.

I know the hardware works flawlessly, because when I run the Epson scanner stuff on Win98 under VMWare the scanner works perfectly. Same box, same underlying kernel, same cable, same everything.

However, when I try to access the thing from Linux directly nothing works right, or consistently. I've checked the udev isn't creating any files other than bus/usb/XXX/YYY. The hotplug script (actually scripts, as iscan and sane both plop scripts in /etc/hotplug/usb) is setting permissions correctly on /proc/bus/usb/XXX/YYY. My user is in the scanner group. I've commented out every line in /etc/sane.d/dll.conf except for net, epkowa, and v4l. Nothing. I've also tried the sane-epson backend. Still nothing. I've tried using the iscan utility you can download directly from Epson using the link found on the sane-project.org web site. No go.

The issue seems to be similar to what many other people are experiencing. sane-find-scanner always finds the scanner:
Quote:

found USB scanner (vendor=0x04b8 [EPSON], product=0x0112 [EPSON Scanner]) at libusb:005:020


However, scanimage -L doesn't see the scanner. Sometimes when I run scanimage -L after firing up the scanner for the first time, it will actually find it. Usually, it won't, and I'll receive the infamous "no scanners were identified" message. In either case, attempting to access the scanner with xsane, iscan or anything else results in 'scanner not responding', 'command timed out', or similar. If I strace the execution of these programs on those rare occasions I see numerous usb bulk timeout errors.

This URL
[url]
http://www.mail-archive.com/linux-usb-users@lists.sourceforge.net/msg09945.html
[url]
seems to suggest it's a problem with hotplug. Others suggest libusb. It seems like there are two camps: those who get the scanner working, proclaim victory and move on, and a few of us, like Picklestix and me, who have tried every suggestion under the sun and still can't get it going.

Anyway, it appears the only way to debug this is to dig into the source and see what's up. My first guess would be that libusb is broken and that's where to start looking. Since VMWare runs the scanner just fine, I suspect the kernel USB stuff, IOAPIC IRQ allocations, and other low-level infrastructure is just fine. I suppose the next trouble spot might be the sane drivers epkowa and/or epson. Most of the recent website postings say 'use the epkowa driver', but man sane-epkowa states in big bold letters "This backend should be considered alpha-quality software!" Well, that's comforting.

Anyway, enough ranting. I guess my only question is: why libusb? What's the point of making a user-space library and then not providing any convenient way of allowing anyone but root to access it without the stupid hotplug script hacks? And why does usblib play around in proc? Why not just access the low-level drives in /dev? Guess I just don't understand...
Back to top
View user's profile Send private message
cryos
Retired Dev
Retired Dev


Joined: 08 Mar 2003
Posts: 242
Location: US

PostPosted: Mon Jun 05, 2006 2:14 pm    Post subject: Reply with quote

I haven't used my scanner in months, and it was working, but I now seem to be suffering from the same issue. I am not an expert on scanning and libusb but doing a little investigation it works fine as root, my user is a member of the scanner group. The node in /proc/bus/usb/001/008 is -rw-rw---- 1 root scanner so all looks well there. Yet as my user the scanner is not accessible.
Code:
[sanei_usb] sanei_usb_open: trying to open device `libusb:001:008'
USB error: could not set config 1: Operation not permitted
[sanei_usb] sanei_usb_open: libusb complained: could not set config 1: Operation not permitted
[sanei_usb] Make sure you run as root or set appropriate permissions


As far as I can tell the permissions are correct. Is there another place I should be looking at permissions? I can scan the stuff I need to now, but I am not sure how to proceed any further and thought I would document my case here too. Hopefully I will be able to report my solution sometime soon too :)
Back to top
View user's profile Send private message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Tue Jun 06, 2006 6:47 pm    Post subject: Reply with quote

@cryos : check permissions doin "scanimage -L" as user in scanner group. If the scanner is not seen please check:
https://forums.gentoo.org/viewtopic-p-3311185.html#3311185 (a script OR a tutorial to manually setting
fine the udev rule of permission for the scanner, if you choose script turn on one scanner at time).
_________________
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
Back to top
View user's profile Send private message
cryos
Retired Dev
Retired Dev


Joined: 08 Mar 2003
Posts: 242
Location: US

PostPosted: Tue Jun 06, 2006 7:42 pm    Post subject: Reply with quote

Thanks for the help Matteo! Finally got it working as my user and the secret is the permissions in /dev/bus/usb/ that were incorrect. Check out bug 50934 for more details. Hopefully this will get resolved soon - I will see if I can figure out anymore on the weekend if no progress has been made.

Thanks once again Matteo!
Back to top
View user's profile Send private message
djs
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2002
Posts: 96
Location: CA

PostPosted: Thu Sep 07, 2006 7:40 pm    Post subject: The real fix for these problems Reply with quote

The real fix for these problems is to remove coldplug from your default runlevel. If coldplug is running, it will detect the usb device and put it in /dev/bus/usb/... with root:root permissions. Hotplug, however, seems to do the job correctly, with root:usb permissions.

Code:
rc-update del coldplug default


NOTE: whatever modules were being detected by coldplug must be added to your /etc/modules.autoload.d/kernel-2.6 file so you get your eth0, for example, at your next boot. For me, this was just e100, the intel nic driver module.

Have fun with sane! :D

/djs
Back to top
View user's profile Send private message
engineermdr
Guru
Guru


Joined: 08 Nov 2003
Posts: 305
Location: Altoona, WI, USA

PostPosted: Sat Jan 27, 2007 5:08 pm    Post subject: Reply with quote

I've been trying half the day to get my once working Epson Stylus CX5400 scanner working again. I'm not even at the permissions problem yet, running everything as root. I've followed the howto and the suggestions in this thread. I have the infamous
Code:
# sane-find-scanner -q
found USB scanner (vendor=0x04b8 [EPSON], product=0x0808 [USB MFP]) at libusb:001:007
Code:
# 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).

I see in the system log
Code:
usb 1-1: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1
everytime I run scanimage.

This makes me think that somehow the printer functionality is interfering with the scanning functionality. Could this be the issue? Any suggestions?
Back to top
View user's profile Send private message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Sun Jan 28, 2007 3:18 pm    Post subject: Reply with quote

mdr wrote:

This makes me think that somehow the printer functionality is interfering with the scanning functionality. Could this be the issue? Any suggestions?


I can't see if someone else tried before so...... Try both sane-find-scanner and then scanimage first
as normal (nonroot, but in scanner group) user, and then try that as root.

Also check at http://www.sane-project.org/ if you need to supply/configure a firmware file for your scanner to work,
or if there's something more required.....

In your situation, I would also make sure that the udev rule in /etc/udev/rules.d/99-libsane.rules:
Code:
SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="0808", MODE="660", GROUP="scanner"

would really catch my scanner , checking thet "04b8" and "0808" aren't wrong with udevinfo.... (or usbview)
_________________
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
Back to top
View user's profile Send private message
engineermdr
Guru
Guru


Joined: 08 Nov 2003
Posts: 305
Location: Altoona, WI, USA

PostPosted: Sun Jan 28, 2007 7:18 pm    Post subject: Reply with quote

Quote:
I can't see if someone else tried before so...... Try both sane-find-scanner and then scanimage first
as normal (nonroot, but in scanner group) user, and then try that as root.
Code:
$ id
uid=10806(michael) gid=100(users) groups=10(wheel),11(floppy),18(audio),19(cdrom),27(video),85(usb),100(users),250(portage),409(scanner)
$ sane-find-scanner -q
found USB scanner (vendor=0x04b8 [EPSON], product=0x0808 [USB MFP]) at libusb:001:002
$ 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).
Same as with root.
Quote:
Also check at http://www.sane-project.org/ if you need to supply/configure a firmware file for your scanner to work,
or if there's something more required.....

I looked there and I don't see any firmware requirements, in fact, support is rated as good.
Quote:
In your situation, I would also make sure that the udev rule in /etc/udev/rules.d/99-libsane.rules:

Here's from mine:
Code:
# Epson CX-5400
SYSFS{idVendor}=="04b8", SYSFS{idProduct}=="0808", MODE="660", GROUP="scanner"

Now I've never used udevinfo before, but after playing around, the only thing relavent I can get is
Code:
# udevinfo -q all -n /dev/bus/usb/001/002
P: /class/usb_device/usbdev1.2
N: bus/usb/001/002
so it's recognizing it's there, and the dev node has the right permissions
Code:
ls -l /dev/bus/usb/001/002
crw-rw---- 1 root scanner 189, 1 Jan 28 13:07 /dev/bus/usb/001/002
I'm not sure what else to check. I compiled sane-backends with the usb USE flag.
Back to top
View user's profile Send private message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Mon Jan 29, 2007 9:23 am    Post subject: Reply with quote

The only other possible "easy fix" that comes in my mind is to check that
you specified the right backend in /etc/make.conf ......

However IMHO is really strange that root doesn't gets the scanner with scanimage -L ,
this means is not a permission issue (that's 98% of the errors) but something else.....
_________________
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
Back to top
View user's profile Send private message
engineermdr
Guru
Guru


Joined: 08 Nov 2003
Posts: 305
Location: Altoona, WI, USA

PostPosted: Mon Jan 29, 2007 2:07 pm    Post subject: Reply with quote

Yep, like I said in my first post, I'm way before dealing with permission problems.

Seems like the only clue is my message in the system log:
Code:
usb 1-1: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1
Does anybody have a clue what this message means?
Back to top
View user's profile Send private message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Wed Jan 31, 2007 7:45 pm    Post subject: Reply with quote

mdr wrote:
Does anybody have a clue what this message means?

I'm just guessing but usblp should be an interface for usb printers....
Do you moved the scanner to the usb port that was previously of the printer?
Try to move the scanner to another usb port, if you can, and check if it gives the same issue...
_________________
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
Back to top
View user's profile Send private message
engineermdr
Guru
Guru


Joined: 08 Nov 2003
Posts: 305
Location: Altoona, WI, USA

PostPosted: Wed Jan 31, 2007 8:06 pm    Post subject: Reply with quote

Matteo Azzali wrote:
mdr wrote:
Does anybody have a clue what this message means?

I'm just guessing but usblp should be an interface for usb printers....
Do you moved the scanner to the usb port that was previously of the printer?
Try to move the scanner to another usb port, if you can, and check if it gives the same issue...

Actually, the printer and the scanner are one and the same device, so there's only 1 usb cable.
Back to top
View user's profile Send private message
lyhana8
n00b
n00b


Joined: 28 Feb 2007
Posts: 31
Location: France

PostPosted: Wed Feb 28, 2007 5:19 am    Post subject: Epson perfection 1670 Reply with quote

1) I have no idea how to install my scanner (espon perfection 1670) on -any- linux ;
2) some quick read give me a working scanner as root (I don't know how to give right to my user on gentoo ;) ;
3) I'm not an expert so I try many think, maybe useless, but at least that work (don't follow this think it's bad X) ;
So i follow these step :

I add the usb USE in my /etc/make.conf
Code:

# emerge -av sane-backends sane-frontends
# emerge iscan (doesn't seems to work even in root)


Some tutorial talk about /etc/sane.d/snapscan.conf, I replace the following generic line by :
Code:
firmware /usr/share/sane/snapscan/esfw30.bin

that seem to be the windows file, I download using the following command (from http://www.flexion.org/site/index.php?gadget=StaticPage&action=Page&id=15):
Code:

# wget http://www.commercialventvac.com/~jeffs/ESFW30.BIN


then copy in /usr/share/sane/my_Backend (see http://www.sane-project.org/sane-mfgs.html). As snapscan folder doesn't exists I create before copy :
Code:

# mkdir /usr/share/sane/snapscan
# cp ESFW30.BIN /usr/share/sane/snapscan


I made this to "locate" my scanner :
Code:

# scanimage -L
device `snapscan:libusb:001:003' is a EPSON EPSON Scanner flatbed scanner

this mean I must look at : /dev/bus/usb/001/ (on the port 003)

So i add this
Code:
/dev/bus/usb/001 bus=usb

in my /etc/saned.d/snapscan.conf

Xsane wokr as root, now i need to give right to my user, to test i used :
Code:
scanimage >image.test

scan and send to image.test (25M for me :))

I think i don't forgot anything so good luck.
_________________
" Share aware "
Back to top
View user's profile Send private message
Matteo Azzali
Retired Dev
Retired Dev


Joined: 23 Sep 2004
Posts: 1133

PostPosted: Fri Mar 02, 2007 4:08 pm    Post subject: Re: Epson perfection 1670 Reply with quote

lyhana8 wrote:

Xsane wokr as root, now i need to give right to my user, to test i used :


This is usually done by adding the user to the scanner group (check if he's added also to usb group).

Note : the firmware file could be everywhere you want, just modifying the firmware line at the start of
/etc/sane.d/snapscan.conf file :
Code:

firmware /usr/local/esfw30.bin

_________________
Every day a new distro comes to birth. Every day a distro "eats" another.
If you're born distro, no matter what, start to run.
---- http://www.linuxprinting.org/ ---- http://tuxmobil.org/
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3013
Location: Edge of marsh USA

PostPosted: Thu Oct 29, 2009 6:26 pm    Post subject: Reply with quote

This may be helpful to some of you, even though this is an old thread. I got my Epson Perfection 3170 working correctly with the software provided by avasys: See: https://forums.gentoo.org/viewtopic-p-6035076.html#6035076
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6
Page 6 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum