?
Solved

Newbie to writting device drivers

Posted on 2006-11-30
8
Medium Priority
?
1,298 Views
Last Modified: 2011-10-03
Hi all,

I'm new to writting windows device drivers, could anyone provide me some good tutorials online to start learning. Thanks.

Regards,
Kelvin
0
Comment
Question by:Kelvin_King
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 500 total points
ID: 18044284
This is main site of Windows device drivers developers:
http://www.osronline.com/

The best book about device drivers, the only one which has really working source code:
http://www.microsoft.com/MSPress/books/6262.aspx

New Microsoft high-level (relatively) platform for writing kernel-mode device drivers (KMDF):
http://www.microsoft.com/whdc/driver/wdf/KMDF.mspx

Sample hardware devices which can be used for learning device driver development:
https://www.osronline.com/custom.cfm?name=index_fullframeset.cfm&pageURL=https://www.osronline.com/store/index.cfm

WDM driver for OSR USB FX2 Learning Kit (V2):
http://www.osronline.com/article.cfm?article=371

Microsoft KMDF contains new version of OSR USB FX2 Learning Kit driver written in KMDF.

I think the best way is: download and install KMDF, buy OSR USB FX2 Learning Kit and learn Microsoft KMDF sample driver for this Learning Kit.
Of course, buy Walter Oney's book - "must" for every driver developer.

About online tutorials - there are no tutorials which allow to really learn driver development. You need real hardware device and sample driver working with it, this requires to spend some money.
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 18048458
Addition:
In the page "Sample hardware devices which can be used for learning device driver development" click " Hardware for Learning" link.
 
0
 
LVL 13

Author Comment

by:Kelvin_King
ID: 18050337
Thanks Alex,

I'll look at those resources u recommended. Get back to you soon.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 13

Author Comment

by:Kelvin_King
ID: 18050347
When you said I need real hardware, I'm a little confused. It's the computer already the hardware? eg. memory, harddrives etc. Can't I test on those?
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 18051654
The problem with "real hardware" is the following. Suppose you need to learn C++ programming in user mode. All you need is to install some C++ IDE like VC++, and to write a program. You can run this program, find a lot of working samples which can be executed, debugged, tested etc.
With device drivers it is much more complicated. Of course, computer IS hardware. For every device, there is working device driver. Microsoft DDK contains a lot of sample drivers. For example, keyboard driver. Try to read it - it is over complicated and absolutely unreadable for beginner. All standard device drivers on XP are protected. When you try to replace keyboard device driver with compiled Microsoft sample, XP kicks it off and restores original driver.
There are many driver books and tutorials which contain code fragments, but don't contain full working samples which can be installed and executed. Only Walter Oney's book contains really working sample code.

To learn driver development, we need real piece of hardware with known and relatively simple interface, and working driver sample, which can be installed, tested and debugged. Here comes osronline store whith driver learning kits. You can buy there simple device of some type, like USB device, PCI card, which comes with sample driver and source code. You can connect this device, install driver and see it working.

I have OSR USB FX2 Learning Kit. This is small card with number of swithces and LEDs, connected to USB computer port. There are two sample drivers for it - OSR WDM driver, and Microsoft KMDF driver. I used Microsoft KMDF driver.

Microsoft sample code contains driver and user-mode client application. Connect OSR USB FX2 device, install KMDF sample driver, run user-mode application and test driver functions. It is possible to turn on/off LEDs, read state of switches, read/write information in stream mode. See details in these articles:
http://www.codeproject.com/system/wdf_kmdf_basic.asp
http://www.codeproject.com/system/kmdf_osr_usb_fx2.asp

I think that this is the best learning kit.

Do you have some specific requirements? For example, if you need to write PCI card driver, you don't need to learn USB sample. There are lot of driver types, which are significantly different.
If you don't have any requirements and only want to start from any place, OSR USB FX2 is good one to start with.
0
 
LVL 13

Author Comment

by:Kelvin_King
ID: 18051962
Thanks alot Alex.

Yeah I see what you mean now. I'll try and purchase Walter's book. But does Walter's book require me to buy some specific devices or does it work on general computer hardware.

Also, we are not using the Windows Driver Framework yet. I'm actually joining a project that is already in version 1, we are doing some major changes so I need to pick up kernel mode device drivers. Specifically File System device drivers as well as USB devices/ smart cards as it's related to file io/ encryption etc, i believe using the IFS Kit.  

Í'll give Walter's book a read first.. but I don't think I'll be able to get my hands on the hardware you mentioned that soon.
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 18052881
OK, if you have existing WDM drivers, this is better. Walter Oney's book is about WDM drivers.
If you want to learn WDM USB drivers, you can use OSR USB toolkit with OSR WDM (non-KMDF) driver. If you want to write completely new USB driver, consider using KMDF.
I don't know anything about file system drivers, you need to search for examples. However, learning file system drivers must be relatively easy - they can be executed on any computer, without special hardware.

In any case, reading the "Programming the Microsoft® Windows® Driver Model" is the first thing you should do.
0
 
LVL 13

Author Comment

by:Kelvin_King
ID: 18058783
Yep. In fact, my supervisor just passed me Walter's book on Friday. I'm reading it now. Thanks for your help Alex.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question