Re: LPRng: LPRng 3.8.27 w/ ifhp-3.5.17 - missing port on appsocket/SNMP printer
From [EMAIL PROTECTED] Thu May 6 09:42:57 2004 Subject: LPRng: LPRng 3.8.27 w/ ifhp-3.5.17 - missing port on appsocket/SNMP printer To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] Date: Thu, 6 May 2004 11:53:29 -0400 I'm trying to get a Xerox Phaser 7300DX to print using the latest LPRng software. I've tried all the Phaser entries, but they all fail with a 'missing port number' after successfully getting status with SNMP. Here is the status file with ifhp debug=1 (of) main: using model 'phaser7700' at 15:32:30.570 (of) main: appsocket device now 'wfd-color3%9100' at 15:32:30.571 (of) Open_device: device 'wfd-color3%9100' at 15:32:30.571 (of) Open_device: closed fd 1 at 15:32:30.571 (of) Link_open: destination '143.122.1.10' port 9100, attempt 1 at 15:32:30.575 (of) Fd_readable: nonblocking read returned -1, errno 35 (Operation would block) at 15:32:30.576 (of) Open_device: success at 15:32:30.576 (of) main: start snmp_dev NULL, Device wfd-color3%9100, :lp=wfd-color3%9100 at 15:32:30.576 (of) snmp device 'wfd-color3' at 15:32:30.576 (of) main: snmp_monitor device now 'wfd-color3' at 15:32:30.576 (of) using snmp_program '/usr/local/libexec/filters/snmp_printer_status -h wfd-color3 -m default -f /usr/local/libexec/filters/snmp_printer_status.conf' at 15:32:30.576 (of) main: poll for status 0, Dev_sleep 1000 msec at 15:32:30.577 (of) Check_pagecount: pagecount using 'snmp info pagecount' at 15:32:30.582 (of) Process_job: setting up printer at 15:32:30.583 (of) Make_tempfile: tempfile 'ifhpXX' at 15:32:30.583 (of) Make_tempfile: new tempfile 'ifhpcaclG3', fd 6 at 15:32:30.586 (of) Process_job: starting OF mode passthrough at 15:32:30.587 (of) Start_of_job: do_pagecount 1, ps 0, pjl 0, prog 'NULL' at 15:32:30.587 (of) Do_sync: getting sync using 'snmp' and snmp at 15:32:30.587 (of) Check_device_status: warning = 'level: other, group: generalprinter(1), message: power saver' at 15:32:31.665 (of) Check_device_status: devicestatus = 'unknown' at 15:32:31.965 (of) Check_device_status: devicedescr = 'xerox phaser 7300 dx v(2.12/15.78.10.14.2002/0.1.33/4.68) printer 512mb lpl205689' at 15:32:32.331 (of) Check_device_status: printerstatus = 'other' at 15:32:32.461 (of) Check_device_status: prtmarkerlifecount = '41' at 15:32:32.662 (of) Check_device_status: status = 'power saver mode active - press ok button' at 15:32:32.796 (of) Do_sync: sync done at 15:32:32.796 (of) Do_pagecount: pagecount at start -1 at 15:32:32.796 (of) Do_pagecount: getting pagecount, timeout 0, pagecount_same 0, pagecount_poll 0 at 15:32:32.796 (of) Current_pagecounter: starting, use_pjl 0, use_ps 0, timeout 0 at 15:32:32.796 (of) Current_pagecounter: Read_status_timeout result 0 at 15:32:34.366 (of) Current_pagecounter: Read_status_timeout result 0 at 15:32:34.603 (of) Current_pagecounter: Read_status_timeout result 0 at 15:32:34.666 (of) Current_pagecounter: Read_status_timeout result 0 at 15:32:34.733 (of) Check_device_status: pagecount = '41' at 15:32:34.796 (of) Current_pagecounter: Read_status_timeout result 0 at 15:32:34.796 (of) Current_pagecounter: page 1, pagecounter 41 at 15:32:34.796 (of) Do_pagecount: pagecounter 41 after 1 attempts at 15:32:34.796 (of) Start_of_job: Appsocket device close at 15:32:34.796 (of) Open_device: device 'wfd-color3' at 15:32:34.796 (of) Open_device: closed fd 1 at 15:32:34.796 (of) Link_open: missing port number 'wfd-color3' at 15:32:34.796 Here is the printcap entry: ...SNIP... color3|co3|Xerox Phaser 7300DX|Copy Center :lp=wfd-color3%9100 :ifhp=model=phaser7700,appsocket :filter=/usr/local/libexec/filters/ifhp -Tdebug=1 :vf=/usr/local/libexec/filters/ifhp -c :of=/usr/local/libexec/filters/ofhp -Tdebug=1 :fx=flpv :pl=60 :pw=83 :sh :rw :tc=.common,.ifacct ...SNIP... .common|Common definitions for all printers :af=/var/adm/%P-acct :lf=/var/adm/%P-log :sd=/var/spool/lpd/%P :pr=/usr/local/libexec/filters/pr-arg-fix $l $w $T :mx=0 :mc#500 .ifacct|Common accounting setup for all printers using IFHP as print filter :as=|/usr/local/libexec/filters/accounting.pl start :ae=|/usr/local/libexec/filters/accounting.pl end Any ideas what's going on and how to fix it? Thank - Justus I will try to reproduce this... Patrick - YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRng MAILING LIST The address you post from or your Reply-To address 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. 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
Re: LPRng: LPRng 3.8.27 w/ ifhp-3.5.17 - missing port on appsocket/SNMP printer
Ralph, Perfect. That solved my problem. I created the following patch to ifhp.c. *** ifhp.c.oldWed Feb 25 10:56:25 2004 --- ifhp.c Mon May 10 08:32:27 2004 *** *** 393,399 } DEBUG1(main: start snmp_dev %s, Device %s, :lp=%s, Snmp_dev, Device, GET_HASH_STR_OBJ(Model, lp, MEMINFO ) ); ! if( ISNULL(Snmp_dev) ) Snmp_dev = Device; if( ISNULL(Snmp_dev) ) Snmp_dev = GET_HASH_STR_OBJ(Model, lp, MEMINFO ); if( (s = safestrchr(Snmp_dev,'%')) ) *s = 0; LOGMSG(LOG_INFO)snmp device '%s', Snmp_dev ); --- 393,401 } DEBUG1(main: start snmp_dev %s, Device %s, :lp=%s, Snmp_dev, Device, GET_HASH_STR_OBJ(Model, lp, MEMINFO ) ); ! if( ISNULL(Snmp_dev) ) ! if ( ! ISNULL(Device) ) ! Snmp_dev = safestrdup(Device, MEMINFO); if( ISNULL(Snmp_dev) ) Snmp_dev = GET_HASH_STR_OBJ(Model, lp, MEMINFO ); if( (s = safestrchr(Snmp_dev,'%')) ) *s = 0; LOGMSG(LOG_INFO)snmp device '%s', Snmp_dev ); - Justus [EMAIL PROTECTED] rmatik.tu-darmsta dt.de (Ralph To Roessner) [EMAIL PROTECTED] Sent by: cc [EMAIL PROTECTED] .com Subject Re: LPRng: LPRng 3.8.27 w/ ifhp-3.5.17 - missing port on 05/10/2004 06:28 appsocket/SNMP printer Please respond to [EMAIL PROTECTED] Hello! I encountered the same problem, and tracked it down to the ifhp source, I think. Of course, I could be wrong ... See: On Thu, May 06, 2004 at 11:53:29AM -0400, [EMAIL PROTECTED] wrote: [...] (of) main: using model 'phaser7700' at 15:32:30.570 (of) main: appsocket device now 'wfd-color3%9100' at 15:32:30.571 (of) Open_device: device 'wfd-color3%9100' at 15:32:30.571 Here the device appears as assigned in your lp= printcap entry. [...] (of) main: start snmp_dev NULL, Device wfd-color3%9100, :lp=wfd-color3%9100 at 15:32:30.576 (of) snmp device 'wfd-color3' at 15:32:30.576 Here the device to use for SNMP is determined (originally it was NULL because you have not included an snmp_device parameter in your ifhp= line. [...] (of) Do_pagecount: pagecounter 41 after 1 attempts at 15:32:34.796 (of) Start_of_job: Appsocket device close at 15:32:34.796 (of) Open_device: device 'wfd-color3' at 15:32:34.796 And here the printer device port number has magically disappeared. (of) Open_device: closed fd 1 at 15:32:34.796 (of) Link_open: missing port number 'wfd-color3' at 15:32:34.796 [...] Now look at the source (ifhp.c line 394ff): DEBUG1(main: start snmp_dev %s, Device %s, :lp=%s, Snmp_dev, Device, GET_HASH_STR_OBJ(Model, lp, MEMINFO ) ); if( ISNULL(Snmp_dev) ) Snmp_dev = Device; if( ISNULL(Snmp_dev) ) Snmp_dev = GET_HASH_STR_OBJ(Model, lp, MEMINFO ); if( (s = safestrchr(Snmp_dev,'%')) ) *s = 0; LOGMSG(LOG_INFO)snmp device '%s', Snmp_dev ); If we have a non-null Device but not a non-null Snmp_dev, the former is assigned to the latter, and then the port number (if any) is removed. At that time, Device and Snmp_dev point to the same string, so Device loses its port number as well. It may help to change the assignment: Snmp_dev = Device; to: Snmp_dev = safestrdup(Device, MEMINFO); I have other problems with mit HP test printer, so I cannot test the effect right now, but you may want to give it a try. Or as a workaroung, add snmp_dev=wfd-color3 to your ifhp= config line. Regards, Ralph Rößner -- Ralph Rößner TU Darmstadt EMail: [EMAIL PROTECTED]FB Informatik - 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: LPRng 3.8.27 w/ ifhp-3.5.17 - missing port on appsocket/SNMP printer
I'm trying to get a Xerox Phaser 7300DX to print using the latest LPRng software. I've tried all the Phaser entries, but they all fail with a 'missing port number' after successfully getting status with SNMP. Here is the status file with ifhp debug=1 (of) main: using model 'phaser7700' at 15:32:30.570 (of) main: appsocket device now 'wfd-color3%9100' at 15:32:30.571 (of) Open_device: device 'wfd-color3%9100' at 15:32:30.571 (of) Open_device: closed fd 1 at 15:32:30.571 (of) Link_open: destination '143.122.1.10' port 9100, attempt 1 at 15:32:30.575 (of) Fd_readable: nonblocking read returned -1, errno 35 (Operation would block) at 15:32:30.576 (of) Open_device: success at 15:32:30.576 (of) main: start snmp_dev NULL, Device wfd-color3%9100, :lp=wfd-color3%9100 at 15:32:30.576 (of) snmp device 'wfd-color3' at 15:32:30.576 (of) main: snmp_monitor device now 'wfd-color3' at 15:32:30.576 (of) using snmp_program '/usr/local/libexec/filters/snmp_printer_status -h wfd-color3 -m default -f /usr/local/libexec/filters/snmp_printer_status.conf' at 15:32:30.576 (of) main: poll for status 0, Dev_sleep 1000 msec at 15:32:30.577 (of) Check_pagecount: pagecount using 'snmp info pagecount' at 15:32:30.582 (of) Process_job: setting up printer at 15:32:30.583 (of) Make_tempfile: tempfile 'ifhpXX' at 15:32:30.583 (of) Make_tempfile: new tempfile 'ifhpcaclG3', fd 6 at 15:32:30.586 (of) Process_job: starting OF mode passthrough at 15:32:30.587 (of) Start_of_job: do_pagecount 1, ps 0, pjl 0, prog 'NULL' at 15:32:30.587 (of) Do_sync: getting sync using 'snmp' and snmp at 15:32:30.587 (of) Check_device_status: warning = 'level: other, group: generalprinter(1), message: power saver' at 15:32:31.665 (of) Check_device_status: devicestatus = 'unknown' at 15:32:31.965 (of) Check_device_status: devicedescr = 'xerox phaser 7300 dx v(2.12/15.78.10.14.2002/0.1.33/4.68) printer 512mb lpl205689' at 15:32:32.331 (of) Check_device_status: printerstatus = 'other' at 15:32:32.461 (of) Check_device_status: prtmarkerlifecount = '41' at 15:32:32.662 (of) Check_device_status: status = 'power saver mode active - press ok button' at 15:32:32.796 (of) Do_sync: sync done at 15:32:32.796 (of) Do_pagecount: pagecount at start -1 at 15:32:32.796 (of) Do_pagecount: getting pagecount, timeout 0, pagecount_same 0, pagecount_poll 0 at 15:32:32.796 (of) Current_pagecounter: starting, use_pjl 0, use_ps 0, timeout 0 at 15:32:32.796 (of) Current_pagecounter: Read_status_timeout result 0 at 15:32:34.366 (of) Current_pagecounter: Read_status_timeout result 0 at 15:32:34.603 (of) Current_pagecounter: Read_status_timeout result 0 at 15:32:34.666 (of) Current_pagecounter: Read_status_timeout result 0 at 15:32:34.733 (of) Check_device_status: pagecount = '41' at 15:32:34.796 (of) Current_pagecounter: Read_status_timeout result 0 at 15:32:34.796 (of) Current_pagecounter: page 1, pagecounter 41 at 15:32:34.796 (of) Do_pagecount: pagecounter 41 after 1 attempts at 15:32:34.796 (of) Start_of_job: Appsocket device close at 15:32:34.796 (of) Open_device: device 'wfd-color3' at 15:32:34.796 (of) Open_device: closed fd 1 at 15:32:34.796 (of) Link_open: missing port number 'wfd-color3' at 15:32:34.796 Here is the printcap entry: ...SNIP... color3|co3|Xerox Phaser 7300DX|Copy Center :lp=wfd-color3%9100 :ifhp=model=phaser7700,appsocket :filter=/usr/local/libexec/filters/ifhp -Tdebug=1 :vf=/usr/local/libexec/filters/ifhp -c :of=/usr/local/libexec/filters/ofhp -Tdebug=1 :fx=flpv :pl=60 :pw=83 :sh :rw :tc=.common,.ifacct ...SNIP... .common|Common definitions for all printers :af=/var/adm/%P-acct :lf=/var/adm/%P-log :sd=/var/spool/lpd/%P :pr=/usr/local/libexec/filters/pr-arg-fix $l $w $T :mx=0 :mc#500 .ifacct|Common accounting setup for all printers using IFHP as print filter :as=|/usr/local/libexec/filters/accounting.pl start :ae=|/usr/local/libexec/filters/accounting.pl end Any ideas what's going on and how to fix it? Thank - Justus - 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. -