Operating System - HP-UX
1839983 Members
2441 Online
110158 Solutions
New Discussion

Why I could config a printer as both Network printer and Remote printer at same time?

 
Zhe
Occasional Advisor

Why I could config a printer as both Network printer and Remote printer at same time?

Here's a printer connecting on the LAN.
The strange thing is that I could config it either as network printer by using jetadmin or remote printer by using lpadmin! Why?

Thanks in advance!

Regards,
Henry
7 REPLIES 7
G. Vrijhoeven
Honored Contributor

Re: Why I could config a printer as both Network printer and Remote printer at same time?

Hi,

Do you have a jetdirect interface on the printer? if so you should be able to ping and telnet to the interface and configure the printer using jetadmin. If not the interface could be in defauld settings 192.0.0.(192?) and you should alter it to an adress in the range that is reachable for your server. You can do that on the printer or by setting up bootp for the printer.

Gideon
Elmar P. Kolkman
Honored Contributor

Re: Why I could config a printer as both Network printer and Remote printer at same time?

Adding a printer on unix doesn't really add the printer but defines a printer queue for the printer.
For instance, you can add a printerqueue that will automatically print double sided or from a different paper tray, while another queue uses other features of the printer...
Every problem has at least one solution. Only some solutions are harder to find.
Zhe
Occasional Advisor

Re: Why I could config a printer as both Network printer and Remote printer at same time?

Hi, Gideon

Thanks for your reply.

But, maybe there're some misunderstanding.
As you know, we could config a printer in HP-UX as a remote printer which means the printer has already been defined in another computer. or we could config a printer in HP-UX as a network printer which means the printer isn't defined in any other computer but only connect to the LAN. These 2 configurations are totally different ones.

My question is, I could config as both of them at the same time, what is the reason?

I did like the following,

###CONFIG a remote printer
lpadmin -pprn1 -mrmodel -v/dev/null -orm172.28.131.45 -orptesting

###CONFIG a network printer
jetadmin
printer ip: 172.28.131.45
printer type: HP Laser Jet 4000 serials

Both of them could work.

Thanks & Regards,
Henry
Elmar P. Kolkman
Honored Contributor

Re: Why I could config a printer as both Network printer and Remote printer at same time?

On printers with, for example, jetdirect boxes, it listens on several network ports. You can access it using the lpd port, but also raw or sometimes even http (and other ports I don't remember by head). This means that you can add them in several ways on HP-UX too.
Every problem has at least one solution. Only some solutions are harder to find.
G. Vrijhoeven
Honored Contributor

Re: Why I could config a printer as both Network printer and Remote printer at same time?

Hi Henry,

Sorrie about the previouse answer and i am afraid i can not give you the answer to you actual question....

Hope s.o. else can, good luck!

Gideon
Zhe
Occasional Advisor

Re: Why I could config a printer as both Network printer and Remote printer at same time?

Hi, Kolkman

It seems to be the reason. Thank you!
Anyway, the printer works. ;-)

BRs,
Henry

rmueller58
Valued Contributor

Re: Why I could config a printer as both Network printer and Remote printer at same time?

Jet direct devices listen on tcp/9100 and tcp/515

If the printer I have attached is a HP/Canon engine I prefer 9100 as is it much simpler to configure multiple queues.. at once.

Depending on your application it may require different orientation Land/Port or Compressed printing for text based printing.

By default the PCL code will handle any PCL jobs without a problem and using only the queue name..

If you wish to define a jetdirect queue
use

the shell script below will define the queue and insert different text orientation into a database.. (Informix.)

#

#=============================================================================

# Jet Direct Queue Section
# This script uses sed as a stream editor to change
# IPADDRESS variable to $IP entered
# QUENAME variable to $QN enther
# =============================================================================
clear
echo 'Select type of print que:

a.) Jet Direct
b.) LPR/LPD
c.) EZ Spool

Please Select one of the above: \c'
read qtype
case "$qtype" in
a)export qtype=jd;;
b)export qtype=lpr;;
c)export qtype=ez;;
esac




if [ "$qtype" = "jd" ]
then

echo "Enter IP Address of Printer:\n"
read IP
sed s/IPADDRESS/$IP/g TEMPLATE >TEMPLATE2
sed s/QUENAME/$QN/g TEMPLATE2 >TEMPLATE3
echo "Please select from one of the print type:\n"
cat pname.txt |pr -c 2 -t
read pt
export pt
echo $pt
sed s/PTYPE/$pt/g TEMPLATE3 > TEMPLATE.CMD
chown support:support TEMPLATE.CMD
chmod 770 TEMPLATE.CMD
cat TEMPLATE.CMD
sudo TEMPLATE.CMD
echo $qtype
chmod 666 TEMPLATE.CMD
echo "Press any key" or "Control - C" to break.
read

# =============================================================================
# LPR/LPD Section -- UNDER DEVELOPMENT
# =============================================================================
elif
[ $qtype = "lpr" ]
then
echo "Enter IP Address of LPR / Printer:\n"
read IP
echo $qtype
touch hosts1
echo "$IP $QN # $bldgnum $BNAME2 $PNAME $MNUM" > hosts1
cat hosts1 >> /etc/hosts
tail /etc/hosts
lpshut
lpadmin -p$QN -v/dev/null -mrmodel -ocmrcmodel -osmrsmodel -ob3 -orm$QN -orplp -v/dev/null
lpsched
fi
# =============================================================================
# EZ SPOOLER Section -- UNDER DEVELOPMENT
# =============================================================================

# =============================================================================
# SECTION FOR CREATION OF DATABASE INSERTION FILE
# =============================================================================
echo $BN
echo $BNAME2
echo $PNAME
echo $MNUM
echo $QN
echo $SDE
echo $STI
# ==============================================================================
# Standard LP commands assuming Laser Jet/Compatible Printers and Jet Direct
#===============================================================================
touch /tmp/menutb_ins
chmod 666 /tmp/menutb_ins
echo "$bldgnum|$BNAME2 $PNAME $MNUM PORT|lp -d $QN -ovsi7.27|N|-n|$SDE|`date +%T`|dbadminusername" > /tmp/menutb_ins
echo "$bldgnum|$BNAME2 $PNAME $MNUM PORTCOMP|lp -d $QN -ovsi7.27 -oc|N|-n|$SDE|`date +%T`|dbadminusername" >> /tmp/menutb_ins
echo "$bldgnum|$BNAME2 $PNAME $MNUM LAND|lp -d $QN -ovsi5.45 -olandscape|N|-n|$SDE|`date +%T`|dbadminusername" >> /tmp/menutb_ins
echo "$bldgnum|$BNAME2 $PNAME $MNUM LANDCOMP|lp -d $QN -ovsi5.45 -oc -olandscape|N|-n|$SDE|`date +%T`|dbadminusername" >> /tmp/me
nutb_ins
# ==============================================================================
cat /tmp/menutb_ins
echo "Press CTRL-C to Break or Enter to Insert record into Database"
read