[sane-devel] Fwd: canon lide 110 - buttons - don't working :/
Tobias Stoeber
tobi at to-st.de
Fri Nov 30 01:27:50 UTC 2012
Hi Roberto,
Am 29.11.2012 19:44, schrieb Roberto Spadim:
> i tryed some 'solutions' to use buttons on canon lide110 but no one worked
> i searched about sane-genesys and buttond but i couldn't make it work
>
> can anyone help me allowing this device to accept buttons and send me
> information when should i start scanimage? maybe we need to add some
> code but it's not a problem
Well, I am using a Canon LiDE 200 scanner. Should work similar to your
LiDE 110 ... Using it under Ubuntu 10.04 (well, yes it's old ;-) with
scanbuttond 0.2.3.
Recompiled the stock Ubuntu scanbuttond package with some changes to
backends/genesys.c to include the LiDE 200's usb id.
~~~ code coe changes ~~~
#define NUM_SUPPORTED_USB_DEVICES 3
static int supported_usb_devices[NUM_SUPPORTED_USB_DEVICES][3] = {
// vendor, product, num_buttons
{ 0x04a9, 0x221c, 15 }, // CanoScan LiDE 60 (15 includes
combined buttons - only 4 real buttons)
{ 0x04a9, 0x1905, 15 }, // CanoScan LiDE 200 (15 includes
combined buttons - only 4 real buttons)
{ 0x04a9, 0x2213, 15 } // CanoScan LiDE 35 (15 includes
combined buttons - only 4 real buttons)
};
static char* usb_device_descriptions[NUM_SUPPORTED_USB_DEVICES][2] = {
{ "Canon", "CanoScan LiDE 60" },
{ "Canon", "CanoScan LiDE 200" },
{ "Canon", "CanoScan LiDE 35" }
};
~~~ code changes ~~~
So you have to change NUM_SUPPORTED_USB_DEVICES, and add lines for your
scanner (name and usb id) to backends/genesys.c
> for who don't know the device it's a canoscan lide 110 (sane-genesys)
> it have four buttons
> PDF, AUTO SCAN, COPY, EMAIL
Well recognizes all four buttons. What you do with it then, depends on
the actions you start from /etc/scanbuttond/buttonpressed.sh
I've build my own solution from various sources and tried some things
out. As there are only some examples, that come with the scanbuttond
package.
My "setup" is as follows:
- COPY scans a greyscale image and sents it to the default printer
with lpr.
- SCAN just generates a jpeg file and places it in /tmp/scanned and
display a little message with 'zenity' ;)
- PDF scans and generates a pdf file in /tmp/scanned, and opens the
file with evince.
- EMAIL button generates a jpeg file and opens a new email with
thunderbird, jpeg attached.
One of my sources has been e.g.
http://en.gentoo-wiki.com/wiki/Scanner_buttons_and_one-touch_scanning
The basic idea of the /etc/scanbuttond/buttonpressed.sh script and using
some single scripts for each action etc. is derived from there.
In fact you can use "combined" buttons, i.e. pressing SCAN and PDF
together generates a "button 5" event etc. I'm using that for some more
scripts, that e.g. open the jpeg file with GIMP for editing.
If you like, I can try to put thes pieces together with some sort of
documentation. But just getting the "button pressed" events with
scanbuttond is the easier part and quickly done ;-)
Regards, Tobias
More information about the sane-devel
mailing list