lpd/printcap -> Trendnet TE100-P1P printserver/H-P5l

I am using a Trendnet TE100-P1P printserver with an H-P 5l laserjet that supports the following print command sets
Code:
HP ENHANCED PCL5,PJL
The printserver has a static IP at 192.168.1.2 and supported ipp:// and http:// in cups and has an hp jetdirect ports that I used for an OpenBSD printcap with apsfilter.
The following is my OpenBSD/Debian printcap:
Code:
## APS1_BEGIN:printer1
# - don't delete start label for apsfilter printer1
# - no other printer defines between BEGIN and END LABEL
hp5l|hp5l;r=300x300;q=draft;c=gray;p=letter;m=auto:\
    :lp=9100@192.168.1.2:\
    :if=/etc/apsfilter/basedir/bin/apsfilter:\
    :sd=/var/spool/lpd/hp5l:\
    :lf=/var/spool/lpd/hp5l/log:\
    :af=/var/spool/lpd/hp5l/acct:\
    :mx#0:\
    :sh:
# APS1_END - don't delete this
This printcap also works in Debian squeeze with apsfilter. I struggled mightly before I found a website that suggested using
Code:
lp=9100@192.168.1.2
instead of the :rp and :rm entries.
This same printcap did not work with FreeBSD 8.2 and the handbook page indicates that I need a :rm entry otherwise the job will the local parallel port by default.
My attempt at a FreeBSD printcap:
Code:
$ cat /etc/printcap
hp5l|lp|hp5l;r=300x300;q=draft;c=gray;p=letter;m=auto:\
    :rm=PS-8B4C0D:\
    :rp=raw:\
    :if=/usr/local/share/ps2pcl:\
    :sd=/var/spool/lpd/hp5l:\
    :lf=/var/spool/lpd/hp5l/log:\
    :af=/var/spool/lpd/hp5l/acct:\
    :mx#0:\
    :sh:
My /etc/hosts:
Code:
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#
# Network H-P 5l Laserjet printer
192.168.1.2    PS-8B4C0D.home.yak   PS-8B4C0D
My /usr/local/libexec/ps2pcl:
Code:
#!/bin/sh
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=ljet4 -sOutputFile=- -
Permissions for /usr/local/libexec/ps2pcl:
Code:
ls -al /usr/local/libexec/ps2pcl
-rwxr-xr-x  1 root  wheel  81 May  4 18:39 /usr/local/libexec/ps2pcl
My attempts to print:
Code:
$ lpq
Musk.home.yak: waiting for queue to be enabled on PS-8B4C0D
Rank   Owner      Job  Files                                 Total Size
1st    jsh        6    escher.ps                             10617 bytes


$ lpc status all
hp5l:
        queuing is enabled
        printing is enabled
        1 entry in spool area
        waiting for queue to be enabled on PS-8B4C0D
I have seen several formats for the 9100 printer port:
9100@192.168.1.2 and 192.168.1.2:9100 and 9100%192.168.1.2.
In cups the following works 192.168.1.2:P1

Thanks in advance
 
Thanks - success printing
Code:
/usr/local/share/ghostscript/8.71/examples/escher.ps
Your webpage had the answer at the end of the page.
For documentation this worked
Code:
hp5l|lp|H-P 5L Laserjet:\
    :lp=9100@PS-8B4C0D:\
    :sh:\
    :mx#0:\
    :sd=/var/spool/lpd/hp5l:\
    :if=/usr/local/libexec/ps2pcl: \
    :lf=/var/spool/lpd/hp5l/log:

There is a space on the :if line between the final colon and the backslash that I copied from your website and pasted into my printcap. I was wondering if it is necessary?
 
shepper said:
There is a space on the :if line between the final colon and the backslash that I copied from your website and pasted into my printcap. I was wondering if it is necessary?

No, it's just spurious. Now fixed; thanks!
 
Back
Top