AM Productions
HP Printer and Multi-Function Device Support for FreeBSD
NOTE: AM Productions is not responsible for damages of any kind that result from the use/misuse of the following instructions.
HPLIP
Last Updated 2006-12-25
I have ported a preliminary version of HP's hplip software for their printers and multi-function devices. You can download the port skeleton linked below. If you have a Deskjet or Officejet this should unlock all the functionality that HP has provided with the hplip software.
The hplip port has been commited to the ports tree. CVSup and to grab the latest version. You will still want to apply the ugen patch below if you are not running -CURRENT.
* Make sure that the following ports are opened on your firewall if running one locally (see http://www.iana.org/assignments/port-numbers): Add IANA HP I/O and Status ports to /etc/services
- hpssd: 2207/tcp and 2207/udp
- hpiod: 2208/tcp and 2208/udp
- cups: 631/tcp and 631/udp
sh /etc/ipfw.rules
If hpiod shows an error while you are trying to print:
hpiod: Unable to Device::Open
Before doing the following DOUBLE CHECK all of your settings, permissions, and restart all of the daemons and devfs. The following is a last resort and this is NOT recommended.
You can fix it by running hpiod with the elevated privileges (in/etc/rc.conf):
hpiod_user="root"
A good step-by-step howto by Daniel W. Steinbrook
All of the relevant instructions should now be included in the above port skeleton. All of the following information is just for historical reference.
NOTE: Make sure to read the pkg-message for correct unprivledged setup.
If you'd like to try to get it setup, you need to:
NOTE: Make sure to pkg_delete any previous versions! Do not make deinstall an old installed version with a new skeleton!
- Make sure your printer is attaching as a
ugendevice. This means if the ulpt device is appearing remove it from your kernel or unload the ulpt module and add/load the ugen device. - Install the port using the linked skeleton above
- Follow the instructions in the
pkg-messagefile. If you have never setup devfs.rules follow these instructions. Then restart devfs/etc/rc.d/devfs restartto pickup the ugen ownership and permission changes. - Stop cups
/usr/local/etc/rc.d/cupsd stop. If you are upgrading from a previous version stop the hpiod and hpssd daemons too. - You MUST start the services in the following order
/usr/local/etc/rc.d/hpiod start && /usr/local/etc/rc.d/hpssd start && /usr/local/etc/rc.d/cupsd start - Run
hp-setupand follow the prompts. - You should have been able to print out the test page in step 5. If not, send your syslog (/var/log/messages) output along with any output from the application you're trying to run.
- Run hp-toolbox for all of that fun printer information
You can now pull status information. Scanning and faxing work too! I didn't have a destination fax number to send something to, but the machine did initialize, dial, and timeout correctly. The scan correctly grabbed the image :).
hp-toolbox is your friend.
Patches
To-Do
- General Testing
- Photocard Testing
- Fix Officejet Panel Display
- Fix "Make Copies"
- Properly implement ugen
write()polling. - Implement a WITHOUT_GUI option to disable the GUI tools and QT dependency. [Fixed as of 1.6.7]
- Banish the Linuxisms in the Makefile [Fixed in commited version]
- Fix the panic in ugenpoll when using
select()to properly implement timeouts. [Fixed with above patch] - Various ugen fixes [Fixed with above patch]
- Run hpiod and hpssd as unprivileged users [Fixed -try3]
- Automatically Setup Scanner [Fixed -try3]


