5 ms·
Scanimage: Scan from the Command Line
- tapia 6y agoMy friends can never understand my excitement when I realize that I can use a non-trivial scanner or printer utility in Linux. For example, I was really impressed that I could scan without problems from my brother ADS-1100W through wifi(!), or when I could configure the printer at work that requires some login credentials. Ah, the little joys of life :P
- tialaramex 6y agoIt's actually interesting which things get standardized and which do not, which directly impacts what works and what doesn't if you use a less than majority system. USB's expectation that you can just plug things in and they work really helped drive standardization of many things. This was done using USB's "Device class" model, but we'd seen a similar model in PCI without overwhelming success (e.g. SATA is a PCI class, but so is VGA card - knowing my high end graphics card is technically "VGA compatible" is not actually helpful). In USB things turned out somewhat differently. Webcams for example had previously been completely proprietary but USB led to UVC and today you expect to just plug in a borrowed webcam and use it - drivers? Why would it need special drivers, it's a webcam. USB Sound is the same, you aren't surprised when plugging a USB headset in not only makes the headset work, but also re-routes audio to it by default. Again there's a standard (the standard is completely bonkers but it's a standard) But somehow scanners escaped this. USB scanners are each different, driver code has to be written to address each family of scanners from each vendor. Vendors might choose to send data in a different order, or to cut up the scanning procedure differently. One scanner has an explicit command to move the scan head back to its rest position another always does it when scanning ends. One sends interleaved image data, another separates sensor channels out. SANE bundles a bunch of the resulting drivers for the Free Unix systems, but it's worth a moment to consider how this even became necessary. Who wanted scanners to be arbitrarily different? Who benefits? Maybe you can make some sort of vague argument in favour of opportunity to innovate, but scanners hardly seem like a more thrusting forward-looking and innovative technology than, say, webcams and those are standardized.
- non-entity 6y agoTo be fair I get excited when printing /scanning through wifi works on any OS.
- gvjddbnvdrbv 6y agoNevermind WiFi. I get excited when the ink cartridge hasn't dried up/run out after 20 odd pages.
- stareatgoats 6y agob/w laser printers ftw
- tapia 6y agoActually, yes. It is really a pretty cool thing in general haha
- denysvitali 6y agoThen I guess my little project might be helpful to you too: https://github.com/denysvitali/brother-scanner-scripts https://github.com/denysvitali/brother-scanner-scripts
- tapia 6y agoThanks for sharing. Maybe you could add a more detailed Readme? What is the exact use situation of the script?
- denysvitali 6y agoSorry for not expalining it better. This is basically a reverse engineering of Windows' (SOAP?) Scan API that was used to perform the scan over LAN. Unfortunately my Linux distribution did not support the scanner, so I looked at the requests made by my Windows VM, and I've created this small set of bash scripts to perform the scanning :)
- imglorp 6y agoI have that scanner and love it. The firmware is clunky junk from 15 years ago, but its killer feature is scan to FTP. The workflow: insert document, press a button, and go look at PDFs in the NAS folder. No dinking with Sane like poor OP.
- dvh 6y agoFew years ago friend gave me a broken scanner. In Windows it always said "Paper jammed". I opened it and just wanted to short paper sensor, but this scanner was too "smart". Instead of single sensor there were two sensors next to each other and the scanner was using them to calculate speed of paper and if it was outside of some range it called an error. I tried sane on Linux and got similar error. But on Linux I had source code so I found exact error message, commented that single line out, recompiled and it worked like a charm.
- nickcw 6y agoWhat's the best way to get a supported scanner on Linux? Buy a scanner, put it in a box for a year, then it will work fine!
- coronadisaster 6y agoFor a lot of uses, scanning using my computer's webcam or my phone's camera is good enough.
- scannersu 6y agoBest way: get a scanner that supports saving a file to a fat32 formatted usb drive. The brother ads-1200 is one such model.
- ce4 6y agoSupported devices: http://www.sane-project.org/sane-mfgs.html http://www.sane-project.org/sane-mfgs.html Generally, Canon Lide series work great, if you want double sided automatic feed scanning, Fujitsu FI or ScanSnap series.
- sam_lowry_ 6y agoI really miss a tool where I would put paper into the scanner, hit a button on the scanner and get the output in a folder of my linux workstation.
- raegis 6y agoIf you're willing to pay $400 for the convenience (like I did) an HP printer/scanner/copier/all-in-one which can scan to a network drive (Samba) should tempt you. I've gone through 2-3 different cheap Brother laser printers, but I got to a point where the hassle isn't worth it anymore.
- pgtan 6y agoThere are scanbd, scanbuttond, which poll the usb events and trigger a script, if a scanner button was pressed: https://sourceforge.net/projects/scanbd/ https://sourceforge.net/projects/scanbd/ http://scanbuttond.sourceforge.net/ http://scanbuttond.sourceforge.net/ https://github.com/jdam6431/scanbuttond https://github.com/jdam6431/scanbuttond
- sam_lowry_ 6y agoGosh! Thanks for the hint!
- hoytech 6y agoI'm probably going to lose a lot of geek-cred here, but if you're on hour 4 of wrestling with your SANE config, have some mercy on yourself and checkout vuescan. It works flawlessly on linux with every scanner I've tried: https://www.hamrick.com/ https://www.hamrick.com/
- Mekantis 6y agoIt's too bad people look at proprietary software with such disdain. Yeah, I'd love it too if all the world adhered to open source, but there are too many useful and awesome applications that simply aren't open source, where the open source "alternatives" pale in comparison.
- anoncake 6y agoAs a supporter of free software, why should I advertise for the competition?
- Klasiaster 6y agoThe easiest-to-use scan GUI is GNOME Simple Scan (The binary is `simple-scan`), not gscan2pdf which is powerful but normally not needed.
- u801e 6y agoIt works for my scanner, but I have to reset the usb device after scanning each page. I use the C program I found in this Stack Overflow[1] answer to handle resetting the device. [1] https://askubuntu.com/questions/645/how-do-you-reset-a-usb-device-from-the-command-line#661 https://askubuntu.com/questions/645/how-do-you-reset-a-usb-d...
- at_a_remove 6y agoI made great use of Dosadi EZTwain tool for command line scanning in Windows. Fantastic stuff.