[sane-devel] USB problems - [was"no devices available"]

kilgota at banach.math.auburn.edu kilgota at banach.math.auburn.edu
Sat Jun 21 16:00:35 UTC 2008


Well, it seems that you are well on the way to solving the problems. What 
you have to do about the camera ought to be quite similar to what you have 
to do about the scanner. The reason why I cannot give you more specific 
advice is that I have no idea of the way that Hardy Heron is setting up 
these kinds of things. There are all kinds of ways to do it. Some 
examples:

let root only run the given class of usb devices

let all users run the given class of usb devices

let only one user run the given class of usb devices

let a group do it, for example a group called "scanner" and if it is done 
this way then any given user who is supposed to have access to the scanner 
needs to get added to the group, a separate operation.

In all of the above, for "scanner" you can substitute "camera" of course. 
And by all means, you should finish the job in a manner which is 
compatible with Hardy Heron. If they want you to use a group, then use a 
group. Call it what they called it for the rest of the scanners (cameras). 
And so on.

Now, I am just curious. Is there a specific line for your camera in the 
libgphoto2.rules file? If so, then what does it say? If that line is set 
up correctly, then IMHO the camera ought to work. If it is a PTP camera, 
then PTP support is done through the libgphoto2 PTP driver. If it requires 
some proprietary Canon driver, then that is supported through the 
libgphoto2 Canon driver. In either event, the permissions given in 
libgphoto2.rules ought to suffice for access to the camera, and AFAICT 
there ought to be no need at all for a more general statement in the 
permissions.rules file. Similar remarks pertain to the scanner, naturally.

Theodore Kilgore

On Sat, 21 Jun 2008, earther at eartherdesigns.com wrote:

> Yes, you are correct that it is a permissions problem,
>
> I finally got the camera working properly by editing 
> /etc/udev/rules.d/40-permissions.rules as per this thread:
>
> http://ubuntuforums.org/showthread.php?t=784864
>
> I can now run xsane as root but not as user.  I have looked through Groups 
> settings several times and everything looks OK so I'm guessing I'll need to 
> do more hand-editing.
>
> I'm too tired to do any more with this tonight but tomorrow I will revisit 
> your comments and see where I can go with them.
>
> Thanks so much for your thoughts on this.
>
> Quoting kilgota at banach.math.auburn.edu:
>> Hi,
>> 
>> Don't know about the scanner, but I do know a bit about the internals
>> of libgphoto2. The problem with the scanner is most probably similar to
>> what appears to happen with the camera:
>> 
>> With approximately 99% probability, I would say that your problem with
>> the camera is a permissions problem. Quite likely, what has happened is
>> that the camera and perhaps the scanner also, is not listed in any of
>> the appropriate files in /etc/udev/rules.d in spite of the fact that
>> you have upgraded udev. Either that, or along with the upgraded udev
>> the rules are not what you expect. For example, the libgphoto2.rules
>> might expect you, as a user, to belong to a group called "camera" or
>> some variation on the same theme. One of the things that you might do
>> to try to localize the problem is to try running these devices as root.
>> If that works, then definitely it is a permissions problem and you need
>> to create the right entries in the libgphoto2.rules file and the
>> libsane.rules files, which are suitable for yourself, or if you do find
>> entries in those files for these devices (look for the USB
>> Vendor:Product number combination) and it wants your userid to belong
>> to some group and it does not, then either add yourself to the group or
>> change the rules file to let you do what you want. By all means, too,
>> you can contact Ubuntu and ask them just exactly what they have in mind
>> about how they intend for things like this to be done in Hardy Heron. I
>> do not know how they are handling such things as upgrades because I am
>> not using Ubuntu and instead I usually deal with things like this by
>> hand-editing the affected files.
>> 
>> Sorry that there are these problems with permissions, but the
>> alternative is that these problems are not under control and then we
>> would have a Linux with all the lack of security that is found in
>> Windows. Clearly, none of us want that. But in return for the care
>> about security comes some occasional inconvenience, in the form of
>> problems like this.
>> 
>> I hope this helps.
>> 
>> Theodore Kilgore
>> 
>> 
>> On Fri, 20 Jun 2008, earther at eartherdesigns.com wrote:
>> 
>>> Good news. I have made some progress after upgrading the Hardy udev
>>> package but still not out of the woods.
>>> 
>>> lsusb now prints out correctly:
>>> 
>>> ~$ lsusb
>>> Bus 008 Device 001: ID 0000:0000
>>> Bus 007 Device 001: ID 0000:0000
>>> Bus 006 Device 002: ID 03f0:0205 Hewlett-Packard ScanJet 3300c
>>> Bus 006 Device 001: ID 0000:0000
>>> Bus 005 Device 001: ID 0000:0000
>>> Bus 004 Device 001: ID 0000:0000
>>> Bus 003 Device 001: ID 0000:0000
>>> Bus 002 Device 006: ID 04a9:30fd Canon, Inc. PowerShot A610 (normal
>>> mode)/PowerShot A610 (PTP mode)
>>> Bus 002 Device 001: ID 0000:0000
>>> Bus 001 Device 001: ID 0000:0000
>>> 
>>> And Sane now finds the scanner:
>>> 
>>> ~# SANE_DEBUG_NIASH=255 scanimage -L
>>> [sanei_debug] Setting debug level of niash to 255.
>>> [niash] sane_init
>>> [niash] Looking for ScanJet 3300C...
>>> [niash] _AttachUsb: found libusb:006:003
>>> [niash] niash: _ReportDevice 'libusb:006:003'
>>> [niash] Looking for ScanJet 3400C...
>>> [niash] Looking for ScanJet 4300C...
>>> [niash] Looking for HP ScanJet 4300c...
>>> [niash] Looking for Snapscan Touch...
>>> [niash] Looking for Office Scanner USB 19200...
>>> [niash] sane_get_devices
>>> device `niash:libusb:006:003' is a Hewlett-Packard ScanJet 3300C
>>> flatbed scanner
>>> [niash] sane_exit
>>> 
>>> However, when launched, Sane spits out this error:
>>> 
>>> Failed to open device 'niash:libusb:006:002': Device busy.
>>> 
>>> Any ideas?
>>> 
>>> FWIW, the camera is having problems too.  Just in case it might be
>>> helpful, here's the error:
>>> 
>>> "An error occurred in the io-library ('Could not claim the USB
>>> device'): Could not claim interface 0 (Operation not permitted). Make
>>> sure no other program or kernel module (such as sdc2xx, stv680,
>>> spca50x) is using the device and you have read/write access to the
>>> device."
>>> 
>>> Thanks again for your expertise and patience.
>>> 
>>> 
>>> Quoting "m. allan noah" <kitno455 at gmail.com>:
>>>> 
>>>> xsane is not the problem, but sane probably is. run this at the
>>>> command line as root:
>>>> 
>>>> SANE_DEBUG_NIASH=255 scanimage -L
>>>> 
>>>> and post the output to this list.
>>>> 
>>>> allan
>>>> 
>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> sane-devel mailing list: sane-devel at lists.alioth.debian.org
>>> http://lists.alioth.debian.org/mailman/listinfo/sane-devel
>>> Unsubscribe: Send mail with subject "unsubscribe your_password"
>>>           to sane-devel-request at lists.alioth.debian.org
>>> 
>
>



More information about the sane-devel mailing list