From owner-freebsd-questions@FreeBSD.ORG Tue Aug 6 19:58:11 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 30005365 for ; Tue, 6 Aug 2013 19:58:11 +0000 (UTC) (envelope-from juris.kaminskis@gmail.com) Received: from mail-wg0-x22e.google.com (mail-wg0-x22e.google.com [IPv6:2a00:1450:400c:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BBF3722AF for ; Tue, 6 Aug 2013 19:58:10 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id k13so746956wgh.25 for ; Tue, 06 Aug 2013 12:58:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=4frXw1/dGZhGZHuXqyJ/0eCXwmMfEcDyrv0g6xfbo98=; b=XZCOQB5TuvSycRaqg3be0fGSHEIWnmxskBxQ4ALvFIOR5nc+Om1KoORqR5lOTMijzN DXmvoPmjscR1HrnFa//221B7Ish7QAZGcIf65i44HNkgtJZOL8S5bprog5PAdRlpYCUz VtJE2iHyrB4vlhTg4YKk6JpEXweJOf4PZwhCjwu5WENKWVn3lLJuhaUd5pWKoysEr0gj jKInXFYLrV7ANCo8f0hBBP+yiq0msqFhUFJ5QqdPSXMpdDQ9h2hVjq2vFAggyVJ0SByo LdvzOzbZwLpWFsOywL6zK1gX+M0bfbUqrPybZ9ZhGYgyfhAgoediq+tYtRVS3cthiHeh sObQ== MIME-Version: 1.0 X-Received: by 10.180.20.105 with SMTP id m9mr3143047wie.44.1375819088954; Tue, 06 Aug 2013 12:58:08 -0700 (PDT) Received: by 10.194.83.225 with HTTP; Tue, 6 Aug 2013 12:58:08 -0700 (PDT) Date: Tue, 6 Aug 2013 22:58:08 +0300 Message-ID: Subject: Setup HP Laserjet 1120m over network with LPD From: Juris Kaminskis To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 19:58:11 -0000 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_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 () { 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