# Can't make my scanner work (HP Scanjet 2200c)  [SOLVED]

## SoulSe

I've searched the board - can't get this working.

It's a usb scanner - hp scanjet 2200c.

lsusb:

```
lsusb

Bus 005 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd

Bus 005 Device 001: ID 0000:0000

Bus 004 Device 001: ID 0000:0000

Bus 003 Device 002: ID 045e:0040 Microsoft Corp. Wheel Mouse Optical

Bus 003 Device 001: ID 0000:0000

Bus 002 Device 002: ID 03f0:0605 Hewlett-Packard ScanJet 2200c

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 001: ID 0000:0000
```

sane-find-scanner:

```
sane-find-scanner

  # No SCSI scanners found. If you expected something different, make sure that

  # you have loaded a SCSI driver for your SCSI adapter.

  # Also you need support for SCSI Generic (sg) in your operating system.

  # If using Linux, try "modprobe sg".

  # No USB scanners found. If you expected something different, make sure that

  # you have loaded a driver for your USB host controller and have installed a

  # kernel scanner module.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports

  # can't be detected by this program.

```

No mention of the scanner in dmesg. I also emerged libusb and usbutils. 

Not sure what to do now. Any ideas? Thanks in advance...

----------

## avendesora

You'll find a great doc here.

----------

## SoulSe

 *mseigneurin wrote:*   

> You'll find a great doc here.

 

Um, that's the hpoj homepage - it's a driver for OFFICEJET combo machines. I've gone through the whole site - nothing about Scanjets there. 

Anybody?

----------

## oumpah-pah

Since lsusb lists your scanner, I think this could be related to rights or device name. What permissions do you have for your scanner in /dev, and did you create a symlink named scanner pointing to it ?

----------

## avendesora

Sorry for that too quick reply... (I had just been messing with my HP PSC's scanner so I had the link handy).

Here's something maybe more interesting: sane-plustek manpage. Does this help more?

----------

## SoulSe

 *oumpah-pah wrote:*   

> Since lsusb lists your scanner, I think this could be related to rights or device name. What permissions do you have for your scanner in /dev, and did you create a symlink named scanner pointing to it ?

 

Where would the scanner be in /dev? 

/dev/usb/ is empty and I'm not sure what to look for   :Confused: 

 *mseigneurin wrote:*   

> Sorry for that too quick reply... (I had just been messing with my HP PSC's scanner so I had the link handy).
> 
> Here's something maybe more interesting: sane-plustek manpage. Does this help more?

 

Well, it confirms that my scanner is compatible and that I need the symlink in /dev - now I just need to know what to link it to...

----------

## oumpah-pah

You should look in your dmesg output to see what device node your printer is attached to. For example, when I plug my usb printer in, I get :

 *Quote:*   

> usb 2-2: new full speed USB device using address 2
> 
> drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x03F0 pid 0x0B17

 

so that I know it is attached to /dev/usblp0. But I still need to know if you use udev or devfs, because udev could give your scanner an other name.

----------

## SoulSe

That's the thing, it doesn't show up in dmesg:

```
dmesg |grep usb

usbcore: registered new driver usbfs

usbcore: registered new driver hub

usbcore: registered new driver usb-storage

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

usbcore: registered new driver usbserial

drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0

drivers/usb/serial/usb-serial.c: USB Serial support registered for PocketPC PDA

drivers/usb/serial/ipaq.c: USB PocketPC PDA driver v0.5

usbcore: registered new driver ipaq

usbcore: registered new driver hci_usb

usb 3-1: new low speed USB device using address 2

input: USB HID v1.10 Mouse [Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)] on usb-0000:00:10.1-1

usb 5-2: new full speed USB device using address 2

usb 2-2: new full speed USB device using address 2
```

----------

## oumpah-pah

Did you try to plug it in another usb port ?

----------

## SoulSe

 *oumpah-pah wrote:*   

> Did you try to plug it in another usb port ?

 Yes, I did - same response. 

Could these last few lines of dmesg be the scanner:

```
usb 5-2: new full speed USB device using address 2

usb 2-2: new full speed USB device using address 2

usb 2-2: USB disconnect, address 2

usb 3-2: new full speed USB device using address 3
```

 ??

Not that it helps   :Razz: 

----------

## oumpah-pah

I think that's your scanner, indeed. Because when you unplugged it, that mysterious device disapeared. You should try to do

```
ls /dev
```

plug your scanner in and then ls /dev again, and see what changed (if any).

----------

## tomchuk

Quick check: was sane-backends compiled with the usb USE flag? etcat should look like:

```

root@t40 thomas # etcat -u sane-backends

[ Colour Code : set unset ]

[ Legend   : (U) Col 1 - Current USE flags        ]

[          : (I) Col 2 - Installed With USE flags ]

 U I [ Found these USE variables in : media-gfx/sane-backends-1.0.14-r3 ]

 + + usb     : Adds USB support to applications that have optional USB support (e.g. cups)

 + + gphoto2 : Adds digital camera support

```

If sane-backends was compiled with USB, I'll get my 2200c going on my laptop (which I've done before) and list what you should be seeing in /dev, dmesg, and sane-find-scanner.

----------

## SoulSe

 *tomchuk wrote:*   

> Quick check: was sane-backends compiled with the usb USE flag? etcat should look like:
> 
> ```
> 
> root@t40 thomas # etcat -u sane-backends
> ...

 

I was sure I did... don't have etcat though.

So I recompiled and added usb USE flags anyway, now it's downloading different packages... maybe that's it - I'll report back as soon as it's compiled...

----------

## SoulSe

Ok, so recompiling with USB flags has caused my scanner to show up on sane-find-scanner:

```
sane-find-scanner

  # No SCSI scanners found. If you expected something different, make sure that

  # you have loaded a SCSI driver for your SCSI adapter.

  # Also you need support for SCSI Generic (sg) in your operating system.

  # If using Linux, try "modprobe sg".

found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x0605 [HP ScanJet 2200C], chip=LM9832/3) at libusb:003:003

  # Your USB scanner was (probably) detected. It may or may not be supported by

  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports

  # can't be detected by this program.
```

Sweet! However, xsane says it can't find an available device, as root it seems to find the scanner though. sane-find-scanner find the scanner when run as a user though...

So it's a permission problem? What do I need to change?

----------

## oumpah-pah

It seems to be a permission problem. So you must change the device permissions in /dev like that :

```
chmod 0666 /dev/<your_scanner>
```

----------

## SoulSe

 *oumpah-pah wrote:*   

> It seems to be a permission problem. So you must change the device permissions in /dev like that :
> 
> ```
> chmod 0666 /dev/<your_scanner>
> ```
> ...

 

I'm having trouble finding my scanner in /dev though.

You know, I've been using Linux exclusively for the last three years and for the first time in a long while I feel like a complete n00b because of this scanner  :Confused: 

At least some things are still challenging! 

Thanks for all the help, if I can just find my scanner in /dev/ now I'll be sorted...

----------

## oumpah-pah

If dmesg doesn't give you any details, you should try and see what changes in /dev when you plug and unplug your scanner. Also look for anything containing usb in its name. I do not have an usb scanner, but my usb printer was named /dev/usblp0.

----------

## SoulSe

Success!

I've found out that 2.6 kernels and libusb do not create /dev entries for scanners, so I tracked down my scanner in /proc/bus/usb and altered the permissions there - now it works for users as well.

I realise that a hotplug script would be better, but it's working.

----------

## elzbal

I've been wanting to get my 2200C up and running as well, and thanks to this excellent thread, I did. I want to offer one bit of feedback, however. Instead of altering permissions on the appropriate entry in /proc (or an entry in /dev), all you really need to do is to add yourself to the Scanners group. This is much better for in case you decide to reboot, change which port on the hub your scanner is plugged into, etc.

Of course, after adding your account to the Scanners group, you will need to log out and log back in for it to fully take effect.

----------

## SoulSe

 *elzbal wrote:*   

> I've been wanting to get my 2200C up and running as well, and thanks to this excellent thread, I did. I want to offer one bit of feedback, however. Instead of altering permissions on the appropriate entry in /proc (or an entry in /dev), all you really need to do is to add yourself to the Scanners group. This is much better for in case you decide to reboot, change which port on the hub your scanner is plugged into, etc.
> 
> Of course, after adding your account to the Scanners group, you will need to log out and log back in for it to fully take effect.

 

Nice one! That actually is a cleaner solution than a hotplug script. I actually feel pretty stupid for not checking /etc/groups for a Scanner group  :Rolling Eyes: 

You're right, this was a great thread. I hope it helps more people  :Wink: 

Oh, and for the record: xsane is a better piece of software for scanning than anything I have seen in Winblows. It, quite simply, ROCKS!

----------

