Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Mar 2004 02:49:58 +1030
From:      Malcolm Kay <malcolm.kay@internode.on.net>
To:        Stephen Liu <satimis@icare.com.hk>, Kris Kennaway <kris@obsecurity.org>
Cc:        questions@freebsd.org
Subject:   Re: MAKEDEV question
Message-ID:  <200403090249.58795.malcolm.kay@internode.on.net>
In-Reply-To: <200403091228.22894.satimis@icare.com.hk>
References:  <200403081945.16907.satimis@icare.com.hk> <200403082215.29256.malcolm.kay@internode.on.net> <200403091228.22894.satimis@icare.com.hk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 9 Mar 2004 14:59, Stephen Liu wrote:
> - snip -
>
> > > I skipped following steps
> > >
> > > 1)
> > > # ./MAKEDEV port
> > >
> > > and
> > > 2)
> > > # lptcontrol -i -d /dev/lpt0
> > > (to set interrupt-driven mode for lpt0)
> > >
> > > and
> > > 3)
> > > # lptcontrol -p -d /dev/lpt0
> > > (to set polled-mode for lptN)
> > >
> > >
> > > Jumped to;
> > > # lptest > /dev/lpt0
> > > only strange symbols printed and printing continued without stop un=
til
> > > I removed the paper tray.  Communication between printer and port
> > > seemed working
> >
> > It could be that your printer does not understand plain ascii text. W=
hat
> > is the make and model.
> >
> > The other possibility is that there is something wrong in the
> > communications path -- a dud or incorrectly wired cable.
>
> Hi Malcolm,
>
> FreeBSD 5.2
> Printer HP Desktop 690c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> Thanks for your response.
>
> I missed steps 2) and 3) mentioned above.  I performed further test as
> follows;
>
> step-2
> # lptcontrol -i -d /dev/lpt0
>
> step-3
> # lptcontrol -p -d /dev/lpt0
>
> both without printout
>
> rebooted PC because having got printer turned on. The later could not b=
e
> detected with 'dmesg'
>
> ** how can I detect the printer to avoid 'reboot' ??????
>
> After reboot
> # dmesg
> Probing for PnP devices on ppbus0:
> ppbus0: <HEWLETT-PACKARD DESKJET 690C> MLC,PCL,PML
> plip0: <PLIP network interface> on ppbus0
> lpt0: <Printer> on ppbus0
> lpt0: Interrupt-driven port
> ppi0: <Parallel I/O> on ppbus0
>
> # ls -l /dev/lpt0
> crw------- 1 root wheel 16, 0 Mar 9 01:17 /dev/lpt0
>
> Repeated step-2 and step-3 above
> (also no printout)
>
> # lptest > /dev/lpt0
>
> One line printed on 1st paper as follow;
> !"#$%&'()*
> +,-./0123456789:;<=3D>?@ABCDEFGHIJK.....XYZ......abcdefghijk.......xyz.=
=2E..
>
> It seemed OK but feed-in paper continued with 'no_paper' light on (I pu=
t
> only 1 paper in the tray)

If you just run the utility lptest without redirecting the output you wil=
l see on the
screen what you should expect to print.

Do you get one printed line or a full page?
One line implies that 2nd and subsequent lines have disappeared of to the=
 right
as BSD does not supply a CR, only LF, at end of line. You may find a you =
can set
up your printer to interpret LF as CR-LF.

As for running out of paper -- lptest produces 200 lines -- and even if t=
hese have
disappeared off the right then they need about 3 pages of A4.

I gather you have not yet got as far as setting up /etc/printcap or start=
ing the print
daemon lpd.
Once you do this you can insert setup codes via an input filter ahead of =
the data=20
to be printed and most printers including many HP models have a code whic=
h=20
switches the interpretation of the LF character.

Malcolm



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403090249.58795.malcolm.kay>