Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Dumb USB Print Server (not using CUPS drivers)

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
jrobin28260
Posts: 47
Joined: 2018-11-09 20:30

[SOLVED] Dumb USB Print Server (not using CUPS drivers)

#1 Post by jrobin28260 »

Hi folks,

I saw in the past a lot of routers/modems which are able to transform an "USB" printer into a "Network printer". USB Print Server devices are also available from various manufacturer.
Fortunately, those devices don't need the driver of the printer : driver is installed on the client side. By doing so, client computer is able to access Ink levels and various things provided by the driver, so that the USB Print Server doesn't put any limitation by trying to drive the printer by itself.

I'm pretty sure that it's possible to do it from Debian, after all.
But everything I found is using CUPS, making it listen on every interface, installing the correct driver/PPD into CUPS, and then, connecting existing Windows computers to it thanks to the cups link (http://ip-address:631/printers/PrinterName) but it's not using an IP adress, it's using CUPS address, and cups drivers as an intermediate layer. I'm in front of an "8 cartdrige" printer and Windows computer cannot access the ink levels by this method.

Before buying a physical USB Print Server, is it possible to configure some Debian service for making the printer available trough IP address, without using CUPS and his drivers ?

Thank you in advance !
Last edited by jrobin28260 on 2021-04-01 01:11, edited 1 time in total.

shep
Posts: 423
Joined: 2011-03-15 15:22

Re: Dumb USB Print Server (not using CUPS drivers)

#2 Post by shep »

The terminology is important here.

Cups is a server that provides spooling, accounting and if needed, print filters. Print Filters are often referred to as drivers but that is not an accurate use of the term "driver".

The spool accepts print jobs and queues them until the printer is ready. This comes into play when you have multiple users sending jobs to a single printer.

In environments trying to control print costs, you can determine how many pages a user prints in a given time period, send them a bill and cut off their print privileges if they exceed their limits.

The filters are needed for non-postscript printers to translate the print job into something the printer understands. Most applications generate print jobs as PostScript and a Postscript capable printer can print these directly - no filtering. A PCL5e printer would need the job filtered. Some really cheap printers use MS Windows only filter - these are paperweights in linux.

If you have a router with a usb port, it is possible to install cups on the router to act as a network print server.

https://openwrt.org/docs/guide-user/ser ... ups.server.

If you are uncomfortable flashing your router with OpenWRT, Tomato or DD-wrt, NetGear, and likely other Router manufacturers, have their own print server setup

https://www.netgear.com/support/product ... inter.aspx

Web Search to see if your router has that option.

jrobin28260
Posts: 47
Joined: 2018-11-09 20:30

Re: Dumb USB Print Server (not using CUPS drivers)

#3 Post by jrobin28260 »

Thanks shep,

Unfortunately, as I said, I don't want CUPS, be it on a Debian or on a OpenWRT router (for making an USB printer accessible trough IP, CUPS adds an undesirable driving layer). Even if the print filters that CUPS uses to drive the printer aren't called drivers, I'm still looking for a solution which doesn't use them.

Of course I already know that there is tons of devices available which are able to run without CUPS, this is why I'm here : on those devices you can't install any "print filter" or anything : this isn't the work of this device, and it's way better. This is why I'm pretty sure that it's possible to do it from Debian, after all.

Before buying a physical USB Print Server, is it possible to configure some Debian service for making the printer available trough IP address, without using CUPS and his print filters ?

Thank you in advance !

shep
Posts: 423
Joined: 2011-03-15 15:22

Re: Dumb USB Print Server (not using CUPS drivers)

#4 Post by shep »

More details are needed.

1) What will the printer be connected to? If it is a Windows or Mac computer, you can print from a second Debian system via Samba shared services. If it is a Debian computer in cups, you can share the printer to other Linux based devices. You can also share a printer connected to a Debian machine to other Windows/Mac machines via Samba. Does your router have a usb port? Do you have several computers with usb ports? Will you want wireless devices to access?

2) You mentioned purchasing a usb print server. Print servers come either with an ethernet port or wireless. In general, transmision of print jobs is several fold faster over a wired connection.

3) It also depends on the printer. If your printer is a postscript or PCL4/PCL5/PCL6 printer you will have alot of flexibility. If it does not have an opensource filter, it will need to be connected to a system that supports the manufacturers driver/filter. What is your printer make/model?

4) Debian has two other print systems: LPR and LPRng. Both support network printing.
Before buying a physical USB Print Server, is it possible to configure some Debian service for making the printer available trough IP address, without using CUPS and his print filters ?
It is only possible to not use a print filter in two settings. If you are just printing text or have a postscript printer. Section 9.4 of the FreeBSD Handbook gives an example where the spooler is bypassed with a text file.
https://www.freebsd.org/doc/en_US.ISO88 ... irect.html

It it is not a text file or the printer is not a postscript printer, the output will be gibberish.

reinob
Posts: 1196
Joined: 2014-06-30 11:42
Has thanked: 99 times
Been thanked: 47 times

Re: Dumb USB Print Server (not using CUPS drivers)

#5 Post by reinob »

jrobin28260 wrote:I saw in the past a lot of routers/modems which are able to transform an "USB" printer into a "Network printer". USB Print Server devices are also available from various manufacturer.
Fortunately, those devices don't need the driver of the printer : driver is installed on the client side. By doing so, client computer is able to access Ink levels and various things provided by the driver, so that the USB Print Server doesn't put any limitation by trying to drive the printer by itself.

I'm pretty sure that it's possible to do it from Debian, after all.
I think what you're looking for is USB-over-IP, i.e. where a USB-connected device physically connected to a server is seen by a client as if it were physically connected to it.

For that, you need the usbip package (# apt install usbip).

You can then read:
http://usbip.sourceforge.net/
https://www.howtoforge.com/how-to-modif ... -ip-server
http://www.linux-magazine.com/Issues/20 ... ial-USB-IP

I haven't tried this myself (and currently have no need for this), but hopefully it will work as you expect.
Would appreciate feedback if it worked (and if it didn't).

jrobin28260
Posts: 47
Joined: 2018-11-09 20:30

Re: Dumb USB Print Server (not using CUPS drivers)

#6 Post by jrobin28260 »

Thanks reinob for the tip : This is not exactly what I'm looking for, but it's pretty cool.
I wasn't aware that open source things existed for sharing any USB device between 2 computers, this is cool and it works exactly as if the device is connected to the client computer, be it a printer or an USB stick.

Server side :

Code: Select all

apt install usbip
modprobe usbip_host
usbipd -D
usbip list -l
usbip bind -b 1-1.4
This "disconnect" the device from software that were able to see it

Client side :

Code: Select all

apt install usbip
modprobe vhci-hcd
usbip list -r REMOTE_IP
usbip attach -r REMOTE_IP -b 1-1.4
The device appears as an USB device (the software dealing with the device isn't aware that the device is behind a network cable).
Looks like only 1 computer can connect the device.

There is some bug into Raspberry Pi as client mode doesn't work, and it looks like there is every year some bugs with almost every OS and this thing, but I succeeded today using just Debian. For Windows computer it looks like you have to spend some hours making a Visual Studio 2017 setup to build some unofficial things as the official one isn't supported by Windows 10.

-------------------------------------------------------------------------------------------------

Thanks shep for your answer, I finally found back what I used years ago to make an USB Printer (an USB Canon i560) available trough IP exactly as if the printer was a native IP printer, but sorry it's described in french https://www.free.fr/assistance/2230.html
If the printer is already configured with USB, you just have to tell Windows "please use this IP address / port 9100 instead of the USB cable, this is the same printer" and it works exactly as if the cable didn't changed.

The point is : what I'm looking for is a print protocol passtrough, or a "low level adapter" : I suppose it is a RAW link between the TCP port 9100, and the USB port of the printer (it's probably using a precise USB endpoint which is the same on every USB printer). Any question about upper level protocol, is already solved by the client computer. Exactly as my GSM/LTE modem phone should never care about which video format Youtube is using when I browse it from my computer.

The printer I'm trying to deal with today, is an Epson Stylus Photo R1900, connected to a Linux Server. Around it, five Windows 10 computers will use it. The server by itself will not be used to print documents, but it's always running (which is not the case of the Windows computers and laptops - this is why the printer is shared from it).

I'll take a look at LPR and LPRng, as Samba is just sharing the CUPS handled printers (so it's still messing the same way by trying to over-handle the communication between Windows clients and the printer, which ideally only requires a wire, without any CUPS or configuration about printer model into it).

shep
Posts: 423
Joined: 2011-03-15 15:22

Re: Dumb USB Print Server (not using CUPS drivers)

#7 Post by shep »

Port 9100 is assigned to HP jetdirect. If your printer supplies this and it is functional, you are in luck.
http://danieru.com/2013/06/06/what-is-p ... int-to-it/
and
https://okiprinting-en-gb.custhelp.com/ ... rt-9100%3F

You should be able to ping the printer at the URL:9100 and send it some gibberish before you invest time in setting it up.

According to OpenPrinting,

http://www.openprinting.org/printer/Eps ... hoto_R1900

your Epson can use one of two filters
https://packages.debian.org/sid/printer-driver-escpr
or
https://packages.debian.org/stretch/pri ... gutenprint

I set up my neighbors son to print, over wireless, to an epson printer, with the escpr filter, in cups. It was just there connected to Dad's windows machine when we scanned for available printers.

If your are looking at LPR/LPRng they are older, lighter print spoolers, that typically take manual editing of configuration files. The FreeBSD handbook link, I provided above walks you through setting it up. I've used LPR in debian and copied over my printcap/filters with minimal editing.. You can also use a package called cups-filters to get foomatic-rip.

This can be used for spooler less printing with LPR
http://cvsweb.openbsd.org/cgi-bin/cvswe ... text/plain

LPR, foomatic-rip and the escpr package would be the lightest setup that would correctly print.

mikeboss
Posts: 1
Joined: 2020-03-21 20:35

Re: Dumb USB Print Server (not using CUPS drivers)

#8 Post by mikeboss »

for others looking for a solution: "p910nd" appears to be what @jrobin28260 was looking for...

https://packages.debian.org/search?keywords=p910nd

jrobin28260
Posts: 47
Joined: 2018-11-09 20:30

Re: Dumb USB Print Server (not using CUPS drivers)

#9 Post by jrobin28260 »

mikeboss wrote:for others looking for a solution: "p910nd" appears to be what @jrobin28260 was looking for...

https://packages.debian.org/search?keywords=p910nd
Many thanks! I sort of given up and used CUPS as an half working layer between Windows clients and the USB printer, with broken ink monitoring on Windows side.
I looked again for a solution, found back this topic, and finally! It's exactly what I was looking for, many thanks

Post Reply