[NBLUG/talk] HP 5200c scanner, Fedora Core 2, 2.6.5 kernel

Mark Street mark at oswizards.com
Tue Jun 15 10:29:51 PDT 2004


On Monday 14 June 2004 18:09, Dave Sisley wrote:
> No problem, Mark.  Really.  A botched system is not to steep a price
> to pay for the advancement of linux. (cough!)

hehehe, cough cough cough, sure is smokey in here.

OK, so no remnants of the old way of doing things seems to be left.  I have 
noticed that after 2.6.3 most all USB device drivers have been removed from 
the kernel.  Everything is now accessed through libusb.  So now we hark back 
to the original post where you had permission problems with the scanner and 
no I/O when run as root.

I mentioned hotplug previously as a possible problem in this saga.  Here is a 
a thread that may shed some light on some your problem, 
http://www.linuxquestions.org/questions/showthread.php?s=&threadid=157385

Since we are trying to solve this in a public forum let's keep learning.

Let's have a little more info with a running system, scanner plugged in;

ls -la /proc/bus/usb/

and from your output;
>"found USB scanner (vendor=0x03f0, product=0x0401) at libusb:002:002"

ls /proc/bus/usb/002

And I think you should be able to get more info by executing

cat /proc/bus/usb/002/002

Let's see the config for HP printers for sane-backends just for giggles

cat /etc/sane.d/hp.conf

Now let's run some scans as a regular user

What does scan the command 'scanimage -L'  show as a regular user from a fresh 
boot?  Now do the same command as root, what do you see?

Now UNplug the scanner and run scanimage -L as a regular user, no reboot 
required.  What do you see??

There is an interesting post in the link I mentioned above that manipulates 
the hotplug utility.  It bears mentioning at this point.

>  Additional Comment #19 From W. Michael Petullo  on 2004-05-03 10:23 -------
> 
> From bug #121893:
> 
> Hotplug correctly sets the permissions of USB devices (ie:
> /proc/bus/usb/001/*) when I plug in my digital camera.  Hotplug gives
> read and write permissions to the console owner.
> 
> However, the same is not true for scanners.  Since the USB scanner
> kernel module was dropped some time ago in favor of libusb, scanners
> should be handled like digital cameras.
> 
> This is how I got my scanner to work right:
> 
> I added the following two lines to /etc/hotplug/usb.usermap (copied
> from /etc/hotplug/usb.distmap -- the map for old kernel modules):
> 
> # Umax Astra 2200
> scanner              0x0003 0x1606   0x0230    0x0000       0x0000   
>    0x00       0x00            0x00            0x00            0x00   
>         0x00       0x00000000
> 
> Then I copied /etc/hotplug/usb/usbcam to /etc/hotplug/scanner and
> modified the script to reference scanners instead of cameras (actually
> a slight modification of the same script could probably be used in
> both cases).

The line for your HP scanner can be found in the usb.distmap file referenced 
above.

scanner              0x0003 0x03f0   0x0401    0x0000       0x0000       0x00         
0x00            0x00
     0x00            0x00            0x00            0x00000000

This may help get you working.  It may not solve all over your permission 
problems though.  I think I have another lead on another forum that may shed 
more light on this.  Let's see what this does for you first.

Unplug your scanner and try the scanimage command again as described above.

-- 
Mark Street, RHCE
http://www.oswizards.com
--
Key fingerprint = 3949 39E4 6317 7C3C 023E  2B1F 6FB3 06E7 D109 56C0
GPG key http://www.oswizards.com/pubkey.asc




More information about the talk mailing list