public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Problems with my parport (and printer)
@ 2004-03-25 11:51 DervishD
  2004-03-28 15:51 ` Jan-Benedict Glaw
  0 siblings, 1 reply; 3+ messages in thread
From: DervishD @ 2004-03-25 11:51 UTC (permalink / raw)
  To: Linux-kernel

    Hi all :)

    I have a printer connected thru my parallel port, supported in
the kernel by parport+parport_pc+lp:

kernel: parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE]
kernel: parport0: Printer, Lexmark International Lexmark Optra E312
kernel: lp0: using parport0 (interrupt-driven).
kernel: lp0: console ready

    It works ok, BTW... The problem is that, when the printer is
switched of and I try to print something, the print command just
blocks, no error, no messages, nothing. I use a shell function to
print, which sends a control command to the printer and after that
sends the file I want to print. It stops (forever) at the reset
command, something like "echo -n '\eE' > /dev/printer".

    Why this operation doesn't fail? IMHO, it should fail with
ENODEV, because parport can work (the parallel port is there...), but
lp shouldn't (the printer is switched off...).

    BTW, I would swear I have the parallel port configured as EPP+ECP
with DMA3 and irq 7 :??? Why is it detected as PCSPP?

    Any help? Thanks in advance :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems with my parport (and printer)
  2004-03-25 11:51 Problems with my parport (and printer) DervishD
@ 2004-03-28 15:51 ` Jan-Benedict Glaw
  2004-03-28 18:09   ` DervishD
  0 siblings, 1 reply; 3+ messages in thread
From: Jan-Benedict Glaw @ 2004-03-28 15:51 UTC (permalink / raw)
  To: Linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1666 bytes --]

On Thu, 2004-03-25 12:51:31 +0100, DervishD <raul@pleyades.net>
wrote in message <20040325115131.GA12195@DervishD>:
>     Hi all :)
> 
>     I have a printer connected thru my parallel port, supported in
> the kernel by parport+parport_pc+lp:
> 
> kernel: parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE]
> kernel: parport0: Printer, Lexmark International Lexmark Optra E312
> kernel: lp0: using parport0 (interrupt-driven).
> kernel: lp0: console ready
> 
>     It works ok, BTW... The problem is that, when the printer is
> switched of and I try to print something, the print command just
> blocks, no error, no messages, nothing. I use a shell function to

First of all, if you want to do normal printing, you shouldn't switch on
LP console. From there on, all kernel debug output (as seen in
/var/log/kern.log and outputted with "dmesg") would be sent to the
printer, what isn't exactly what you want to have.

>     Why this operation doesn't fail? IMHO, it should fail with
> ENODEV, because parport can work (the parallel port is there...), but
> lp shouldn't (the printer is switched off...).

Another gotcha may be that your printer doesn't easily accept commands.
Many printers don't do that nowadays. Some are dumb GDI-Printerts
(Windows-only, that is...), some nees specific wake-up sequences.

MfG, JBG

-- 
   Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems with my parport (and printer)
  2004-03-28 15:51 ` Jan-Benedict Glaw
@ 2004-03-28 18:09   ` DervishD
  0 siblings, 0 replies; 3+ messages in thread
From: DervishD @ 2004-03-28 18:09 UTC (permalink / raw)
  To: Linux-kernel; +Cc: Jan-Benedict Glaw

    Hi Jan :)

 * Jan-Benedict Glaw <jbglaw@lug-owl.de> dixit:
> > kernel: parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE]
> > kernel: parport0: Printer, Lexmark International Lexmark Optra E312
> > kernel: lp0: using parport0 (interrupt-driven).
> > kernel: lp0: console ready
> >     It works ok, BTW... The problem is that, when the printer is
> > switched of and I try to print something, the print command just
> > blocks, no error, no messages, nothing. I use a shell function to
> First of all, if you want to do normal printing, you shouldn't switch on
> LP console. From there on, all kernel debug output (as seen in
> /var/log/kern.log and outputted with "dmesg") would be sent to the
> printer, what isn't exactly what you want to have.

    That's right, but LP console must be activated at boot time (or
at module-loading time) AFAIK, so this is not the problem.

> >     Why this operation doesn't fail? IMHO, it should fail with
> > ENODEV, because parport can work (the parallel port is there...), but
> > lp shouldn't (the printer is switched off...).
> Another gotcha may be that your printer doesn't easily accept commands.
> Many printers don't do that nowadays. Some are dumb GDI-Printerts
> (Windows-only, that is...), some nees specific wake-up sequences.

    This printer (Lexmark Optra E312) is not a winprinter, and the
problem is not related to commands. The printer works fine, I have no
problems with that. My problem arises when the printer is offline:
when I send data to the printer and it is not connected, the command
used to send that data doesn't fail, just waits forever...

    Thanks for your answer anyway :) Really I'm not familiar with the
parallel port :(

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-28 18:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-25 11:51 Problems with my parport (and printer) DervishD
2004-03-28 15:51 ` Jan-Benedict Glaw
2004-03-28 18:09   ` DervishD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox