views:

172

answers:

3

I have been studying device level programming and was curious what everyone's experience is as far as finding documentation for the hardware? For instance, in my systems programming class we wrote a basic serial IO driver which communicated with a terminal, and for that I read the documentation for the chip we were using which explains just about everything I needed to know. My question is, are these type of manuals always available on request? Or can someone point me to the right place to look? I would think that these manuals would always be available from the manufacturer, but that doesn't seem to be the case.

As an example, I have a Logitech G5 mouse, which as far as I know doesn't have a Linux driver (to perform specific things like altering the DPI settings). If I wanted to write a driver, would Logitech supply me with the required documentation (as I can't find it on their site)? I understand that for many devices this type of documentation is always available, but it seems like it is impossible to find for others.

Thanks for looking!

+2  A: 

Serial ports are easy: because the on-board serial port hardware is a chip which is sold to system-builders, and therefore the chip's manufacturers publish the chip's API.

External devices (e.g. exotic mice) and even on-card devices can be more problematic. Sources for documentation include:

  • The manufacturer
  • Open source implementations of drivers

A manufacturer may not cooperate with providing documentation. They might even consider it a proprietary trade secret (because the information that you'd need to write a driver might tell you a lot about the implementation of the device).

http://www.crynwr.com/qcpc/ for example suggests that, to develop a driver, sometimes people "reverse engineer" a device (which isn't an easy thing to do).

ChrisW
+1  A: 

Intel used to publish excellent (but fat) reference architectures for their processors. For example, the old "Pentium Reference Manual". Since many standards are still based on Intel's work (E.g., USB), their stuff can still be useful. For other standards, you need to look at the standard bodies.

If you are writing drivers for an obscure or proprietary device, the vendor should have a programmer's manual available. However, most companies control these things very closely so you may have to sign contracts with them before they give you access.

Generally speaking, companies do not have to supply you with the documentation, but that is often part of the device's EULA. You typically buy the rights to use the device only with the software provided by the vendor.

Uri
+1  A: 

For information on chips search for the name of the chip (if needed with some variations) plus "data-sheet".

For other devices like your G5 mouse you can ask the manufacturer. There's a big variability in attitudes, some are very helpful and provide complete documentation, others keep everything a secret. Try to buy your stuff from the first kind.

For the latter kind you can do reverse engineering: Observe the communication between the device and its proprietary driver and deduce the commands. For your example of setting DPI, do this on the driver and observe the communication. Often it is quite easy to deduce most of the protocol, but there always remain some dark corners.

starblue