Re: USB data Transfer question
- From: Charles Wang <CharlesWang@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Mar 2006 07:10:27 -0800
Thanks for the reply!
Here is the code :
//===xxx_Read===
dwErr = IssueBulkTransfer (pUsbSIS->UsbFuncs,
pUsbSIS->BulkIn.hPipe, DefaultTransferComplete, //Callback
pUsbSIS->BulkIn.hEvent, //Context
(USB_IN_TRANSFER|USB_SHORT_TRANSFER_OK), //Flags pBuffer, 0, //
*pBuffer==0 here
BufferLength, &dwBytesTransferred, dwTimeout,
&dwUsbErr);
//===Write===
dwErr = IssueBulkTransfer( pUsbSIS->UsbFuncs,
pUsbSIS->BulkOut.hPipe,
DefaultTransferComplete, // Callback
pUsbSIS->BulkOut.hEvent, // Context
(USB_OUT_TRANSFER /*
pBuffer, 0, //*pBuffer equal to the
data I trying to transfered
dwTransferSize,
&dwBytesTransferred,
dwTimeout,
&dwUsbErr );
"Voidcoder" wrote:
Post your IssueBulkTransfer call here. I'm not sure, but may.
be something is wrong there.
"Charles Wang" <Charles Wang@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4CAD4799-7723-48B1-BD16-A8228EDF2A26@xxxxxxxxxxxxxxxx
The USB host and Client are CE device.
When I read the data from Client, in my app I can see the data "hello" in
the first several times and then start dumpping like "heeeeeeee...".
when I tried to printf out the value of pBuffer in IssueBulkTransfer(..,
pBuffer,),
the value is always 0 even though I can see the data correctly in my app.
As I said in OP, I can write data from host to client, I can see the data in
my app running in client, and both USB analizer and the pBuffer value is the
right value I am trying to transfer.
Any ideas?
"Charles Wang" wrote:
I guess the USB2Serial driver you mentioned is the USB Function Client driver.
The driver I worte is for host. I want to Read/Write into USB hostport as a
comport.
"voidcoder" wrote:
May be I'm missing something, but CE already includes
USB2Serial driver... what are you doing exactly? Give us
some details. For example you may want to tell
is your device USB Host or USB Device, and what is
on the oposite side? Desktop? Different device?
"Charles Wang" <CharlesWang@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:50614146-40A1-46CC-9B25-F99D79DBDA39@xxxxxxxxxxxxxxxx
I wrote a USB to Serial driver on CE ARM device.
and the write function which write data from USB host to client works
fine,
but when tried to read data from client, just occasionally get the serial
data, most likely, host only read partial data.
USB analizer tells that Writing from USB host to Client works fine, but
always error when I tried to read data from Client, no matter I got data
complete or not.
eg. if I write "Hello" in Client, I can read "Hello" in the beginning some
times, then I'll get "HHH......" or "lllll....." or "oooo..." randomly.
The
USB analizer always tells "no data".
Any ideas?
- Follow-Ups:
- Re: USB data Transfer question
- From: Voidcoder
- Re: USB data Transfer question
- References:
- Re: USB data Transfer question
- From: voidcoder
- Re: USB data Transfer question
- From: Voidcoder
- Re: USB data Transfer question
- Prev by Date: Creating Keyboard Layout
- Next by Date: Re: Alternatives to TFAT?
- Previous by thread: Re: USB data Transfer question
- Next by thread: Re: USB data Transfer question
- Index(es):
Relevant Pages
|
Loading