Solved Trying to understand FreeBSD CUPS documentation

According to the documentation, I am supposed to add this line to /etc/devfs.rules

add path 'usb/X.Y.Z' mode 0660 group cups

But:
Note that X, Y, and Z should be replaced with the target USB device listed in the /dev/usb directory that corresponds to the printer.To find the correct device, examine the output of dmesg(8), where ugenX.Y lists the printer device, which is a symbolic link to a USB device in /dev/usb.

This note is not clear to me. Using dmesg I get:

ugen3.2: <Hewlett-Packard hp LaserJet 3015> at usbus3
ulpt0: <Hewlett-Packard hp LaserJet 3015, class 0/0, rev 1.10/1.00, addr 2> on usbus3

Using that, how do I replace 'usb/X.Y.Z' in /ect/devfs.rules files? What is "X" ? What is "Y" ? What is "Z" ?

Here is the documentation that I am trying to use:
 
I don't know exactly, but run "usbconfig -l" as root and look for your printer.
It will probably be on ugen3.2 as you show. That means X = 3 Y = 2 Z probably 0.

cd /dev/usb
ls
see what you have starting with 3.2
 
I found this:
crw-rw---- 1 root cups 0x8a Jan 8 07:14 3.2.0

So change:
add path 'usb/X.Y.Z' mode 0660 group cups
to
add path 'usb/3.2.0' mode 0660 group cups ?
 
I found this:
crw-rw---- 1 root cups 0x8a Jan 8 07:14 3.2.0

So change:
add path 'usb/X.Y.Z' mode 0660 group cups
to
add path 'usb/3.2.0' mode 0660 group cups ?
I really don't know. output of "sudo usbconfig -l" is probably more useful to anyone that can help. Me, I don't have a printer so can't really help.
 
The numbers of the USB device units may change if multiple USB devices are connected, do not specify hard-coded numbers (usb/3.2.0), set address placeholders to all:

/etc/devfs.rules
Code:
[system=10]
add path 'ugen*' mode 0660 group cups
add path 'usb/*' mode 0660 group cups
Make sure the user is in the "cups" group, and "system" is set in /etc/rc.conf.
 
The numbers of the USB device units may change if multiple USB devices are connected, do not specify hard-coded numbers (usb/3.2.0), set address placeholders to all:

/etc/devfs.rules
Code:
[system=10]
add path 'ugen*' mode 0660 group cups
add path 'usb/*' mode 0660 group cups
Make sure the user is in the "cups" group, and "system" is set in /etc/rc.conf.

<Sigh>
Just when I got everything working. Okay, will try changes.

Here is what I have in /etc/rc.conf

devd_enable="YES"
lpd_enable="YES"
cupsd_enable="YES"
cupsd_browsed_enable="YES"
devfs_system="system"


Here is what I have in /etc/devfs.rules

[system=10]
add path 'unlpt*' mode 0660 group cups
add path 'ulpt*' mode 0660 group cups
add path 'lpt*' mode 0660 group cups
add path 'ugen*' mode 0660 group cups
add path 'usb/*' mode 0660 group cups

Hope that will do it. Setting up printers is a beast.
 
A more precise approach is a devd rule that matches the printer's vid and pid. That avoids touching everything under /dev/usb.

usbconfig will tell you the printer's vid (vendor) and pid (product).

Here's a random example:

 
Back
Top