Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Problems with Network Printer HP LaserJet
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
matsu
n00b
n00b


Joined: 21 Nov 2011
Posts: 30

PostPosted: Tue Feb 26, 2013 5:51 am    Post subject: [solved] Problems with Network Printer HP LaserJet Reply with quote

I've been trying to add a HP LaserJet via the CUPS interface, but without success.

The printer's IP address is known from its configurarion page (printer intern), so the URI should be socket://ip-address (I've also tried several other ones, though). Necessary drivers are installed as well.
I have tried both connecting directly and via router.
lpstat -a shows two empty lines, when nothing is connected it doesn't show anything, so the output is different in some way.


(After reading this thread I'm not really motivated trying to use USB instead.)


Any ideas what I could do or what outputs would you need?

Thank you in advance.


Last edited by matsu on Mon Mar 04, 2013 7:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
Quincy
Apprentice
Apprentice


Joined: 02 Jun 2005
Posts: 188
Location: Germany

PostPosted: Tue Feb 26, 2013 10:34 am    Post subject: Reply with quote

First questions:
- Which specific LaserJet?
- Do you have hplip installed?
Back to top
View user's profile Send private message
matsu
n00b
n00b


Joined: 21 Nov 2011
Posts: 30

PostPosted: Tue Feb 26, 2013 1:22 pm    Post subject: Reply with quote

Yes, I have hplip installed. I've tried both drivers, the one from gutenprint and from hplip.

The printer is LaserJet 5000.
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2122
Location: Near Toronto

PostPosted: Tue Feb 26, 2013 1:39 pm    Post subject: Reply with quote

Quote:
The printer is LaserJet 5000.


do you mean 5000n

this is a network capable printer, right?

else, where does it get an ip address
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
matsu
n00b
n00b


Joined: 21 Nov 2011
Posts: 30

PostPosted: Tue Feb 26, 2013 1:46 pm    Post subject: Reply with quote

You're right, it's 5000N, I accidently dropped the N, and it is network capable.

Somewhere on the net I found out that the IP address along with other data can be printed (on paper) via the printer's menu, which is what I have done. Other than that I have no idea how to get the IP address.
Back to top
View user's profile Send private message
Quincy
Apprentice
Apprentice


Joined: 02 Jun 2005
Posts: 188
Location: Germany

PostPosted: Tue Feb 26, 2013 2:29 pm    Post subject: Reply with quote

I think albright means how the printer gets the IP address (static, DHCP, etc.).

Additional question on that: Can you connect to the web server of the printer by opening the IP address in your web browser?
Back to top
View user's profile Send private message
matsu
n00b
n00b


Joined: 21 Nov 2011
Posts: 30

PostPosted: Tue Feb 26, 2013 2:46 pm    Post subject: Reply with quote

I don't know how the printer gets the IP address. I was thinking it's static, but now that you mention it, I don't actually know.


Quote:
Additional question on that: Can you connect to the web server of the printer by opening the IP address in your web browser?


No, I can't. Hm, so this means the IP address is wrong?
If this is the case, what can I do to get the IP? I have googled before, but have only found what I have wirtten above (this configuration print).
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2122
Location: Near Toronto

PostPosted: Tue Feb 26, 2013 4:48 pm    Post subject: Reply with quote

Quote:
If this is the case, what can I do to get the IP?


it may well be that the printer is getting an IP address from your
router, in which case the router's web config page should have
a list of connected devices ...
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
Quincy
Apprentice
Apprentice


Joined: 02 Jun 2005
Posts: 188
Location: Germany

PostPosted: Tue Feb 26, 2013 8:59 pm    Post subject: Reply with quote

matsu wrote:
No, I can't. Hm, so this means the IP address is wrong?
If this is the case, what can I do to get the IP? I have googled before, but have only found what I have wirtten above (this configuration print).


It could also mean that there is no such web server at all, I don't know perfectly if this printer has one, but with the official HP JetDirect module there should be one accoring to this.

To rule out the obvious: The IP address of the printer is in the same network as your PC?
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 429
Location: North~Sea~Coa~s~~t~~~

PostPosted: Tue Feb 26, 2013 9:41 pm    Post subject: Reply with quote

Hi,

Did you try "hp-setup" as a terminal command yet? Also I had to enable some USE flags for the network interface of my HP printer: slp for cups and snmp for hplip.
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 323
Location: Hawaii

PostPosted: Wed Feb 27, 2013 9:29 am    Post subject: Reply with quote

My LaserJet Pro 400 has a menu option to DISPLAY IT'S IP ADDRESS on it's little LCD display. I found it while trying to configure mine. I'd bet yours has the same feature and turning it on via the printer's own controls will save you some mucking about.
_________________
Asus m5a99x Evo Rev 2
Phenom II X4 965 BE
8Gb DDR3
Geforce GTX 460
Etc....
Back to top
View user's profile Send private message
matsu
n00b
n00b


Joined: 21 Nov 2011
Posts: 30

PostPosted: Sat Mar 02, 2013 8:31 am    Post subject: Reply with quote

So, after a few tries I still haven't proceeded at all.

The printer is in the same network as the PC and the IP address that shows up on the display is the same that I have used all the time, so there should not be anything wrong here.
The only thing I can imagine is that the problem is related to the router as I have not yet succeeded to connect to the router's configuration page. This seems to be the what I need to work on first.

hp-setup brings up the following error (I also have change the USE flags accordingly):
[code]
error: Network error
error: No device selected/specified or that supports this functionality
[\code]
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32461
Location: 56N 3W

PostPosted: Sat Mar 02, 2013 11:09 am    Post subject: Reply with quote

matsu,

What is the IP address of the printer?
What is the IP address of the system you are trying to connect from - the one running CUPS?
What is the output of route from this system ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 429
Location: North~Sea~Coa~s~~t~~~

PostPosted: Sat Mar 02, 2013 12:58 pm    Post subject: Reply with quote

The printer should respond to ping.

Normally I don't filter the connection to my printer, but if I block traffic using iptables, the logs show that hp-setup needs output udp dest. port 161 (snmp). During operation it also needs output dest. tcp ports 9100 and 9290 (jetdirect), but these 2 may be different on your model.

This short command works for me:
Code:
# hp-setup -i <ip address>
... after answering the questions, the printer shows up in the CUPS web interface.

Here are all the USE flags of my installation.
Code:
# emerge -pv cups hplip

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] net-print/cups-1.5.2-r4  USE="X acl dbus jpeg ldap pam png slp ssl threads tiff usb -avahi -debug -filters -gnutls -java -kerberos -perl -python (-selinux) -static-libs -xinetd" LINGUAS="nl -da -de -es -eu -fi -fr -id -it -ja -ko -no -pl -pt -pt_BR -ru -sv -zh -zh_TW" 0 kB
[ebuild   R    ] net-print/hplip-3.12.10a  USE="X fax hpcups kde libnotify (policykit) qt4 scanner snmp -doc -hpijs -libusb0 -minimal -parport -static-ppds" 0 kB
Back to top
View user's profile Send private message
matsu
n00b
n00b


Joined: 21 Nov 2011
Posts: 30

PostPosted: Mon Mar 04, 2013 4:01 pm    Post subject: Reply with quote

The printer's IP address is 192.168.178.250.
The system's IP address is 192.168.1.2.

Code:
# route -n

Destination     Gateway         Genmask            Flags   Metric   Ref   Use Iface
0.0.0.0         192.168.1.1     0.0.0.0  .0        UG      202      0     eth0
127.0.0.0       127.0.0.1       255.0.0.0          UG      0        0     lo
192.168.1.0     0.0.0.0         255.255.255.0      U       202      0     eth0


Hm, this rather looks like the printer is not in the same network, right?


hp-setup -i <ip address> shows that the URI is invalid, I tried also ping <ip address>, the output:
Code:
ping 192.168.178.250
PING 192.168.178.250 (192.168.178.250) 56(84) bytes of data
^C
--- 192.168.178.250 ping statistics ---
71 packets transmitted, 0 received, 100 % package loss, time 69999 ms
Back to top
View user's profile Send private message
lost+found
Guru
Guru


Joined: 15 Nov 2004
Posts: 429
Location: North~Sea~Coa~s~~t~~~

PostPosted: Mon Mar 04, 2013 4:31 pm    Post subject: Reply with quote

Looks to me that the printer uses a self configured static ip address, perhaps after trying to get one from dhcp. A router would give one in the same subnet. If you connect directly, do you use a cross link cable? Not needed to a router...

Neddy, .... :)
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2594
Location: UK

PostPosted: Mon Mar 04, 2013 4:41 pm    Post subject: Reply with quote

Easy way to check if it has a network connection: run nmap. You'll get one page of random ASCII garbage if it's working.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32461
Location: 56N 3W

PostPosted: Mon Mar 04, 2013 7:02 pm    Post subject: Reply with quote

matsu,

For testing, add a IP address to your PC.
As the printer is on 192.168.178.250,
Code:
ifconfig eth0:1 192.168.178.25/24
should add a route to 192.168.178.0/24 and give your PC the address 192.168.178.25 in addition to its 192.168.1.2.

As the printer IP is not in the link local range, it looks like it has previously been set statically.
The printer will have a 'reset to factory defaults' set of buttons you hold down at power up. This will probably set it to use dhcp to get an IP address.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
matsu
n00b
n00b


Joined: 21 Nov 2011
Posts: 30

PostPosted: Mon Mar 04, 2013 7:33 pm    Post subject: Reply with quote

Thank you NeddySeagoon, this made it.

It is finally working.
Also, the printer was automatically detected by CUPS, so there was no need to manually type in some URI.

There is the possibility of resetting, however I'm just happy that the printer is finally running, so I will do try that at some later time. I guess, it doesn't hurt to let it as it is now.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32461
Location: 56N 3W

PostPosted: Mon Mar 04, 2013 7:38 pm    Post subject: Reply with quote

matsu,

If you want to leave it, add the IP address to your /etc/conf.d/net file, so you don't have to run ifconfig every boot.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum