LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-22-2015, 08:21 AM   #1
GioBonvi
Member
 
Registered: Feb 2015
Location: Trento, Italy
Distribution: Ubuntu 15.04, Linux Mint 17.2
Posts: 36

Rep: Reputation: Disabled
Connecting printer via USB to router


Hi,
I have a HP-P1606dn (LaserJet Professional) which since a few days gives me lots of problems (in Linux as well as in Windows):

This is a little summary of what happened:
The printer has been connected via ethernet to my router since months and it worked flawlessly utnil a week ago: from then on I can print only one job and then the printer stops working. Then I have to power cycle it to print another job.
To explain: If I print 2 (or more) jobs it prints the first immediately and the second only after the power cycle.

I tried:
inifinite number of power cycles: nothing changed
inifinite number of resets to factory: nothing changed

Then I had an idea: I connected the printer to my router via USB (My router is a Fritz!Box 3390 which supports this kind of things)

Finally I accomplished something: Now I can print from my Windows computers (2 windows 7 and a Windows 8), BUT I still can't configure correctly my two Ubuntu PC! (Ubuntu 14.10 and Lubuntu 14.10)

I searched a lot in Internet and found these:
  • Fritz!Box says the printer needs to support RAW/TCP printing (Which I think it does, as it works on Windows) and CAN NOT rely on "bidirectional support"
    http://en.avm.de/nc/service/fritzbox...twork-printer/
  • Some users say they solved the problem by doing:
    Quote:
    Manage printers > Add new Printer > Network Printer
    Socket/JetDirect (Host=IP_OF_THE_ROUTER and Port=9100)
    I did this (that's pretty much the same procedure on windows), but the result is that every print job I send says "Printer error" (in CUPS "Filter error")
  • I can print line of text by doing:
    Code:
    telnet IP_OF_ROUTER 9100
    sometexthere
    ^]
    quit
    Although it takes some minutes to print from the moment I give the "quit" command in the end it prints "sometexthere"
    This is not really useful for me, but I think this implies that the printer is somehow working...

So the question is:
How can I connect to this printer? (Or, alternatively: how can I use it with the ethernet cable, solving the first problem?)

THank you in advance!
 
Old 03-22-2015, 06:05 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Based on the Fritz!Box printer configuration guide, it does look as though the AppSocket (JetDirect) protocol is appropriate, and I'm surprised things aren’t working as expected.

I'm not sure if it will make a difference, but which printer driver are you using? Examine /etc/cups/ppd/ directory, and do
Code:
cat /etc/cups/ppd/<name-of-ppd>.ppd|grep Filter
I note that the HP LaserJet Professional p1606dn is supported by the HPLIP suite (with hpcups driver), so maybe if you're not using that already, you could try using it?

http://hplipopensource.com/hplip-web...l_p1606dn.html

It mentions that for this model a downloadable plug-in is required for printing.

Even if you would normally configure the printer using an Ubuntu utility, try using 'hp-setup' instead.
Code:
sudo hp-setup
There is an option for connecting via JetDirect servers, so this should work okay.
 
Old 03-23-2015, 08:36 AM   #3
GioBonvi
Member
 
Registered: Feb 2015
Location: Trento, Italy
Distribution: Ubuntu 15.04, Linux Mint 17.2
Posts: 36

Original Poster
Rep: Reputation: Disabled
Thank you for the answer Ferrari

1) First of all: how do Iknow what driver do I use?
When installing the printer this is what I do:
Quote:
System Settings > Printer > Add > Network Printer > JetDirect > 192.168.178.1:9100 > HP > LaserJet Professional p1606dn > Next
When selecting the model it says: "HP LaserJet Professional p1606dn, hpcups 3.14.6, requires proprietary plugin [en] (recommended)"

This is the procedure I tried for the USB-router (and it's not working), but it's also the procedure I used to install it as network printer when it worked (and the procedure went fine)

2) Secondly, I tried, as you suggested,
Code:
sudo hp-setup
and did this:
Device discovery > Ethernet/wireless/Network (direct connession or JetDirect) > Next

After a few seconds a page appears saying that no printer could be found: I tried to set the host and the port in the options, but I could only assign 1 2 3 or 4 as "port number" (the port should be 9100).

3) There's another thing I can say: on Windows the procedure seems pretty much the same and works like this:
Add printer > 192.168.178.1:9100 > Error! No printer detected!
BUT at this point I can click "Next" anyway and continue linke this:
HP > p1606dn > Assign printer name > Done! Printer working

4) Lastly: I noticed that when adding the printer as I described in point 1 the printer is marked operative UNTIL I send the first job: only then it's marked as problematic. This makes me think that is a problem of communication rather than an installation one.
I suppose (I don't have nothing to support this supposition) that the problem is that sentence found in the FritzBox page: "The printer needs to operate unidirectionally". I think that my PC is somehow waiting for an answer from the printer (which the printer can't send) and therfore fails... Could it be the case?

Thanks anyway!
 
Old 03-23-2015, 02:17 PM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Thanks for clarifying further. Some print utilities definitely try to detect the printer at configuration time. The CUPS web interface allows a network-attached printer to be defined (without it even being present), so maybe worth trying that approach perhaps?

http://localhost:631/admin

*Enter the appropriate credentials when prompted. For Ubuntu, I think the user needs to be a member of the 'lpadmin' group first as described here.

Then 'Add Printer' > 'AppSocket/HP JetDirect' > enter "socket://<IP address>:9100" > .....
 
Old 03-23-2015, 02:35 PM   #5
GioBonvi
Member
 
Registered: Feb 2015
Location: Trento, Italy
Distribution: Ubuntu 15.04, Linux Mint 17.2
Posts: 36

Original Poster
Rep: Reputation: Disabled
I didn't say I've already tried that before, sorry.

However I tried again and the result was the same as before:
1) Printer added normally (the same as system>Printers)
2) When I tried to print the first job it says
Quote:
Print status: Stopped "Filter failed"
 
Old 03-23-2015, 03:12 PM   #6
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
I would use 'cupsctl --debug-logging' to increase reporting verbosity, then try a print job again, and xamine what is reported in /var/log/cups/error_log
 
Old 03-23-2015, 03:30 PM   #7
GioBonvi
Member
 
Registered: Feb 2015
Location: Trento, Italy
Distribution: Ubuntu 15.04, Linux Mint 17.2
Posts: 36

Original Poster
Rep: Reputation: Disabled
Ok, so I gave a test page print. Here is the result:
https://dl.dropboxusercontent.com/u/...37/CupsLog.txt

It's a lot of things and I don't know where to start...

If you or everyone else can help I would be extremely grateful!
 
Old 04-04-2015, 11:14 AM   #8
GioBonvi
Member
 
Registered: Feb 2015
Location: Trento, Italy
Distribution: Ubuntu 15.04, Linux Mint 17.2
Posts: 36

Original Poster
Rep: Reputation: Disabled
Any idea?

Has anyone half of an idea? I really need that printer working again :-( so if noone can imagine a solution I'll change it.

Thanks anyway
 
Old 04-04-2015, 04:21 PM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
An apparent problem wit the plugin is reported

Code:
[Job 22] STATE: +hplip.plugin-error
D [23/Mar/2015:21:24:17 +0100] cupsdMarkDirty(P----)
D [23/Mar/2015:21:24:17 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [23/Mar/2015:21:24:17 +0100] cupsdMarkDirty(---J-)
D [23/Mar/2015:21:24:17 +0100] cupsdSetBusyState: newbusy="Dirty files", busy="Dirty files"
D [23/Mar/2015:21:24:17 +0100] [Job 22] prnt/hpcups/HPCupsFilter.cpp 456: m_Job initialization failed with error = 48
You could try running
Code:
hp-doctor
to see if it can determine/correct the issue with the proprietary plugin.

Another suggestion that I have is to try using the HPIJS driver instead, and see whether this helps.

HPLIP reference page for the P1606dn
http://hplipopensource.com/hplip-web...l_p1606dn.html
 
Old 04-04-2015, 05:07 PM   #10
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Since we're in experimentation-mode, if the issue with the plugin cannot be resolved, it might be worth considering trying the open-source 'foo2zjs-z2' driver instead

http://www.openprinting.org/driver/foo2zjs-z2/

There are comments here that suggest some users have had better success with it.

FWIW, a blog recommending the same advice
http://www.dedoimedo.com/computers/l...-printing.html

That's about all I can offer.

Last edited by ferrari; 04-04-2015 at 05:09 PM.
 
Old 04-04-2015, 08:20 PM   #11
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
Use hplip. It's in the repos,; note that it's often two packages, one for the basic hplip command line programs and another for the GUI interface (hp-toolbox on the command line).

Start the hplip GUI and select Device-->Setup Device. When the "Device Discovery" window appears, select the appropriate option (USB | Network | Wireless | Advanced) and go from there.

I usually use "Advanced" because it allows me to specify the ip address of my printer, which is directly on my network and has a static ip. Once hplip discovers your printer, it will present a list of *.ppd files (drivers) for you to choose from. Choose the one that matches your printer model name.

Last edited by frankbell; 04-04-2015 at 08:23 PM.
 
Old 04-04-2015, 08:54 PM   #12
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
Use hplip. It's in the repos,; note that it's often two packages, one for the basic hplip command line programs and another for the GUI interface (hp-toolbox on the command line).
The OP has already confirmed that they are using HPLIP (with hpcups driver), and they're having a problem with communicating with the printer. (Refer to their attached log.)
 
1 members found this post helpful.
Old 04-04-2015, 11:42 PM   #13
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 829

Rep: Reputation: 229Reputation: 229Reputation: 229
If you go through CUPS (localhost:631) and add a printer there by using (socket://routerIPaddress:9100) and using a generic postscript driver, what happens? Make sure to use root and root password when it prompts you.
 
1 members found this post helpful.
Old 04-05-2015, 08:33 AM   #14
GioBonvi
Member
 
Registered: Feb 2015
Location: Trento, Italy
Distribution: Ubuntu 15.04, Linux Mint 17.2
Posts: 36

Original Poster
Rep: Reputation: Disabled
YES! We did it!

So here's the complete story (SPOILER: I used ferrari's foo2zjs-z2 driver)

First I tried hp-doctor:
The first time it installed some missing packages, but it did not solve anything, moreover it displayed this:
Code:
Checking for Deprecated items....
error: This distro (i.e ubuntu  14.10) is either deprecated or not yet supported.
The diagnosis is limited on unsupported platforms. Do you want to continue?(y=yes*, n=no):y

Checking for HPLIP updates....
error: Failed to locate hp-upgrade utility
I tried rebooting, reinstalling hplip, but it did not solve anyting

Secondly I tried frankbell's advice, but I soon realized I had already tried it (don't know if I said that) and it couldn't see the printer.

Then I tried to use the Genric-PostScript driver as erik2282 suggested and something REALLY strange happened...
No matter what page/how many pages/which options I printed the printer sent out a first page saying:
Code:
%!PS-Adobe-3.0
                 %%HiResBoundingBox: 0 0 595.00 842.00
                                                         %%Creator: GPL Ghostscript
Then it printed infinitely many blank pages (I had tu turn off the printer every-time to make it stop).

My last hope was ferrari's advice: the foo2zjs-z2 driver. I followed the instructions on the page he linked AND IT WORKED!
At first I was only able to print one-sided papers, but after tinkering alittle bit I am now able to print also double-sided papers. (If anyone wants to know it: I had set the options in the printer-options, but Firefox, where I was printing from, had different options, which needed to be set up separately).

So if anyone has problems using HP Laserjet Pro P1606dn with network connection on USB to router connection use foo2zjs driver as explained at this page.

Ferrari, I owe you one!
Obviously I also thank everyone else who made an effort in order to solve this frustrating problem. I was going to throw away my printer! Thank you guys!
 
Old 04-05-2015, 03:24 PM   #15
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,800

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
So if anyone has problems using HP Laserjet Pro P1606dn with network connection on USB to router connection use foo2zjs driver as explained at this page.

Ferrari, I owe you one!
Obviously I also thank everyone else who made an effort in order to solve this frustrating problem. I was going to throw away my printer! Thank you guys!
You're most welcome GioBonvi. I'm glad that changing the driver helped here.... but I'm still curious as to what the HPLIP driver couldn't cope with (as far as having a print server in the chain).
 
  


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
[SOLVED] Connecting printer through router teboil12 Linux - Hardware 9 04-23-2011 02:58 AM
Connecting to D-Link router/3in1 HP printer mzeesabu LinuxQuestions.org Member Intro 1 02-05-2009 02:48 PM
ADSL USB Modem / Router connecting ( through USB ) but cannot connect to internet DJ Shaji Linux - Networking 1 03-28-2008 03:24 AM
Connecting ADSL router using USB eagle_y2j Linux - Hardware 1 05-04-2006 01:31 PM
connecting to Printer through router Ishjer Linux - Hardware 4 11-19-2003 04:47 PM

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

All times are GMT -5. The time now is 03:42 PM.

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