Another CUPS Local Printer Issue

Hello,

I see that this was posted not too long ago (https://forums.freebsd.org/showthread.php?t=11335) and I am having the same issue of cups not seeing locally attached printers when I go to localhost:631. I have installed cups and gutenprint. I have added additional dev points as noted in the other post to /etc/devfs.rules. I have also ensured that I am a member of groups cups and wheel.

[CMD="cat"] /etc/devfs.rules[/CMD]
Code:
[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
#add path 'usbctl' mode 0660 group cups
add path 'usb/*' mode 0660 group cups%

[CMD="cat"] /etc/rc.conf[/CMD]
Code:
ntpd_enable="YES"
ntpd_sync_on_start="YES"
keymap="us.iso"
# Auto-Enabled NICs from pc-sysinstall
ifconfig_em0="DHCP"
ifconfig_em1="DHCP"
hostname="freeenv"
hald_enable="YES"
dbus_enable="YES"
sshd_enable="YES"
pf_enable="YES"
pflog_enable="YES"
zfs_enable="YES"  
cupsd_enable="YES"
devfs_system_ruleset="system"

[CMD="cat"] /dev[/CMD]
Code:
acd0            dcons           mem             ttyu1.lock      ugen4.3
acpi            devctl          midistat        ttyv0           ugen4.4
ad4             devstat         mixer0          ttyv1           ugen5.1
ad4s1           dgdb            mixer1          ttyv2           ugen5.2
ad4s1a          dsp0.4          mixer2          ttyv3           ugen5.3
ad4s1b          dsp1.0          nfslock         ttyv4           ugen6.1
ad4s1d          dsp2.0          null            ttyv5           ugen7.1
ad4s1e          fd              nvidia0         ttyv6           ukbd0
ad5             fido            nvidiactl       ttyv7           ulpt0
ad6             fw0             pci             ttyv8           ulpt1
ata             fw0.0           pf              ttyv9           ums0
atkbd0          fwmem0          ptmx            ttyva           ums1
audit           fwmem0.0        pts             ttyvb           unlpt0
bpf             geom.ctl        random          ttyvc           unlpt1
bpf0            io              sndstat         ttyvd           urandom
console         kbd0            stderr          ttyve           usb
consolectl      kbd1            stdin           ttyvf           usbctl
ctty            kbd2            stdout          ufsid           xpt0
cuau0           kbdmux0         sysmouse        ugen0.1         zero
cuau0.init      klog            ttyu0           ugen1.1         zfs
cuau0.lock      kmem            ttyu0.init      ugen2.1
cuau1           label           ttyu0.lock      ugen3.1
cuau1.init      log             ttyu1           ugen4.1
cuau1.lock      mdctl           ttyu1.init      ugen4.2

I have started and stopped both devfs and cups many times, as well as rebooted and I still cannot see either of my two usb connected printers. I do see networked printers (not that I want to). Any further suggestions would be greatly appreciated.

Thanks,
 
I should note that the the printers are found in:
[CMD=]dmesg[/CMD]
Code:
...
Root mount waiting for: usbus7
Trying to mount root from ufs:/dev/label/rootfs0
ugen4.2: <Canon> at usbus4
ulpt0: <Canon i860, class 0/0, rev 1.10/1.10, addr 2> on usbus4
ulpt0: using bi-directional mode
...
uhub8: 4 ports with 4 removable, bus powered
ugen4.4: <Brother> at usbus4
ulpt1: <Brother HL-5250DN, class 0/0, rev 2.00/1.00, addr 4> on usbus4
ulpt1: using bi-directional mode
ugen4.5: <vendor 0x0430> at usbus4
 
Thank you for the pointers.
[CMD="echo"] "foobar" > /dev/ulpt0[/CMD]
does nothing after restarting cups (i.e., no change in situation).

I have looked over the reference that you suggest and it appears maybe it is a bit dated? I have no BrowseAddress @LOCAL in /usr/local/etc/cups/cupsd.conf in the original file. With hald_enable="YES" in /etc/rc.conf do I actually need to put usbd_enable="YES" in /etc/rc.conf (other usb devices are working)? The remainder of it appears to be done already.

Thanks very much for any further suggestions.
 
Here is my output from [CMD=]lpinfo -v[/CMD]
Code:
network http
network ipp
network lpd
network socket
network lpd://BRN03F44B/BINARY_P1
network socket://10.1.45.38:9100
network socket://10.1.45.50
network socket://10.1.45.87

and unlike in the cups online documentation there is no direct usb:/dev/usb/lp0 type line. So it seems that cups is not looking for usb connections?
 
Hello,

First, Are you using linux?

Second, I am not so sure, but I think you may need a driver for your printer, linuxprinting.org

Btw, Canon driver was not available.
 
On my Solaris machine I have this, which highlights that hal is supported by cups, but I don't see a similar line in FreeBSD cups and I suspect this is the problem. I do not know how to enable hal support for cups in FreeBSD.
[CMD=]lpinfo -v[/CMD]
Code:
network ipp
network socket
network http
direct hal
network lpd
direct hp

Indeed, looking at [CMD=]ls /usr/local/libexec/cups/backend[/CMD]
Code:
dnssd*          lpd*            scsi*           socket*
http*           mdns*           serial*         usb*
ipp*            parallel*       snmp*
There is no hal. I suspect there should be?

thanks
 
Well, I am not using linux and posting here. ;)

But I do not need the driver just to find the printer with cups. Though to make it work properly one must have the correct PPD file, which I do. I have both a Brother and Canon printer, both of which work with cups, hal and Solaris. If it can work with Solaris I can't imagine it will not work with FreeBSD.

thanks
 
So I have installed kdebindings4 in the hope that hal-cups-utils was there. There is still not hal support in cups as listed in the backends or as noted below.

Oddly enough, if I rebuild cups *without* usb support, then I appear to have usb support!
[CMD=]lpinfo -v[/CMD]
Code:
network http
network ipp
network lpd
network socket
direct usb:/dev/ulpt0
direct usb:/dev/unlpt0
direct usb:/dev/ulpt1
direct usb:/dev/unlpt1
network lpd://BRN03F44B/BINARY_P1
network socket://10.1.45.38:9100
network socket://10.1.45.50
network socket://10.1.45.87

Cups should be able to automatically identify the printers, rather than just saying Printer #1 as it currently does in the configuration. Plus, it is noting its mounting at ulpt0 rather than usbus4 or ugen5, I'm not sure if that matters but there was some mention on a related thread that kernel support for ulpt and unlpt was not necessary and could be removed. I don't know what sort of effect that would have here.

Amazingly, building without usb support (counterintuitive) leads to usb support. I still have not figured out hal support, but at least I have been able to print test pages.

thanks
 
aorchid said:
Oddly enough, if I rebuild cups *without* usb support, then I appear to have usb support!

Agree, having the same issue just clicked to disable USB support in cups-base config and my printer appeared after cupsd restart. I think it is typo. It must be disable UDB support.
 
Look at the Makefile for print/cups-base:
Code:
.if !defined(CUPS_CLIENT) && !defined(CUPS_IMAGE) && defined(WITH_LIBUSB) && ${OSVERSION}>800062
CPPFLAGS+=              -I/usr/include
LDFLAGS+=               -L/usr/lib
.elif !defined(CUPS_CLIENT) && !defined(CUPS_IMAGE) && defined(WITH_LIBUSB) && ${OSVERSION}<800063
LIB_DEPENDS+=           usb:${PORTSDIR}/devel/libusb
.else
CONFIGURE_ARGS+=        --disable-libusb
.endif
.if ${OSVERSION} >= 800000
CONFIGURE_ARGS+=        LIBS="-lssp_nonshared"
.endif

CUPS_CLIENT and CUPS_IMAGE are set in the slave ports print/cups-client and print/cups-image, so this boils down to
Code:
.if defined(WITH_LIBUSB) && ${OSVERSION}>800062    # FreeBSD 8 and above has a native libusb
CPPFLAGS+=              -I/usr/include
LDFLAGS+=               -L/usr/lib
.elif defined(WITH_LIBUSB) && ${OSVERSION}<800063  # FreeBSD 7 and below use [port]devel/libusb[/port] for libusb
LIB_DEPENDS+=           usb:${PORTSDIR}/devel/libusb
.else
CONFIGURE_ARGS+=        --disable-libusb
.endif

Don't know why there would be problems if LIBUSB is enabled. If I used CUPS, I'd contact the maintainer (make maintainer) or enter a PR.
 
FWIW, I ran into trouble with USB printing when the printer was attached by means of a USB-Hub. In that case the device was silently killing any process using it. In case you use a HUB, could you attach that printer to a direct port? Sometimes the USB ports being available on the side/top/front of a machine are routed trough an internal HUB, so be a bit extra paranoid.
 
I once experienced a problem with cups not printing. Turned out the cable wasn't completely plugged in, even if it appeared to be. Your dmesg suggests they're both plugged in, but have you checked?
Any errors in /var/log/cups/error_log?
Can you manage printers from http://127.0.0.1:631, bring them up/down, print a test page?
 
Back
Top