# cannot scan images[solved]

## Adel Ahmed

I'm tryng to configure my scanner on my gentoo machine

lsusb:

```
Bus 001 Device 009: ID 03f0:5511 Hewlett-Packard DeskJet F300 series
```

the model is hp deskjet f380 which is both printer and scanner.

```
I have installed the sane backends with all the backends:

[ebuild   R    ] media-gfx/sane-backends-1.0.25-r1::gentoo  USE="systemd threads usb -doc -gphoto2 -ipv6 -nls -snmp -v4l -xinetd -zeroconf" ABI_X86="(64) -32 (-x32)" SANE_BACKENDS="abaton agfafocus apple artec artec_eplus48u as6e avision bh canon canon630u canon_dr cardscan coolscan coolscan2 coolscan3 dc210 dc240 dc25 dell1600n_net dmc epjitsu epson epson2 fujitsu genesys gt68xx hp hp3500 hp3900 hp4200 hp5400 hp5590 hpljm1005 hs2p ibm kodak kodakaio kvs1025 kvs20xx leo lexmark ma1509 magicolor matsushita microtek microtek2 mustek mustek_usb nec net niash p5 pie pixma plustek plustek_pp qcam ricoh rts8891 s9036 sceptre sharp sm3600 sm3840 snapscan sp15c st400 stv680 tamarack teco1 teco2 teco3 {test} u12 umax umax1220u umax_pp xerox_mfp -canon_pp -hpsj5s -kvs40xx -mustek_pp -mustek_usb2 -pnm" 0 KiB

```

sane find scanner is able to find the scanner

```
g50-80 ~ # sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the

  # result is different from what you expected, first make sure your

  # scanner is powered up and properly connected to your computer.

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

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

found USB scanner (vendor=0x0bda [Generic], product=0x0129 [USB2.0-CRW]) at libusb:001:002

found USB scanner (vendor=0x03f0 [HP], product=0x5511 [Deskjet F300 series]) at libusb:001:009

could not fetch string descriptor: Pipe error

could not fetch string descriptor: Pipe error

  # 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.

```

scanimage -L does not:

```
g50-80 ~ # scanimage -L

No scanners were identified. If you were expecting something different,

check that the scanner is plugged in, turned on and detected by the

sane-find-scanner tool (if appropriate). Please read the documentation

which came with this software (README, FAQ, manpages).
```

This is the first time I configure this scanner on this machine, usblp has been compiled as a module and has been loaded:

```
g50-80 linux # lsmod

Module                  Size  Used by

[b]usblp                  10298  0[/b]

hid_generic             1321  0

usbhid                 18016  0

cfq_iosched            20069  1

iwlmvm                161279  0

radeon               1382327  1

ttm                    66608  1 radeon

iwlwifi                88761  1 iwlmvm

r8169                  65233  0

mii                     3843  1 r8169

ac                      3468  0

nfsd                   56530  1

lockd                  54760  1 nfsd

grace                   1858  1 lockd

sunrpc                164730  3 nfsd,lockd

```

Last edited by Adel Ahmed on Mon May 01, 2017 6:12 am; edited 1 time in total

----------

## cboldt

Does your system include the "hplip" package?

----------

## Adel Ahmed

it does not, does working with sane-backends require hplip to be installed?

----------

## cboldt

Good question, I don't know the answer for sure, and also don't know if hplip and sane have some sort of relationship.  The package hplip has a USEflag for "scanner."<p>

No harm in installing it and see if it gets the job done.

https://wiki.gentoo.org/wiki/HPLIP

Seems the hplip package adds a hpaio backend

----------

## Adel Ahmed

emerged the hplip package but no dice, same error.

----------

## sebB

Are you in the lp group?

----------

## cboldt

From the Gentoo hplip Wiki, is the hplip "helper" notified to sane?

```
# /etc/sane.d/dll.conf

# Add support for the HP-specific backend.  Needs net-print/hplip installed.

hpaio
```

I expect it will be there.  I believe that is put there by installation of the sane-backends package.

From https://bbs.archlinux.org/viewtopic.php?id=43356, try commenting that OUT.

```
   So, I missed the post install message in hplip.  I uncommented "hpaio" at the end of

   /etc/sane.d/dll.conf.  Now I can scan as root using either of:

> sudo hp-scan -d hpaio:/usb/Deskjet_F300_series?serial=CN676GJ0TH04KH -n

> sudo scanimage > image.ppm
```

Edit to add, from the Gentoo wiki "make sure the user is in the scanner, usb and/or lp groups"

----------

## Adel Ahmed

the user is a member of the scanner group,

The line was commented out  :Sad: 

----------

## cboldt

If the line was commented out, try uncommenting it.  That was the fix in the post I cited.  I figured you'd notice what the blockquote said, so didn't bother correcting my suggestion.

----------

## Adel Ahmed

nope, nothing commented or not  :Sad: .

----------

## cboldt

Supposedly that is a supported scanner ...

 *Quote:*   

> I've run into the same problem - it turned out to be because I hadn't installed the hpaio scanner driver (part of the hplip package). Under gentoo, this was a matter of re-running "emerge hplip" with the "scanner" USE flag (and adding the new driver line into /etc/sane.d/dll.conf via conf-update). There is probably some equivalent, or extra package under other distributions (or possibly a config flag if you manually installed hplip)
> 
> To check if this is what the problem is, try running hp-check. If this gives you a warning about the hpaio driver not being in /etc/sane.d/dll.conf, this is probably your problem. If it is there, you could run "SANE_DEBUG_DLL=128 scanimage -L 2>&1 | grep hpaio" to check if sane is loading the driver.

 

Note the scanner USEflag part of hplip.

----------

## Adel Ahmed

I've tried with the flag enabled and disabled, and no luck

----------

## cboldt

The combination that should work is `USE=scanner emerge hplip` plus (uncommented) "hpaio" in /etc/sane.d/dll.conf

Once that condition is in place, the next step is posting the output of `SANE_DEBUG_DLL=128 scanimage -L`  You won't have to post all of it, you'll see the patterns easily.  Plug the scanner in (should be obvious, but hey, "is it plugged in?" is sometimes the answer) scanimage should find and load /usr/lib/sane/libsane-hpaio.so.1

----------

## Adel Ahmed

no luck there, I've emerged with the scanner flag, commented out hpaio(and restarted the machine)

I got tons of messages on initializing and exiting, these are the only unique messages:

```
[dll] sane_get_devices: found 0 devices

No scanners were identified. If you were expecting something different,

check that the scanner is plugged in, turned on and detected by the

sane-find-scanner tool (if appropriate). Please read the documentation

which came with this software (README, FAQ, manpages).

[dll] sane_exit: exiting

```

----------

## sebB

Please try adding you in the lp group

----------

## The Doctor

I also have problems getting my HP to scan. However, I found a work around.

I recommend using the hp-scan function from hplip. It works very nicely. You can locate the man page by googling "hp-scan"

----------

## cboldt

 *Adel Ahmed wrote:*   

> no luck there, I've emerged with the scanner flag, commented out hpaio(and restarted the machine)
> 
> 

 

Just to make sure, you have also tried with hpaio not commented out, after emerging hplip with the scanner flag.  Nothing we are doing will involve changes due to reboot, although appreciate that you may be trying to clear any USB issues.

----------

## Adel Ahmed

Finally it's working, I removed the minimal flag from hplip and things are working fine now.

thanks everyone,

----------

