05-10-2012 11:24 AM
Intaris wrote:
What exactly have you implemented and using which software? I'd be very interested to hear more......
I have pretty old LIFETEC LT 9452 scanner, which is not working under Windows7. Was purchased 10 years ago, but still working:
(c) google images
This is cheap scanner based on GT68x chip. The are lot of such scanners (Mustek Scan Express, for example, etc).
I was unable to get it running with Windows 7, because no driver. The only way is Virtual Machine with Windows XP, but for me it was "too heavy" solution.
I have done following:
- install driver on Windows XP (under VMWare)
- get full protocol with sniffer (USBSniff and USBTrace was used - both working, but USBTrace a little bit more comfortable)
- then I have created VISA USB RAW driver for scanner and finally the complete protocol was "reverse engineered".
The source code for Linux from Sane project (http://www.sane-project.org/) was very helpful for me - saved huge time for parsing and understanding the commands.
The rest just technical, for example - full scan with 50 dpi for preview: Take a note, that we will get RAW data from sensor - they should be corrected at least with Gain correction:
Or for example, loading sbfw.usb firmware into scanner (this should be done every time when scanner turned on):
now I have simple "light weight" application for scanning:
Of course, I haven't TWAIN interface to the scanner, but I don't need it. I can scan something and save it into file - that all what I needed. In additional, my application works much faster than the original driver, because Offset/Gain calibration data saved and reused. The original driver perform scanner calibration every time before scan. With my solution I can start scan immediately.
The source code is not very clear (because was written just for my internal use), probably I'll perform some cleanups and then will post it here.
Andrey.
05-10-2012 01:27 PM
That's cool.
This is kind of the thing which got me programming USB in the first place too. We had a spectrometer (from our own company) whose drivers were sucky.
I implemented the driver completely in VISA and all my problems went away.....
Shane.
05-10-2012 01:33 PM - edited 05-10-2012 01:34 PM
@Intaris wrote:
That's cool.
This is kind of the thing which got me programming USB in the first place too. We had a spectrometer (from our own company) whose drivers were sucky.
I implemented the driver completely in VISA and all my problems went away.....
Shane.
Are you allowed to comment like that about products from your own company?
Anyhow the scanner implementation for sure is a nice example for what can be done. And before anybody else asks, no I wouldn't have considered to do something like that myself, despite that I find it a really impressive job.
And don't start with this, if you don't know about low level bit manipulations, how to read an USB specification document, and how to read and understand C code from open source projects like in this case sane. All of this is necessary and a lot of time too for something like this. If you have a paid job and do it for that, you can be sure that it is going to be to expensive to do
05-11-2012 04:43 AM
Rolf,
1. I don't work there any more and I never mentioned the company name
2. The software was in beta.
<looks over his shoulder>
Think I got away with it.
Shane.