> From [EMAIL PROTECTED] Thu Feb  7 00:30:11 2002
> Date: Thu, 07 Feb 2002 08:34:35 +0100
> To: [EMAIL PROTECTED]
> From: =?iso-8859-1?Q?Fr=E9d=E9ric?= Oger <[EMAIL PROTECTED]>
> Subject: LPRng: HP 4 simx page counter
>
>
> Hello everyone,
>
> I try to get the page counter from an HP 4 si mx using a perl script. While 
> it works perfectly with other HP printers (4050, 4100), I never get the 
> expected answer.
>
> Here's the script I use (found on this list)
>
> #!/usr/bin/perl
> use IO;
> use Socket;
> use strict;
>
> my $ipaddr = '130.104.3.15:9100';
> my $sock=IO::Socket::INET->new(PeerAddr =>$ipaddr, Proto => 'tcp', Type => 
> SOCK_
> STREAM) or die "socket : $!";
> my $eol="\x0a";
> my $esc="\x1B";
> my $pagecount="$esc\%-12345X\@PJL JOB$eol" . "\@PJL INFO PAGECOUNT $eol" . 
> "$esc
> \%-12345x";
> my $stuff;
> $sock->send("$pagecount");
> $sock->recv($stuff, 1024);
> print "Received : $stuff\n";
> close $sock;
>
> The result I get is :
> Received : @PJL USTATUS TIMED
> CODE=10001
> DISPLAY=":"
> ONLINE=TRUE
>
> When expecting :
>
> Received : @PJL INFO PAGECOUNT
> 18043

The printer probably does not support the INFO PAGECOUNT.

Patrick

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to