LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-24-2017, 04:04 AM   #1
meesha
LQ Newbie
 
Registered: May 2015
Posts: 6

Rep: Reputation: Disabled
Question usb winprinter sharing via cups on LAN


Hi there,

The problem seems simple but I have no more ideas. But first, the setup:

printer: HP LaserJet P1005, usb connected winprinter (needs firmware blob passed each power-on), connected to a slackwarearm raspberry pi 'server'

clients: windows and linux (slackware ofc) ones

all connected in a home LAN 192.168.etc

current cups server config: two queues, one "local raw printer" for windows clients (using their own windows printer driver), and the second "foo2xqx" (linux native driver) for linux clients

the above works, but

the problem: cannot get my linux clients to work with the "local raw printer", to do the processing on their part. Processing printjobs on a raspberry pi using foo2xqx works, but is painfully slow (low cpu power). Windows clients' printjobs come out of the printer in the next half of a second after a windows user clicks "print", which I want to have also for linux.


Do you guys have any ideas how could I resolve this? When tried different configurations, cups logs say either "filter failed" or there is no logging at all (job completed, but printer does nothing).
 
Old 05-25-2017, 06:52 AM   #2
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,483

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
meesha --

Hoo boy ... there have a lot of threads on LQ about Cups v 2.14 and Slackware 14.2.

One common denominator has been the version of cups running on the Server and the Client.

Seems that Apple changed the IPP protocol version with Cups 1.6 and printer configs that have worked for years stopped working with Cups 2.1.4 ( Slackware 14.2 )

Anyhow, There are a ton of [SOLVED] threads here on LQ

Maybe one-or-more of these threads apply to your system ?

HTH.

-- kjh
 
Old 05-25-2017, 01:22 PM   #3
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware 14.2 || Slackware-current && CentOS
Posts: 1,372

Rep: Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737Reputation: 737
I recently set up my older Raspberry Pi B+ to act as a network printer. It runs Slackware ARM 14.2. I have a HP Officejet 4500 g510n-z printer connected by USB to the Pi. The wireless signal in my house is weak on the side of the house where the printer is located. However, my house is wired with Cat 6, and that is how I connect all clients to the cups/samba print server.

Sharing the printer over the LAN to my Linux machines was as easy as enabled printer sharing in cups, and then exposing cups to the LAN. The windows machines are using Samba to access the printer.

Print jobs take a while to pop out of the Officejet, but I assume, like you, that it's due to the low processing power of the Pi. Each job on the Linux machines almost always reports a printing error, and several seconds later, returns a successful job.

The Linux machines are all running Slackware. I do not use the HP Device Manager because it almost never works. I add a printer in KDE using Printer control module. The Pi exposes the printer @ ipp://192.168.x.xxx:631/printers/HP_Officejet_4500_G510n-z and I add that url to each machine, and it just works.

It might help if you take a look at the following Slackware documentation:

howtos:network_services:slackware_print_server

EDIT:

I forgot to mention that the Pi also serves as a scanner server using saned. This also just works once the appropriate settings are used. XSane on the Linux machines finds the Pi on the network with no problem.

Last edited by mralk3; 05-25-2017 at 01:23 PM.
 
Old 05-26-2017, 03:59 AM   #4
meesha
LQ Newbie
 
Registered: May 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
thanks for replies

hplip is one of the first things that goes out of the system (along with precompiled kernels) on my fresh installs, I ditched it long ago too

been digging the Internetz for a while already on this topic, and it gave me some conclusions:

- cups documentation suxx something badly or is non existent in some parts
- most of web 'tutorials' are outdated and/or plain wrong in some areas
- my issue is not trivial to be just found out on a forum/site, even here

I did even try to overcome my software problem using hardware (tp-link's tl-ps3010u has a native lpd queue), but was very unreliable, even for home use

I have the following ideas to pursue once I find more spare time (maybe this weekend):

- modification of a PPD file to adjust input filtering (still dunno how to achieve this, tho)
- direct networked usb/IP printing via kernel module (usbip-core) and accompanying kernel tools

I know I am no IT pro and thus need more time to learn some things, but cups is such a pos (piece of software) that I lost my patience with too many times :/

There is also a chance that I am missing something big, obvious for you guys, so don't hesitate to throw some basic ideas/solutions if you think they may fit. Thanks
 
Old 05-26-2017, 04:42 AM   #5
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,483

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Thanks for the info meesha.

The company I work for 'inherits' a lot of printing problems from our Customers so I am always interested in printer-related problems.

not that I am much help here

I am not much pleased either with the changes to Cups since Apple acquired it way back when.

LQ User loiugi600 was using an armv4 NAS/print server where rendering on the server-side at first did not work at all but when he did get it working, it took forever to render the jobs on the low-power print server.

In this post he describes dropping Cups in favor of lprng to handle the raw queue.

I am not sure that lprng can load the required firmware blob for your HP LaserJet P1005 but maybe loiugi600 has more info on what he did to replace Cups with lprng for the raw queue ?

-- kjh

Last edited by kjhambrick; 05-26-2017 at 04:46 AM. Reason: add sentence
 
Old 05-26-2017, 05:40 PM   #6
meesha
LQ Newbie
 
Registered: May 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
will check this one too, thank you

this printer is so kind that the firmware can be sent to it via raw queue like a printjob, and it accepts it - this is however not an issue with raspberry, since the foo2xqx package contains a rule for eudev which sends firmare automagically upon pluggin it in (but did this hack with the tp-link thingie via network)
 
Old 05-28-2017, 05:32 AM   #7
meesha
LQ Newbie
 
Registered: May 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thumbs up

So, I got it finally. The reason was the most unexpected - outdated printer/filter drivers (foo2zjs) on client machine (first slackware got there about 4 years ago or so). Now it works even with cups raw queue.

but that was tl,dr, in case you're interested how I got it solved, the story follows:

First downloaded lprng version 3.8.35 from its homepage. Did not want to compile, so grabbed one from sourceforge (version 3.8.C). This one did compile, so I reused the old slackbuild from 13.37, trying not to trash my install. Cups had to be thrown out completely - programs had the same names and messed around with the same config files (crazy). Got the server running and raw queue set up, I proceeded to configure clients.

And to my surprise, none of my systems interacted well with the lprng's lpd. Windows machines reported problems with communication, linux ones (lp, lpq, lpstat etc. from the latest cups package) saw the service, but were unable to interchange data. As a last ditch I tried to install lprng on another linux machine - it worked (connected, saw the queue), could send the firmware that way, but failed while printing (some filter issues - now I think it could be that outdated foo2zjs). Either way having the printserver compatible only with some linux machines was not an option, so I ditched the idea.

Then I tried the usb/ip kernel package (driver and tools). This just rocks - virtual usb port over the ethernet. Got it setup in a few minutes - following the documentation is a pleasure. Only drawback - host can connect only with one remote machine. Firmware could be plugged into the printer that way, so it was good. Then tried with a proper print job - but with no effect. Tried from another linux machine - worked, yay! Question - what was the difference between this and my laptop? Yes, my laptop had foo2zjs driver installed few years back. Updated, worked with laptop. Tried with cups - works too.

All in all, that was an interesting journey, thank you guys for your support and ideas
 
1 members found this post helpful.
Old 05-28-2017, 07:13 AM   #8
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,483

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
Thanks for the info meesha !

One Q: Is this: USB/IP Project the kernel package you installed ?

Casually glancing at the USB/IP Project HomePage indicates that it has been merged into the Kernel Tree since Linux3.1.7 ...

Thanks again !

-- kjh
 
Old 05-28-2017, 10:47 AM   #9
meesha
LQ Newbie
 
Registered: May 2015
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yes, that's right. In kernel configuration, one needs to select: device drivers -> usb support -> usb/ip support, host and vhci modules. The tools are under /usr/src/linux/tools/usb/usbip/.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
sharing VPN access with lan + after vpn connected unable to ping lan/public ip xxx_anuj_xxx Linux - Networking 1 03-14-2008 02:50 AM
HP Deskjet (USB) & CUPS & Slackware 9.1: Unable to open USB device "usb:/dev/usb/lp0&qu arnostienen Slackware 2 01-29-2004 03:22 PM
Making a winprinter work in RedHat Streams Linux - Hardware 1 06-11-2002 02:18 AM
samba printing to winprinter jmccade Linux - Networking 2 09-04-2001 09:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration