Re: Xerox DocumentCentre C450 PCL reference

From: Peter Ross <Peter.Ross(at)alumni.tu-berlin.de>
Date: Tue, 7 May 2013 17:01:07 +1000 (EST)

Hi Armando,

danke für die Antwort.

On Tue, 7 May 2013, Armando Cambra wrote:

> 2013/5/7 Peter Ross <Peter.Ross(at)alumni.tu-berlin.de>:
>>
>> http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=bpl02705
>>
>> Paper destination - Left Output Bin: Ec&l2G
>>
>> Okay, nach etwas Friemeln mit sed (an Control-Sequencen gescheitert, wie
>> stellt man Sorderzeichen in sed da?) mein Perlwissen entstaubt,
>>
>> #!/usr/bin/perl
>>
>> # Find the first <esc>E (PCL reset) and add a <esc>&l2G (output tray)

..
>>
>> Prima, Sequenz ist drin, nur bewirkt es nichts (habe auch mit <esc>&l1G etc.
>> versucht)

> #!/usr/bin/perl -w
> use strict;
> use IO::Socket;
> if (@ARGV < 1){
> print "usage: " . $0 . " ip-address\n";
> exit
> }
> my $ip = $ARGV[0];
> #open the socket
> my $sock = new IO::Socket::INET (
> PeerAddr => $ip,
> PeerPort => '9100',
> Proto => 'tcp',
> ) || die "Could not create socket - $!\n";
>
> #send page query to socket
> #
> # ID Provides the printer model number, such as
> # “LaserJet 4.�
> # CONFIG Provides configuration information, such as how
> # many and which paper sizes are available in this
> # printer.
> # FILESYS Returns PJL file system information.
> # MEMORY Identifies amount of memory available.
> # PAGECOUNT Returns the number of pages printed by the
> # print engine.
> # STATUS Provides the current printer status.
> # VARIABLES Lists environmental and printer
> # language-dependent variables, the possible
> # variable values, and the current variable
> # settings.
> # USTATUS Lists the unsolicited status variables provided by
> # the printer, the possible variable values, and the
> # current variable settings.
>
> send($sock, "\033%-12345X\@PJL INFO CONFIG\r\n",0);
> print "request sent\n";
> my $RESPONSE;
> print "Answer: ",recv($sock,$RESPONSE,0xFFFFF,0);
> print "answer received\n";
> print $RESPONSE;
> close($sock);

Wie bekomme ich die Variablen abgefragt?

# ./pcl_printer_test.pl prv3.vv.fda
request sent
Answer: answer received
@PJL INFO CONFIG

(Ändern: send($sock, "\033%-12345X\@PJL INFO ID\r\n",0);

# ./pcl_printer_test.pl prv3.vv.fda
request sent
Answer: answer received
@PJL INFO ID

Na, das ist nur ein Echo-Dienst, irgendwas mache ich hier falsch.

Kannst Du mich bitte aufklären?

Danke
Peter

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Tue 07 May 2013 - 09:01:30 CEST

search this site