LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   HP ScanJet No Longer Works (https://www.linuxquestions.org/questions/linux-hardware-18/hp-scanjet-no-longer-works-275791/)

shortsword 01-09-2005 03:17 PM

HP ScanJet No Longer Works
 
I just installed Fedora Core 3 in place of my Fedora Core 2 OS. I did a complete install not an upgrade.

FC3 now uses udev to populate the /dev directory at boot time, or to hotplug the entries when a device is plugged in. This is different from the old behavior in which the /dev directory was simply populated with all possible devices.

Now my USB connected HP ScanJet 5300C no longer works. That is, The GIMP will no longer recognize that the scanner is present when I attempt to acquire an image.

When I use the lsusb command I get the following:
Code:

Bus 002 Device 001: ID 0000:0000
Bus 001 Device 009: ID 03f0:0701 Hewlett-Packard ScanJet 5300c/5370c
Bus 001 Device 005: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical
Bus 001 Device 004: ID 03f0:0304 Hewlett-Packard DeskJet 810c/812c
Bus 001 Device 003: ID 051d:0002 American Power Conversion Back-UPS Pro 500
Bus 001 Device 002: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
Bus 001 Device 001: ID 0000:0000

When I unplug the usb cable at the back of the scanner and then plug it back in, I get the following entries in my /var/log/messages file:
Code:

Jan  9 13:02:21 diningroom kernel: usb 1-1.3: USB disconnect, address 8
Jan  9 13:02:25 diningroom kernel: usb 1-1.3: new full speed USB device using address 9
Jan  9 13:02:25 diningroom kernel: scsi3 : hpusbscsi
Jan  9 13:02:25 diningroom kernel:  Vendor: HP        Model: ScanJet 5300C Rev: 6.00
Jan  9 13:02:25 diningroom kernel:  Type:  Scanner ANSI SCSI revision: 02
Jan  9 13:02:25 diningroom kernel: Attached scsi generic sg0 at scsi3, channel 0, id 0, lun 0,  type 6
Jan  9 13:02:25 diningroom scsi.agent[4608]: scanner at /devices/pci0000:00/0000:00:11.2/usb1/1-1/1-1.3/1-1.3:1.0/host3/target3:0:0/3:0:0:0

I have also verified that /dev/sg0 is present when the scanner USB cable is plugged in but not present when the cable is not plugged in.

I have solved another problem by creating a udev rule for the device in question. That case was to create the /dev/usb/hiddev0 for my APC UPS. I suspect that sg0 is not the device that The GIMP wants to use. I would create a new udev rule to create a symbolic link device if I knew what symbolic link to create.

Any help would be greatly appreciated.

shortsword 01-09-2005 08:17 PM

RE: HP ScanJet No Longer Works
 
:D

My scanner works again.

The solution was to create a new udev rule like this:

Code:

BUS="usb", SYSFS{idVendor}="03f0", SYSFS{serial}="CN0CQ23042VE", NAME="%k", SYMLINK="usb/scanner%n"
Where the values of the SYSFS{idVendor} and SYSFS{serial} items are given by the output of the lsusb command, the "%k" value says give the device the name that the kernel would usually give to it, and the "usb/scanner%n" says to create a symbolic link to that device in the /dev directory (i.e., /dev/usb/scanner0), the %n part of that value indicates to give the symbolic link the same "number" value as the device to which it points. Therefore, I ended up with this response to an ls -l command:

Code:

[ted@diningroom ~]$ ls -l /dev/usb/scanner0
lrwxrwxrwx  1 root root 6 Jan  9 18:01 /dev/usb/scanner0 -> ../sg0
[ted@diningroom ~]$

And, The GIMP and SANE can find /dev/usb/scanner0 without a problem.


All times are GMT -5. The time now is 10:05 PM.