Results 1 to 2 of 2
I'm new to Driver Development. I was actually trying to avoid it on this project, but I think what I want to do requires it. Lets assume that I don't ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-09-2013 #1
- Join Date
- Feb 2013
Newbie Question about Virtual Device Driver
What I want to do is simulate hardware attached to my system. Please let me know if I'm going in the right direction.
I'm building a simple C++ application to asynchronously command and monitor hardware devices. This is really just for a learning experience, I believe that I have a solid design for this part of the application. Since my hardware being controlled is fictional, I need a way to simulate the hardware. So this project is divided into 2 parts, the manager and simulator.
In the Manager I'm using UDEV to identify the attached devices. So what I need the Simulator to do is to create the fake devices so that UDEV can find them and open a communication line to them. I envision the Simulated devices being simple Socket Servers that respond to the incoming requests from the managing software.
This seems like a problem that has been solved many times over. I think I need to implement a Virtual Driver in order to create the fake devices.
Am I headed in the right direction wiith this?
- 02-16-2013 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
Hardware simulation is difficult since you need to deal with I/O ports, DMA accesses, etc in a manner that will mirror a real device, if the hardware is going to be directly connected to the computer bus (PCI on most current systems). If you are going to simulate USB or similar hardware, then it is not so difficult since you can use a second computer on the other end of a USB cable to emulate the hardware in question, or even the same computer with the cable connected from one port to another on a secondary USB controller (most PC's have 2 or 3 USB controllers).
Building sample USB hardware devices these days is not too difficult given the availability of inexpensive Arduino boards, and low-cost Linux gear such as Raspberry Pi. My grandson uses Arduino gear for a lot of his autonomous aircraft work, testing, simulating, testing it on his PC or laptop.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!