Monday 16 January 2017

To access IPP-over-USB printer: Emulate remote machine in the network

tl;dr: Creating an emulated remote machine representing a USB printer as
it was a network printer, without VM with it's own kernel

Hi,

I am developing the ippusbxd daemon to support IPP-over-USB printers:

https://github.com/tillkamppeter/ippusbxd/

Modern network printers use IPP (Internet Printing Protocol) for clients
communicating with them. Also CUPS uses this protocol. In contrary
toolder, simpler protocols one cannot only simply send jobs (and pray)
but also request status info and, very important for driverless
printing, request information about the printer's capabilities.

To make all this possible on a USB printer (and even accessing the
printer's web admin interface) IPP-over-USB was introduced:

ftp://ftp.pwg.org//pub/pwg/ipp/whitepaper/draft-ippusbspecification-20110510.pdf

ippusbxd mirrors the IPP printer into the network, so that it can be
handled like a network printer, espocially to access the web interface
with a browser and to make CUPS and cups-browsed handle the printer like
a network printer.

In the beginning I used localhost:60000 which makes polling capabilities
and status, printing, and web interface work, but the printer could not
be Avahi-broadcasted and so CUPS and cups-browsed could not discover it.

Then I tried the "dummy" network device with an IPv6 ULA IP address.
This I could broadcast with Avahi and the broadcasts only appeared on
the local machine, as I wanted to have it, but I could only work with th
(awkward) IP address and not with host names, as Avahi broadcasts only
the one host name of the system and this hostname resolves only into the
system's network IP, not the IP of the dummy interface. Printing and
capability/status polling works IP-based, but not the web admin
interface of the printer.

See also my earlier discussion about this here on the list in the "Using
the dummy0 interface for a local-only service to be broadcasted by
Avahi" thread.

Now my new idea would be the following:

Is it possible to emulate a remote machine in the network, without
creating a virtual machine (with its own Linux kernel)?

The emulated remote machine should have its own IP (can be IPv6) and
host name (and ideally its own ports) and it should be on an interface
which supports multicast (like dummy, so that one can Avahi-broadcast
the emulated machine to the local machine). The emulation should by
fired up by ippusbxd and the printer be cuoled to that machine, so that
one can access the IPP-over-USB printer like a remote network printer,
ideally via hostname:631 for printing and hostname:80 for the web interface.

Is this possible?

Till



--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel