On Mon, Nov 10, 2003 at 10:36:20AM -0500, Rick Cochran wrote:
> Henrik Edlund wrote:
> >On Tue, 21 Oct 2003, Rick Cochran wrote:
> >
> >RC> One kludge we have had to use here on Lexmark printers and the HP 8550
> >RC> is to use SNMP to read the printer's front panel display to see if it
> >RC> says "Ready" (or "Warming up", etc.). This is because the SNMP status
> >RC> variables will say that the printer is idle before the page counter
> >RC> clicks.
> >
> >And this will fail if you switch language on the printer to, for example,
> >Swedish.
>
> Possible changes in the language on my printer are not at the top of my
> list of concerns.
>
> As I review my notes, I find that I have mischaracterized the problem
> slightly. The problem is that if you have a small (in bytes) print job,
> the entire job can end up getting transferred to the printer before the
> printer starts printing (ie. paper moving). If you are using the usual
> SNMP variables to determine whether the printer is "idle" before doing the
> second read of the page counter, you will be fooled into reading too early
> because these SNMP variables respond only to paper movement.
>
> The front panel display, on the other hand, changes immediately when the
> printer starts to receive a job.
>
> This is a problem for both Lexmark and Xerox printers, not for HP (except
> for the HP 8550).
>
> How do you solve this problem?
>
> -Rick
>
Hmmm... well there are others as well. Here is a snippet from
the ifhp code that seems to address this problem. See the convoluted
logic in the code below. Experiments indicated that a 1 second delay
was suffient for most purposes. I suppose that I should add
Yet Another Configure Variable - snmp_wait_after_close, to
allow you to modify/extend this value. Sigh....
/*
* Some badly bent or totally broken appsocket printers MUST
* have a shutdown rather than a close done on the connection,
* and the connection MUST stay open and MUST be read UNTIL
* the printer is finished. This is really really maddening,
* but that is the way it is done.
*
* if we are doing Appsocket
* and we have shutdown_appsocket
* THE we shutdown the Appsocket and read from it until EOF
* We discard the data if Status@
*/
if( Appsocket ){
if( !Close_appsocket ){
int len;
DEBUG1("End_of_job: Appsocket device shutdown");
shutdown(1,1);
do{
len = Read_status_timeout( 0 );
} while( len == 0 );
}
DEBUG1("End_of_job: Appsocket device close");
close(1);
/* the printer may not respond until it detects the end condition */
if( Status && Close_appsocket && Snmp_fd ){
>>>>>>>>>>>>>>>>>>>>>>>>>
sleep(1);
}
/* and yet another special case */
if( Status && wait_for_end && (Snmp_fd || cval(Waitend) == '|') ){
Do_waitend(Waitend_timeout, Waitend_interval,
Ps_ctrl_t?Waitend_ctrl_t_interval:0, banner_page );
}
} else if( Status && wait_for_end ){
/* we wait for the end normally */
Do_waitend(Waitend_timeout, Waitend_interval,
Ps_ctrl_t?Waitend_ctrl_t_interval:0, banner_page );
}
--
Patrick Powell Astart Technologies
[EMAIL PROTECTED] 6741 Convoy Court
Network and System San Diego, CA 92111
Consulting 858-874-6543 FAX 858-751-2435
LPRng - Print Spooler (http://www.lprng.com)
-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------