[sane-devel] Epson Perfection 2480 Photo: firmware loading

Simon Munton simon at munton.demon.co.uk
Sun Aug 7 22:20:19 UTC 2005

On Sunday 07 August 2005 12:46 pm, Julien BLACHE wrote:
> While speaking of the 2480, I used it with the epkowa backend
> (requires evil non-free binary-only libraries), and did not have to
> suffer the waiting time after the firmware loading. Would it be
> possible to do something similar in the snapscan backend ?
> (something like a SANE daemon to automatically load firmwares into
> scanners which need it, triggered by hotplug, would be a really nice
> thing to have... shouldn't be too hard to do, but requires a snippet
> of code for the firmware loading for each and every scanner...)
Here's something I use for this very purpose (attached):
The shell script epson2480 and firmware.usermap go in /etc/hotplug/usb.
Compile epson_loader.c with the following command:
gcc -o epson_loader epson_loader.c -lusb
(needs libusb) and put the executable in /usr/bin (or whereever, adjust path 
in epson2480 to suit) You may need to change the path to the firmware file in 
The result of this is the firmware is downloaded when the scanner is switched 

There is also epson_buttons.c which will tell you which button has been 
pressed most recently. Could be worked up to poll the buttons regularly and 
launch scanimage etc automatically.

All of it should probably be made more robust, but it works for me.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: epson2480
Type: application/x-shellscript
Size: 894 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20050807/60f641ff/epson2480-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: epson_buttons.c
Type: text/x-csrc
Size: 1560 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20050807/60f641ff/epson_buttons-0001.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: epson_loader.c
Type: text/x-csrc
Size: 2354 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20050807/60f641ff/epson_loader-0001.c
-------------- next part --------------
# This file is part of sane-backends.
# The entries below are used to detect a USB scanner when it's plugged in
# and then run the libusbscanner script to change the ownership and
# permissions on the "device node" used by libusb.
# The 0x0003 match flag means the device is matched by its vendor and
# product IDs.
# Sample entry (replace 0xVVVV and 0xPPPP with vendor ID and product ID respectively) :
# libusbscanner      0x0003      0xVVVV   0xPPPP    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
# usb module         match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
# The following list already contains a lot of scanners. If your scanner
# isn't mentioned there, add it as explained above and mail the entry to
# the sane-devel mailing list.
# Epson Corp.|Perfection 2480
epson2480             0x0003      0x04b8   0x0121    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00000000

More information about the sane-devel mailing list