Hi Wilhelm, Thanks! I checked out the code from svn and found the markers without problems.
It is first time I reviewed scanbd code, so I got few questions, maybe you can answer and save me some time. It looks like the backend selection sane vs. scanbuttond is exclusive (compiled with #ifdef). What I gathered is in sane branch the calling sequence will be sane_init(), sane_get_devices(). I peeked into sanei code, and it seems it will call sane_open() from sane_get_devices(). sane_open() does load firmware for the scanner if it is required (each sane backend has its own implementation). So my understanding is that scanbd with sane backend will load the firmware and have no problem. Is that correct? Now to the scanbuttonbd backend of scanbd. It looks like it won't call into sane backends as it has its own backends library. And scanbuttond backend has no code that loads firmware. As such, the bug of not loading the firmware is only happens with scanbuttond backend.??Am I right? Now I have to select an appropriate fix for the firmware issue, and my #1 option is to call sane_get_devices(), even when using scanbuttond backend which now is exclusive from sane backend. Will that be a problem? If it is, then I don't have an option #2... or better said it gets very complicated very quickly. -- Ilya ________________________________ From: Wilhelm <wilhelm.meier at fh-kl.de> To: Ilya V. Ivanchenko <iva2k at yahoo.com> Cc: "w.meier at unix.net" <w.meier at unix.net>; "sane-devel at lists.alioth.debian.org" <sane-devel at lists.alioth.debian.org> Sent: Thursday, August 29, 2013 12:33 PM Subject: Re: scanbd daemon does not load firmware Am 29.08.2013 16:03, schrieb Ilya V. Ivanchenko: >> >>? 2. When using scanbuttond-backends, fix loading firmware on USB insert. >>> >>> what I could imagine is to fix this problem with a special >>> shell-callback, when scanbd detects a device inserion / removal. >> >>Forgot to say: would you like to write a patch for that? I will provide >>you with the neccessary info to do that. Shouldn't be too much work ;-) > > Not a problem. I'm a software/systems engineer, so I know what I (will > be) doing. Only I have short window before I leave for a business trip. I just marked the code with four place to insert code to start such a callback: // TODO: call the device insertion / removal callback (if you use qtcreator you'll quickly find them) I'm looking forward to your patches ;-) > >>>? >>? 2. When using scanbuttond-backends, fix loading firmware on USB insert. >>>? > >>>? >what I could imagine is to fix this problem with a special >>>? >shell-callback, when scanbd detects a device inserion / removal. >>> This is in the nutshell how I patched the problem from udev. >> >>yes, but you had to stop / restart the scanbd and that's more a >>workaround than a solution ... > > I agree. > > -- > Ilya -- Wilhelm w.meier at unix.net -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130830/c8a075e1/attachment.html>