lorgnette
provides support for document scanners on Chrome OS.
[TOC]
lorgnette
acts as a Scanner Access Now Easy (SANE)
frontend. It exposes a D-Bus API for Chrome or other clients to enumerate
scanners, request scanner capabilities, and request scanned pages. Other
related components include:
- sane-backends: SANE libraries and backends.
- sane-airscan: A SANE backend implementing the Mopria eSCL Scan protocol (see below for more info).
- ippusb_bridge: Allows eSCL to be used over USB on IPP-USB-capable devices.
- Scanning support in Chrome handles mDNS resolution and provides the Scan app UI.
- virtual-usb-printer: A virtual USB printer and scanner that allows testing without a physical device.
lorgnette
is a SANE frontend, so in theory any USB or network scanner
supported by an existing backend may
work.
However, the primary supported and tested protocol is Mopria eSCL. The code referenced in this documentation implements the Mopria Alliance eSCL Scan Technical Specification. You may obtain a copy of the Mopria Alliance eSCL Scan Technical Specification directly from the Mopria Alliance by visiting https://mopria.org/mopria-escl-specification.
For devices discovered through SANE, they are described with a string like
backend:Backend_Specific_String
These will mostly be USB-connected scanners, but some Epson and Canon network
devices can be detected. lorgnette
does minimal parsing on the returned
string to de-duplicate entries for devices that also support eSCL.
Network eSCL devices are discovered through mDNS. lorgnette
does not do mDNS
probing or resolution; it relies on Chrome's zeroconf support for this. The
resulting device description string looks like
airscan:escl:Device Name:https://NNN.NNN.NNN.NNN:PPP/eSCL/
Local USB devices that expose an IPP-USB descriptor are probed for eSCL support
on the IPP-USB tunnel. If the device responds, lorgnette
generates a device
string similar to
ippusb:escl:Device Name:<vid>_<pid>/eSCL/
In this case vid and pid refer to the USB vendor ID and product ID of the
device. They are used to look up an ippusb_bridge
socket in /run/ippusb
for further communication with the device.
Test images include a lorgnette_cli
command-line client that can be used to
exercise all of lorgnette
's functionality. Note that mDNS resolution is
normally done in Chrome, so the scanner lists returned by lorgnette
do not
normally contain networked eSCL devices in the list. lorgnette_cli
simulates
this by running airscan-discover
. It is possible that the scanner lists will
be slightly different from what the UI exposes as a result.