2

I have a plug computer that I want to use as scanner server using sane. It already worked with a different plug, so I know for sure that the scanner and sane are workable together.

If I issue scanimage -L as root I get this output:

device `hpaio:/usb/Deskjet_F300_series?serial=CN73CGJ05504KH' is a Hewlett-Packard Deskjet_F300_series all-in-one

which is what I am expecting, but when I call the command as saned I get this output:

No scanners were identified. [...]

If I call sane-find-scanner as saned it brings up:

found USB scanner (vendor=0x03f0, product=0x5511) at libusb:001:015

Now the interesting part is that the vendor and product is not detected here, but when I do the same as root this is the result:

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

So, somehow the root user has access to the list of vendors (and thus is able to detect the scanner) while saned is not. I don't want to run the saned server as root so I need to figure this out.

All settings I did in saned.conf are for the network interaction, but my problem is on the local host, so I skip the config file (but of course can provide it if necessary)

saned groups: saned scanner

I assume that I need to change the privileges of the file where vendor and product are mapped (/etc/sane.d/hp.conf), but that is already readable by sane.

-rw-r--r-- 1 saned scanner 396 Dec 12  2010 hp3900.conf
-rw-r--r-- 1 saned scanner  76 Dec 12  2010 hp4200.conf
-rw-r--r-- 1 saned scanner 238 Dec 12  2010 hp5400.conf
-rw-r--r-- 1 saned scanner 497 Dec 12  2010 hp.conf
-rw-r--r-- 1 saned scanner  22 Dec 12  2010 hpsj5s.conf

Same for /etc/sane.d/dll.d/

-rw-r--r-- 1 saned scanner   38 Dec 10  2013 hplip

Interesting is that neither of these files contain the Deskjet_F300_series information, so maybe there is another file?

Also, while the scanner does have a printing option, I'm not interested in this.

I did read this post, but I would prefer not to do what is described there, because somewhere the information is already present and I would like to access that place, from the saned user.

Angelo Fuchs
  • 193
  • 11

2 Answers2

0

I found that the scanimage -L works after I added saned to the group lp, moments after I posted the question.

I still am interested in the proper answer to this question (where does the information come from). So, this answer is for future visitors who just want to have it fixed.

Angelo Fuchs
  • 193
  • 11
  • Have you tried to `strace` the commands to see which files/paths they open? – C. M. Apr 27 '21 at 09:38
  • @C.M. Nope and six years later I also don't have the issue anymore :) – Angelo Fuchs May 07 '21 at 15:46
  • Others seeking similar issues may sill come across this, so I post to help guide them :-) In the future, you may also encounter another similar issue... And now you will know the `strace` command is handy diagnostic tool. (Although I came across this myself because of a similar issue that it is not helping me with :-(. ) – C. M. May 08 '21 at 22:45
0

I had a similar issue on Raspbian (Raspberry Pi) with a Samsung printer/scanner. Resolved by making saned user a member of plugdev group - since this is the group the device showed up in /dev/bus/usb tree.