views:

179

answers:

3

How does the open-source/free software community develop drivers for products that offer no documentation?

+2  A: 

Usually by reverse engineering the code. There might be legal issues in some countries, though.

Christian Lescuyer
A: 

This is a pretty vague question, but I would say reverse engineering. How they go about that is dependent on what kind of device it is and what is available for it. In many cases the device may have a similar core chipset to another device that can be modified to work.

Geoffrey Chetwood
+5  A: 

How do you reverse engineer something?

  • You observe the input and output, and develop a set of rules or models that describe the operation of the object.

Example:

Let's say you want to develop a USB camera driver. The "black box" is the software driver.

  1. Develop hooks into the OS and/or driver so you can see the inputs and outputs of the driver
  2. Generate typical inputs, and record the outputs
  3. Analyze the outputs and synthesize a model that describes the relationship between the input and output
  4. Test the model - put it in place of the black box driver, and run your tests
  5. If it does everything you need, you're done, if not rinse and repeat

Note that this is just a regular problem solving/scientific process. For instance, weather forecasters do the same thing - they observe the weather, test the current conditions against the model, which predicts what will happen over the next few days, and then compare the model's output to reality. When it doesn't match they go back and adjust the model.

This method is slightly safer (legally) than clean room reverse engineering, where someone actually decompiles the code, or disassembles the product, analyzes it thoroughly, and makes a model based on what they saw. Then the model (AND NOTHING ELSE) is passed to the developers replicating the functionality of the product. The engineer who took the original apart, however, cannot participate because he might bring copyrighted portions of the code/design and inadvertently put them in the new code.

If you never disassemble or decompile the product, though, you should be in legally safe waters - the only problem left is that of patents.

Adam Davis