From owner-freebsd-questions@FreeBSD.ORG Mon Sep 24 08:44:20 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 822F616A4FC for ; Mon, 24 Sep 2007 08:44:20 +0000 (UTC) (envelope-from on@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) by mx1.freebsd.org (Postfix) with ESMTP id C294013C447 for ; Mon, 24 Sep 2007 08:44:16 +0000 (UTC) (envelope-from on@cs.ait.ac.th) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) by mail.cs.ait.ac.th (8.13.1/8.12.11) with ESMTP id l8O8iFXf057608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 24 Sep 2007 15:44:15 +0700 (ICT) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.13.3/8.12.11) id l8O8iFXa076591; Mon, 24 Sep 2007 15:44:15 +0700 (ICT) Date: Mon, 24 Sep 2007 15:44:15 +0700 (ICT) Message-Id: <200709240844.l8O8iFXa076591@banyan.cs.ait.ac.th> From: Olivier Nicole To: freebsd-questions@freebsd.org X-Virus-Scanned: on CSIM by amavisd-milter (http://www.amavis.org/) Subject: Reading page count from USB printer X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2007 08:44:20 -0000 Hi, I have an HP2200 printer connected to a 6.2 box via USB. I would luke to read the page count. I know the PCL sequence to do that, but I am unsure about the way to access the printer. The pinter shows up at /dev/ulpt0, I can redirect text to it for printing, using cat file.ps >/dev/ulpt0 But I do not manage to read the PCL response. How should I do? In Perl preferably. Best regards, Olivier