1
\$\begingroup\$

I have this USB scanner from my dad that was made back in 2002, that apparently uses an old all-in-one GL646USB chip from Genesys to control the stepper motor, CCD sensor and provide some GPIO pins.

GL646USB Scanner Chip

Here's the datasheet: gl646usb_r14.pdf (Kindly have a look at page 21, section 7).


Now in order to make its 32-bit driver work, I had to bring up a VM with Windows XP installed; Because apparently when this thing came out there were no x64 CPUs around, and the manufacturer has since gone defunct. No dice there.

I'd like to start writing a driver for this thing, first to control the GPIO pins and maybe control the stepper (I'm not sure I'll be capable of controlling the CCD sensor.)

Unfortunately, I have not yet worked on any project involving USBs at a low-level, and my professors from back in college didn't have a lot of experience with them either.


What do I need in order to communicate with the device over USB and send commands in it?

Is there a simple Linux driver source code or a demo, in order to understand the mechanism of USB communication?

Will I be able to somehow reverse-engineer the Windows driver, or am I better off writing it from scratch?

\$\endgroup\$
  • 1
    \$\begingroup\$ The timing of code execution in a VM highly unpredictable. You may have to set up the GL646 to handle pauses in the scan process. It supports these, with programmable motor deceleration and acceleration, but setting this up to work correctly may require detailed work on the mechanical characteristics of the scanner hardware. This may be a similar or greater challenge than writing a Windows XP USB driver. If you want to reverse engineer the driver, consider watching activity on a USB bus analyser as an alternative to debugging the driver code. \$\endgroup\$ – amb Aug 22 '18 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.