HP Photosmart USB setup

I've installed and configured FreeBSD 9.1 to my liking, but now I'm seriously stumped trying to get my printer to work with it. I installed cups-base, hplip and their dependencies, then per the handbook, pkg messages and some posts here I made the following changes:
-> /etc/rc.conf
Code:
lpd_enable="YES"
devfs_system_ruleset="system"
-> /etc/devfs.conf
Code:
/dev/ulpt0 0664
-> /etc/devfs.rules
Code:
add path 'usb*' mode 0770 group cups
add path 'ugen*' mode 0660 group cups
-> /etc/group
Code:
daemon:*:1:daemon,<username>
cups:*:193:<username>
The printer shows up in the CUPS web interface as:

Code:
Description:	HP_Photosmart
Location:	Home
Driver:	HP Photosmart b010 Series hpijs, 3.13.2 (color, 2-sided printing)
Connection:	hp:/usb/Photosmart_B010_series?serial=CN11R2K20D05K9
Defaults:	job-sheets=none, none media=na_letter_8.5x11in sides=one-sided

but hplip shows communication error 5012 and when I try to print a test page the CUPS web client says:
Code:
/usr/local/libexec/cups/backend/hp failed

I'm in a dead end here and all constructive help from the community would be greatly appreciated.
 
IT-Doody said:
I'm in a dead end here and all constructive help from the community would be greatly appreciated.

hplip uses libusb to talk directly to the printer, so if your printer is attached as ulpt there is a conflict. Try to use a kernel without ulpt, you don't need lpd also.
HTH
 
Thanks for replying everyone. I failed to mention that I had cupsd enabled from the beginning. Here are the steps I've undertaken rebooting after each one:
  1. Removed
    Code:
    lpd_enable="YES"
    from /etc/rc.conf(my /etc/devfs.conf didn't actually have any added entries).
  2. Commented out everything containing *lpt* from /etc/devfs.rules
  3. Removed ulpt.ko and ulpt.ko.symbols from /boot/kernel/
At this point though it seems that the conflict remains as hinted by /var/log/messages:
Code:
Oct 25 23:02:30 420 kernel: ugen3.2: <HP> at usbus3
Oct 25 23:02:30 420 kernel: ulpt0: <HP Photosmart B010 series, class 0/0, rev 2.00/1.00, addr 2> on usbus3
Oct 25 23:02:30 420 kernel: ulpt0: using bi-directional mode
Do I have to rebuild the kernel to stop ulpt0 from being loaded?
 
IT-Doody said:
Do I have to rebuild the kernel to stop ulpt0 from being loaded ?

from being "attached" yes (loaded is for the module, attached for the device), ulpt is included in the GENERIC kernel. You can keep the module in /boot/kernel.

edit: I'm not sure if in FreeBSD >= 9.X we have to prevent ulpt from being attached. But try it.

I've made a documentation that worked with 8.X in french : http://diablotins.davenulle.org/index.php/Imprimer,_HPLIP
 
cups-base's default options configuration is without USB support (libusb - required by hplip). Have you switched LIBUSB on before building the port?
 
T-Daemon said:
cups-base's default options configuration is without USB support (libusb - required by hplip). Have you switched LIBUSB on before building the port?
Yes, that was a no-brainer even for a noob like myself. I double-checked now and libusb is ticked in my saved configuration for cups-base. What I'm still trying to understand is why do we have all those kernel objects in /boot/kernel if removing one doesn't stop the kernel from loading/attaching it. Are they actually included in /boot/kernel/kernel and all the individual *.ko modules are there for implicit loading in case not compiled in the kernel? Unless someone can suggest another shortcut via a configuration file I'll have to resign myself to re-compile the kernel then. My understanding is I'd have to edit the customized configuration file as such:
Code:
#device		ulpt		# Printer
 
I recompiled the kernel as described above and removed ulpt.ko and ulpt.ko.symbols. Even though I don't see the ulpt attaching itself to the printer anymore, only
Code:
Oct 26 18:19:08 420 kernel: ugen3.2: <HP> at usbus3
the results are the same as before. Could someone offer some more hand-holding and help me figure out what am I missing? Once again this is my current configuration:
/etc/rc.conf
Code:
cupsd_enable="YES"
devfs_system_ruleset="system"
/etc/devfs.rules
Code:
add path 'usb/3.2' mode 0660 group cups
add path 'ugen*' mode 0660 group cups
etc/group
Code:
cups:*:193:ramrod
 
I'm posting some recent output from /var/log/messages which caught my attention, hoping that someone would get interested in diagnosing this issue further:
Code:
Oct 31 00:36:52 420 python: io/hpmud/musb_libusb01.c 1128: unable to open hp:/usb/Photosmart_B010_series?serial=CN11R2K20D05K9
Oct 31 00:36:52 420 hp-systray: hp-systray(hpdio)[1648]: error: Unable to communicate with device (code=12): hp:/usb/Photosmart_B010_series?serial=CN11R2K20D05K9
Oct 31 00:36:52 420 hp-systray: hp-systray(hpdio)[1648]: error: Device not found
Oct 31 00:37:19 420 hpijs[1690]: io/hpmud/musb_libusb01.c 1128: unable to open hp:/usb/Photosmart_B010_series?serial=CN11R2K20D05K9
Oct 31 00:37:19 420 hp[1684]: io/hpmud/musb_libusb01.c 1128: unable to open hp:/usb/Photosmart_B010_series?serial=CN11R2K20D05K9
Oct 31 00:37:19 420 hp[1684]: prnt/backend/hp.c 745: ERROR: open device failed stat=12: hp:/usb/Photosmart_B010_series?serial=CN11R2K20D05K9
Oct 31 00:38:49 420 hp-systray: io/hpmud/musb_libusb01.c 1128: unable to open hp:/usb/Photosmart_B010_series?serial=CN11R2K20D05K9
Oct 31 00:38:49 420 hp-systray: hp-systray(hpdio)[1648]: error: Unable to communicate with device (code=12): hp:/usb/Photosmart_B010_series?serial=CN11R2K20D05K9
Oct 31 00:38:49 420 hp-systray: hp-systray(hpdio)[1648]: error: Device not found
 
Since I started this thread I did a system upgrade from 9.1 to 9.2 and somehow right after that my system became unstable with every session ending in a spontaneous reboot. I decided to do a clean install of 9.2 (everything working tight so far) and went back to printer setup. It seems to be all working now - what a huge relief! I want to give credit for help I got from here: http://daemon-notes.com/articles/desktop/hplip/

I've done the same steps originally except one regarding /etc/devd. I don't know if that really made all the difference but I'm happy to overcome the final hurdle in migrating to FreeBSD as my full-time desktop.
 
Back
Top