LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-24-2009, 11:04 PM   #1
KFC123
Member
 
Registered: May 2009
Posts: 47

Rep: Reputation: 15
How to make HP Laserjet 1320 works over the network?


I have a HP Laserjet 1320 (ip, says x.y.z.w). I have two computers: one installed winxp and other is running CentOS somewhere else. Usually, I do the printing job via winxp. For the linux, I use nomachine client, installed in the winxp, to remotely logon it. I want to setup the printer on linux too. First of all, I use Nmap to see what ports are being opened at the printer, it returns

-----------------------------------------------
PORT STATE SERVICE
23/tcp open telnet
80/tcp open http
280/tcp open http-mgmt
515/tcp open printer
9100/tcp filtered jetdirect
-----------------------------------------------

Does anyone know what's the difference b/w the last two lines?

Anyway, in linux, I logon as root, turn off the firewall first. Go to printer settings, new a printer, choose corresponding model and driver, choose [Network Printers (TCP)] -> scan all all possible printers at x.y.z.* at port 9100, it retruns some chooses but I didn't see my printer. So I try to scan x.y.z.* at port 515, this time, it shows my printer. I select that item, now the URI of the printer becomes

URI: socket://x.y.z.w:515

socket??? is that normal?

I don't know if there is anything wrong, but when I test the printing, nothing comes out.

I also try different interfaces. First of all, I try "Remote CUPS server (IPP/HTTP)", but it asks me to input user identification, what kind of information I have to provide? The user information for loggon on the linux?

I also try "Network printer w/IPP (IPP/HTTP)", similarly, I scan the subnetwork x.y.z.* at port 9100 and 515, it shows some items (same as before), buy whatever I click in the list, it freezes there forever and have to shut it down by killing the process in the background! Am I doing
somehting wrong? Anyway, I reopen the printer setting, repeat whatever I did before, but I didn't scan the pinter, I directly input URI as x.y.z.w:9100 or x.y.z.w:515, when I try to print something ...
after a while, some junk was coming out (not what I am printing) while the printing job still stays in the montior forever

So what's the different b/w "Network printer w/IPP (IPP/HTTP)" and "Network Printers (TCP)]"? Which one is the right choice for my case?
 
Old 06-25-2009, 03:56 PM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
I think port 9100 is an LPD port.
which means that it should work ok.
it should be set up to act aas a unix network printer.

first try this: (a.b.c.d is the printer address)

ls | nc a.b.c.d 9100

if it works...
then, open an application (e.g. firefox) and print to file
this will give you a postscript file.
try

cat file.ps | nc a.b.c.d 9100

if this works out fine it's a simple job.
I've had no luck with IPP but with TCP it looks like you should be fine.

try cups

browser to localhost:631 should bring up the admin and
set up your printer as an LPD postscript printer.

Last edited by bigearsbilly; 06-25-2009 at 04:53 PM.
 
Old 06-25-2009, 06:10 PM   #3
KFC123
Member
 
Registered: May 2009
Posts: 47

Original Poster
Rep: Reputation: 15
Thanks a lot for your reply. ls | nc a.b.c.d 9100 returns nothing,moreover,if I scan the within this section a.b.c.* at 9100, the ip for the printer didn't shown in the return list. It is there only when I scan a.b.c.* at 515, weird !

Anyway, I following what you said to call cups at localhost:631,

1) I add a new printer, choose Location and Description as OurHP1320, Name is HP1320.

2) In next screen, for choosing the Device, I choose "LPD/LPR Host or Printer", but I read the manual for HP1320 series, it has something call JetDirect, so should I chose "AppSocket/HP JetDirect" instead?

3) In next screen, in Device URI, I input socket://a.b.c.d:9100 (I also try socket://a.b.c.d:515 since this is what scan printer over the network return)

4) In next screen, for Make/Manufacturer for HP1320, I choose HP

5) In next screen, for Model/Driver for HP1320, I choose "HP LaserJet 1320 series Postscript (recommended) (en)" but when I click to proceed, it shows "A username and password are being requested by http://localhost:631. The site says: "CUPS", I don't know what that password and user is for, I input one for the root, is that ok?

However, after this setup, it seems still no good to use the network printer. If I choose socket://a.b.c.d:515 instead of 9100, when I print something, the pritner will print a few lines (with cups information included) but that's not what I am printing...

Quote:
Originally Posted by bigearsbilly View Post
I think port 9100 is an LPD port.
which means that it should work ok.
it should be set up to act aas a unix network printer.

first try this: (a.b.c.d is the printer address)

ls | nc a.b.c.d 9100

if it works...
then, open an application (e.g. firefox) and print to file
this will give you a postscript file.
try

cat file.ps | nc a.b.c.d 9100

if this works out fine it's a simple job.
I've had no luck with IPP but with TCP it looks like you should be fine.

try cups

browser to localhost:631 should bring up the admin and
set up your printer as an LPD postscript printer.
 
Old 06-25-2009, 06:41 PM   #4
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
did you try

lpd://printer?
 
Old 06-25-2009, 06:52 PM   #5
KFC123
Member
 
Registered: May 2009
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bigearsbilly View Post
did you try

lpd://printer?
do you mean lpd://a.b.c.d or just lpd://printer ?

I try the first one, but seems not work. I din't know if the later one works or not, but will the system find it if I just give a name "printer"?
 
Old 06-25-2009, 07:03 PM   #6
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
lpd://a.b.c.d
 
Old 06-25-2009, 07:27 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
I would try just the following without including any port number.
ipp://w.x.y.z
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HP LaserJet 5MP Network Printing grapnell Linux - Hardware 2 07-17-2006 07:04 AM
HP LaserJet 1320 won't print PDFs gradedcheese Ubuntu 0 01-07-2006 08:14 PM
HP LaserJet 1320 - jobs get cancelled jonaskoelker Linux - Hardware 1 08-16-2005 08:02 PM
Laserjet 1320 and samba skota Linux - Hardware 1 06-01-2005 10:00 PM
Printing to Laserjet 1320 via ethernet skota Linux - Hardware 1 05-11-2005 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration