SaneNetScanner
SaneNetScanner copied to clipboard
Possible bridge for TWAIN scanner: Image Capture → SaneNetScanner → localhost/saned → Scanner
Hi there,
I am curious, if this project could solve my problem: I have got an older Canon CanoScan LiDE 35 scanner which I managed to get working under 10.11 El Capitan with the sane-backend. Now I am able to performs scans from the command line with scanimage
and friends. This works fine but just isn't the greatest experience in the world since there is no GUI to configure a scan job.
Now I am wondering, if I could use SaneNetScanner to connect to the local saned
daemon on my Mac, which handles the scan and reports it back to SaneNetScanner/Image Capture. Does anyone have experience with such a setup? Does SaneNetScanner still run under 10.11 at all?
Thanks a lot!
I'm sill running SaneNetScanner on a 10.11 installation without any problems.
To your actual question:
I'm not completely sure whether this would work. Without testing it I would guess, bonjour might be in your war. (As it advertises the scanner, but by default ignores scanners it advertises when showing them).
But no way of being sure, so give it a try :)
Sounds great, I'll give it a try. The installation routine hasn't changed, right? Compile Xcode project, and copy SaneNetScanner.app into /Library/Image Capture/Devices/
. I don't need to make any adjustments to the code or some config file, right?
The installation stayed the same.
After toying around with your tool for a couple of hours, I am afraid I still didn't get it to scan properly. Here is what I tried:
- I followed the installation instructions
- I am able to announce my scanner on the network via Bonjour.
- Adding the scanner in OS X' system settings works, too
- Using Preview.app or Image Capture.app, I can initialize a scan job, which results in a gray box in the preview window that keeps saying "Waiting for Scanner …" ("Auf Scanner warten …") — and that's it. Nothing else happens anymore.
According to the NSLogger log, SaneNetScanner successfully opens the connection and queries the scanner's parameters. However, I have a feeling that it fails somewhere in there because it throws a fair amount of "Failed get <SaneOption: … Invalid argument" errors.
This happens both in the case that the scanner is directly connected to my Mac (the desired scenario) but also when it's connected to my Linux machine. A manual scanimage
via the net backend from the command line does work in both cases.
Would you mind taking a look at my log file? Thank you very much!
Sad to hear that it does not work.
Please follow the following steps to produce more debug output:
- Terminate SaneNetScanner via Activity Monitor (if running)
- open a Terminal
- run
SANE_DEBUG_NET=128 <your/path/to/SaneNetScanner.app>/Contents/MacOS/SaneNetScanner
- attempt to scan via Image Capture
You should see additional log output in the terminal now. (If not, it may end up in the system log accessible via the Console app)
I am happy to report that I finally got SaneNetScanner running under 10.11. Turns out that I needed to disable NSAssert
in the build settings for the Release target. Otherwise, the code would get stuck in the non-implemented addToDeviceDictionary:
of the CSSaneOptionConstraint
-base class. Possibly related to my more recent version of Xcode (7.2).
Currently, this bridge via the saned server to a local device might in fact be the only solution to get TWAIN scanners to show up in recent versions of OS X, after Apple decided to remove Image Capture's TwainBridge.app device in 10.8 or so.
Two features I haven't quite gotten to work yet:
- Selection of the resolution (the drop-down menu is empty, see screenshot)
- Selection of the correct paper size (might be related to #2)
The resolution list is empty because CSSaneOptionEnumConstraint::addToDeviceDictionary
is not implemented. Resolution list looks good with https://github.com/mklein-de/SaneNetScanner/commit/6fab63f323347636ab4fdb0c2ea209642ee5e82d (Epson GT-7000, epson backend). Having the NSAssert
in the base class is perfectly ok.
Looks like this branch is getting a little advanced for mere mortals who just want to get their scanner fixed ;) I too can report that it does not work, which is disappointing after downloading and installing several items. I believe m-urban has resolved the issue successfully but I'm not a coder the explanation lost me. Can anyone point to a resolution walkthrough that gets us the rest of the way? Thanks.