1

With the Advent of Android 4.4 Kit Google now natively supports some form of built in printing functionality.

This means that a lot of printers now support Mopria.

Just like Airprint on IOS, Mopria is nothing more than multicast DNS for detecting the printer and IPP 2.0 to actually print. Of course, MDNS will only work when the phone or tablet is on the same subnet as the printer.

However, on Airprint we can create DNS-SD records that point to the printers, and therefore have IOS devices list devices across different subnets.

Is there a way to this with Mopria as well?

1 Answers1

4

To announce a printer for Android's Mopria-Print-Service via Bonjour use:

  • bonjour-service-type: _ipp._tcp
  • txt-record pdl: one or more of these pdls
    • image/pwg-raster
    • application/PCLm
    • application/pdf
  • txt-record ty: must exist, e.g. CUPS
  • txt-record rp: the appropriate IPP-URI-Path (cups-printer-name)

(code geeks may look into mopria/wfds java source code)

Proof of concept:

use dns-sd (Mac OS X) to advertise a remote print service (on rasperry pi / cups):

dns-sd -P "mopria" _ipp._tcp local 631 pi 192.168.2.118 \
        rp=printers/colorlaser \
        pdl=application/pdf \
        ty=CUPS

My Android-Device can now print PDF to my CUPS-Printer, that is USB-connected to my raspberry pi.

Issue 1:

Mopria-Discovery can not handle two or more printers per host. In terms of "hardware printers" it's reasonable to assume one "queue" per IP/host. In terms of print-spoolers like CUPS you'll face serious problems.

Mac OS X: only one shared printer can be discoverd and used by the Mopria-Print-Service

Issue 2:

For some reason I am unable to use avahi in order to make the cups-ipp-service visible to Android's Mopria-Print-Service.

This should but does not work for me:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
  <name>mopria</name>
  <service>
    <type>_ipp._tcp</type>
    <port>631</port>
    <txt-record>txtvers=1</txt-record>
    <txt-record>qtotal=1</txt-record>
    <txt-record>rp=printers/colorlaser</txt-record>
    <txt-record>pdl=application/pdf</txt-record>
    <txt-record>ty=CUPS</txt-record>
  </service>
</service-group>

Issue 3:

Mopria gets confused when there are too many mDNS responders. For Avahi tests you should disable CUPS's bonjour advertising.

File: /etc/cupsd.conf

Browsing Off  
#BrowseOrder allow,deny  
#BrowseAllow all  
#BrowseLocalProtocols CUPS dnssd
IPP Nerd
  • 141
  • 4