On Mon, 25 Feb 2008, Chetan Karia wrote:

> Alright, here is the entire situation. The sierra device has pair of
> endpoints (bulk in and bulk out)  that sends the multiplexed protocols
> data packets ( two protocols data packets encapsulated in one). Lets
> call that endpoint pair as EP1. The one of the multiplexed protocol is
> DM and other is command and status. EP1 is attached to ttyUSB1. Our
> application reads from ttyUSB1 and ignores DM packets and considers
> only command and status packets. However to get DM stream working
> another application has to read/write to ttyUSB1 concurrently which is
> as tricky. Thus, I am trying to setup another virtual serial port
> called ttyUSB3 that can read/write to EP1 concurrently so that we get
> two duplicate streams. One of the stream (ttyUSB1) can be used by our
> existing application and another stream (ttyUSB3) can be used to set
> up DM logging.Internally however they will talk to same endpoint pair
> EP1. Is it doable?

You should attack this problem in userspace, not in the kernel.

Write a program that will communicate with ttyUSB1 and demultiplex the
two protocol streams.  Then have your applications each read one of the
output streams from this new program.

Or to make it even simpler: Write a program that will make two copies 
of the data stream and feed one copy to each of your applications.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to