Hi All,
I am writing a Custom WDM USB-UART driver(Single VIRTUAL COM PORT)
for FTDI's FT232R chipset.
In my InitializationModule() and startdeviceroutine() I could able to
Get the device descriptor
and configure the Device perfectly. I am getting the Interface and
pipe information correctly.
My problem is after start device, If I try to Read data from the
device by calling the following
//Satrt the request
ulFlags = USBD_TRANSFER_DIRECTION_IN | USBD_SHORT_TRANSFER_OK;
UsbBuildInterruptOrBulkTransferRequest(pCtx->m_pUrb,
sizeof(struct _URB_BULK_OR_INTERRUPT_TRANSFER),
hPipe,
pbBuffer, NULL, cbBuffer, ulFlags, NULL);
// Setup completion proc
IoSetCompletionRoutine(pCtx->m_pIrp,(PIO_COMPLETION_ROUTINE)
RequestCompletedThunk,pCtx,TRUE,TRUE,TRUE);
// Call next device with this IRP
status = IoCallDriver(pCtx->DeviceExtension-
>TopOfStackDeviceObject, pCtx->m_pIrp);
in My Completion routine I am getting 2 bytes of junk data, Which is
unexpected(There is no data kept in port).
When I open the Virtual Com Port and write some data bytes, still I am
getting these 2 junk bytes.
I tried to resolve this issue by resetting the pipe. Still problem
exists.
Can anybody help me to get rid of that unnecessary junk bytes.
Your valuable suggestions are always appriciated.
Thanks in advance.
~Vijji