1

Background to the problem

I have a "Canoscan Lide 120" scanner which is by all accounts a minor upgrade to "Canoscan Lide 110" (Same chipset, same specifications, etc.). The device driver for "Lide 120" is not available yet and the scanner is not yet supported by sane backend. Adding product and vendor ID of "Lide 120" to the sane backend does not help in detecting the scanner by the scanner applications.

The problem

Is there any way I can make my computer 'feel' as if it is connected to a "Lide 110" instead of a "Lide 120" by spoofing the USB product ID and vendor ID, so that I could use the driver for "Lide 110" with "Lide 120" ?

Conditions

  • I am on ubuntu 12.04

  • I do not wish to recompile kernel modules for the same and I am a non-programmer.

So folks, how do we spoof USB vendor and product IDs in ubuntu ?

Jai
  • 63
  • 2
    I think it would be easier and cleaner to force the driver to accept different USB IDs as in http://crunchbang.org/forums/viewtopic.php?id=38471. – David Foerster Feb 08 '15 at 19:45

1 Answers1

0

In this case it may help to add a udev rule for that USB ID:

  1. Find USB vendor and product IDs with lsusb.

  2. Add a file /etc/udev/rules.d/40-libsane-canoscan-lide-120.rules with the content:

    ATTRS{idVendor}=="xxx", ATTRS{idProduct}=="xxx", ENV{libsane_matched}="yes"
    

    Replace xxx with the appropriate IDs from step 1.

  3. (Re-)connect the scanner.

Source: http://wiki.ubuntuusers.de/Scanner?rev=782618#Erkennungs-Probleme

David Foerster
  • 36,264
  • 56
  • 94
  • 147
  • Thank you for your response David. But sadly that did not help. sane-find-scanner still lists the vendor and product ID of the scanner as it did before the rule was made. ' scanimage -L ' is still unable to detect my scanner. The purpose of the question is also to know whether it is possible to spoof a USB device's product ID and vendor ID without recompiling kernel modules. – Jai Feb 10 '15 at 10:30
  • @Jai Kind of late to the party but I used to use a different method to add the product and vendor id (taken from lsusb). You can see in this answer where I add a new_id 2001:330D to the rtl8192cu wifi driver for a USB wifi device: echo "2001 330D" | tee /sys/bus/usb/drivers/rtl8192cu/new_id. This way, you don't need to recompile the module to add a supported ID, just add the ID after the fact. – mchid Jul 27 '22 at 03:30
  • 1
    @mchid Afaik, that method only works for drivers that are kernel modules. SANE drivers work in user space and don’t use the kernel infrastructure for driver and device management. – David Foerster Jul 28 '22 at 09:44