Solved [Solved] Trouble with SANE and USB scanner

cpm@

Moderator
Moderator
Developer
Hi people,

I have one question regarding sane-"backendname" user permissions. Whenever I need to use my scanner (model HP PSC 1310), I have to start it from the console, because it's asking me to enter the user password.
Code:
% xsane
Password of user on localhost?

I added the following related variables in /etc/rc.conf:
Code:
dbus_enable="YES"
hald_enable="YES"
cupsd_enable="YES"
devd_enable="YES"
devfs_system_ruleset="devfsrules_common"

I have established in /etc/devfs.rules:
Code:
[devfsrules_common=7]
add path 'ugen[0-9]*' mode 666 group operator
add path 'usb/*' mode 666 group operator
add path 'usbctl' mode 666 group operator

My user belongs to the cups group. All works fine, except the user's password requirement which is very annoying.

Does someone know how to avoid having to enter the user's password, every time I use xsane?
 
Re: Trouble with SANE and USB scanner

wblock@ said:
Is the user a member of the operator group?

Yes, it is. If you need more information, please, let me know. I'm not sure if I missing something else :\

Thanks for your time, @wblock.
 
Last edited by a moderator:
Re: Trouble with SANE and USB scanner

cpm said:
wblock@ said:
Is the user a member of the operator group?

Yes, it is. If you need more information, please, let me know. I'm not sure if I missing something else :\

Thanks for your time, @wblock.

Try adding your user to the lp group if not already a member. I believe I had to do that a while back when I had the same printer (before it died) to scan without a user password. I cant remember for certain however, and I don't remember why. Sorry, I should have kept notes.
 
Last edited by a moderator:
Re: Trouble with SANE and USB scanner

xsane should not involve CUPS at all. My /etc/devfs.rules does not have a usbctl entry.
 
Re: Trouble with SANE and USB scanner

wblock@ said:
xsane should not involve CUPS at all. My /etc/devfs.rules does not have a usbctl entry.

You're right and I'm most likely not remembering correctly. Sorry for the noise.
 
Re: Trouble with SANE and USB scanner

First, I want to give thanks to all people who try to help me with this annoying issue :)

I performed some changes which I will describe below. Second, I deleted this line from /etc/devfs.rules
Code:
add path 'usbctl' mode 666 group operator
I added my user as member of the lp group, but I had not success. Unfortunately, xsane still requesting for a password.
Code:
% pw group show lp
lp:*:1002:root,charly
Does anyone have a clue?
 
Re: Trouble with SANE and USB scanner

Please do that again, but for the operator group. And ls -lh /dev/usb*. And the entry in the config file for that scanner in /usr/local/etc/sane.d/....
 
Re: Trouble with SANE and USB scanner

wblock@ said:
Please do that again, but for the operator group. And ls -lh /dev/usb*. And the entry in the config file for that scanner in /usr/local/etc/sane.d/....
Here is the information requested:

Code:
% pw group show operator
operator:*:5:root,charly

Code:
% ls -lh /dev/usb*
crw-r--r--  1 root  operator   0x4a  4 dic 17:30 /dev/usbctl

/dev/usb:
total 0
crw-rw-rw-  1 root  operator   0x4e  4 dic 17:30 0.1.0
crw-rw-rw-  1 root  operator   0x54  4 dic 17:30 0.1.1
crw-rw-rw-  1 root  operator   0x6e  4 dic 17:30 0.2.0
crw-rw-rw-  1 root  operator   0x70  4 dic 17:30 0.2.1
crw-rw-rw-  1 root  operator   0x71  4 dic 17:30 0.2.2
crw-rw-rw-  1 root  operator   0x72  4 dic 17:30 0.2.3
crw-rw-rw-  1 root  operator   0x81  4 dic 18:31 0.3.0
crw-rw-rw-  1 root  operator   0x83  4 dic 18:31 0.3.1
crw-rw-rw-  1 root  operator   0x84  4 dic 18:31 0.3.3
crw-rw-rw-  1 root  operator   0x85  4 dic 18:31 0.3.4
crw-rw-rw-  1 root  operator   0x50  4 dic 17:30 1.1.0
crw-rw-rw-  1 root  operator   0x55  4 dic 17:30 1.1.1
crw-rw-rw-  1 root  operator   0x87  4 dic 18:31 1.2.0
crw-rw-rw-  1 root  operator   0x89  4 dic 18:31 1.2.1
crw-rw-rw-  1 root  operator   0xa6  4 dic 17:58 1.3.0
crw-rw-rw-  1 root  operator   0xa9  4 dic 17:58 1.3.1
crw-rw-rw-  1 root  operator   0xaa  4 dic 17:58 1.3.2
crw-rw-rw-  1 root  operator   0xab  4 dic 17:58 1.3.3
crw-rw-rw-  1 root  operator   0xac  4 dic 17:58 1.3.4
crw-rw-rw-  1 root  operator   0xad  4 dic 17:58 1.3.7
crw-rw-rw-  1 root  operator   0xae  4 dic 17:58 1.3.8
crw-rw-rw-  1 root  operator   0x52  4 dic 17:30 2.1.0
crw-rw-rw-  1 root  operator   0x56  4 dic 17:30 2.1.1
crw-rw-rw-  1 root  operator   0x73  4 dic 17:30 2.2.0
crw-rw-rw-  1 root  operator   0x79  4 dic 17:30 2.2.1
crw-rw-rw-  1 root  operator   0x7a  4 dic 17:30 2.2.6
crw-rw-rw-  1 root  operator   0x7b  4 dic 17:30 2.2.7
My scanner uses an external backend which it's included in the HPLIP software. See this link for more details.

Code:
% usbconfig -d 1.3 dump_device_desc
ugen1.3: <psc 1310 series hp> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (2mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0000 
  bDeviceSubClass = 0x0000 
  bDeviceProtocol = 0x0000 
  bMaxPacketSize0 = 0x0008 
  idVendor = 0x03f0 
  idProduct = 0x3f11 
  bcdDevice = 0x0100 
  iManufacturer = 0x0001  <hp>
  iProduct = 0x0002  <psc 1310 series >
  iSerialNumber = 0x0003  <MY4B6CC02QO2>
  bNumConfigurations = 0x0001

Code:
% less /var/log/messages | tail -n 5
Dec  4 17:58:03 freebsd kernel: ugen1.3: <hp> at usbus1
Dec  4 17:58:03 freebsd kernel: ulpt0: <hp psc 1310 series, class 0/0, rev 2.00/1.00, addr 3> on usbus1
Dec  4 17:58:03 freebsd kernel: ulpt0: using bi-directional mode
Dec  4 17:58:03 freebsd root: Unknown USB device: vendor 0x03f0 product 0x3f11 bus uhub1
Dec  4 17:58:03 freebsd root: Unknown USB device: vendor 0x03f0 product 0x3f11 bus uhub1
 
Back
Top