LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   A quesiton MAKEDEV command (https://www.linuxquestions.org/questions/%2Absd-17/a-quesiton-makedev-command-154797/)

satimis 03-07-2004 09:09 PM

A quesiton MAKEDEV command
 
Hi folks,
Â_
Â_FreeBSD 5.2
Â_
Â_I am now configuring printer and aware that 'MAKEDEV' has been replaced with
Â_'devfs'
Â_
Â_According to handbook I should run
Â_
Â_# ./MAKEDEV lpt0 (para port)
Â_
Â_whether to be replaced with
Â_
Â_# ./devfs -m lpt0
Â_
Â_Kindly advise. �TIA
Â_
Â_B.R.
Â_satimis

chort 03-08-2004 01:16 AM

You don't necessarily need to do that. If you do ls -l /dev/lpt0, what is the output?

satimis 03-08-2004 02:24 AM

Quote:

Originally posted by chort
You don't necessarily need to do that. If you do ls -l /dev/lpt0, what is the output?
Hi Moderator,

Tks for your response. I encountered difficulty in making the printer to work and searching around for solution. Herein under is my test and test result;

FreeBSD 5.2
Printer HP Deskject 690C
Connection: parallel port
Manual: FreeBSD handbook

Test and Test result
====================
Turned on printer

# dmesg
.....
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 Â_8 22:48 /dev/lpt0

It is there.


I skipped following steps from the manual

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 lpt0)


Jumped to;
# lptest > /dev/lpt0
only strange symbols printed on 1st page and the printing continued until I
removed the paper tray, but only feeding in papers starting from 2nd page without printout. Â_Communication between printer and port seemed working

Kindly advise how to fix the test printing error.

TIA

B.R.
satimis

chort 03-08-2004 02:32 AM

I'd go back to step #2 and proceed from there. You don't need to create the device, because it's already created. Since the rest of the steps (likely) haven't been done for you, you should start at #2 and continue, then try the test again--with only one piece of paper in the tray ;)

satimis 03-08-2004 03:44 AM

Quote:

Originally posted by chort
I'd go back to step #2 and proceed from there. You don't need to create the device, because it's already created. Since the rest of the steps (likely) haven't been done for you, you should start at #2 and continue, then try the test again--with only one piece of paper in the tray ;)
Hi

Performed 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 be 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:;<=>?@ABCDEFG..........abcd.......

Seemed OK but feed-in paper continued with 'no_paper' light on (only 1 paper in tray)

B.R.
satimis

chort 03-08-2004 12:16 PM

Hmm, so looks like the test worked. If you read the man page for lptest you'll see that it prints 96 lines, one with each character in each position. Try printing a normal text file now.

satimis 03-09-2004 05:56 AM

Quote:

Originally posted by chort
Hmm, so looks like the test worked. If you read the man page for lptest you'll see that it prints 96 lines, one with each character in each position. Try printing a normal text file now.
Hi Moderator,

I carried out following test, putting one paper in the tray.

# lpr -P HPDJ690C clean.txt
Only strange symbols printed. 'No paper' light was flashing.

# lprm -P HPDJ690C
dfA006localhost dequeued
cfA006localhost dequeued

# lpq -P HPDJ690C
no entries

But 'No paper' light was still flashing. Turned off and turned on again the light gone.

B.R.
satimis

satimis 03-09-2004 06:22 AM

Hi Moderator,

I forgot mentioning I have 'Apsfilter' installed, a nice test-printout <tiger head and text> obtained after installation finished.

but it can't help. Same result. Test performed as follows;

# find / -iname apsfilter
/usr/local/etc/apsfilter
/usr/local/share/doc/apsfilter
/usr/local/share/apsfilter
/usr/local/share/apsfilter/bin/apsfilter
/usr/ports/print/apsfilter
/usr/ports/distfiles/apsfilter

adding following line to /etc/rc.conf
lpd_enable="YES"

Rebooted PC

On KDE desktop started a text document
Started printing
File -> Print
Print system currently used <Generic UNIX LPD Print System (default)>
Printer Name - HPDJ690C
Clicked <Print>

Only strange symbols printed out and 'no paper' light flashing.

Remark: also tried
Print system currently used <LPR/LPRng Print System>
same result:- strange symbols and light flashing

B.R.
satimis

chort 03-10-2004 01:12 AM

Well I have to admit you have me stumped. It sounds like lptest is working, so raw printing is working... maybe /etc/printcap isn't configured correctly? Have you tried Googling for "/etc/printcap +HPDJ690C"?

satimis 03-10-2004 03:54 AM

Quote:

Originally posted by chort
Well I have to admit you have me stumped. It sounds like lptest is working, so raw printing is working... maybe /etc/printcap isn't configured correctly? Have you tried Googling for "/etc/printcap +HPDJ690C"?
Hi Moderator,

I have been looking around for solution. From Google search I found follows;

1) On Debian-user@lists.debian.org mailing list, a folk also encountered similar problem on HP Deskjet 690C. He has the first 2 pages printed but afterwards the printer ejected papers continueously. No reply to his posting found

2) Accroding to Apsfilter handbook 2nd ed.
Apsfilter is not working on Solaris, suggesting installing LPRng instead.

3) Another folks on LinuxFromScratch also got problem with HP Deskject 690C which can't print. He installed both Ghostscript and hpdj690c. No reply to his posting.

/etc/printcap:

:lp=/dev/lp0:\
:sd=/var/spool/lpd/hpdj690c:\
:lf=/var/spool/lpd/hpdj690c/logfile:\
:af=/var/spool/lpd/hpdj690c/acct:\
:if=/usr/share/ghostscript/filt/direct/hpdj690c/gsif:\
:mx#0:sh:rs:

/usr/share/ghostscript/filt/direct/hpdj690c/gsif is a link to
/usr/bin/unix-lpr.sh


I sent an email to both of them for assistance, unfortunately their address changed and emails returned

On freebsd_question mailing list a folk had following comment;
.....
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 these 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 starting the print daemon lpd.

Once you do this you can insert setup codes via an input filter ahead of the data to be printed and most printers including many HP models have a code which
switches the interpretation of the LF character.
.....


I returned a posting requesting him for further detail how to set 'CR-LF' but without reply.

The strange thing is ;-
# lptest > /dev/lpt0

only print 1st line then continue ejecting papers

B.R.
satimis

satimis 03-22-2004 12:01 AM

Printing problem SOLVED
 
Hi Moderator,

Printing problem solved after installing 'cups'. 'apsfilter' does not work on HP printer. Now printing works without problem.

I am still looking for solution to add 'cups' to OpenOffice 1.1. Now only 'generic printer' is available. I succeeded adding 'cups' to 'OpenOffice' running on RedHat 7.3/8.0 several years ago but unfortunately I could not recall how to make it.

B.R.
satimis


All times are GMT -5. The time now is 04:08 PM.