EzDevInfo.com

drivers interview questions

Top drivers frequently asked interview questions

What is a good resource to get started with Windows file system driver development?

What is a good resource to get started with Windows file system driver development for a newbie?


Source: (StackOverflow)

What is the difference between FIQ and IRQ interrupt system?

I want to know the difference between FIQ and IRQ interrupt system in any microprocessor, e.g: ARM926EJ.


Source: (StackOverflow)

Advertisements

What IDE would be good for linux kernel driver development [closed]

I am using ubuntu 8.04.1 and i am trying to write a character driver in kernel mode. What would be a good ide, ideally with code completion, to do that ?


Source: (StackOverflow)

android-sdks/build-tools/17.0.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

I just installed eclipse, the android sdk and jdk on a fresh installation for 64 bit fedora 14 , but by the time i create a new project i am getting the following error in the console:

android-sdks/build-tools/17.0.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

i am using a 64bit machine and i need to install some 32bit drivers, so i am trying to install:

sudo apt-get install ia32-libs Reading Package Lists... Done Building Dependency Tree... Done E: Couldn't find package ia32-libs

Anyone help me how to resolve 64bit fedora 14 machine libz.so.1 problems


Source: (StackOverflow)

How should I get started on writing device drivers?

I would like to learn how to write device drivers because I think it would be fun. I use a Mac OS X Macbook, but I also have an Ubuntu machine (running on a Mac Min). I am pretty familiar with C and currently am reading this book. I have found some links online such as Mac Dev Center. I am doing this because it would be fun. I think there would be real gratification to see hardware operate because of software I wrote.

I guess what I would like is some tips or advice and guidance, and does anyone know of a list of devices that don't have drivers or can I write a driver for something that's already supported (would prefer the former so I'm actually providing value). What's a good device to get started with? Am I biting off more than I can chew? I'm not afraid of low level programming or assembly or whatever amount of effort is required. I'd like a challenge really!


Source: (StackOverflow)

Control USB port's power? [closed]

Does anybody know how to control USB pins on a certain USB port? I think it is definately possible in assembler but what about C++ or C#?

I want to be able to use USB battery as a power supply for an LED or something like that. So then a program would power it on and power it off making it flash.

I know it sounds pointless but I need to do it for something awesome.

I also know that it might require a custom driver.

http://www.riccibitti.com/pc_therm/USB_A_pinout.jpg


Source: (StackOverflow)

Writing drivers in C#

I have written earlier in C/C++ but currently, I need it to convert into C#.

Can anyone tell me the code/way How to write drivers in C#?

Actually currently I have some problems with my old application written in C++ and we have to write the drivers of our LPT1,COM Printers and other USB drivers in C#.


Source: (StackOverflow)

Difference between JDBC Driver type numbers

I am very new to Java, when i was going through the JDBC section, i noticed that JDBC has different Drivers like

  1. Type 1 Driver
  2. Type 2 Driver etc.. to Type 4 Why did they get the name like Type 1, Type 2 etc.., Is there any logic?

Source: (StackOverflow)

What is the jdbc driver "org.gjt.mm.mysql.Driver" for?

After taking over a coworker's project I noticed he was using "org.gjt.mm.mysql.Driver" as the jdbc driver for MySQL 5 instead of the more common one "com.mysql.jdbc.Driver". They both are contained in the driver I found on Maven central that appears to be the standard distribution of the driver.

When I look up gjt.org I found some old site that talks about "Mark's mysql driver".

http://gjt.org/


Source: (StackOverflow)

Unit testing device drivers

I have a situation where I need to write some unit tests for some device drivers for embedded hardware. The code is quite old and big and unfortunately doesn't have many tests. Right now, the only kind of testing that's possible is to completely compile the OS, load it onto the device, use it in real life scenarios and say that 'it works'. There's no way to test individual components.

I came across an nice thread here which discusses unit testing for embedded devices from which I got a lot of information. I'd like to be a little more specific and ask if anyone has any 'best practices' for testing device drivers in such a scenario. I don't expect to be able to simulate any of the devices which the board in question is talking to and so will probably have to test them on actual hardware itself.

By doing this, I hope to be able to get unit test coverage data for the drivers and coax the developers to write tests to increase the coverage of their drivers.

One thing that occurs to me is to write embedded applications that run on the OS and exercise the driver code and then communicate the results back to the test harness. The device has a couple of interfaces which I can use to probably drive the application from my test PC so that I can exercise the code.

Any other suggestions or insights would be very much appreciated.


Update: While it may not be exact terminology, when I say unit testing, I meant being able to test/exercise code without having to compile the entire OS+drivers and load it onto the device. If I had to do that, I'd call it integration/system testing.

The problem is that the pieces of hardware we have are limited and they're often used by the developers while fixing bugs etc. To keep one dedicated and connected to the machine where the CI server and automated testing is done might be a no no at this stage. That's why I'm looking for ways to test the driver without having to actually build the whole thing and upload it onto the device.


Summary

Based on the excellent answers below, I think a reasonable way to approach the problem would be to expose driver functionality using IOCTLs and then write tests in the application space of the embedded device to actually exercise the driver code.

It would also make sense to have a small program residing in the application space on the device which exposes an API that can exercise the driver via serial or USB so that the meat of the unit test can be written on a PC which will communicate to the hardware and run the test.

If the project was just being started, I think we'd have more control over the way in which the components are isolated so that testing can be done mostly at the PC level. Given the fact that the coding is already done and we're trying to retrofit the test harness and cases onto the system, I think the above approach is more practical.

Thanks everyone for your answers.


Source: (StackOverflow)

USB programming

I want to program a microcontroller (AVR) to control some leds through USB. It's just out of interest in how to build and program USB devices. There are some AVR microcontrollers that support the USB protocol or I could implement the USB protocol in an another microcontroller myself, but I wonder what to use to write your own drivers on the computer.

My level in system programming: total noob (hence the question)

So what is the literature you people would advice to get good knowledge of the USB technology and how to write your own drivers and beyond?

P.S.: I know:

  • C (probably will need it here)

  • Java (probably won't need it here)

  • Python (hope can use it here)

  • assembler (hopefully won't need it here XD).

  • ...

P.P.S: driver development differs for different OS's. I use Linux and Windows, so any material related to one or both of these systems is welcome.


Source: (StackOverflow)

In Windows 8, will third-party INF driver files require a signature?

I work for a company that sells USB devices and provides drivers for them.

In Windows 7, you could install and use unsigned INF driver files for USB devices as long as they didn't add any code to the kernel. Our company uses generic drivers provided by Microsoft (usbser.sys and winusb.sys), so we never needed to sign our driver packages.

Based on a report from one of our customers and from another Stack Overflow question What changed in the driver signature requirements for Windows 8? and the Arduino forum, it sounds like the Windows 8 Consumer Preview has stricter signing requirements that require all third-party INF files to get signed. The error message people are getting when trying to install drivers that worked on Windows 7 is:

The third-party INF does not contain digital signature information.

What is the official word from Microsoft that confirms that the signatures will still be required in the final version of Windows 8? A sentence or two from MSDN.com would be sufficient, but I can't find anything.

I am considering buying a signing certificate, but before I pay $200 I want to be sure I will actually need it in the long term. It's possible that the new signing requirement is just in the consumer preview and not in the real version?


Source: (StackOverflow)

Creating a Virtual USB Device

I am a newbie learning how to write WDM device drivers for USB devices and found that the materials available are all too hard to comprehend (the DDK online doc is one of the most difficult to read, and the WDM Device driver book by Oney isn't anything better).

So, I've got a simple question. Where do I start if I want to create a virtual USB device (for example, a virtual USB mouse which looks like a real USB mouse attached to a USB port) for testing/learning.

So far what I understand is the HIDClass driver (hidclass.sys) has a minidriver for the usb bus (hidusb.sys) that carries out the enumeration of attached USB hardware. So, if I want to hijack the hardware enumeration process and creates my own virtual hardware, should I include a filter driver somewhere to intercept some IRPs related to the hardware enumeration process?

Sorry if the above does not make sense at all since I am still in the learning stage and this is actually one of the exercise I think could help me learn about writing USB device drivers better.


Source: (StackOverflow)

C# driver development?

Before I jump headlong into C#...

I've always felt that C, or maybe C++, was best for developing drivers on Windows. I'm not keen on the idea of developing a driver on a .NET machine.

But .NET seems to be the way MS is heading for applications development, and so I'm now wondering:

  • Are people are using C# to develop drivers?
  • Do you have to do a lot of API hooks, or does C# have the facilities to interface with the kernel without a lot of hackery?
  • Can anyone speak to the reliability and safety of running a C# program closer to Ring 0 than would normally be the case?

I want my devices to be usable in C#, and if driver dev in C# is mature that's obviously the way to go, but I don't want to spend a lot of effort there if it's not recommended.

  • What are some good resources to get started, say, developing a simple virtual serial port driver?

Source: (StackOverflow)

NVIDIA CUDA: What is the developer driver?

To develop NVIDIA CUDA programs, the tools needed are:

  1. Developer drivers
  2. CUDA Toolkit
  3. GPU Computing SDK

What is this developer driver? Installing it silently overrides any NVIDIA graphics driver that is already installed. So, how is the developer driver different from the usual NVIDIA graphics driver? What extra components or functionality does it contain?

The developer driver is available in both 32-bit and 64-bit flavours. If I am developing 32-bit Visual C++/CUDA projects on 64-bit Windows 7, which flavour of the developer driver do I choose? Why?


Source: (StackOverflow)