0
votes

I have a piece of hardware that sends USB data over ethernet (only the data stored in the package will be send). On a remote PC the data is recieved via ethernet. How can I send this data to the USB driver so it translates the data into commands applications can use?

4
Is it safe to assume that you have a USB->ethernet adapter? Is the data sent in IP packets?Andrew Sledge
The hardware that sends the USB data sends it in IP packets. With Winsock it is possible to read the data. The adapter is programmed with use of a microcontroller (atmel AVR 8bit RISC) and the EN28J60 ic. –Wilfred Knigge
You need to specify in the question or using tags, what platform you want this to happen on.unwind
This has to happen on a windows platform. (probably a server edition)Wilfred Knigge
Is this something you have to (or really want to) do yourself in software? A commercial hardware solution would be so much easier.Jeanne Pindar

4 Answers

1
votes

You're better off getting hardware that does the reciprocal, sends the IP-based USB information to the USB subsystem, rather than try and hack the software driver itself. I can't imagine your hardware vendor doesn't have a device that does this.

0
votes

You need a server listening on whatever port/socket that you are trying to connect to. Twisted Matrix makes decent Python libraries for network communications.

0
votes

I think this is going to be troublesome.

USB is generally set up to associate a driver with a connected device, based on the device's various ID numbers, as discovered during bus traversal.

Your data comes in over Ethernet, so the platform's USB driver stack won't know anything about the device in question. This means you somehow need to directly talk to the proper driver, and also get it prepared to handle events from a (from its point of view) non-connected device.

I can think of several reasons why even a well-designed USB stack won't handle this happily.

On Linux, you might be able to "cheat" by interpreting the data yourself and sending it on, using the same API:s the actual driver would have used. That won't work for any USB device of course, it requires you know what the device is.

0
votes

It's doable on windows as well, but you need a lot of kernel/usb knowledge to make it work i don't think i will be wrong by estimating this task as few man years (you can reduce this estimation dramatically if you have a limited selection of devices/types of device to support.
You will need to develop a bus driver that will simulate the host controller driver to the native usb host, unfortunately this interface is not public and we did not managed to get MS cooperation on that.
There is additional option to work on hub level, instead on controller level, this interface is available, but i did not managed to find my notes on that.
You can download the evaluation version and investigate the driver stack it might give you a clue where to start.