News for hackers. Stuff that matters.
Re:Scanimage: Scan from the Command Line by dvh on Saturday July 11, 2020 @03:48PM (#23805280)
Few 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.
Re:Scanimage: Scan from the Command Line by hoytech on Saturday July 11, 2020 @05:32PM (#23806227)
I'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/
Re:Scanimage: Scan from the Command Line by Mekantis on Saturday July 11, 2020 @09:10PM (#23807741)
It'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.
Re:Scanimage: Scan from the Command Line by anoncake on Sunday July 12, 2020 @11:12AM (#23811957)
As a supporter of free software, why should I advertise for the competition?
Re:Scanimage: Scan from the Command Line by tapia on Saturday July 11, 2020 @03:04PM (#23804801)
My 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
Re:Scanimage: Scan from the Command Line by tialaramex on Saturday July 11, 2020 @03:45PM (#23805247)
It'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.

Re:Scanimage: Scan from the Command Line by imglorp on Saturday July 11, 2020 @09:24PM (#23807824)
I 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.
Re:Scanimage: Scan from the Command Line by denysvitali on Saturday July 11, 2020 @05:03PM (#23805947)
Then I guess my little project might be helpful to you too: https://github.com/denysvitali/brother-scanner-scripts
Re:Scanimage: Scan from the Command Line by tapia on Sunday July 12, 2020 @04:26AM (#23809828)
Thanks for sharing. Maybe you could add a more detailed Readme? What is the exact use situation of the script?
Re:Scanimage: Scan from the Command Line by denysvitali on Monday July 13, 2020 @12:32AM (#23817192)
Sorry 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 :)
Re:Scanimage: Scan from the Command Line by non-entity on Saturday July 11, 2020 @03:49PM (#23805293)
To be fair I get excited when printing /scanning through wifi works on any OS.
Re:Scanimage: Scan from the Command Line by gvjddbnvdrbv on Saturday July 11, 2020 @04:14PM (#23805497)
Nevermind WiFi. I get excited when the ink cartridge hasn't dried up/run out after 20 odd pages.
Re:Scanimage: Scan from the Command Line by stareatgoats on Saturday July 11, 2020 @05:25PM (#23806153)
b/w laser printers ftw
Re:Scanimage: Scan from the Command Line by tapia on Sunday July 12, 2020 @04:30AM (#23809848)
Actually, yes. It is really a pretty cool thing in general haha
Re:Scanimage: Scan from the Command Line by Klasiaster on Saturday July 11, 2020 @06:45PM (#23806815)
The easiest-to-use scan GUI is GNOME Simple Scan (The binary is `simple-scan`), not gscan2pdf which is powerful but normally not needed.
Re:Scanimage: Scan from the Command Line by u801e on Saturday July 11, 2020 @07:07PM (#23806983)
It 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-d...

Re:Scanimage: Scan from the Command Line by sam_lowry_ on Saturday July 11, 2020 @05:01PM (#23805927)
I 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.
Re:Scanimage: Scan from the Command Line by pgtan on Saturday July 11, 2020 @05:57PM (#23806455)
There are scanbd, scanbuttond, which poll the usb events and trigger a script, if a scanner button was pressed:

https://sourceforge.net/projects/scanbd/

http://scanbuttond.sourceforge.net/ https://github.com/jdam6431/scanbuttond

Re:Scanimage: Scan from the Command Line by sam_lowry_ on Sunday July 12, 2020 @10:58AM (#23811844)
Gosh! Thanks for the hint!
Re:Scanimage: Scan from the Command Line by raegis on Saturday July 11, 2020 @05:30PM (#23806211)
If 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.
Re:Scanimage: Scan from the Command Line by nickcw on Saturday July 11, 2020 @04:38PM (#23805704)
What'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!

Re:Scanimage: Scan from the Command Line by ce4 on Sunday July 12, 2020 @03:03AM (#23809465)
Supported devices:

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.

Re:Scanimage: Scan from the Command Line by scannersu on Saturday July 11, 2020 @10:40PM (#23808284)
Best way: get a scanner that supports saving a file to a fat32 formatted usb drive. The brother ads-1200 is one such model.
Re:Scanimage: Scan from the Command Line by coronadisaster on Saturday July 11, 2020 @06:50PM (#23806852)
For a lot of uses, scanning using my computer's webcam or my phone's camera is good enough.
Re:Scanimage: Scan from the Command Line by at_a_remove on Saturday July 11, 2020 @10:32PM (#23808238)
I made great use of Dosadi EZTwain tool for command line scanning in Windows. Fantastic stuff.