Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-04 Thread Bernt Hansson

2012-06-03 02:08, Gary Aitken skrev:


I've deinstalled cups and its dependencies and rebuilt only hpijs.


Did you build it with foomatic-rip if so then you have ppd files in

/usr/local/share/foomatic/db/source/PPD/

Don't know if it is for your specific printer.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-03 Thread Gary Aitken
On 06/02/12 18:35, Polytropon wrote:
 On Sat, 02 Jun 2012 18:08:55 -0600, Gary Aitken wrote:
 I've deinstalled cups and its dependencies and rebuilt only hpijs.
 
 You could have kept it installed (maybe some ports will want
 it as a dependency), just disable it in /etc/rc.conf.

I'm probably going to have to rebuild anyway, as I was totally unclear on what 
cups was initially and whether or not it was needed / wanted.  One of the 
problems with not having another system and display when starting out, and not 
understanding the architecture at first.
 
 However, when I try to use gs + hpijs as a filter, it fails.
 
 Did you write your own filter?

I used a tweaked version of the one Wojciech Puchar just posted,
which appears to be a tweaked version of the one supplied with the hpijs port.
I turned off some of the batch type options to help see what was going on.

#!/bin/sh

#export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin
export 
PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/share/ppd

/usr/local/bin/gs -dBATCH -dPARANOIDSAFER -dNOPAUSE \
-sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer=HEWLETT-PACKARD \
-sDeviceModel=Officejet Pro 8500 A909g \
-dIjsUseOutputFD -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -r600 \
-sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2
 \
-sOutputFile=/tmp/$$ - /dev/null
#-sDeviceModel=DESKJET 960 \
#/usr/local/bin/gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE \
#-sOutputFile=- -  exit 0
cat /tmp/$$
#rm /tmp/$$

 For comparison: I'm using a HP Laserjet 4000 duplex here,
 networked, with /opt/libexec/ps2pcl-dup.sh being the
 filter for use with duplexing:
 
 #!/bin/sh
 printf \033k2G || exit 2
 gs -q -dBATCH -dNOPAUSE -dPARANOIDSAFER -dSAFER -sPAPERSIZE=a4 -r600x600 \
  -sDEVICE=ljet4d -dDuplex=true \
  -sOutputFile=- -  exit 0
 exit 2
 
 The entry for this printer in /etc/printcap is:
 
 Laserjet|ljet4d;r=600x600;q=high;c=full;p=a4;m=auto:\
  :rm=192.168.100.100:\
  :rp=raw:\
  :lp=:\
  :if=/opt/libexec/ps2pcl-dup.sh:\
  :sd=/var/spool/lpd/Laserjet:\
  :lf=/var/spool/lpd/Laserjet/log:\
  :af=/var/spool/lpd/Laserjet/acct:\
  :mx#0:\
  :sh:
 
 The name Laserjet is set in $PRINTER as the system's default
 printer. There's also Laserjet-nodup where the filter simply
 omits the duplexing functionality.
 
 I assume you did something similarly?

That's quite a bit different, in that the output device for mine is the ijs 
daemon with hpijs as the ijs server.  That part's from the hp sample script 
with the hpijs port.  As you can see from the script and the commented out 
lines, the -sDeviceModel=XXX is what is changing the behavior.  If I swap 
that one argument, it works.

 Can you provide the command you've used for printing? By default,
 the printer subsystem accepts PS (which is the normal printing
 output format of _any_ printing application).

lpr foo.txt
lpr foo.pdf

 Also, the ppd.gz files from the port *did not* include any
 ppd.gz file for this printer.  However, the cups port did,
 but they were installed elsewhere.  So I just copied them
 over, but I'm wondering if there is a db or internal cache
 somewhere that has to be rebuilt.
 
 The ppd handling tool usually manages that.

I never saw that mentioned.  What's the ppd handling tool?

 It looks to me like it is unable to locate a .ppd.gz or .ppd
 which matches the device name enough to be used.  Anyone know
who is generating the error
 
 It's lpd (see message).

I'm not certain about that.  
It may be an error passed up by the ijs subsystem and simply spit out by lpd.

 It's accessing a printer called lp (does it exist with tha
 name?) and loses the connection, and try to restart it. The
 inability is expressed as unable to set device=HP Officejet
 Pro 8500 a909g hpijs, I'm not sure if spaces are allowed?
 (Check man 5 printcap to be sure.)

Spaces are allowed; DESKJET 960 works.
But that name is coming from the :if: script, not printcap.
Again, I don't think it's a printcap / lpr issue.  
lpr is simply running the script it found by looking up device lp.
The script passes the DeviceModel on to gs, 
which feeds it to ijs (-sDEVICE=ijs)
which uses the hpijs implementation
which is what I think is failing to find the ppd file or its contents.
(which I think it has cached, see below; 
I think the actual files are irrelevant at this point)

lpr passes the appropriate stuff to gs,
which creates a file,
which lpr then sends on to the output device :rm=aa.bb.cc.dd:
The gs process gets cut short because hpijs or ijs can't fine the ppd 
file/contents its looking for,
so the file created by gs is empty 
and the error gets passed on up to lpd
and nothing gets sent to the device.

Here's my printcap entry:

lp|hp|text|hp8500|HP Officejet Pro 8500 a909g:\
:lp=:\
:sh:\
:mx=1000:\
:rm=aa.bb.cc.dd:\
:rp=lp:\
:sd=/var/spool/lpd/hp8500:\

Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-03 Thread Polytropon
On Sun, 03 Jun 2012 01:01:07 -0600, Gary Aitken wrote:
 On 06/02/12 18:35, Polytropon wrote:
  On Sat, 02 Jun 2012 18:08:55 -0600, Gary Aitken wrote:
  I've deinstalled cups and its dependencies and rebuilt only hpijs.
  
  You could have kept it installed (maybe some ports will want
  it as a dependency), just disable it in /etc/rc.conf.
 
 I'm probably going to have to rebuild anyway, as I was totally
 unclear on what cups was initially and whether or not it was
 needed / wanted. 

As a summary, CUPS is both a replacement of the system's default
printer spooler (lpr) and its command line tools (lpr, lpq, lprm,
plus lpstat, lpconfig), as well as a collection of printer filters
(to turn PS into different printer languages) and preprocessors
(to turn non-PS input files into PS prior to printing). It's being
considered _the_ standard meanwhile for many modern software
packages that have hardcoded expectations that CUPS is present
and running, in order to print (instead of just to submit the PS
data to whatever is there - lpr is _always_ there).



 One of the problems with not having another system and display
 when starting out, and not understanding the architecture at
 first.

As soon as you've got the the basic system up and running,
a minimal windowing environment, some xterms, a MUA and a
web browser should be sufficient.



  However, when I try to use gs + hpijs as a filter, it fails.
  
  Did you write your own filter?
 
 I used a tweaked version of the one Wojciech Puchar just posted,
 which appears to be a tweaked version of the one supplied with the hpijs port.
 I turned off some of the batch type options to help see what was going on.
 
 #!/bin/sh
 
 #export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin
 export 
 PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/share/ppd
 
 /usr/local/bin/gs -dBATCH -dPARANOIDSAFER -dNOPAUSE \
 -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer=HEWLETT-PACKARD \
 -sDeviceModel=Officejet Pro 8500 A909g \
 -dIjsUseOutputFD -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -r600 \
 -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2
  \
 -sOutputFile=/tmp/$$ - /dev/null
 #-sDeviceModel=DESKJET 960 \
 #/usr/local/bin/gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE \
 #-sOutputFile=- -  exit 0
 cat /tmp/$$
 #rm /tmp/$$

Ah okay, this uses ijs, _not_ a .ppd file. See the -sDEVICE
parameter which is the main entry to what printer filter
will be used (to compare, in my case it's ljet4d which
produces PCL that gets then sent).



  For comparison: I'm using a HP Laserjet 4000 duplex here,
  networked, with /opt/libexec/ps2pcl-dup.sh being the
  filter for use with duplexing:
  
  #!/bin/sh
  printf \033k2G || exit 2
  gs -q -dBATCH -dNOPAUSE -dPARANOIDSAFER -dSAFER -sPAPERSIZE=a4 -r600x600 \
   -sDEVICE=ljet4d -dDuplex=true \
   -sOutputFile=- -  exit 0
  exit 2
  
  The entry for this printer in /etc/printcap is:
  
  Laserjet|ljet4d;r=600x600;q=high;c=full;p=a4;m=auto:\
   :rm=192.168.100.100:\
   :rp=raw:\
   :lp=:\
   :if=/opt/libexec/ps2pcl-dup.sh:\
   :sd=/var/spool/lpd/Laserjet:\
   :lf=/var/spool/lpd/Laserjet/log:\
   :af=/var/spool/lpd/Laserjet/acct:\
   :mx#0:\
   :sh:
  
  The name Laserjet is set in $PRINTER as the system's default
  printer. There's also Laserjet-nodup where the filter simply
  omits the duplexing functionality.
  
  I assume you did something similarly?
 
 That's quite a bit different, in that the output device for mine
 is the ijs daemon with hpijs as the ijs server.  That part's from
 the hp sample script with the hpijs port. 

Correct. If the ijs system supports your printer, it should be fine.



 As you can see from the script and the commented out lines, the
 -sDeviceModel=XXX is what is changing the behavior.  If I
 swap that one argument, it works.

Good!



  Can you provide the command you've used for printing? By default,
  the printer subsystem accepts PS (which is the normal printing
  output format of _any_ printing application).
 
 lpr foo.txt
 lpr foo.pdf

For diagnostics, you should always start with a PS file. This
is what the printer spooler accepts as input. Before printing,
check the PS file with gv filename to make sure it contains
what you expect it to contain. All applications that have a
print to file option will output PS.

In the past, I've been using apsfilter to do the preprocessing
(? - PS), but its backend was the same simple gs command as I'm
using today, even the automatically generated printcap entry was
similar (except at that time, the printer destination was parallel).



  Also, the ppd.gz files from the port *did not* include any
  ppd.gz file for this printer.  However, the cups port did,
  but they were installed elsewhere.  So I just copied them
  over, but I'm wondering if there is a db or internal cache
  somewhere that has to be rebuilt.
  
  The ppd handling 

Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-03 Thread Warren Block

On Sun, 3 Jun 2012, Polytropon wrote:


By the way, have you tried using your filter directly for testing?
As mentioned before, prepare a printable PS file, then do:

# cat test.ps | /var/spool/lpd/hp8500/diff.2 | nc 123.45.67.890

Note: nc is from port nc (netcat). It will send it directly to
the IP address, which will normally be done by lpr, but just for
diagnostics, always work with the smallest possible variables. :-)


nc(1) is also in the base system as /usr/bin/nc.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-03 Thread Polytropon
On Sun, 3 Jun 2012 10:17:28 -0600 (MDT), Warren Block wrote:
 On Sun, 3 Jun 2012, Polytropon wrote:
 
  By the way, have you tried using your filter directly for testing?
  As mentioned before, prepare a printable PS file, then do:
 
  # cat test.ps | /var/spool/lpd/hp8500/diff.2 | nc 123.45.67.890
 
  Note: nc is from port nc (netcat). It will send it directly to
  the IP address, which will normally be done by lpr, but just for
  diagnostics, always work with the smallest possible variables. :-)
 
 nc(1) is also in the base system as /usr/bin/nc.

Damn, you're right! Maybe that is because of netcat hasn't always
been part of the OS? I talked about it as something so common
that I didn't even mention it. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-03 Thread Thomas Mueller
Polytropon, you mention ppd files (.ppd or .ppd.gz).

Is this the binary plugin that hplip was unable to install for me?

Or am I grasping at straws?

Somehow I thought the binary plugin was much bigger than the .ppd.gz files 
found in 
/usr/local/share/ppd/HP/

Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-03 Thread Robert Bonomi

 From: Thomas Mueller muelle...@insightbb.com

 Polytropon, you mention ppd files (.ppd or .ppd.gz).

 Is this the binary plugin that hplip was unable to install for me?

No.  '.ppd' files are 'postscript printer description' files.
They ontain 'device dependant information about a specific make/model
of Postscript-capable printer.

They consist of 'feature' names, 'values' for that feature, and the
postscript code fragment that tells that printer how to use a particular 
'value' for that particular feature.  e.g. one can select the input
paper tray by 'name' -- e.g. 'upper', 'lower', etc. -- without having
to know whether trays are numbered starting at zero or one, or whether
the numbering goes 'up' or 'down'.

'.ppd' files are relevent _only_ if you are producing postscript output,


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-03 Thread Wojciech Puchar
ppd file are actually human readable, you get a fragment that tell you how 
to filter postscript to produce output.


eg. my OfficeJet 8500 filter is based on it.

On Sun, 3 Jun 2012, Thomas Mueller wrote:


Polytropon, you mention ppd files (.ppd or .ppd.gz).

Is this the binary plugin that hplip was unable to install for me?

Or am I grasping at straws?

Somehow I thought the binary plugin was much bigger than the .ppd.gz files 
found in
/usr/local/share/ppd/HP/

Tom



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-02 Thread Wojciech Puchar

seems you like to incredibly complicated things.

It just happens that i configured that printer in one office and there is 
NO NEED for this windows-style crappy shit from HP.


/usr/ports/print/hplip (make config and disable GUI trash) is enough.


scanning works directly to SMB exported shares or mails - just connect by 
WWW browser to http://yourprinterip and configure it.


printing works fine with this lpr filter

#!/bin/sh
export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin
/usr/local/bin/gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE \
-sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer=HEWLETT-PACKARD \
-sDeviceModel=deskjet 5600 -dIjsUseOutputFD -dDEVICEWIDTHPOINTS=595 \
-dDEVICEHEIGHTPOINTS=842 -r600 \
-sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2
 \
-sOutputFile=/tmp/$$ - /dev/null
cat /tmp/$$
rm /tmp/$$


that's all. Work for whole office without trash software installed on 
(windoze) workstation or unix server.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-02 Thread Thomas Mueller
From: Wojciech Puchar woj...@wojtek.tensor.gdynia.pl:

 seems you like to incredibly complicated things.

 It just happens that i configured that printer in one office and there is
 NO NEED for this windows-style crappy shit from HP.

 /usr/ports/print/hplip (make config and disable GUI trash) is enough.


 scanning works directly to SMB exported shares or mails - just connect by
 WWW browser to http://yourprinterip and configure it.

 printing works fine with this lpr filter

 #!/bin/sh
 export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin
 /usr/local/bin/gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE \
 -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer=HEWLETT-PACKARD \
 -sDeviceModel=deskjet 5600 -dIjsUseOutputFD -dDEVICEWIDTHPOINTS=595 \
 -dDEVICEHEIGHTPOINTS=842 -r600 \
 -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2
  \
 -sOutputFile=/tmp/$$ - /dev/null
 cat /tmp/$$
 rm /tmp/$$


 that's all. Work for whole office without trash software installed on
 (windoze) workstation or unix server.
___

Your message is worth saving, gives me some new ideas on getting that 
recalcitrant printer (HP M1212nf MFP) to work.

Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-02 Thread Wojciech Puchar




that's all. Work for whole office without trash software installed on
(windoze) workstation or unix server.

___

Your message is worth saving, gives me some new ideas on getting that 
recalcitrant printer (HP M1212nf MFP) to work.

if you want mail my privately i have quite large practice in making 
modern printers to work normal way.


i don't think there are HP printers that cannot be made to work normally.

If not hplip or hpijs then

/usr/ports/print/foo2zjs

is your friend. Most probably this printer will need foo2... tools.

And fortunately none of this solution requires CUPS, even if some ports 
are made so cups are installed (not a problem anyway) there is no need to 
use it.


Normal (==ancient) way of using printers under unix is to use lpd and 
write a filter that will translate at least postscript to printer's 
format.


If your machine is a network server for windoze computers then use samba 
and just add


printing = bsd
load printers = yes


in [global]

and all your printers in /etc/printcap are available. Install generic 
postscript driver in windows. Actually - Any Apple postscript printer 
driver in windows XP (their postscript is actually compatible with 
postscript).


this way you gain independence - changing printer doesn't need fooling 
with windows drivers, and you print from anything.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-02 Thread Gary Aitken
On 06/02/12 02:29, Wojciech Puchar wrote:
 seems you like to incredibly complicated things.

No, but it does seem like I did, hopefully unnecessarily...
Thanks.

 /usr/ports/print/hplip (make config and disable GUI trash) is enough.
...
 printing works fine with this lpr filter
 
 #!/bin/sh
 export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin
 /usr/local/bin/gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE \
 -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer=HEWLETT-PACKARD \
 -sDeviceModel=deskjet 5600 -dIjsUseOutputFD -dDEVICEWIDTHPOINTS=595 \
 -dDEVICEHEIGHTPOINTS=842 -r600 \
 -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2
  \
 -sOutputFile=/tmp/$$ - /dev/null
 cat /tmp/$$
 rm /tmp/$$

I've deinstalled cups and its dependencies and rebuilt only hpijs.
lpr works to the printer for the simple demo text filter hp supplies 
(The printer is directly connected to the network, not via USB or parallel port)
However, when I try to use gs + hpijs as a filter, it fails.

There are a number of gs_xx and n files left in /tmp, zero length.
The n files are the OutputFile from the filter (I commented out the rm).
The n files are one number larger than the pid for lpd indicated in the log,
no surprise there.

the log shows:
Jun  2 16:58:18 fbsdbox lpd[10367]: lp: lost connection
Jun  2 16:58:18 fbsdbox lpd[10367]: restarting lp
unable to set device=HP Officejet Pro 8500 a909g hpijs, err=16
unable to read client data err=-2
Jun  2 16:38:54 fbsdbox lpd[10367]: lp: lost connection
Jun  2 16:38:54 fbsdbox lpd[10367: lp: job could not be sent to remote host ...
Jun  2 16:38:54 fbsdbox lpd[10367]: mail sent to user garya about job unknown 
on printer lp (FATALERR)

The .ppd.gz file was not located in the path exported from the filter script.
However, when I put /usr/local/share/ppd/HP in the path, it made no difference.
Where are your .ppd files or .ppd.gz files located?

Also, the ppd.gz files from the port *did not* include any ppd.gz file for this 
printer.  However, the cups port did, but they were installed elsewhere.  So I 
just copied them over, but I'm wondering if there is a db or internal cache 
somewhere that has to be rebuilt.

It looks to me like it is unable to locate a .ppd.gz or .ppd which matches the 
device name enough to be used.  Anyone know
  who is generating the error
  what err=16 is exactly
  how to get the path it is searching
  what the match criteria is?

.

Ok, I tweeked /etc/printcap and the filter to call the printer a DESKJET 960 
and it worked.  So one obviously has to do more than just supply the correct 
.ppd.gz file in the correct spot.

ideas?

Thanks,

Gary
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-02 Thread Polytropon
On Sat, 02 Jun 2012 18:08:55 -0600, Gary Aitken wrote:
 I've deinstalled cups and its dependencies and rebuilt only hpijs.

You could have kept it installed (maybe some ports will want
it as a dependency), just disable it in /etc/rc.conf.



 lpr works to the printer for the simple demo text filter hp supplies 
 (The printer is directly connected to the network, not via USB or parallel 
 port)
 However, when I try to use gs + hpijs as a filter, it fails.

Did you write your own filter?

For comparison: I'm using a HP Laserjet 4000 duplex here,
networked, with /opt/libexec/ps2pcl-dup.sh being the
filter for use with duplexing:

#!/bin/sh
printf \033k2G || exit 2
gs -q -dBATCH -dNOPAUSE -dPARANOIDSAFER -dSAFER -sPAPERSIZE=a4 -r600x600 \
-sDEVICE=ljet4d -dDuplex=true \
-sOutputFile=- -  exit 0
exit 2

The entry for this printer in /etc/printcap is:

Laserjet|ljet4d;r=600x600;q=high;c=full;p=a4;m=auto:\
:rm=192.168.100.100:\
:rp=raw:\
:lp=:\
:if=/opt/libexec/ps2pcl-dup.sh:\
:sd=/var/spool/lpd/Laserjet:\
:lf=/var/spool/lpd/Laserjet/log:\
:af=/var/spool/lpd/Laserjet/acct:\
:mx#0:\
:sh:

The name Laserjet is set in $PRINTER as the system's default
printer. There's also Laserjet-nodup where the filter simply
omits the duplexing functionality.

I assume you did something similarly?



 the log shows:
 Jun  2 16:58:18 fbsdbox lpd[10367]: lp: lost connection
 Jun  2 16:58:18 fbsdbox lpd[10367]: restarting lp
 unable to set device=HP Officejet Pro 8500 a909g hpijs, err=16
 unable to read client data err=-2
 Jun  2 16:38:54 fbsdbox lpd[10367]: lp: lost connection
 Jun  2 16:38:54 fbsdbox lpd[10367: lp: job could not be sent to remote host 
 ...
 Jun  2 16:38:54 fbsdbox lpd[10367]: mail sent to user garya about job 
 unknown on printer lp (FATALERR)

Can you provide the command you've used for printing? By default,
the printer subsystem accepts PS (which is the normal printing
output format of _any_ printing application).

CUPS, as well as apsfilter, offer some built-in functionality
for converting data from non-PS (e. g. text, images) to PS when
you call lpr, for example:

% lpr picture.jpg
% lpr source.c
% lpr stuff.txt

As long as you print PS (or from any application within X that
outputs PS), this shouldn't be an issue for you.



 The .ppd.gz file was not located in the path exported from the filter script.
 However, when I put /usr/local/share/ppd/HP in the path, it made no 
 difference.
 Where are your .ppd files or .ppd.gz files located?

Depends. CUPS puts them into /usr/local/etc/cups/ppd, there's
also the possibility that other tools that handle PPD files
search for them in a location defined in their documentation.
For example, the CUPS ppd files are already extracted.



 Also, the ppd.gz files from the port *did not* include any
 ppd.gz file for this printer.  However, the cups port did,
 but they were installed elsewhere.  So I just copied them
 over, but I'm wondering if there is a db or internal cache
 somewhere that has to be rebuilt.

The ppd handling tool usually manages that.



 It looks to me like it is unable to locate a .ppd.gz or .ppd
 which matches the device name enough to be used.  Anyone know
   who is generating the error

It's lpd (see message).

It's accessing a printer called lp (does it exist with tha
name?) and loses the connection, and try to restart it. The
inability is expressed as unable to set device=HP Officejet
Pro 8500 a909g hpijs, I'm not sure if spaces are allowed?
(Check man 5 printcap to be sure.)



 Ok, I tweeked /etc/printcap and the filter to call the printer
 a DESKJET 960 and it worked. 

Is your $PRINTER set to this name? In that case, you could
easily move from lp (the default name) to omitting -Pname
in the lp* commands.



 So one obviously has to do more than just supply the correct
 .ppd.gz file in the correct spot.

Right. If you look into a .ppd file, you'll see PostScript in
there. It's (highly inaccurately described) code that instructs
the PS interpreter (usually gs) on how to create the correct
output language for the particular printer, tell details about
options and parameters of the printer (such as paper feeds,
duplexer, paper sizes and so on).



 ideas?

Some of your code (scripts and commands) would help (at least
me) to understand your current state better.





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-01 Thread Adam Vande More
On Thu, May 31, 2012 at 6:59 PM, Thomas Mueller muelle...@insightbb.comwrote:

 I have an HP LaserJet M1212nf MFP, and hplip/hp-setup in FreeBSD finds the
 printer all right when connected by Ethernet, but then fails on installing
 the required binary plugin.  Printer is not detected at all when connected
 by USB.

 NetBSD 5.1_STABLE i386 with hplip 3.11.1 built from pkgsrc-wip couldn't
 find the printer on Ethernet, next step is to login to wireless router,
 and/or check the dmesg.boot, and then use the IP address found therefrom.

 pkgsrc-wip URL: http://pkgsrc-wip.sourceforge.net/
 pkgsrc URL: http://www.netbsd.org/docs/software/packages.html

 I wonder if I should have bought a printer, non-HP, with wireless, as long
 as it also had USB and Ethernet capability.

 Seeing security advisories for FreeBSD, my next move might be to update
 the source tree by csup, then rebuild (RELENG_9: 9.0-STABLE) for amd64 and
 build for i386 as well.  Then I would have the possibility of building wine
 from the ports, and I could try the MS-Windows software.  I also need to
 update the other ports, including but not limited to hplip and dependencies.


I added a HP Photosmart C6300 series via CUPS using HP Photosmart c6300
Series hpijs, 3.11.5 socket://192.168.25.15:9100

Prints fine over wireless.

-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-06-01 Thread Gary Aitken
On 06/01/12 10:51, Gary Aitken wrote:
 On 05/31/12 17:59, Thomas Mueller wrote:
From Gary Aitkena...@dreamchaser.org   :

 I've got an HP printer directly connected to the local network.

 hp-probe finds it:

 #hp-probe -bnet

 HP Linux Imaging and Printing System (ver. 3.12.2)
 Printer Discovery Utility ver. 4.1
 ...
 Device URI   Model  
Name
 ---  
   
 hp:/net/Officejet_Pro_8500_A909g?ip=aa.bb.cc.dd  
 Officejet_Pro_8500_A909g  HP4356E6

 Found 1 printer(s) on the 'net' bus.

 However, hp-setup and hp-uri refuse to use it:

 #hp-makeuri -ldebug aa.bb.cc.dd

 HP Linux Imaging and Printing System (ver. 3.12.2)
 Device URI Creation Utility ver. 5.0
 ...
 hp-makeuri[63924]: debug: Trying IP address aa.bb.cc.dd
 hp-makeuri[63924]: debug: Not found.
 hp-makeuri[63924]: debug: Trying serial number aa.bb.cc.dd
 hp-makeuri[63924]: debug: Probing bus: usb
 hp-makeuri[63924]: debug: Probing bus: par
 error: Device not found

 When the gui comes up, only the USB option is enabled.  There is no 
 parallel port active and no wireless on the box, but at least the network 
 connection should be available.

 The probe which succeeds takes several seconds, but the hp-setup gui and 
 makeuri fail immediately, and the missing ability to set the network 
 discovery option in the gui lead me to believe it's not even trying the ip 
 addr.

 Anyone with experience setting these guys up have any advice?

 Alternately, is there anything other than a special lp filter really 
 needed, and if not, any suggestions on the best one to use?  I looked at 
 apsfilter but the installation SETUP driver options didn't seem to include 
 this printer.
 Thanks

 I have an HP LaserJet M1212nf MFP, and hplip/hp-setup in FreeBSD finds the 
 printer all right when connected by Ethernet, but then fails on installing 
 the required binary plugin.  Printer is not detected at all when connected 
 by USB.

 NetBSD 5.1_STABLE i386 with hplip 3.11.1 built from pkgsrc-wip couldn't find 
 the printer on Ethernet, next step is to login to wireless router, and/or 
 check the dmesg.boot, and then use the IP address found therefrom.

 pkgsrc-wip URL: http://pkgsrc-wip.sourceforge.net/
 pkgsrc URL: http://www.netbsd.org/docs/software/packages.html

 I wonder if I should have bought a printer, non-HP, with wireless, as long 
 as it also had USB and Ethernet capability.

 Seeing security advisories for FreeBSD, my next move might be to update the 
 source tree by csup, then rebuild (RELENG_9: 9.0-STABLE) for amd64 and build 
 for i386 as well.  Then I would have the possibility of building wine from 
 the ports, and I could try the MS-Windows software.  I also need to update 
 the other ports, including but not limited to hplip and dependencies.
 
 I am in the process of trying to sort mine out.
 Found this via one of the hp linux support pages
http://hplipopensource.com/hplip-web/support.html
 I'm in the process of trying to get mine working with their help.
 We'll see how that goes; will post results.
 
 In my case (network connection) they suggested running and sending them the 
 output of:
 
 $ hp-check
 $ hp-probe -ldebug
 $ hp-makeuri -ldebugipaddress
 $ hp-setup -ldebugipaddress
 
 I'm in the process of sorting that out, as it may be an issue of how cups and 
 dbus are installed which may be preventing access (file ownership issues)

hp-check indicated what it thought were inconsistencies;
things it couldn't find but should have because they were there.
the output didn't jibe with file permissions and running daemons,
but I did see one potential issue (a missing python capability which was not 
one of the defaults.  can't remember which, maybe in the cups install)
I did a make clean, make config, make install, and that got me a lot further.
In the config, I think for something cups related, I checked the python 
capability.

When I run hp-setup now, it finds the printer, but it can't find an appropriate 
ppd file.  
Working on that now.
The right one is there, but for some reason it claims it's not a close-enough 
match.

Gary
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


HP networked printer -- hp-setup won't use, hp-probe finds

2012-05-31 Thread Gary Aitken
I've got an HP printer directly connected to the local network.

hp-probe finds it:

#hp-probe -bnet

HP Linux Imaging and Printing System (ver. 3.12.2)
Printer Discovery Utility ver. 4.1
...
  Device URI   Model 
Name
  ---    

  hp:/net/Officejet_Pro_8500_A909g?ip=aa.bb.cc.dd  Officejet_Pro_8500_A909g  
HP4356E6

Found 1 printer(s) on the 'net' bus.

However, hp-setup and hp-uri refuse to use it:

#hp-makeuri -ldebug aa.bb.cc.dd

HP Linux Imaging and Printing System (ver. 3.12.2)
Device URI Creation Utility ver. 5.0
...
hp-makeuri[63924]: debug: Trying IP address aa.bb.cc.dd
hp-makeuri[63924]: debug: Not found.
hp-makeuri[63924]: debug: Trying serial number aa.bb.cc.dd
hp-makeuri[63924]: debug: Probing bus: usb
hp-makeuri[63924]: debug: Probing bus: par
error: Device not found

When the gui comes up, only the USB option is enabled.  There is no parallel 
port active and no wireless on the box, but at least the network connection 
should be available.

The probe which succeeds takes several seconds, but the hp-setup gui and 
makeuri fail immediately, and the missing ability to set the network discovery 
option in the gui lead me to believe it's not even trying the ip addr.

Anyone with experience setting these guys up have any advice?

Alternately, is there anything other than a special lp filter really needed, 
and if not, any suggestions on the best one to use?  I looked at apsfilter but 
the installation SETUP driver options didn't seem to include this printer.
Thanks
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: HP networked printer -- hp-setup won't use, hp-probe finds

2012-05-31 Thread Thomas Mueller
 From Gary Aitken a...@dreamchaser.org :

 I've got an HP printer directly connected to the local network.

 hp-probe finds it:

 #hp-probe -bnet

 HP Linux Imaging and Printing System (ver. 3.12.2)
 Printer Discovery Utility ver. 4.1
 ...
   Device URI   Model 
 Name
   ---    
 
   hp:/net/Officejet_Pro_8500_A909g?ip=aa.bb.cc.dd  Officejet_Pro_8500_A909g  
 HP4356E6

 Found 1 printer(s) on the 'net' bus.

 However, hp-setup and hp-uri refuse to use it:

 #hp-makeuri -ldebug aa.bb.cc.dd

 HP Linux Imaging and Printing System (ver. 3.12.2)
 Device URI Creation Utility ver. 5.0
 ...
 hp-makeuri[63924]: debug: Trying IP address aa.bb.cc.dd
 hp-makeuri[63924]: debug: Not found.
 hp-makeuri[63924]: debug: Trying serial number aa.bb.cc.dd
 hp-makeuri[63924]: debug: Probing bus: usb
 hp-makeuri[63924]: debug: Probing bus: par
 error: Device not found

 When the gui comes up, only the USB option is enabled.  There is no parallel 
 port active and no wireless on the box, but at least the network connection 
 should be available.

 The probe which succeeds takes several seconds, but the hp-setup gui and 
 makeuri fail immediately, and the missing ability to set the network 
 discovery option in the gui lead me to believe it's not even trying the ip 
 addr.

 Anyone with experience setting these guys up have any advice?

 Alternately, is there anything other than a special lp filter really needed, 
 and if not, any suggestions on the best one to use?  I looked at apsfilter 
 but the installation SETUP driver options didn't seem to include this printer.
 Thanks

I have an HP LaserJet M1212nf MFP, and hplip/hp-setup in FreeBSD finds the 
printer all right when connected by Ethernet, but then fails on installing the 
required binary plugin.  Printer is not detected at all when connected by USB.

NetBSD 5.1_STABLE i386 with hplip 3.11.1 built from pkgsrc-wip couldn't find 
the printer on Ethernet, next step is to login to wireless router, and/or check 
the dmesg.boot, and then use the IP address found therefrom.

pkgsrc-wip URL: http://pkgsrc-wip.sourceforge.net/
pkgsrc URL: http://www.netbsd.org/docs/software/packages.html

I wonder if I should have bought a printer, non-HP, with wireless, as long as 
it also had USB and Ethernet capability.

Seeing security advisories for FreeBSD, my next move might be to update the 
source tree by csup, then rebuild (RELENG_9: 9.0-STABLE) for amd64 and build 
for i386 as well.  Then I would have the possibility of building wine from the 
ports, and I could try the MS-Windows software.  I also need to update the 
other ports, including but not limited to hplip and dependencies.

Tom
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org