views:

96

answers:

7

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.

A: 

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

unwind
It is, but that is only for Windows. I'm looking for Windows support.
Moshe
+1  A: 

can't you use some sort of Remote Desktop?

In81Vad0
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
And, this answer should be commeent. I've upvoted to get you closer to enough rep to post comments.
Moshe
+1  A: 

Google is your friend.

Andreas Magnusson
A: 

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.

Chinmay Kanchi
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
Look at the last link on that page. It's Windows-only and packaged as a driver.
Chinmay Kanchi
I will. Thanks.
Moshe
A: 

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.

Alex Farber
I'm not looking for a product endorsement here. Sorry. I don't want to pay for it either. ;-) Thanks for trying though. I do appreciate it. Perhaps one day I will actually spend some money on that kind of thing.
Moshe
A: 

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

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

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.

Hugh Brackett