>I've done some testing now and noticed that with the following 
>AppSocket settings on the printer:
>
>         Port Enabled: Yes
>             Language: Postscript
>     Host Access List: Unrestricted
>  Receive Window Size: 0
>     Send Window Size: 0
>            Filtering: None
>Delayed Output Close: Off
>
>I manage to get the pagecounter. When the option Language was set to 
>AUTO, I got the Connection refused error message.
>
>The command I used was:
>
># ./ifhp -Tdev=tek560%9100,trace,debug=2,model=phaser < 
>/var/tmp/smalltest.ps 2>&1 | tee /var/tmp/log01
>
>tek560 - IP name of printer
>smalltest.ps - a small postscript document
>log01 - the log file
>
>When I sent the file I only got the following error message printed:
>
>ERROR: undefined     (COMMAND TYPE: nametype)
>OFFENDING COMMAND:  M   "^AM"
>
>OPERAND STACK: (0 total entries)
>     ===top of stack===
>...
>
>

I solved this issue by disabling tbcp from the ifhp.conf file.

Now I manage to print postscript and text documents to the printer!

But I do have some questions:

When examining the log file it looks like the connection opens and 
closes before the pagecount command is given. Is this correct?

Log file:

...
ifhp 11:40:07.500 [936] Open_device: device 'tek560%9100'       <-- 
FIRST ATTEMPT ??
ifhp 11:40:07.528 [936] Open_device: destination 'x.x.x.x' port 9100, attempt 1
ifhp 11:40:07.538 [936] Open_device: success
ifhp 11:40:07.554 [936] Check_pagecount: pagecount using 'ps script'
ifhp 11:40:07.555 [936] Init_outbuf: Outbuf 0x40798, Outmax 10240, Outlen 0
ifhp 11:40:07.558 [936] Process_job: setting up printer
ifhp 11:40:07.559 [936] Start_of_job: sync and pagecount, 
do_pagecount 1, ps 1 pjl 0
ifhp 11:40:07.561 [936] Do_sync: sync is '0'    <-- Why do this when 
sync is off?
ifhp 11:40:07.563 [936] Current_pagecounter: Appsocket device close
ifhp 11:40:07.565 [936] Open_device: device 'tek560%9100'       <-- 
SECOND ATTEMPT ??
ifhp 11:40:07.569 [936] Open_device: destination 'x.x.x.x' port 9100, attempt 1
ifhp 11:40:07.581 [936] Open_device: connect to 'x.x.x.x port 9100' 
failed - Connection refused
ifhp 11:40:07.585 [936] Open_device: destination 'x.x.x.x' port 9100, attempt 1
ifhp 11:40:07.594 [936] Open_device: connect to 'x.x.x.x port 9100' 
failed - Connection refused
...

After a while a connection is made. ifhp is getting the pagecounter:

...
ifhp 11:40:08.860 [936] Open_device: success
ifhp 11:40:08.861 [936] Current_pagecounter: Appsocket device open done
ifhp 11:40:08.866 [936] Current_pagecounter: starting, use_pjl 0, 
use_ps 1, timeout 0
ifhp 11:40:08.868 [936] Init_outbuf: Outbuf 0x40798, Outmax 10240, Outlen 0
ifhp 11:40:08.869 [936] Current_pagecounter: using '%!false 0 startjob pop
(%%[ pagecount: )print statusdict /pagecount get exec ( 
)cvs print
( ]%% )= flush'
ifhp 11:40:08.872 [936] Current_pagecounter: write len 0
ifhp 11:40:11.247 [936] Current_pagecounter: write len 0
ifhp 11:40:11.248 [936] Read_status_line: read fd 1, count 26, '%%[ 
pagecount: 97675 ]%% '
ifhp 11:40:11.249 [936] Current_pagecounter: Read_status_line_returned '26'
ifhp 11:40:11.250 [936] Current_pagecounter: page 1, pagecounter 97675
ifhp 11:40:11.251 [936] Do_pagecount: pagecounter 97675
ifhp 11:40:11.251 [936] Start_of_job: Appsocket device close
ifhp 11:40:11.253 [936] Open_device: device 'tek560%9100'
ifhp 11:40:11.254 [936] Open_device: destination '129.177.42.61' port 
9100, attempt 1
ifhp 11:40:11.263 [936] Open_device: connect to '129.177.42.61 port 
9100' failed - Connection refused
...

After getting the ifhp closes the connection an opens it again for 
sending the file.

...
ifhp 11:40:11.510 [936] Open_device: success
ifhp 11:40:11.510 [936] Start_of_job: Appsocket device open done
ifhp 11:40:11.514 [936] Do_accounting: pagecounter 97675
ifhp 11:40:11.516 [936] Accounting: script '<NULL>', Accountfile 
'<NULL>', outpu
t 'filestart '-q936' '-p97675' '-t2000-08-22-11:40:11.515''
ifhp 11:40:11.517 [936] Init_outbuf: Outbuf 0x40798, Outmax 10240, Outlen 0
ifhp 11:40:11.518 [936] Start_of_job: doing 'init'
ifhp 11:40:11.518 [936] Write_out_buffer: write len 0, read_fd 1, maxtimeout 0
ifhp 11:40:11.519 [936] Write_out_buffer: done, returning 0
ifhp 11:40:11.520 [936] Init_outbuf: Outbuf 0x40798, Outmax 10240, Outlen 0
ifhp 11:40:11.521 [936] Process_job: sending job file
ifhp 11:40:11.521 [936] Send_job: starting transfer
...

The printer job is printed successfully and then ifhp is trying to 
get the new pagecounter:

...
ifhp 11:40:13.839 [936] Send_job: total written 13957
ifhp 11:40:13.840 [936] Send_job: pc total 13957, change 26%
ifhp 11:40:13.842 [936] Send_job: 100 percent done
ifhp 11:40:13.844 [936] Send_job: finished file transfer
ifhp 11:40:13.845 [936] Term_job: language 'POSTSCRIPT'
ifhp 11:40:13.847 [936] Write_out_buffer: write len 1, read_fd 1, maxtimeout 0
ifhp 11:40:13.849 [936] Write_out_buffer: timeout 0, len 1
ifhp 11:40:13.851 [936] Write_out_buffer: left to write 0, flag 0
ifhp 11:40:13.852 [936] Write_out_buffer: done, returning 0
ifhp 11:40:13.854 [936] Init_outbuf: Outbuf 0x40798, Outmax 10240, Outlen 1
ifhp 11:40:13.855 [936] Send_job: data sent
ifhp 11:40:13.856 [936] Process_job: sent job file
ifhp 11:40:13.859 [936] Init_outbuf: Outbuf 0x40798, Outmax 10240, Outlen 0
ifhp 11:40:13.861 [936] Write_out_buffer: write len 0, read_fd 1, maxtimeout 0
ifhp 11:40:13.862 [936] Write_out_buffer: done, returning 0
ifhp 11:40:13.863 [936] Init_outbuf: Outbuf 0x40798, Outmax 10240, Outlen 0
ifhp 11:40:13.865 [936] End_of_job: end sync and pagecount, 
do_pagecount 1, ps 1, pjl 0
ifhp 11:40:13.866 [936] End_of_job: Appsocket device shutdown, 
reading until eof
ifhp 11:40:13.868 [936] Read_until_eof: waiting 1
ifhp 11:40:14.867 [936] Read_until_eof: Read_write_timeout returned 0
ifhp 11:40:14.869 [936] End_of_job: Appsocket device closed
ifhp 11:40:14.870 [936] Current_pagecounter: Appsocket device close
ifhp 11:40:14.872 [936] Open_device: device 'tek560%9100'
ifhp 11:40:14.874 [936] Open_device: destination '129.177.42.61' port 
9100, attempt 1
ifhp 11:40:14.888 [936] Open_device: connect to '129.177.42.61 port 
9100' failed - Connection refused
...

After a while ifhp manage to get the pagecounter:

...
ifhp 11:40:18.315 [936] Open_device: success
ifhp 11:40:18.316 [936] Current_pagecounter: Appsocket device open done
ifhp 11:40:18.317 [936] Current_pagecounter: starting, use_pjl 0, 
use_ps 1, timeout 0
ifhp 11:40:18.318 [936] Init_outbuf: Outbuf 0x40798, Outmax 10240, Outlen 0
ifhp 11:40:18.319 [936] Current_pagecounter: using '%!
false 0 startjob pop
(%%[ pagecount: )print statusdict /pagecount get exec (                )cvs
print
( ]%% )= flush
'
ifhp 11:40:18.320 [936] Current_pagecounter: write len 0
ifhp 11:40:20.848 [936] Current_pagecounter: write len 0
ifhp 11:40:20.849 [936] Read_status_line: read fd 1, count 26, '%%[ 
pagecount: 9
7675 ]%%
'
ifhp 11:40:20.850 [936] Current_pagecounter: Read_status_line_returned '26'
ifhp 11:40:20.851 [936] Current_pagecounter: page 1, pagecounter 97675
ifhp 11:40:20.852 [936] Do_pagecount: pagecounter 97675
ifhp 11:40:20.852 [936] Do_accounting: pagecounter 97675, pages 0
ifhp 11:40:20.853 [936] Accounting: script '<NULL>', Accountfile 
'<NULL>', outpu
t 'fileend '-b0' '-T14' '-q936' '-p97675' '-t2000-08-22-11:40:20.853''
ifhp 11:40:20.854 [936] End_of_job: Appsocket device close
ifhp 11:40:20.855 [936] Process_job: done


So it looks like every time ifhp starts a conenction to the Phaser 
560 I get a "Connection refused" but after about one secon the 
connection opens again. Is this correct?

I also tried the sync option and here is the results:
ifhp 10:20:34.186 [28877] Open_device: device 'tek560%9100'
ifhp 10:20:34.197 [28877] Open_device: destination '129.177.42.61' 
port 9100, attempt 1
ifhp 10:20:34.208 [28877] Open_device: success
ifhp 10:20:34.228 [28877] Check_pagecount: pagecount using 'ps script'
ifhp 10:20:34.230 [28877] Init_outbuf: Outbuf 0x40798, Outmax 10240, Outlen 0
ifhp 10:20:34.231 [28877] Process_job: setting up printer
ifhp 10:20:34.232 [28877] Start_of_job: sync and pagecount, 
do_pagecount 1, ps 1, pjl 0
ifhp 10:20:34.234 [28877] Do_sync: sync is 'ps'
ifhp 10:20:34.235 [28877] Do_sync: getting sync using 'ps'
ifhp 10:20:34.237 [28877] Do_sync: input fd 1, output fd 1
ifhp 10:20:34.238 [28877] Do_sync: attempt 1
ifhp 10:20:34.239 [28877] Init_outbuf: Outbuf 0x40798, Outmax 10240, Outlen 0
ifhp 10:20:34.241 [28877] Do_sync: Ps_status_code '%!PS-Adobe-2.0
    ( %%[ echo: NAME ]%% ) print () = flush', use_pjl 0, use_ps 1
ifhp 10:20:34.243 [28877] Do_sync: using sync '^D%!PS-Adobe-2.0
    ( %%[ echo: [EMAIL PROTECTED] ]%% ) print () = flush^D'
ifhp 10:20:54.244 [28877] Do_sync: attempt 2
ifhp 10:20:54.246 [28877] Init_outbuf: Outbuf 0x40798, Outmax 10240, Outlen 0
ifhp 10:20:54.247 [28877] Do_sync: Ps_status_code '%!PS-Adobe-2.0
    ( %%[ echo: NAME ]%% ) print () = flush', use_pjl 0, use_ps 1
ifhp 10:20:54.249 [28877] Do_sync: using sync '^D%!PS-Adobe-2.0
    ( %%[ echo: [EMAIL PROTECTED] ]%% ) print () = flush^D'
...

and then the printers hangs with an open connection. The status on 
the printer is Receiving data and I have to restart the printer with 
the power switch.

But one sheet of paper got printed giving this error message:

ERROR: undefined     (COMMAND TYPE: nametype)
OFFENDING COMMAND: flush     "flush^D^D"

OPERAND STACK: (0 total entries)
...

Any ideas or hints??


-- 
Lars-Gunnar Persson
System Administrator

Nansen Environmental and Remote Sensing Center
Address: Edvard Griegs vei 3a, N-5059 Bergen, NORWAY
Phone: +47 55 29 72 88, Fax: +47 55 20 00 50
E-mail: [EMAIL PROTECTED], Web: www.nrsc.no

-----------------------------------------------------------------------------
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