1834757 Members
3060 Online
110070 Solutions
New Discussion

Line printer

 
SOLVED
Go to solution
Massimo_37
Frequent Advisor

Line printer

I am running a K380 machine with HP Ux 10.2
uname -m returns 9000/800
My problem is that the line printer connected as local printer to pararllel port of k380 does not work. When i do an ioscan on it i get among other things..
ext_bus 2 10/12/0 CentIf CLAIMED INTERFACE Built-in Parallel Interface /dev/c2t0d0_lp
When i check device drivers on SAM I see lpr2 as "IN" , but does not see that on ioscan.
My understanding is we need lpr2 to print to line printer through parallel port. My question is
1)should I take the Centif Parallel Interface "OUT" from the kernel, and if so, is it okay ?
2) As lpr2 is already "IN", would taking CEntif "OUT" make lpr2 use the parallel printer port and connect to device.

Or is it something completely different that I have to do to get the printer working ? Many thanks in anticipation
15 REPLIES 15
Devender Khatana
Honored Contributor

Re: Line printer

Dear George,

It does not seems a problem related to driver in kernel.
Have you tried by redirecting the output of a command to the device file of the port. For example

#ls -l >>/dev/c2t0d0_lp

Is it working ?
If it is working your hardware will be ok. In that case if it is not working through scheduler then check for SCHEDLOCK file , if exists delete it.

If it is not working your hardware is suspected to be faulty.

Regards,
Devender K.
Impossible itself mentions "I m possible"
Massimo_37
Frequent Advisor

Re: Line printer

deleted SCHEDLOCK file - Tried

ls -l>>/dev/c2t0d0_lp
returns
sh: /dev/c2t0d0_lp: Cannot create the specified file - Althoug there is a file
crw-r--r-- 1 lp bin 216 0x020002 Jul 1 12:40 c2t0d0_lp

So, is the parallel interface card faulty ? Because we can print to this from another HPUX 10.2 server.
But on that server ioscan returns
ext_bus 2 5 lpr2 CLAIMED INTERFACE HP 28655A - Parallel Interface /dev/c2t0d0_lp /dev/diag/c2t0d0_lp
It uses lpr2 although Centif is also "IN" on that server- Can I make this device use lpr2 instead of Centif Many Thanks
Shaikh Imran
Honored Contributor
Solution

Re: Line printer

hi,
Just a small clarification:
Centif is used for series 700 &
lpr2 is used for series 800.
Yours is K class i.e. series 800 so no matter Centif is out or in ..
Since you are talking about Making Centif in and out seems you are OK rebooting the server.
Since the printer is working from other server and it was aslo working with this server in this case,
I will say is possible just simply restart
server and give a try.

Regards,

I'll sleep when i am dead.
Bruno Ganino
Honored Contributor

Re: Line printer

Try add a Printer Manually
Stop the LP spooler:
hpux# lpshut

Add the printer to the LP spooler. In this example, the printer device is /dev/lp and the model file is laserjet:
hpux# lpadmin -phpljet -v/dev/lp -mlaserjet

(Be sure to use the appropriate model file for the printer. Generally, the model files are located in /usr/lib/lp.
These files describe the characteristics supported by the printer.)

Allow print requests to be accepted:
hpux# accept hpljet

This command allows the LP spooler to accept print requests for this printer.

Enable printing:
hpux# enable hpljet

This command allows the LP spooler to actually print the job.

Restart the LP spooler:
hpux# lpsched

Test the printer.
hpux# lp -dhpljet /etc/hosts


HTH
Bruno
Torino (Turin) +2H
Massimo_37
Frequent Advisor

Re: Line printer

I tried rebooing just now, but still Centif seems to be linked with the parallel interface. And if you look on my ioscan output you may have noticed that although it says CLAIMED, there is no device file assosciated with it. I thought that the device file would be created by the OS automatically on startup. DO I have to create this device file manually - with lpr2?
Anyone done this before ?
Shaikh Imran
Honored Contributor

Re: Line printer

Hi,

Check whether the Printer device file is existing By.
#/usr/sbin/ioscan -fn -d lpr2

O/p Sholud be like the attached txt file.

If not
Then simply add the lpr2 driver in the kernel and rebuild the kernel and reboot
the server.
This should automatically create a device
file as /dev/c2t0d0_lp.

I have never created this device file
manually.

Regards,


I'll sleep when i am dead.
Shaikh Imran
Honored Contributor

Re: Line printer

Hi,

Check whether the Printer device file is existing By.
#/usr/sbin/ioscan -fn -d lpr2

O/p Sholud be like the attached txt file.

If not
Then simply add the lpr2 driver in the kernel and rebuild the kernel and reboot
the server.
This should automatically create a device
file as /dev/c2t0d0_lp.

I have never created this device file
manually.

Regards,


I'll sleep when i am dead.
Massimo_37
Frequent Advisor

Re: Line printer

OUtput on ioscan is as below, not that it is Centif instead of lpr2. But however adding the printer on SAM as a local printer to /dev/c2t0d0_lp does not work. The print job stays in queue and does not print -

ext_bus 2 10/12/0 CentIf CLAIMED INTERFACE Built-in Parallel Interface /dev/c2t0d0_lp
Shaikh Imran
Honored Contributor

Re: Line printer

Hi,
As i said earlier that you are using a K class server i.e. series 800 so the parellel port driver for that is lpr2

Coming back to your own original post question No 2).
Please remove Centif from the kernel and keep
only lpr2.Reboot the server this must whow you the device file for lpr2 as
/dev/cxtxdx_lp
and you can use lpadmin to create the default printer and ask the printer to accept the request and give the printing command and Test.

Regards,
I'll sleep when i am dead.
Massimo_37
Frequent Advisor

Re: Line printer

Thanks Shaikh for the quick response, but questions still remain :
On the Cards list on SAM, I see this:

10/12/0 CentIf Built-in Parallel Interface

Since there is a Centif Parallel Interface card, can I take Centif out of the kernel ? Or will the Centif card use lpr2 if Centif is out ?
Shaikh Imran
Honored Contributor

Re: Line printer

Hi,
Once you remove the Cenif
lpr2 will be used instead.....

Please refer the attached doc for printer configuration.

This will clear max doubts...

Regards,

I'll sleep when i am dead.
Bruno Ganino
Honored Contributor

Re: Line printer

George, you have read my previous post ?
Bruno
Torino (Turin) +2H
Massimo_37
Frequent Advisor

Re: Line printer

Bruno, i did- Thank you- But my problem is only with this line printer which has to be added on a parallel port. I added other printers through SAM, and they are fine- My problem is mainly witht the type of parallel interface
As I have got only Cetronics parallel interface card and my machine is 800 series, I don't think now that I can try and add this printer , unless I change the parallel interface card
Bill Hassell
Honored Contributor

Re: Line printer

The parallel interface on the K-class (and earlier models) is quite narrow in it's ability to accomodate the *MANY* versions of the parallel interface, commonly called Centronics. Centronics was the first printer company to define a fairly standard high-speed interface to supplement RS-232 (serial). Large line printers in the 60's and 70's mostly had proprietary interfaces, and it was not until low-cost dot matrix came out that a more portable interface standard emerged.

However, the Centronics interface design varied even within Centronics printers so when the PC market began to drive common (and low-cost) printer interfaces, a lot of attention was paid to integrating smart BIOS and/or electronics to accomodate the differing standards. The standards varied in terms of handshaking and whether these protocol signals were levels or pulsed.

The HP implementation was to control the interface using various minor number values and the man page called "cent" will give the details. There are five separate modes (minor number values) which can all be setup by creating different device files and varying the last hex digit. You can create the device files like this:

mknod /dev/c2t0d0_lp1 c 216 0x020001
mknod /dev/c2t0d0_lp2 c 216 0x020002
mknod /dev/c2t0d0_lp3 c 216 0x020003
mknod /dev/c2t0d0_lp4 c 216 0x020004
mknod /dev/c2t0d0_lp5 c 216 0x020005

Mode 6 is not available for 800 series (K380) boxes. Now try cat'ing a simple file to each device file:

cat /etc/issue > /dev/c2t0d0_lp1
cat /etc/issue > /dev/c2t0d0_lp2
cat /etc/issue > /dev/c2t0d0_lp3
cat /etc/issue > /dev/c2t0d0_lp4
cat /etc/issue > /dev/c2t0d0_lp5

One (or more) of those device files may work. If multiple device files work, use long listings to verify the most reliable handshake mode. NOTE: cat'ing direct to the port will require filtering ASCII files because in Unix, ASCII files are string followed only by a linefeed (LF). For multi-line files, use this:

ux2dos /etc/issue > /dev/c2t0d0_lp1

Note also that cat'ing direct will leave off the formfeed between print jobs, but this is just a test. Once you find a device file that works, add the printer using the dumb model script and you should be ready to print. If none of the files work, you may have one of the few completely incompatible parallel interfaces on your printer. While it may work fine on a PC, even HP's RuggedWriter (a 1980's dot matrix printer) could not be made to work with any HP 9000 server.

In that case, you have an even better solution than parallel: HP makes a Centronics-to-LAN adapter box called a JetDirect External. The 170x is only $129 retail and allows you to move your printer to anywhere you can run a LAN cable. It also allows other machines such as PCs to print to the printer (although you can lockout any incoming jobs based on IPP address). The JetDirect External box has multi-protocol parallel interface capability that is as universal as a typical PC.


Bill Hassell, sysadmin
Massimo_37
Frequent Advisor

Re: Line printer

Thank you very much- I tried adding the printer with a Jet Direct Card and it works. I think this is the best solution,a s we also got an ip address for this printer and can be accessed from any other machine