LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-10-2009, 09:18 AM   #1
xasanchez
LQ Newbie
 
Registered: Dec 2007
Posts: 15
Blog Entries: 1

Rep: Reputation: 0
CUPS unable to discover an HP 1022n Network Printer


The situation is quite simple. I have a network-attached HP Lasejet 1022n printer. Everything what I have read about, suggests it's a piece of cake for CUPS finding a network printer by itself.

The printer gets its IP address via a DHCP router providing that service, so in theory, sometimes it could change dynamically.

Why does CUPS not find the printer?

Thanks in advance.
Xavier.
 
Old 03-10-2009, 11:26 AM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
I would assign a Static IP to the Printer, or at the very least create a reservation for it on the DHCP server. Having printer IP addresses changing all the time would be a nightmare to mange imho.

Once the IP is fixed, no matter which method you used, it's simple to add it in cups by entering the IP address for the printer in the printer configuration wizard.

Auto-discovery for devices and services on the network is over rated imho.
 
Old 03-10-2009, 05:58 PM   #3
xasanchez
LQ Newbie
 
Registered: Dec 2007
Posts: 15

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Wink

Ok, good. It is common sense. Suppose just for testing, with the ready-given IP address during the day, are you saying CUPS wouldn't either find it?

I mean, CUPS is NOT for discovering networked printers anyway? You HAVE to configure it manually?
 
Old 03-10-2009, 08:13 PM   #4
xasanchez
LQ Newbie
 
Registered: Dec 2007
Posts: 15

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Smile Finished

For those who want to get through with this kind of need:

1. Configure the printer with its own facility, getting into its web page: http://the-actual-ip-address.
2. There, assign a static IP address of your choice.
3. You would have to (recommended) restart the printer with the new assigned static IP.
4. Configure manually the printer within CUPS.
5. Follow instructions up to the point where you are asked to specify the URI. There, write
socket://the-new-ip-address
6. Specify it is an HPLIP printer, and when prompted to specify the type of printer, scroll down and find the "HP LaserJet 1022n Foomatic/hpijs, hpijs 2.8.10.33" (for example, version is actually the one shown in my system, could be some other).
7. Choose Add Printer.
8. Print a Test Page and...
9. Voila...!!

Very comfortable getting through, huh?

Have fun!
 
Old 03-10-2009, 11:44 PM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Glad to see you got it all sorted out
 
Old 03-11-2009, 01:53 PM   #6
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
I have a similar setup (network connected HP C6380) on a DHCP router. Although it may be theoretically possible for the router to assign new IP addresses, it never seems to happen...the printer is always 192.168.2.146, the laptop is always 192.168.2.120, etc. (everything on the LAN is 192.168.2.something.) So it's probably safe to skip the "assign static IP" step.

Usually I can just install the printer using the Control Center wizard but you must know the IP address...the Control Center "scan" never seems to find it.
 
Old 03-11-2009, 02:15 PM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
In your small relatively fixed network that may be true, but it would be a poor habit to get into.

If you look at the way DHCP works there is an exchange between the Client and the Server.

Client Printer says "Hey is there anyone out there that can give me an IP ?"
Server Responds. "Sure I can, what IP do you want ? "
Client Printer responds with the Last IP address it had on this network and says "is this address still available ?"
Server responds "Sure it is you may lease it again"

(A good exercise here to better understand how DHCP operates, would be to use Wireshark to capture the discussion between a client machine and a DHCP server)

Trouble comes in if the printer using that address is off the network, and a new Laptop shows up. the new laptop could possibly get the address that was assigned to the Printer, so the next time the printer asks for an address it will be denied it's old IP and instead offered the next available address in the DHCP scope.

So for the sake of best practice your Printer, as I stated above, should either be Statically assigned, or DHCP reservations made that are tied to the MAC address of the printer.

Assuming the device will always get the same IP could cause you trouble down the road, while learning and implementing best practices will server you better in the long run.
 
Old 03-11-2009, 02:25 PM   #8
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
I stand (or sit) corrected then.
 
Old 03-11-2009, 02:34 PM   #9
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Now if you want some real fun, have someone on your network start running a second DHCP server that ISN"T supposed to be there, then try to figure out why NO-ONE can get an IP address.. now THAT makes for an interesting wireshark capture..

I wanted to strangle that guy, once I tracked him down.. he was running a web proxy on His PC, to allow users that were blocked from Internet access to go through his machine to get to the web. his web proxy had a built in DHCP server, that kept denying legitimate requests to the proper DHCP server. User ended up with no address at all..


I guess what I'm trying to say is, that the reason we are all here. To learn from each others experiences and knowledge. I know I certainly have learned a lot from other people around here.

Cheers !!
 
Old 03-12-2009, 09:38 AM   #10
xasanchez
LQ Newbie
 
Registered: Dec 2007
Posts: 15

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Reinforcing

Supporting further farslayer's very-nicely exposed explanations, notice that, also, many DHCP-servicing routers keep track of the MAC addresses of the leased IP'S they grant to requesting clients in a table.

So, not only the client can ask for the former granted IP, but also, according to the status of the table, whether that MAC is already assigned to another client or not, it makes a best-effort decision to give again the same IP or not. And it usually works just about the same every time.

In a small, domestic, network, the scenario presented by farslayer is perfectly clear.

When I first came up with my question, it only shows that I am like new to Linux and that kind of small obstacles that someone may have already solved, but the general matter is something that I manage more or less modestly well.
 
  


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
cups to cups printing through network on usb printer checkmate3001 Linux - Server 2 02-16-2009 12:12 PM
cups: discover printers noir911 Linux - Server 2 01-14-2009 05:48 PM
CUPS Network Printer/ server indicator blinks no printer output wine Linux - Networking 8 03-18-2006 10:20 PM
how to use network cups printer snoble Linux - Newbie 1 10-18-2004 12:31 PM
unable to print with CUPS if printer wasn't on when computer start sirpelidor Linux - Software 1 10-03-2004 09:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:20 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