View previous topic :: View next topic |
Author |
Message |
matsu n00b
Joined: 21 Nov 2011 Posts: 30
|
Posted: Tue Feb 26, 2013 5:51 am Post subject: [solved] Problems with Network Printer HP LaserJet |
|
|
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 |
|
|
Quincy Apprentice
Joined: 02 Jun 2005 Posts: 201 Location: Germany
|
Posted: Tue Feb 26, 2013 10:34 am Post subject: |
|
|
First questions:
- Which specific LaserJet?
- Do you have hplip installed? |
|
Back to top |
|
|
matsu n00b
Joined: 21 Nov 2011 Posts: 30
|
Posted: Tue Feb 26, 2013 1:22 pm Post subject: |
|
|
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 |
|
|
albright Advocate
Joined: 16 Nov 2003 Posts: 2588 Location: Near Toronto
|
Posted: Tue Feb 26, 2013 1:39 pm Post subject: |
|
|
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 |
|
|
matsu n00b
Joined: 21 Nov 2011 Posts: 30
|
Posted: Tue Feb 26, 2013 1:46 pm Post subject: |
|
|
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 |
|
|
Quincy Apprentice
Joined: 02 Jun 2005 Posts: 201 Location: Germany
|
Posted: Tue Feb 26, 2013 2:29 pm Post subject: |
|
|
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 |
|
|
matsu n00b
Joined: 21 Nov 2011 Posts: 30
|
Posted: Tue Feb 26, 2013 2:46 pm Post subject: |
|
|
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 |
|
|
albright Advocate
Joined: 16 Nov 2003 Posts: 2588 Location: Near Toronto
|
Posted: Tue Feb 26, 2013 4:48 pm Post subject: |
|
|
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 |
|
|
Quincy Apprentice
Joined: 02 Jun 2005 Posts: 201 Location: Germany
|
Posted: Tue Feb 26, 2013 8:59 pm Post subject: |
|
|
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 |
|
|
lost+found Guru
Joined: 15 Nov 2004 Posts: 509 Location: North~Sea~Coa~s~~t~~~
|
Posted: Tue Feb 26, 2013 9:41 pm Post subject: |
|
|
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 |
|
|
bammbamm808 Guru
Joined: 08 Dec 2002 Posts: 548 Location: Hawaii
|
Posted: Wed Feb 27, 2013 9:29 am Post subject: |
|
|
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. _________________ MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 2070S 8GB
Samsung m.2 NVME pcie-3.0
Etc.... |
|
Back to top |
|
|
matsu n00b
Joined: 21 Nov 2011 Posts: 30
|
Posted: Sat Mar 02, 2013 8:31 am Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Sat Mar 02, 2013 11:09 am Post subject: |
|
|
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 |
|
|
lost+found Guru
Joined: 15 Nov 2004 Posts: 509 Location: North~Sea~Coa~s~~t~~~
|
Posted: Sat Mar 02, 2013 12:58 pm Post subject: |
|
|
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 |
|
|
matsu n00b
Joined: 21 Nov 2011 Posts: 30
|
Posted: Mon Mar 04, 2013 4:01 pm Post subject: |
|
|
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 |
|
|
lost+found Guru
Joined: 15 Nov 2004 Posts: 509 Location: North~Sea~Coa~s~~t~~~
|
Posted: Mon Mar 04, 2013 4:31 pm Post subject: |
|
|
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 |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Mon Mar 04, 2013 4:41 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Mon Mar 04, 2013 7:02 pm Post subject: |
|
|
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 |
|
|
matsu n00b
Joined: 21 Nov 2011 Posts: 30
|
Posted: Mon Mar 04, 2013 7:33 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Mon Mar 04, 2013 7:38 pm Post subject: |
|
|
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 |
|
|
|