4

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.

3
  • 2
    Boy did you choose a tough problem! Sep 21, 2010 at 12:20
  • @Chinmay Kanchi - Necessity is the mother of invention.` I came across a situation where this would have been all too helpful.
    – Moshe
    Sep 21, 2010 at 12:34
  • Moshe, did you ever get this working? Is there a URL for the project? Nov 1, 2013 at 14:50

7 Answers 7

3

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.

3

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++.

3
  • I'm game for learning C++. I've seen some of that code too. (Not that seeing is coding, of course.)
    – Moshe
    Sep 21, 2010 at 13:26
  • Good luck. What you are trying to do is an interesting project but challenging.
    – JeremyP
    Sep 21, 2010 at 13:28
  • Thanks. If anyone has a Mac (I do, but not here, hence this project.) and wants to help, let me know.
    – Moshe
    Sep 21, 2010 at 13:51
1

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.

1
  • Can you provide a link or perhaps some example of its usage?
    – Fiver
    Nov 26, 2013 at 20:00
0

Sounds quite like this product, a bit unsure if theirs works over wide-area networks though.

1
  • It is, but that is only for Windows. I'm looking for Windows support.
    – Moshe
    Sep 21, 2010 at 12:30
0

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.

2
  • Your EDIT link is close, but not exactly what I want. I want the challenge and besides, your link only works on Linux. I want computer to computer sharing of USB.
    – Moshe
    Sep 21, 2010 at 12:31
  • Look at the last link on that page. It's Windows-only and packaged as a driver. Sep 21, 2010 at 12:33
0

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.

0
0

Can't you use some sort of Remote Desktop?

2
  • No, I've tried. The best we have is Windows to windows USB port sharing for a hefty price tag. I want to do better. This can unlock iOS development for Windows users. (!> :-)
    – Moshe
    Sep 21, 2010 at 12:29
  • And, this answer should be commeent. I've upvoted to get you closer to enough rep to post comments.
    – Moshe
    Sep 21, 2010 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.