Multiples USB connections

Multiples USB connections.

I want to create a project that permits connection from usb pen drive to multiple ports on a arduino system.

The goal of project is to copy files from one usb port with a USB mass storage to another one.

This project could be viewed like a duplicator for a usb pen drive content (as we can do in specific machines for dvd or cd ). The user will insert one source, so the source content will be copied to destination others usb connected pen drives.

A several days i have searched over internet but not found any specific project or sample to do this.

Thanks in advance.

Edson
PY2ELG

Start your search by looking for USB Host - all those devices require a USB host, and Arduino is another slave.
There are a couple of shields with MAX3241E which is a host capable chip.

Start your search by looking for USB Host

Then, consider the fact that you need two USB Hosts to talk to two USB devices at the same time, and consider the fact that the Arduino can't wear two USB Host shields at the same time.

Simplest way to me, would be to do it on your PC with a DOS command line, perhaps in a .bat file. (Do .bat files still exist?- showing my age....)

copy       e:\*.*     f:
copy       e:\*.*     g:
copy       e:\*.*     h:

Do .bat files still exist?

Of course. Only dinosaurs actually use them, though. (Dyed in the wool dinosaur, here 8))

CrossRoads:
Start your search by looking for USB Host - all those devices require a USB host, and Arduino is another slave.
There are a couple of shields with MAX3241E which is a host capable chip.

Hi.

I saw something about it (http://www.circuitsathome.com/arduino_usb_host_shield_projects), but did not see how to connect two USB hosts at the same time the available ports on the Arduino.

Perhaps a small example can help me. In fact, the intention of the project is to add a Hub and expand the number of ports available. It is a duplicator of data, then the more ports, the better the performance of work.

Tks

PaulS:

Start your search by looking for USB Host

Then, consider the fact that you need two USB Hosts to talk to two USB devices at the same time, and consider the fact that the Arduino can't wear two USB Host shields at the same time.

Urgh! With that you respond to a question I did earlier. Maybe I should consider using another technology, perhaps the Raspberry PI or similar.
Although there is that possibility, I would like to do it with the Arduino.
And if I used a USB Hub to expand the number of ports? Does this Host Shield could interpret and provide these ports to the Arduino?
It's just a hypothesis.

Tks

JimboZA:
Simplest way to me, would be to do it on your PC with a DOS command line, perhaps in a .bat file. (Do .bat files still exist?- showing my age....)

copy       e:\*.*     f:

copy       e:*.*     g:
copy       e:*.*     h:

Initially I set out for this small field. I developed a script that perfectly meets both the Windows and Linux environment, but I would like to develop an independent unit, because they want this technology to be used in environments where there is no need for a dedicated computer to it. As said earlier, the Raspberry PI is an option, although I still want to do it via Arduino.

Maybe I should consider using another technology, perhaps the Raspberry PI or similar.

Good choice, and only marginally more expensive than an Arduino. My son connects a USB Hub to his, so he can have a monitor, keyboard, and mouse all connected at the same time. He still has two ports left.

Hey, that's how many you need...

Although there is that possibility, I would like to do it with the Arduino.

Get over it?

And if I used a USB Hub to expand the number of ports? Does this Host Shield could interpret and provide these ports to the Arduino?

I don't know. I never made any progress using my USB Host shield.

egoncalez:
then the more ports, the better the performance of work.

The Arduino (except the Due) can input or output at a maximum rate of 8Mbps using SPI (that’s bits per second), not including overhead.

That means that you can read or write at somewhat less than 1 megabyte per second. So, duplicating a 2GB USB thumb drive will take, at a minimum, 68 minutes (34 minutes reading, 34 minutes writing).

If you want to copy one mass storage device to 10 destinations, it would take about 6 hours (because USB is not a broadcast protocol, you must send each block of data 10 times).

Also, I don’t believe anyone has written an Arduino library to talk to a USB mass storage device, so you may need to code that from scratch (the SD card libraries might be a good place to start).

Easier and faster to use a Raspberry Pi. Hardware is an order of magnitude faster, software is already written.

So, duplicating a 2GB USB thumb drive will take, at a minimum, 68 minutes (34 minutes reading, 34 minutes writing).

That's assuming that it is full. A rather unlikely scenario, in my experience, but the point is still relevant.

Easier and faster to use a Raspberry Pi. Hardware is an order of magnitude faster, software is already written.

Exactly. And, the Pi is only about $10 more than the Arduino.

PaulS:

So, duplicating a 2GB USB thumb drive will take, at a minimum, 68 minutes (34 minutes reading, 34 minutes writing).

That's assuming that it is full. A rather unlikely scenario, in my experience, but the point is still relevant.

And assuming you can decode the filesystem so you know which blocks do and don't contain data. I don't think anyone has implemented NTFS on Arduino yet...