Home arrow Latest Tutorials arrow Configure HP 1020 Printer to work with FreeBSD
Configure HP 1020 Printer to work with FreeBSD PDF
Monday, 03 January 2011

We will use cups and foo2zjs.
The version of FreeBSD on which we tested the installation is 8.x (8.0 and 8.1)

When compiling CUPS choose USB support, otherwise it will not work (do a make config on cups-base port dir).

cd /usr/ports/print/cups
make install clean

cd /usr/ports/print/foo2zjs
make install clean

After installation of foo2zjs read the after install message on that terminal and then do as in that message:

cd /tmp && getweb all

Make some directories

mkdir /usr/local/share/foo2zjs/icm
mkdir /usr/local/share/foo2zjs/firmware
mkdir /usr/local/share/foo2hp/icm

Copy there downloaded files:

cp DL*.icm CP*.icm km2430*.icm /usr/local/share/foo2zjs/icm
cp sihp*.img /usr/local/share/foo2zjs/firmware
cp hpclj26*.icm km2430*.icm /usr/local/share/foo2hp/icm
rm *.icm *.img


Edit /boot/loader.conf and add:

ulpt_load = "YES"

Edit /etc/devfs.rules and add the following line:

add path 'ulpt0' mode 0660 group cups
add path 'usb/4.2.1' mode 0660 group cups


You can look in /var/log/messages for ugen device id of your printer:
For us it is: /dev/ugen4.2 (it depends on your usb port).

Generate .dl file for the printer from the previously downloaded firmware:

cd /usr/local/share/foo2zjs/firmware
arm2hpdl sihp1020.img > sihp1020.dl

Install the file to the printer:

cat /usr/local/share/foo2zjs/firmware/sihp1020.dl > /dev/usb/4.2.1

Please note that in your case the usb device might be different.

Edit /etc/devd.conf and add the following lines:

# firmware for HP Laserjet 1020 printer
attach 100 {
        match "vendor" "0x03f0";
        match "product" "0x2b17";
        action "cat /usr/local/share/foo2zjs/firmware/sihp1020.dl > /dev/usb/4.2.1";
        # action "cat /usr/local/share/foo2zjs/firmware/sihp1020.dl > /dev/$device-name";
};


Next step is to configure cups.
Add the following lines to /etc/rc.conf

cupsd_enable="YES"
devfs_system_ruleset="system"

If your printer is on a local net server you might want to configure it from anoter station.
To do this make cups run on machine IP (by default the service runs on localhost) and then allow your client machine IP or your local subnet to configure cups:

edit /usr/local/etc/cups/cupsd.conf and add:

  Listen 192.168.0.100:631

Asuming that your server IP is 192.168.0.100.

To allow your entire subnet (192.168.0.0/24 for example) add in the same file a line like this:

  Allow from 192.168.0.0/24

in every section you want access from cupsd.conf file.


Then start cups:
/usr/local/etc/rc.d/cupsd start

To access web interface for cups use a browser:

http://192.168.0.100:631/admin




Tips:
-----

Tip 1. Debugging devd
-----------------------

To debug your setup use:

devd -Dd

(you will get debug info when you start the printer)


Tip 2. Compatibility with Windows Clients
---------------------------------------------

In /usr/local/etc/cups/mime.types file the line application/octet-stream must be uncommented to work with some Windows clients. By default on last FreeBSD OS-es this option is uncommented by default.


Tip 3. Encryption error
------------------------

If when you try to add a printer when using an IP address you are redirected to a https page and you get the message:

426 Upgrade Required
You must access this page using the URL https://hostname:631/admin/.


Upgrade Required, then is a problem with encryption and is a quick way to disable it and then dont't forget to restart cups.

To disable encryption add in /usr/local/etc/cups/cupsd.conf at the top:

DefaultEncryption IfRequested

l

Last Updated ( Thursday, 04 October 2012 )
 
< Prev   Next >

Other BSD Systems

OpenBSD

Misc

Solaris

Polls

Best BSD firewall?