LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-01-2007, 10:53 AM   #1
greatgoogamooga
LQ Newbie
 
Registered: May 2006
Posts: 24

Rep: Reputation: 15
Does Sane need udev?


I recently upgraded from Kubuntu 6.10 to 7.04. I have an Acer 640u scanner attached to my computer which worked with Sane under Kubuntu 6.10. when I installed 7.04, sane would not detect the scanner, either as root nor as a user. I have copied the firmware to my /usr/share/sane/snapscan folder and modified the /etc/sane.d/snapscan.conf file, using the same firmware which worked under 6.10.

As I was looking for the culpret, I noticed that there is no scanner in the /dev directory in any form (usbscanner, scanner0, usb/scanner, etc). sane-find-scanner correctly identifies my scanner and shows it at libusb 001:006. In the /etc/udev/rules.d/60-sane rules (something like that, I'm at work right now) it has a listing for my snapscan scanner, but it does not appear to be creating a device.

Should I edit the rule in udev? I dont' even remember if udev created at device in my old version or not.

TIA

Goog
 
Old 10-01-2007, 02:51 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Is /proc/bus/usb mounted? As far as I remember, libusb does not use /dev.
 
Old 10-01-2007, 06:10 PM   #3
greatgoogamooga
LQ Newbie
 
Registered: May 2006
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by raskin View Post
Is /proc/bus/usb mounted? As far as I remember, libusb does not use /dev.
Yes, /proc/bus/usb is mounted.
 
Old 10-01-2007, 09:50 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
I created just a script that runs
xsane <driver>:$(sane-find-scanner | grep <model> | sed -e 's/.* at //')
If you specify USB address explicitly xsane starts.
 
Old 10-02-2007, 06:29 AM   #5
greatgoogamooga
LQ Newbie
 
Registered: May 2006
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by raskin View Post
I created just a script that runs
xsane <driver>:$(sane-find-scanner | grep <model> | sed -e 's/.* at //')
If you specify USB address explicitly xsane starts.
is the <driver> argument the .bin file or the backend?

I appreciate the help I'm getting, but still unclear about why it no longer works in Kubuntu 7.04. Was there a change in libusb?

Goog
 
Old 10-02-2007, 07:26 AM   #6
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
<driver> is backend name, like gt68xx for me. Maybe they ruined something in xsane..
 
Old 10-02-2007, 06:36 PM   #7
greatgoogamooga
LQ Newbie
 
Registered: May 2006
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by raskin View Post
<driver> is backend name, like gt68xx for me. Maybe they ruined something in xsane..
I tried this by finding the scanner first with sane-find-scanner, then running the command:

xsane snapscan:libusb:002:008

The command returned with "Failed to open device 'snapscan:libusb:002:008' Invalid Argument.

Goog
 
Old 10-02-2007, 09:16 PM   #8
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Hm.. Try 'strace -f -o xsane.strace xsane snapscan:libusb:002:008' and post xsane.strace . Also try unloading ehci_hcd and ohci_hcd and loading uhci_hcd before plugging scanner.
 
Old 10-03-2007, 07:15 PM   #9
greatgoogamooga
LQ Newbie
 
Registered: May 2006
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by raskin View Post
Hm.. Try 'strace -f -o xsane.strace xsane snapscan:libusb:002:008' and post xsane.strace . Also try unloading ehci_hcd and ohci_hcd and loading uhci_hcd before plugging scanner.
The output is:

umovestr: Input/output error
umovestr: Input/output error
umovestr: Input/output error

Sane comes back with "Failed to open device 'snapscan:libusb:002:008': Invalid Argument.

It's got to be a libusb thing. Sane-find-scanner is finding the device, it recognizes it as snapscan, even if I dont' specify it, but it seems like sane doesn't like libusb as much as it does udev. The snapscan.conf has a line that you can edit to specify a device in the /dev directory.

Goog
 
Old 10-03-2007, 07:17 PM   #10
greatgoogamooga
LQ Newbie
 
Registered: May 2006
Posts: 24

Original Poster
Rep: Reputation: 15
I checked dmesg after running xsane and found this:


[ 202.552000] usb 1-3: usbfs: USBDEVFS_CONTROL failed cmd sane-find-scann rqt 128 rq 6 len 2 ret -62
 
Old 10-03-2007, 09:37 PM   #11
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
And if you run
Code:
strace -f -o xsane.strace xsane <device>
as root, what appears in dmesg and xsane.strace?
 
Old 10-15-2007, 06:54 PM   #12
greatgoogamooga
LQ Newbie
 
Registered: May 2006
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by raskin View Post
And if you run
Code:
strace -f -o xsane.strace xsane <device>
as root, what appears in dmesg and xsane.strace?
no dmesg output at all.

the xsane.strace file is INSANELY long (pardon the pun). Is there a particular line you are looking for in the output?

Goog
 
Old 10-15-2007, 10:13 PM   #13
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Well, at least it would be interesting to know what 'open()' was executed just before writing 'Failed to open' to output.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SANE how to georgeks SUSE / openSUSE 1 10-03-2006 12:03 PM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM
What to do with SANE? Gammaw Linux - Newbie 3 02-10-2006 06:09 AM
Sane Again tonyath Linux - Software 22 03-15-2004 07:55 PM
Sane Pedroski Linux - Software 9 10-05-2003 02:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration