tags:

views:

69

answers:

2

Hello,

I have some questions regarding communication over USB cable in Linux, in a Host-Target Device environment.(USB2.0) Please help as we are stuck for the below imiplementation. We have a host PC connected to a target device (Linux OS) through USB cable. On the target device we need to spawn 3 or 4 child processes. [Using fork() or some equivalent system call] All the child process should communicate to the host PC independently though there own source file descriptor and sink file descriptors. As per our experimentation, one process communicates to the PC at a time then the control is given to another process. But our requirement is for simultaneous communication. We are not sure whether USB driver(2.0/3.0) supports this methodology.

Any pointers regarding this will be helpful.

Thank you.

-AD

+1  A: 

As per our experimentation, one process communicates to the PC at a time then the control is given to another process.

This is how computers work. Only one thread at a time has control of a particular CPU - when it blocks for i/o or exhausts its quantum, control is given to another thread.

What do you need simultaneity for that you can't manage with sending data one after the other?

Anon.
A: 

USB is a serial bus protocol with a SINGLE DATA BUS, and this means, what you are looking for is not possible.

But we can have 4 different USB COMMUNICATION PIPES which can provide different paths, but NOT simultaneously.

Alphaneo