This widget could not be displayed.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

communication with USB Raw device


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:

 

LIFETEC_LT.jpg

(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:

 

preview.png

 

 

Or for example, loading sbfw.usb firmware into scanner (this should be done every time when scanner turned on):

 

firmware.png

 

now I have simple "light weight" application for scanning:

 

app.png

 

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.

 

Message 21 of 24
(1,099 Views)

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.

0 Kudos
Message 22 of 24
(1,092 Views)

@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? Smiley Very Happy
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 Smiley LOL
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 23 of 24
(1,088 Views)

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.

Message 24 of 24
(1,063 Views)