Tuesday, November 09, 2010

Setup Netgear Printer Server WGPS606 with FreeBSD

Here is the steps to configure FreeBSD to use an HP LaserJet printer on Netgear WGPS606.


  1. Add lpd_enable="YES" in /etc/rc.conf
  2. Add these lines to /etc/printcap
    lp|hp|laserjet|HP LaserJet 3015 on WGPS606:\
        :sh:\
        :rm=192.168.1.110:rp=L1:sd=/var/spool/lpd/hp:lf=/var/log/lpd-errs:\
        :if=/usr/local/libexec/ifhp:
    

    In my setup, the IP address of WGPS606 is 192.168.1.110 and the printer is connected to the first USB port. Therefore, the rm in the printcap is 192.168.1.110 and the rp is L1. If a printer is connected to the second USB port, then rp should be L2.
  3. Now let's copy the hp filter:
    cp /usr/local/share/examples/printing/ifhp /usr/local/libexec/ifhp
  4. We need to make the filter executable by all:
    chmod 0555 /usr/local/libexec/ifhp
  5. Now create the printer spool folder.
    mkdir /var/spool/lpd/hp
  6. Don't forget to start lpd by:
    /etc/rc.d/ldp start
  7. Print a test page: lpr -P hp test.txt
  8. If printing does not happen at all, tail -f /var/log/lpd-errs to see what is going on.

No comments: