USB Host to Ethernet

Hi all

A little hep if possible, struggling to find any examples.

I have an Uno with the USB Host Shield and the Ethernet Shield attached. I have the USB Host Shield Library V2.0.

What I need to happen is "snoop" a USB stream and dump it onto a UDP stream (or TCP). Only needs to be ethernet out, not ethernet in.

I have a USB device connected to my PC which is talking to a bit of software in Windoze. I want to plug the device into the Arduino USB Host port, then the Uno into the PC and pass the stream right through so the device and software works as if there is nothing there. The data that is transferred between the device and PC (& vice versa) I then want to dump onto the ethernet.

As I say I don't really care whether this is a UDP or TCP stream, the packets will be time-stamped anyway so my second device (on eternet) will be able to assemble the packets if they come in out of order. The network has a DHCP server bit I will assign the Uno a static IP and the receiving machine a static IP too to make things simpler.

Any help greatly appreciated.

Cheers

Simon

How much data are you talking about? Can you read data from the USB device? Can you write to the device?

The Arduino is far too slow to "pass the stream right through so the device and software works as if there is nothing there." And, sending the data to the internet is only going to make things worse.

Hi, thanks for the reply.

So the USB stream is actually a UART to USB at 57600baud. We're not talking Mbps here, really quite slow, so I can't see a reason why the Arduino couldn't handle it without getting buffer overruns. Gut feeling but willing to go through the motions even if it can't handle it and ditch some packets.

I should point out it isn't going to the internet, just a local LAN.

Attached diagram if that helps?

Didn't answer one of your questions, apologies.

At the moment I have no idea how to write the data coming from PC1 to the USB host, nor how to actually setup the USB host. All the examples are for Keyboards, Wii motes etc etc and not a generic USB-UART device.

Still stuck on this if anyone can help, pretty please

Hi,
Sorry but I don't come with an answer but a question...
I'm trying to get USB+LAN on an Arduino (USB scanner+result to a DB).
What shields/modules did you use?

Thanks a lot!