OpenPrinting / ipp-usb

ipp-usb -- HTTP reverse proxy, backed by IPP-over-USB connection to device
BSD 2-Clause "Simplified" License
129 stars 11 forks source link

ipp-usb compatibility issues with existing/future software in distributions #56

Open zdohnal opened 1 year ago

zdohnal commented 1 year ago

To ease up using ipp-usb in the system by default, we should try to tackle and track issues which other apps have if ipp-usb is on system.

There are:

  1. any classic USB printer backends (CUPS usb, hplip hp, gutenprint gutenprint53+usb and more proprietary ones) list the device even if its interface is claimed by ipp-usb, which means the newly installed printer won't work, even if the device was advertised by the backend
  2. any printer applications list the device even if it claimed by ipp-usb, thus unavailable
  3. any already installed USB printers from the past which interface is now claimed by ipp-usb don't work - aka migration solution
  4. there is duplicity in the scanner's list, if the scanner/multifunction device is supported by ipp-usb and by a classic driver, but the classic driver won't work because ipp-usb claims the device's interface.

Ad 1.

Ad 2.

Ad 3.

Ad 4.

zdohnal commented 1 year ago

@debiantriage

AFAIK there are two ways right now how to find out whether a scanner device is under control of ipp-usb:

The former can be implemented in sanei_usb_find_devices(), which can cover backends which uses the library function (some big backends - pixma, genesys - use it), however the change needs sane-backends starting to require Avahi as a whole (now only escl requires and pixma can require Avahi).

The latter has disadvantages which Mike mentions at https://github.com/OpenPrinting/ipp-usb/issues/28#issuecomment-828392483 .

The approach you mentioned - check whether ipp-usb claimed the device (you can have ipp-usb running even without any ipp-over-usb device if you run it in standalone mode or you can have more devices where one is ipp-over-usb and other not) and then disable non-driverless backends - I'm not sure whether it can work with current SANE design. sane-backends currently doesn't implement disabling backends per device, only for a whole system - so in case you have two scanners, one driverless and other non-driverless - you will see only the driverless one.

I've checked sane-backends' code further - we can add some generic function which omitts driverless scanners in classic backends into libusb_scan_devices() function.