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  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
patrickfo
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2002
Posts: 79
Location: France

PostPosted: Thu Feb 26, 2004 9:25 am    Post subject: Reply with quote

i have a epson scanner perfection 1660 photo and see what i have done to make it work:

1) in dll.conf # before all backends except epson
2) in epson.conf i put usb VENDOR PRODUCT for me:
Code:
usb 0x4b8 0x11e

note: if you put a think like libusb:001:002 in epson.conf, every time you disconnect and reconnect the scanner the last number change and you must reedit epson.conf ;)
other note: to find VENDOR and PRODUCT see result of sane-find-scanner or cat /proc/bus/usb/devices.
3) then i put in usb.usermap
Code:
epson_scanner       0x0003 0x04b8   0x011e    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00            0x00            0x00000000

you need this to set the perms with a script named epson_scanner evrytime the scanner is connected
4)i wrote the script ( fully copied from the net :oops: )
Code:
#!/bin/bash

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
        chown root "${DEVICE}"
        chgrp users "${DEVICE}"
        chmod 660 "${DEVICE}"
fi

( i have just changed the group users :D )

5) and now my scanner work for the users group but i have a pb: i have to wait more than 1 minute for xsane to initialise my scanner. i have tried with libusb-1.8
( in /usr/local/portage/dev-libs/libusb you just have to copy libusb-1.7-r1.ebuild to libusb-1.8.ebuild then
Code:
emerge -uD world
revdep-rebuild

the last line is needed because sane-backends, xsane and some other progs must be linked to the new library libusb.so, and don't miss to put in you /etc/make.conf the "usb" flag in USE="..." :D )
... but the delay is the same... any idea?
Back to top
View user's profile Send private message
Sudrien
Apprentice
Apprentice


Joined: 01 Oct 2003
Posts: 207
Location: Michigan

PostPosted: Sat Feb 28, 2004 12:10 am    Post subject: Reply with quote

patrickfo wrote:

2) in epson.conf i put usb VENDOR PRODUCT for me:
Code:
usb 0x4b8 0x11e

note: if you put a think like libusb:001:002 in epson.conf, every time you disconnect and reconnect the scanner the last number change and you must reedit epson.conf ;)


actually, you could put several instances - like

usb libusb:001:002
usb libusb:001:003
usb libusb:001:004
usb libusb:001:005

but putting in the sane-find-scanner info is more sophisticated. :)


patrickfo wrote:

4)i wrote the script ( fully copied from the net :oops: )
Code:
#!/bin/bash

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
        chown root "${DEVICE}"
        chgrp users "${DEVICE}"
        chmod 660 "${DEVICE}"
fi

( i have just changed the group users :D )



If you aren't picky of who uses the scanner, I would shorten it more;

Code:


if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
        chmod 666 "${DEVICE}"
fi



See if that speeds it up any.

Oh yeah- If that doesn't work, remove the commenting in the conf file. Sane may be trying to find those files.

One more thing- are you sure that adding "usb" isn't for supporting the old kernel driver? My libusb / sane-backends work fine without.


-Sud.
_________________
...
Back to top
View user's profile Send private message
patrickfo
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2002
Posts: 79
Location: France

PostPosted: Sat Feb 28, 2004 3:25 pm    Post subject: Reply with quote

i have tried 2.6.4-rc1 to see if pb disapeared but... no
so i have walked the web with google and found that sane-backend was not for my scanner 8O
see http://www.buzzard.org.uk/jonathan/scanners-usb.html for more info
and then found that a backend and a frontend was written for it 8O
see http://www.epkowa.co.jp/english/linux_e/index.html
i am not at home for now, but i will give it a try this night, or perhaps tomorrow :roll:
ah, and for 2.6.4-rc1 my scanner is allways found by sane-find-scanner but only found with "usb libusb:XXX:XXX" in epson.conf
scanimage -L return immediatly with "no scanner found..." if no "usb..." line and after a long delay and the same answer if "usb VENDOR PRODUCT"... :)
and only epson.conf is uncommented in dll.conf
friendly
ps: it seems that for some epson scanners, plustek backend works, but not for mine :(
Back to top
View user's profile Send private message
lyz
n00b
n00b


Joined: 17 Feb 2003
Posts: 14

PostPosted: Mon Mar 01, 2004 11:49 pm    Post subject: oddities Reply with quote

patrickfo wrote:
i have a epson scanner perfection 1660 photo and see what i have done to make it work:

1) in dll.conf # before all backends except epson
2) in epson.conf i put usb VENDOR PRODUCT for me:
Code:
usb 0x4b8 0x11e

note: if you put a think like libusb:001:002 in epson.conf, every time you disconnect and reconnect the scanner the last number change and you must reedit epson.conf ;)
other note: to find VENDOR and PRODUCT see result of sane-find-scanner or cat /proc/bus/usb/devices.
3) then i put in usb.usermap
Code:
epson_scanner       0x0003 0x04b8   0x011e    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00            0x00            0x00000000

you need this to set the perms with a script named epson_scanner evrytime the scanner is connected
4)i wrote the script ( fully copied from the net :oops: )
Code:
#!/bin/bash

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
        chown root "${DEVICE}"
        chgrp users "${DEVICE}"
        chmod 660 "${DEVICE}"
fi



Did all of this, but I forgot one important detail that I though I'de share. Make sure the epson_scanner script has execute permissions or it won't execute. :roll:

The first time I try to access the scanner as a member of the users group after it hotplugs fails. About every other time I try it works ok. It's kinda funky.
Back to top
View user's profile Send private message
dopey
Apprentice
Apprentice


Joined: 10 Feb 2003
Posts: 235

PostPosted: Mon Mar 08, 2004 5:28 am    Post subject: Reply with quote

I'm having the same problem with an Epson 1660 USB scanner and 2.6.3 kernel. I haven't been able to get it to work since going to a 2.6.x kernel. Worked fine with the old scanner module in 2.4.x.

scanimage -L and sane-find-scanner both find the scanner. My epson.conf file is configured with the proper device id and everything. The hotplug scripts are properly setting the permissions on the /proc nodes.

However scanimage -T fail. xsane detects the scanner, but when i try to scan or acquire a preview it just hangs with a bunch of the same error messages in my kernel log. I've tried libusb 0.17 and 0.18 with no luck.

What kernel version were you able to revert to in order to get this to work?

imesg wrote:
kurtb wrote:


...

However, I have set things up as mentioned in the link and I'm seeing some very peculiar weirdness. Sometimes when I run xsane or scanimage it works just fine. But most of the time it sits there quite a while and either says no devices found or it eventually works. While xsane is sitting there I see the following in my log files.:
Code:

usb 1-2: bulk timeout on ep1in
usbfs: USBDEVFS_BULK failed dev 3 ep 0x81 len 1 ret -110
usb 1-2: bulk timeout on ep2out
usbfs: USBDEVFS_BULK failed dev 3 ep 0x2 len 2 ret -110
usb 1-2: bulk timeout on ep1in
usbfs: USBDEVFS_BULK failed dev 3 ep 0x81 len 1 ret -110


Anyone else experiencing this? Might this be a kernel bug?


Yes, I have this problem however, maybe not as bad as you describe. I do not know the problem. I suspect the kernel. I had to revert to a previous kernel to get my printer to work. All usb of course.

Gene
Back to top
View user's profile Send private message
okram
n00b
n00b


Joined: 06 Aug 2002
Posts: 74
Location: Taipei, Taiwan

PostPosted: Mon Mar 08, 2004 8:43 am    Post subject: Reply with quote

I'm also still battling with this problem, with an Epson 2400 Photo. I'm using development-sources 2.6.4-rc1, libusb-0.1.8, sane-backends-1.0.13-r3, but have tried downgrades in various permutations :(

I've written an executable script called epson_scanner in /etc/hotplug/usb/, with logger lines inserted to check when and whether the script is called. It is, and works: soon as I turn on the scanner, the permissions on the device are changed. In dll.conf all but epson.conf are commented out. In epson.conf only the line "usb 0x04b8 0x011b" is uncommented.

1) sane-find-scanner finds the scanner.
2) scanimage -L doesn't. Or rather, it mostly doesn't find the scanner -- plenty of log messages about "bulk timeout on ep1in" and "usbfs: USBDEVFS_BULK failed dev 3 ep 0x81 len 4 ret -110" -- but sometimes does after more than two minutes wait and, on rare occasions, finds it immediately.
3) When scanimage -L finds the scanner, xsane will start and recognise the scanner by its internal name GT9300, but scanning will fail with "Failed to start scanner. Error during device I/O."

Any help?
Back to top
View user's profile Send private message
okram
n00b
n00b


Joined: 06 Aug 2002
Posts: 74
Location: Taipei, Taiwan

PostPosted: Mon Mar 08, 2004 11:45 am    Post subject: Reply with quote

Well, just to let others know who might have the same problem: after downgrading libusb to libusb-0.1.7-r1 and recompiling sane-backends-1.0.13-r3, it now works. Also recompiled kdegraphics, media-gfx/xsane-0.91 and sane-frontends for good measure.

It's still painfully slow, but works.
Back to top
View user's profile Send private message
dopey
Apprentice
Apprentice


Joined: 10 Feb 2003
Posts: 235

PostPosted: Mon Mar 08, 2004 10:43 pm    Post subject: Reply with quote

so wanna hear something crazy :). scanimage fails. scanimage -L finds the scanner, but it refuses to scan.
However now xscanimage and xsane both work properly unless the scanner goes to sleep (light goes off). if the scanner is sleeping and i fire up xscanimage or xsane, it hanges the programs for a couple of minutes before they finally start up and things work.

however, CLI scanimage does not work at all. I did nothing to change anyhthing other than set a bunch of SANE_DEBUG_* environment variables.
I'm wondering if part of the DEBUG stuff sent some kind of extra initialization to the scanner. I'm planning on powering the scanner down and rebooting tonight to see if my luck holds.
Back to top
View user's profile Send private message
tucolino
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2003
Posts: 90

PostPosted: Tue Mar 30, 2004 11:10 am    Post subject: Reply with quote

got my perfection 1260 working with linux-2.6.3-gentoo-r1.

it works with both iscan and xsane. for xsane, i am using the plustek backend. make sure that you have "plustek" in /etc/sane.d/dll.conf

for iscan, which i find better with coors, you need ot make sure that /etc/sane.d/dll.conf has "epkowa" in it. also, it is also important that you add "usb libusb:004:002" to /etc/sane.d/epkowa.conf

hope this helps.

tuco
_________________
Alvaro Ramirez
http://www.xenodium.com/blog
eye candy corner
Back to top
View user's profile Send private message
patrickfo
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2002
Posts: 79
Location: France

PostPosted: Tue Mar 30, 2004 10:35 pm    Post subject: woahh it work now with kernel 2.6.5-rc3 Reply with quote

i don't change anything from my previous post and now it work with kernel 2.6.5-rc3 even if i plug and unplug the scanner and IMMEDIATLY and VERY WELL like before module was removed from kernel :D :D :D
just try it and tell us
ps: i am in ~x86 with hotplug-20040329
good luck ;)
Back to top
View user's profile Send private message
alfie
n00b
n00b


Joined: 26 Feb 2004
Posts: 2

PostPosted: Fri Apr 09, 2004 2:06 pm    Post subject: scanimage -L timeout errors , disable hotplug? Reply with quote

I have a similar problem in 2.6.4-gentoo-r1 with a usb scanner (Epson 2450, libusb) where scanimage -L is flakey, and scanning is erratic and slow, sometimes freezing up the entire usb system. (My other usb devices no longer are accessible) I use Epson's iscan, scanimage -L, xsane. epson or epkowa backend.

tail -f /var/log/messages reveals timeout errors with the scanner.

Here is a reference to a post in linux-usb-users, where the errors went away when hotplug was disabled.

http://www.mail-archive.com/linux-usb-users@lists.sourceforge.net/msg09945.html
Back to top
View user's profile Send private message
Säck
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 141
Location: Switzerland

PostPosted: Sat Apr 24, 2004 3:53 pm    Post subject: Reply with quote

Hi,
After reading this post, I got my scanner partially working.
I can scan now as root, but I just don't get to change the permissions automatically.
I tried with the script:

the file is stored under /etc/hotplug/usb/epson_scanner and is executable.
Code:
#!/bin/bash

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
        chown root "${DEVICE}"
        chgrp users "${DEVICE}"
        chmod 660 "${DEVICE}"
fi


but somehow I doesn't get executet when I plug my scanner in.

my /etc/hotplug/usb.usermap

Code:
# usb module         match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
#Epson Perfection 1660 Flatbed Scanner

epson_scanner      0x0003 0x04b8 0x011e 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 0x000 0x000000000


The second comment is all one line only epson_scanner is not #


ah, when i change permission by hand it works

Code:
chmod 666 /proc/bus/usb/001/*


WHY isn't the script working as it should?
_________________
Remember: Gentoo Rocks
Back to top
View user's profile Send private message
patrickfo
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2002
Posts: 79
Location: France

PostPosted: Sat Apr 24, 2004 7:01 pm    Post subject: Reply with quote

try to:
Code:
cat /proc/bus/usb/devices

and look if Vendor and ProdID are the sames as mines ;)
or do an
Code:
rc-update add hotplug default
/etc/init.d/hotplug start


good luck ;)
Back to top
View user's profile Send private message
Säck
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 141
Location: Switzerland

PostPosted: Sat Apr 24, 2004 7:52 pm    Post subject: Reply with quote

Code:

gentdell root # cat /proc/bus/usb/devices

....

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=04b8 ProdID=011e Rev= 1.00
S:  Manufacturer=EPSON
S:  Product=EPSON Scanner
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
gentdell root #

I didn't just copy blindly, we just seem to have the same scanner. 1660 photo.

hotplug is enebled per default.
?? I don't know why it doesn't work. I don't have any problems unpluging and repluging my mouse, pda or external hd (firewire) ??
_________________
Remember: Gentoo Rocks
Back to top
View user's profile Send private message
patrickfo
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2002
Posts: 79
Location: France

PostPosted: Sat Apr 24, 2004 9:10 pm    Post subject: Reply with quote

seems that something wrong in hotplug:
in fact i have epson_scanner in 2 places:
1) /etc/hotplug/usb/epson_scanner
2) /etc/hotplug/epson_scanner

surely a mistake when i installed my scanner ;) but... if i remove the second,
perms are unsets UNTIL I DO under root:
Code:
scanimage -L

if i put epson_scanner in the two places perms are ok when i plug in my scanner.
could you test it, if you find same things like me i will try to find where is the bug ;)
Back to top
View user's profile Send private message
Säck
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 141
Location: Switzerland

PostPosted: Sun Apr 25, 2004 11:08 am    Post subject: Reply with quote

@patrickfo:

No luck. :(
I'm wondering what could be the cause of that.
Maybe the kernel I use? I'm using 2.6.6-mm6 with some ieee1394 and the move-__this_module-to-modpost.patch patch so that i can load the nvidia dirvers.
But I seriously have no idea what could be the cause.
I still use libusb-1.7-rc1 but I don't think this is the cause. I was thinking about upgrading to version 1.8 as you suggestet, but I couldn't find the programm:
Code:
revdep-rebuild

what package does it belong to?

????

edit: oh and another question: what are perms?
_________________
Remember: Gentoo Rocks
Back to top
View user's profile Send private message
Säck
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 141
Location: Switzerland

PostPosted: Sun Apr 25, 2004 4:18 pm    Post subject: Reply with quote

changed to the 2.6.6-rc1 kernel, same problem (i didn't think that this is the case)

I'm wondering if i should see any output in /var/log/messages when i plug in the scanner (like which scripts are executed or something)
is there a log-file i can watch and see what hotplug is doing?

i also realized that i had some hex numbers in the usb.usermap set to the wrong amount of bytes, I changed it, but it didn't do anything. It looks now like that:

Code:
epson_scanner              0x0003 0x04b8   0x011e    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00            0x00            0x00000000

_________________
Remember: Gentoo Rocks
Back to top
View user's profile Send private message
patrickfo
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2002
Posts: 79
Location: France

PostPosted: Sun Apr 25, 2004 5:44 pm    Post subject: Reply with quote

ok Säck
perms are the flags you change with chmod chown or chgrp, that is what the script epson_scanner do ;)
revdep-rebuild belong to gentoolkit and is needed when you upgrade some package needed by other packages: it find libraries needed by a package and no more present on your computer. exemple libusb-0.1.so.3 replaced by libusb-0.1.so.4 ( perhaps;) ) by upgrading to libusb-1.8.
to merge libusb-1.8 do an
Code:
echo "dev-libs/libusb ~x86" >> /etc/portage/portage.keywords
emerge -Dp libusb         # to see if needed packages don't block you
                                    # and if all seems ok ;)
emerge -D libusb
revdep-rebuild               # normaly sane-backends will be rebuilt


i'm in ~x86 and kernel 2.6.5 with linux-headers-2.6.5
if your scanner work for root, i think that you just have a pb with "perms" in /proc/bus/usb directory, anyway try to do an revdep-rebuild to see how your installation is ;)
good luck
Back to top
View user's profile Send private message
Säck
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 141
Location: Switzerland

PostPosted: Fri Apr 30, 2004 2:06 pm    Post subject: Reply with quote

as a matter of fact, i don't get it to work.
I don't know why, but i agree that it's a problem with "perms" :lol: wow, i learned something, thanks. well, i tried with different kernels, with different version of libusb and hotplug, no luck.

anyone an idea?
_________________
Remember: Gentoo Rocks
Back to top
View user's profile Send private message
twilight
Tux's lil' helper
Tux's lil' helper


Joined: 09 Feb 2003
Posts: 144
Location: Linuxland

PostPosted: Wed May 05, 2004 2:10 pm    Post subject: still no solution here Reply with quote

Hi folks,

ive got the same problem and i have still
no solution!

Neither creating a scanner-group and changing
the permissions nor creating a hotplug-script
or else brought a solution to me!

My usb is working fine... digi-cam, printer, mouse...
since the new kernel i have to use libusb... okidoke...
as root "sane-finde-scanner" is able to find the scanner

Code:
found USB scanner (vendor=0x04a9, product=0x2204 [CanoScan FB630U]) at libusb:002:002


but as user i don`t get any result



Code:
  # No USB scanners found. If you expected something different, make sure that
  # you have loaded a driver for your USB host controller and have installed a
  # kernel scanner module.


so, my permissions of /proc/bus/usb

Code:
bash-2.05b# ls -lisa /proc/bus/usb/
total 0
5279 0 drwxrwx---  4 root scanner 0 May  4 18:44 .
4130 0 dr-xr-xr-x  5 root root    0 May  4 18:44 ..
6119 0 drwxrwx---  2 root scanner 0 May  4 16:44 001
6191 0 drwxrwx---  2 root scanner 0 May  4 16:44 002
6117 0 -rwxrwx---  1 root scanner 0 May  4 16:44 devices


my user is member of the group scanner...

but i don`t have permission to read the
proc-folder :-((

any help is welcome!!

Greetz,

twilight
_________________
- The day Micro$oft produces anything that doens`t suck, is probably the day, they start making vacuum cleaners-

"The Box said: Requires Micro$oft Windows XP or better, so I installed Linux"
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 May 05, 2004 8:43 pm    Post subject: Reply with quote

Hi ,

you need to post the contents of /proc/bus/usb/002, we cant see the scanner device from your post.

BTW what kernel are you running?
Code:
uname -a


Quote:
but i don`t have permission to read the
proc-folder


so do it as root, the permissions wont change depending upon who is looking. 8)
Back to top
View user's profile Send private message
twilight
Tux's lil' helper
Tux's lil' helper


Joined: 09 Feb 2003
Posts: 144
Location: Linuxland

PostPosted: Wed May 05, 2004 9:55 pm    Post subject: Reply with quote

Hi,

sure, i`ve done everything as root and i am aware that the
permissions will reset after reboot, but for that i could use
that hotplug-script...

after a reboot the content of my /proc/bus/usb/002
looks like:

Code:

6254 0 -rw-r--r--  1 root root 43 May  5 21:59 001
6472 0 -rw-r--r--  1 root root 50 May  5 22:00 002
6660 0 -rw-r--r--  1 root root 50 May  5 22:00 003


my kernel is version 2.6.5 from (so, with!!) gentoo-patches.

after resetting the permissions of the 002-file (the scanner)
the content looks like:

Code:

6254 0 -rw-r--r--  1 root root    43 May  5 21:59 001
6472 0 -rwxrwx---  1 root scanner 50 May  5 22:00 002
6660 0 -rw-r--r--  1 root root    50 May  5 22:00 003


so, as you can see i was setting the permissions to 770 instead
of 660, which won`t work either...

no i test sane-find-scanner again as root and he`s detecting the
scanner properly... a scanimage -L reports the perfect right
scanner!!

now i exit that su-console and try again as user and... wow,
look there, sane-find-scanner finds it and scanimage -L reports
the right scanner also...

ahm... ok, gimp-2.0, plugin for xsane works... finds the scanner
and...

ah, odd, i can`t scan... it says that the device is busy!

ok maybe the environment wasn`t properly updated after i
created that scanner-group so that i couldn`t scan... i will
now try that boot-script and tell you if it works after a reboot...

kindest regards,

twilight
_________________
- The day Micro$oft produces anything that doens`t suck, is probably the day, they start making vacuum cleaners-

"The Box said: Requires Micro$oft Windows XP or better, so I installed Linux"
Back to top
View user's profile Send private message
twilight
Tux's lil' helper
Tux's lil' helper


Joined: 09 Feb 2003
Posts: 144
Location: Linuxland

PostPosted: Wed May 05, 2004 10:20 pm    Post subject: Reply with quote

hi again,

so, now that i got this "to work" i created that bootscript
and it seems to work fine... the permissions are set exactly
the way they need to be!

But still there`s the problem with "can not start scanner: device busy"

Maybe anybody has an idea for that??

Greetings,

twilight
_________________
- The day Micro$oft produces anything that doens`t suck, is probably the day, they start making vacuum cleaners-

"The Box said: Requires Micro$oft Windows XP or better, so I installed Linux"
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 May 05, 2004 10:42 pm    Post subject: Reply with quote

OK, you have moved forwards.

However the device busy is another issue intirely. The usb is there and the hotplugging is working and you have all the permissions correct. So in this respect your system is setup correctly.

When you said your scanner was working as root , I thought you meant your scanner was *working*.

Sadly I have exactly the same pb !! :evil:

I did have this hardware working at one stage and got decent scans so there is hope for this scanner. Hwvr, something changed and I got back to the "device busy" syndome.

I have been changing loads of stuff around trying to get various hardware sorted so I am unable to say exactly what borked the scanner driver or to go back to a working state.

What I can tell you is that it was recent ck-sources that got it working.

Usually I use love-sources and it was when I first tested ck that it magically fixed the scanner. It didnot last though and I now have exactly the same pb with ck sources as well.

You may like to try ck and see if it does some magic for you, it is reputed to be good on difficult usb pbs.

If something changes for you let me know. I would love to get my scanner working again but it isnot my top priority.:cry:

PS check you hotplugging script by pulling the usb lead and replugging , you should see the scanner move to 002/003 , checks perms.
8)
Back to top
View user's profile Send private message
kurtb
n00b
n00b


Joined: 05 Nov 2003
Posts: 23

PostPosted: Wed May 05, 2004 11:42 pm    Post subject: Reply with quote

Ok, here is what I did to get my Epson Perfection 2400 Photo usb scanner going. First off I'm running 2.6.5-gentoo-r1, libusb-0.1.8, sane-backends-1.0.13-r3, and xsane-0.91.

My /etc/saned/epson.conf looks like:
Code:

# epson.conf
#
# here are some examples for how to configure the EPSON backend
#
# SCSI scanner:
#scsi EPSON
#
# Parallel port scanner:
#pio 0x278
#pio 0x378
#pio 0x3BC
#
# USB scanner - only enable this if you have an EPSON scanner. It could
#               otherwise block your non-EPSON scanner from being
#               recognized.
#               Depending on your distribution, you may need either the
#               first or the second entry.
usb


Now, I set my scanner up with hotplug.
My /etc/hotplug/usb.usermap looks like:

Code:

# usb module         match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
epson_scanner 0x0003 0x04b8 0x011b 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000


Now I initially tried the following script for /etc/hotplug/usb/epson_scanner which can be found online:
Code:

#!/bin/bash

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
        chown root "${DEVICE}"
        chgrp users "${DEVICE}"
        chmod 660 "${DEVICE}"
fi


However, on boot up for some reason the DEVICE variable doesn't get set so it fails to execute the body of the if statement so scanning doesn't work because the permissions are wrong. I'm not sure if this is a libusb bug or hotplug bug. However, I came up with an ugly little hack that will work. Its not the cleanest way to get the job done but it works. Basically, I use lsusb to grab the device info and then set the permissions.

So now my /etc/hotplug/usb/epson_scanner looks like:

Code:
#!/bin/bash

scanner=/proc/bus/usb
scanner=$scanner/`/usr/sbin/lsusb | grep 04b8 | awk '{print $2 "/" $4}' | cut -c1-7`

chown root:users $scanner
chmod 660 $scanner


I'm just using users for the group here since that works for me. This always works for me and I don't have that weird problem where xsane would hang there for a bit anymore. I grepped for 04b8 because that is the vendor id for all epson scanners so I can count on it being there for my scanner. That value can be gathered from sane-find-scanner.
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=0x011b [EPSON Scanner]) 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.

  # Scanners connected to the parallel port or other proprietary ports can't be
  # detected by this program.



Like I said it ain't pretty, but it works. If that helps out somebody then it was worth sharing.
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  Next
Page 2 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