Date: Sun, 18 Aug 2013 21:26:46 +0300 From: Juris Kaminskis <juris.kaminskis@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: Setup HP Laserjet 1120m over network with LPD Message-ID: <CAKJAkzs=ynr6Mz=HO=MPtXaS9SbRkysGFo2%2BkVSURDr4Tqsxiw@mail.gmail.com> In-Reply-To: <CAKJAkzvA5%2BG5mOAZKKQOS6zdq%2B=A0i-BpbtjJtDwZJipskuz0A@mail.gmail.com> References: <CAKJAkzvA5%2BG5mOAZKKQOS6zdq%2B=A0i-BpbtjJtDwZJipskuz0A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
as suggested i tried now foo2xqx filter. My printcap entry: ----------------------- HP:\ :lp=:\ :sh:\ :mx#0:\ :rm=192.168.1.105:\ :rp=raw:\ :sd=/var/spool/hp:\ :if=/usr/bin/foo2xqx-wrapper:\ :lf=/var/log/lpd-errs:\ ----------------------- Now I get following errors in log file: ----------------------- Aug 18 21:16:17 laptops lpd[11798]: lpd startup: logging=0 Aug 18 21:16:17 laptops foo2xqx-wrapper: foo2xqx-wrapper -w132 -l66 -i0 -n root Aug 18 21:16:18 laptops lpd[11799]: restarting HP Aug 18 21:16:18 laptops foo2xqx-wrapper: foo2xqx-wrapper -w132 -l66 -i0 -n root Aug 18 21:16:19 laptops lpd[11799]: restarting HP Aug 18 21:16:19 laptops foo2xqx-wrapper: foo2xqx-wrapper -w132 -l66 -i0 -n root Aug 18 21:16:19 laptops lpd[11799]: restarting HP Aug 18 21:16:19 laptops foo2xqx-wrapper: foo2xqx-wrapper -w132 -l66 -i0 -n root Aug 18 21:16:19 laptops lpd[11799]: restarting HP Aug 18 21:16:19 laptops foo2xqx-wrapper: foo2xqx-wrapper -w132 -l66 -i0 -n root Aug 18 21:16:19 laptops lpd[11799]: HP: job could not be sent to remote host (cf Aug 18 21:16:20 laptops lpd[11799]: mail sent to user root about job <unknown> o ----------------------- why foo2xqx-wrapper is forcing restart for the printer? 2013/8/6 Juris Kaminskis <juris.kaminskis@gmail.com> > > after several trials and errors and reading through FreeBSD handbook I am > at dead end on how to proceed further, hope someone can guide me. > > my /etc/printcap entry: > ----------------------- > HP:\ > :rm=192.168.1.105:sd=/var/spool/hp:lf=/var/log/lpd-errs:\ > :if=/usr/local/libexec/hp-network: > ----------------------- > > my /usr/local/libexec/hp-network entry: > ----------------------- > #!/bin/sh > # > # hp-network - Text filter for HP printer `NPI2B483C' listening > # on port 9100. Installed in /usr/local/libexec/hp-network > # > exec /usr/libexec/lpr/lpf "$@" | /usr/local/libexec/netprint 192.168.1.105 > 9100 > ----------------------- > > my /usr/local/libexec/netprint entry: > ----------------------- > !/usr/bin/perl -w > # > # netprint - Text filter for printer attached to network > # Installed in /usr/local/libexec/netprint > # > > $#ARGV eq 1 || die "Usage: $0 <printer-hostname> <port-number>"; > > $printer_host = $ARGV[0]; > $printer_port = $ARGV[1]; > use Socket; > > $protocol = getprotobyname('tcp'); > $address = inet_aton("192.168.1.105"); > $sockaddr = sockaddr_in($printer_port, $address); > > socket(PRINTER, PF_INET, SOCK_STREAM, $protocol) > || die "Can't create TCP/IP stream socket: $!"; > connect(PRINTER, $sockaddr) || die "Can't contact $printer_host: $!"; > > while (<STDIN>) { print PRINTER; } exit 0; > ----------------------- > > Now my /var/log/lpd-errs is empty and in spool directory I have following > after running command lptest 20 5 | lpr -P HP : > > content of /var/spool/hp > total 16 > -rw-r--r-- 1 root juris 4 Aug 6 21:55 .seq > -rw-rw---- 1 daemon juris 70 Aug 6 21:55 cfA014laptops > -rw-rw---- 1 root juris 605 Aug 6 21:55 dfA014laptops > -rw-rw-r-- 1 root juris 0 Aug 6 21:55 errs.ukc0YLC > -rw-rw-r-- 1 root juris 5 Aug 6 21:55 lock > > My printer is not responding in any way, it keeps on flashing Ready. it is > on the internal network having ip 192.168.1.105 > > thanks > Juris > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKJAkzs=ynr6Mz=HO=MPtXaS9SbRkysGFo2%2BkVSURDr4Tqsxiw>