lpr problems with HP Deskjet 712C
Hi all,
I'm trying to configure my box as a printserver over Samba, to connect it
to our HP Deskjet 712C (formerly attached to a laptop, which I want to make more portable). With a little bit of work I've got PDQ printing fine. However, if I try printing directly to the parallel port ("cat filename >> \dev\lp0") I get the message "lp0: compatibility mode" but nothing actually prints out. I get the same message when using PDQ but something will actually print. Since this HP printer uses a proprietary file format, I figured perhaps a plaintext file wouldn't have the instructions to actually print embedded in it. So I've tried sending files from the Windows laptop (which has the printer's drivers installed) to the printer over Samba- with the same results.
I'm running Debian Woody with kernel 2.4.18.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 4 lines · Jonathan Kallay
Hi all,
I'm trying to configure my box as a printserver over Samba, to connect it
to our HP Deskjet 712C (formerly attached to a laptop, which I want to make more portable). With a little bit of work I've got PDQ printing fine.
Quoted 8 lines
However, if I try printing directly to the parallel port ("cat filename >> \dev\lp0") I get the message "lp0: compatibility mode" but nothing actually prints out. I get the same message when using PDQ but something will actually print. Since this HP printer uses a proprietary file format, I figured perhaps a plaintext file wouldn't have the instructions to actually print embedded in it. So I've tried sending files from the Windows laptop (which has the printer's drivers installed) to the printer over Samba- with the same results.
Can for post a followup with a more exact description of what you are doing?
First, in what you posted, the use of backslashes (\) where you should be using forward slashes (/) is an obvious error, and it might help to know if it is just in your message to us or in what you are actually doing. (That is, the command should read "cat filename >>/dev/lp0", not "cat filename >> \dev\lp0" -- your version is equivalent to "cat filename >> devlp0", which would create the file devlp0 and copy the other file's contents to it.) In any case, if the printer needs a special driver to work (as this one does; see final item), cat'ing to lp0 is unlikely to work.
Second, what does the [printers] block in /etc/samba/smb.conf look like? Assuming it refrences a spool directory, what does the /etc/printcap entry corresponding to that spooler look like?
Third, when you say ...
Quoted 3 lines
So I've tried sending files from the Windows laptop
(which has the printer's drivers installed) to the printer over Samba- with the same results.
... what are you actually doing? Are you printing to a network printer from some application, for example? And do you really mean you get the message "p0: compatibility mode" as part of the failure? If not, please be precise about what you mean by "same" results.
Fourth, when you say " I've got PDQ printing fine" ... how? PDQ appears to be (from the apt-cache package description; I don't use it myself) just a frontend for workstation use; behind the curtain, lpr or LPRng still needs to be working to support Samba (but not necessarily PDQ) printing.
Finally, have you consulted the Linux Printing Database for HP printers? It's at URL
http://www.linuxprinting.org/printer_list.cgi?make=HP
The Deskjet 712C is listed in the works "Perfectly" column, and the link specifies use of the pnm2ppa driver, and makes some comments about use with PDQ as well.
--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
-------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Sorry about the slashes in the wrong direction- I keep jumping from the linux box to the Windows laptop...
PDQ isn't just a front end for lpr or Lprng. PDQ stands for "Print, Don't Queue" and is a printing system that circumvents the printing queues altogether. With my printer, it's configured to use the pnm2ppa driver as a filter.
When I said "with the same results" to describe the effects of printing from the Windows laptop over Samba I was being precise- the "lp0:compatibility mode" message appears without anything coming out of the printer. The file was being printed from within Microsoft Word.
The printer's drivers need to be on the Windows client in order for Samba printing to work- thus one would think that the filtering is all done on the client side.
Quoted 2 lines
Can for post a followup with a more exact description of what you are
doing?
Quoted 3 lines
First, in what you posted, the use of backslashes (\) where you should be using forward slashes (/) is an obvious error, and it might help to know
if
Quoted 8 lines
it is just in your message to us or in what you are actually doing. (That is, the command should read "cat filename >>/dev/lp0", not "cat filename
Quoted 1 line
\dev\lp0" -- your version is equivalent to "cat filename >> devlp0", which would create the file devlp0 and copy the other file's contents to it.) In any case, if the printer needs a special driver to work (as this one does; see final item), cat'ing to lp0 is unlikely to work.
Quoted 8 lines
Second, what does the [printers] block in
/etc/samba/smb.conflook like? Assuming it refrences a spool directory, what does the/etc/printcapentry corresponding to that spooler look like?Third, when you say ...
Quoted 2 lines
So I've tried sending files from the Windows laptop
(which has the printer's drivers installed) to the printer over Samba-
with
Quoted 3 lines
Quoted 1 line
the same results.
... what are you actually doing? Are you printing to a network printer
from
Quoted 14 lines
some application, for example? And do you really mean you get the message "p0: compatibility mode" as part of the failure? If not, please be precise about what you mean by "same" results.
Fourth, when you say " I've got PDQ printing fine" ... how? PDQ appears to be (from the apt-cache package description; I don't use it myself) just a frontend for workstation use; behind the curtain, lpr or LPRng still needs to be working to support Samba (but not necessarily PDQ) printing.
Finally, have you consulted the Linux Printing Database for HP printers? It's at URL
Quoted 7 lines
The Deskjet 712C is listed in the works "Perfectly" column, and the link specifies use of the pnm2ppa driver, and makes some comments about use with PDQ as well.
-- -------------------------------------------"Never tell me the
odds!"--------
Quoted 3 lines
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
--------------------------------------------------------------------------
-----
Quoted 7 lines
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Thanks for the additional information. But I still need to see the answer to one question you skipped:
Quoted 3 lines
Quoted 3 lines
Second, what does the [printers] block in
/etc/samba/smb.conflook like? Assuming it refrences a spool directory, what does the/etc/printcapentry corresponding to that spooler look like?
Or, if Samba is (somehow) configured to use PDQ, rather than a spool directory, what does that setup look like? As I said previously,
Quoted 4 lines
Quoted 4 lines
Fourth, when you say " I've got PDQ printing fine" ... how? PDQ appears to be (from the apt-cache package description; I don't use it myself) just a frontend for workstation use; behind the curtain, lpr or LPRng still needs to be working to support Samba (but not necessarily PDQ) printing.
Quoted 4 lines · it appears I was unclear. You
PDQ isn't just a front end for lpr or Lprng. PDQ stands for "Print, Don't Queue" and is a printing system that circumvents the printing queues altogether. With my printer, it's configured to use the pnm2ppa driver as a filter.
Yes, that part was clear from the package description. But how to tell Samba to use a queueless printing system -- is there even a printing daemon for Samba to use in PDQ? -- is not apparent. It's Samba, not PDQ, that (I think) needs some lprd running ... at least that's the only way I know to set up Samba ... sorry I was unclear about that before.
At 03:56 PM 1/20/03 -0500, Jonathan Kallay wrote:
[details deleted]
--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
-------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
I referred to PDQ simply as proof of an existing setup that does work. I
think it's mostly irrelevant when it comes to using the Linux box as a printserver over SMB.
here's my printcap file:
lp:\
:lp=/dev/lp0
:sd=/var/spool/lpd/%P:\
:sh:
and the smb.conf blocks:
[printers]
comment = All Printers
path = /tmp
create mask = 0700
printable = Yes
browseable = No
[lp]
path = /tmp
read only = No
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr -P'%p' %s
printer name = lp
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
This is a good bit different from what I am used to, so I have to guess a bit about what some of it means.
The Samba block for [lp] seems to be saying that Samba should print to this printer by executing (approximately) this command:
lpr -Plp /tmp/somefilename
Are you able to run a similar command from the command line (substituting a suitable file name)? Probably not ... but see my last suggestion below. If not, how does it fail?
In printcap, I see one clear error and one entry I am unfamiliar with. The error is on this line:
:lp=/dev/lp0
It needs to read:
:lp=/dev/lp0 \
The unfamiliar usage is the %P
:sd=/var/spool/lpd/%P:\
While it is easy to infer what this is intended to do, I don't know if it works in a printcap entry. The man page for printcap doesn't mention this usage. I'd try
:sd=/var/spool/lpd/lp:\
(and make sure that /var/spool/lpd/lp exists and has sensible permissions).
Finally, since you have the correct driver on your Windows machine, there is a way to do the "cat" test that you might find helpful. On the Windows machine, use Word to print to file, using the appropriate printer driver. Then somehow (via SMB filesharing, for example ... or NFS or ftp or scp or whatever you have set up) copy the printer file to the Linux host. Then cat *that* file to /dev/lp0; since it is formatted for the printer, it should print if the printer and the parport stuff is working right.
So ... if that works, your problem is most likely in the handoff that Samba does to lpd (by way of lpr). In that case, my next step would be to fix printcap, then try
lpr -Plp filename
where filename is the file you used successfully in the "cat" test.
If it doesn't work ... then the problem is in the parallel-port driver setup (it's the source of the actual error message you see) ... or maybe in the printer or the cable ... but I'm then puzzled about why PDQ *does* work.
Quoted 18 lines · Jonathan Kallay
I referred to PDQ simply as proof of an existing setup that does work. I
think it's mostly irrelevant when it comes to using the Linux box as a printserver over SMB.here's my printcap file:
lp:\
:lp=/dev/lp0
:sd=/var/spool/lpd/%P:\
:sh:and the smb.conf blocks:
[printers]
comment = All Printers
path = /tmp
create mask = 0700
printable = Yes
browseable = No
Quoted 8 lines
[lp]
path = /tmp
read only = No
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr -P'%p' %s
printer name = lp
--
-------------------------------------------"Never tell me the odds!"--------
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
-------------------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Thanks, Ray- I wouldn't have thought to try printing to a file in Windows, transferring the file over and trying the cat command. That worked, so I'll work on the Samba configuration.
----- Original Message -----
From: "Ray Olszewski" <[email protected]>
To: "Jonathan Kallay" <[email protected]>; <[email protected]>
Sent: Monday, January 20, 2003 8:37 PM
Subject: Re: lpr problems with HP Deskjet 712C
Quoted 4 lines
This is a good bit different from what I am used to, so I have to guess a bit about what some of it means.
The Samba block for [lp] seems to be saying that Samba should print to
this
Quoted 5 lines
printer by executing (approximately) this command:
lpr -Plp
/tmp/somefilenameAre you able to run a similar command from the command line (substituting
a
Quoted 16 lines
suitable file name)? Probably not ... but see my last suggestion below. If not, how does it fail?
In printcap, I see one clear error and one entry I am unfamiliar with. The error is on this line:
:lp=/dev/lp0It needs to read:
:lp=/dev/lp0 \The unfamiliar usage is the %P
:sd=/var/spool/lpd/%P:\
Quoted 7 lines
While it is easy to infer what this is intended to do, I don't know if it works in a printcap entry. The man page for printcap doesn't mention this usage. I'd try
:sd=/var/spool/lpd/lp:\(and make sure that
/var/spool/lpd/lpexists and has sensible
permissions).
Quoted 6 lines
Finally, since you have the correct driver on your Windows machine, there is a way to do the "cat" test that you might find helpful. On the Windows machine, use Word to print to file, using the appropriate printer driver. Then somehow (via SMB filesharing, for example ... or NFS or ftp or scp or whatever you have set up) copy the printer file to the Linux host. Then
cat
Quoted 4 lines
*that* file to
/dev/lp0; since it is formatted for the printer, it should print if the printer and the parport stuff is working right.So ... if that works, your problem is most likely in the handoff that
Samba
Quoted 9 lines
does to lpd (by way of lpr). In that case, my next step would be to fix printcap, then try
lpr -Plp filename
where filename is the file you used successfully in the "cat" test.
If it doesn't work ... then the problem is in the parallel-port driver setup (it's the source of the actual error message you see) ... or maybe
in
Quoted 1 line
the printer or the cable ... but I'm then puzzled about why PDQ *does*
work.
Quoted 3 lines
Quoted 1 line · Jonathan Kallay
I referred to PDQ simply as proof of an existing setup that does work.
I
Quoted 29 lines
Quoted 17 lines
think it's mostly irrelevant when it comes to using the Linux box as a printserver over SMB.
here's my printcap file:
lp:\
:lp=/dev/lp0
:sd=/var/spool/lpd/%P:\
:sh:and the smb.conf blocks:
[printers]
comment = All Printers
path = /tmp
create mask = 0700
printable = Yes
browseable = NoQuoted 8 lines
[lp]
path = /tmp
read only = No
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr -P'%p' %s
printer name = lp
Quoted 2 lines
-- -------------------------------------------"Never tell me the
odds!"--------
Quoted 3 lines
Ray Olszewski -- Han Solo
Palo Alto, California, USA [email protected]
--------------------------------------------------------------------------
-----
Quoted 2 lines
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs