Discussion:
Canon Pixma G2000
(too old to reply)
Iam Droidzone
2017-09-06 17:50:25 UTC
Permalink
Raw Message
So, with the latest PPA updates, Ubuntu Xenial recognizes my G2000 as a
scanner. But I'm having the issue where usblp is claiming the device,
causing this to appear in dmesg, and the scanning jobs just stutter out:
"usb 1-1.4: usbfs: interface 1 claimed by usblp while 'scangui' sets config
#1"

I tried many workarounds including writing C code to release the device
from usblp as documented here:
https://bugzilla.redhat.com/show_bug.cgi?id=723696#c2

But usblp releases it and then claims it.
scanimage does not work from command line, or via xsane or scangearmp2.

Is there a known resolution?
Olaf Meeuwissen
2017-09-10 03:19:54 UTC
Permalink
Raw Message
Hi Iam,
Post by Iam Droidzone
So, with the latest PPA updates, Ubuntu Xenial recognizes my G2000 as a
scanner. But I'm having the issue where usblp is claiming the device,
"usb 1-1.4: usbfs: interface 1 claimed by usblp while 'scangui' sets config
#1"
This brings back memories. Mind you, they're not particularly good
ones.
Post by Iam Droidzone
I tried many workarounds including writing C code to release the device
https://bugzilla.redhat.com/show_bug.cgi?id=723696#c2
But usblp releases it and then claims it.
scanimage does not work from command line, or via xsane or scangearmp2.
The libusb_reset_device() function[1] basically does a disconnect and
reconnect of the device, so usblp claiming it again is not a surprise.

[1]: http://libusb.sourceforge.net/api-1.0/group__dev.html#ga7321bd8dc28e9a20b411bf18e6d0e9aa
Post by Iam Droidzone
Is there a known resolution?
Not that I'm aware of, but you might try modifying your C code to use
the OS specific kernel related libusb APIs[2] to check for an active
kernel driver and detach or attach it as needs be.

[2]: http://libusb.sourceforge.net/api-1.0/group__dev.html#gab14d11ed6eac7519bb94795659d2c971

That's basically what I ended up doing in the sanei_usb.c code for the
third party epkowa backend way back when. You can find its code at

http://support.epson.net/linux/src/scanner/iscan/iscan_2.30.3-1.tar.gz

in case you're interested.

I notice that there is now also libusb API that lets you automate this.
Cool, might be something for the sane-backends sanei_usb.c code.

Patches welcome ;-)

Hope this helps,
--
Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27
GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9
Support Free Software https://my.fsf.org/donate
Join the Free Software Foundation https://my.fsf.org/join
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Loading...