I am creating my own midi-instrument and would like to know how to create a PC driver program for this instrument. Does anyone have any pointers or resources I could look at to help me complete this task?
All i have found so far is
1) https://msdn.microsoft.com/en-us/library/windows/hardware/mt187811(v=vs.85).aspx --> USB drivers
Just make your device conform to the USB MIDI device class specification, and you do not need to write any driver for the PC.
Check out the Driver samples for Windows 10. The Sample KMDF Function Driver for OSR USB-FX2 might be closer to what you need, if you want to write a USB device driver.
Related
I have an "off the shelf" commercial software using an ANT USB dongle to communicate with a cycling trainer.
My trainer is not compatible with the software because the protocol is slightly different (not a lot).
My goal is to write a protocol translator. The only thing I can think of is to write a UMDF virtual device driver (like Magic ISO Virtual DVD) looking like an ANT USB Device in the device manager (same PID\VID) while connecting itself to the physical ANT device. The virtual device driver will perform the protocol translation.
I looked at several examples from Microsoft here https://github.com/Microsoft/Windows-driver-samples but I was unable to find anything relevant. I thought this example would be a good start https://github.com/Microsoft/Windows-driver-samples-master/Sensors/CustomSensors but it is impossible to load the driver using the given procedure from the inf file.
BTW I am familiar with the content of INF files and the basics of KMDF & UMDF device drivers programming. My problem is to write something that will load in the device manager and present itself as a real USB device even if it is not enumerated by the USB bus subsystem.
Can anybody with driver development experience point me to some relevant code sample or documentation?
Best regards !
I am currently developing a UMDF CCID (smartcard reader) driver. This project helped me at the beginning because it compiles out of the box and creates virtual device nodes (smartcard readers) visible in the device manager.
I'm trying to learn Unix kernel development and I'm asked to "play around with the usb driver code and learn things".
where should I start?
Thanks in advance!
First go through basics of USB
Try to understand USB document from free electronic website
After that go to Linux kernel document
Continuously try to go through Linux kernel codes in USB module and corelate with document contains.
If any board is available then try to put debugs in kernel code, dump to board and observe the code flow for different USB devices.
I think you should start with learning USB protocol first and then analysing usb linux drivers. Read the usb specifications from www.usb.org.
I want to learn Linux device driver development.
Positives:
I have developed small drivers on WinCE and worked on SPI, i2c interface from application i.e. opening, reading and writing driver.
I'm good in operating system and data structures.
Negatives:
I have never worked on Linux.
My background is not embedded system.
How should I proceed to learn Linux device driver development?
EDIT: any book reference would be appreciable thanks
Linux Device Drivers, Third Edition : http://lwn.net/Kernel/LDD3/ should help you along.
THE FOLLOWING LINKS WILL HELP TO START LEARNING DEVICE DRIVERS
http://www.freesoftwaremagazine.com/articles/drivers_linux
http://lwn.net/Articles/driver-porting/
I have developed a USB device that communicates with linux over a simple but proprietary interface and some custom Linux drivers. My goal is to port this to Windows without writing windows drivers. What I would like to do is find an open source or inbuilt class driver for windows that would look like a COM port in Windows. Then I would tailor the embedded software to match what ever protocol and descriptors the virtual COM port expects to see.
The idea would be that I could plug my device in to a Windows machine and a relatively high speed COM port would appear with out me having to develop Windows drivers for it.
I have been looking at the USB CDC (Communications Device Class) documentation and it looks promising, but I don't know which sub interface would be best to use so that it would show up as a COM port.
Has anyone here done any work like this before or could provide some insight?
Specifically:
Are there virtual COM drivers "built in" to windows or would I need a 3rd party driver.
Which CDC sub class should I use for simple RS232 emulation (No need for modem AT commands, etc)
Is there a better option to do what I am trying to do.
Thanks
There is a USB-to-serial driver built in to Windows that will do what you want. It is called usbser.sys:
http://support.microsoft.com/kb/837637
You will have to write an INF file and distribute that to your users, but that will not be too hard because it is only a few kilobytes of text and you can find examples online.
I'm not aware of any great documentation for this driver by Microsoft, so my advice would be to find some other device that uses it, such as Pololu Wixel, and copy what they did.
Here are the device descriptors we used and the special control tranfers we had to implement:
https://github.com/pololu/wixel-sdk/blob/master/libraries/src/usb_cdc_acm/usb_cdc_acm.c
You can see our INF file, wixel_serial.inf, by downloading the software and looking in the drivers folder:
http://www.pololu.com/docs/0J46/3.a
(There are other files in there that are not necessary for you.)
You can also look at the Arduino Uno because they use the same driver.
Whatever you do, please don't use our USB Vendor ID in your product! You need to get your own.
Update: In Windows 10, you don't need an INF file anymore because of the new usbser.inf driver that comes with Windows.
If you are using a UART you can easily interface it to a FTDI USB chip like http://www.ftdichip.com/Products/ICs/FT232R.htm or a Prolific like http://www.prolific.com.tw/eng/products.asp?id=59
For development, prototype and testing I have half dozen of these laying around http://www.pololu.com/catalog/product/391
I connect it directly to the UART pins on AVR and 8051 micros.
I'd like to modify a USB driver to send and receive USB data over a network.
Take for example, an iMac and a PC. I have an iPod plugged in to my PC (in NY). I want my iMac (in LA) to recognize the iPod as plugged in to a local USB port and be able to communicate with the iPod.
Forget my qualifications, or lack thereof (I have background in web, iOS apps, I've toyed with Java and C).
Where can I get source code for a USB driver for Windows that I can modify? Mac OS?
Any tips or pointers towards accomplishing my goal would be appreciated as well.
It looks like folks are coming up with something close to what you want. If you do decide to roll your own, the USB driver source you asked for is libusb.
On the Mac OS X end, drivers are built up in a stack. What you want to do should be relatively simple (nothing is really simple in kernel land). You need to create a driver that can communicate over ethernet with the PC and looks like a USB device to the driver matching software. Then everything else will happen automatically.
The source code is available for Apple's USB stack. You should also read about the IOKit API and IOKit device driver guidelines and IOKit fundamentals.
Oh yes and you say you have toyed with Java and C. To write device drivers on OS X, you'll need to learn some C++.
I suggest you to go see USBIP project. This is available on Linux and Windows, but not clear for MAC. If you can get a VHCI-Controller driver installed for MAC, we can kick start USBIP for MAC.
Sounds quite like this product, a bit unsure if theirs works over wide-area networks though.
I have a general idea of how I'd go about it, but not any specifics. Basically, I'd use the platform's driver development kit to write a USB device emulator on the client machine. I'd then add a virtual device to that system called "Networked USB Host", or something similar that maintains an open port to listen for communication from the server and passes it on to your virtual USB device. IIRC, the Windows DDK comes with a USB simulation framework that might be able to help you with this.
On the server, you'd have to hook into the USB subsystem to send raw USB packets to the client machine. libpcap and wireshark have USB capturing facilities for that, but I'm not sure if this works with winpcap and the Windows version of wireshark as well.
EDIT: Look at this for cross-platform USB capture alternatives.
You can buy OSR USB learning kit: https://www.osronline.com/custom.cfm?name=index_fullframeset.cfm&pageURL=https://www.osronline.com/store/index.cfm
This is actually small USB device with known interface. Windows Driver Kit (WDK) contains sample KMDF driver for this device: http://www.microsoft.com/whdc/driver/wdk/
This is good starting point to learn Windows Drivers development, and USB drivers development specifically. However, it is still far away from your problem solution.
Can't you use some sort of Remote Desktop?