USB-UART Driver Write problem

Discussion in 'Windows Vista Drivers' started by kalyani.vijaykumar, Sep 11, 2007.

  1. hi,

    I am developing a USB-UART driver, I had implemented the PnP, Power
    management, IOCTLs and Write operation.

    The problem in my driver is when I am trying to write characters
    through hyperterminal, I am able to write
    only single character successfully. When I try to write the second
    character,my driver is getting
    IOCTL_SERIAL_GET_COMMSTATUS continuously.

    The debug log file is as follows

    SerialEvtIoWrite routine starts Request = 0x7e108ac8 Length = 1
    SerialCompleteIfError routine starts
    SerialCompleteIfError routine ends
    SerialStartOrQueue called
    IsQueueEmpty called
    IsQueueEmpty ends
    SerialStartWrite routine starts
    SerialSetCancelRoutine routine starts
    SerialSetCancelRoutine routine ends
    SerialSetTimer starts
    SerialSetTimer ends
    SerialGiveWriteToIsr routine starts
    TransmitComplete routine starts
    StartWriteUrb routine starts
    SerialInsertQueueDpc called
    SerialInsertQueueDpc ends
    TransmitComplete routine ends
    SerialGiveWriteToIsr routine ends
    SerialStartWrite routine ends
    SerialEvtIoWrite routine ends status = 0x0
    OnWriteInterrupt routine starts
    TransmitComplete routine starts
    TransmitComplete routine ends
    OnWriteInterrupt routine ends
    SerialCompleteWrite routine starts
    SerialTryToCompleteCurrent starts
    SerialRundownIrpRefs starts
    SerialClearCancelRoutine routine starts
    SerialClearCancelRoutine routine ends
    SerialCancelTimer starts
    SerialCancelTimer ends
    SerialRundownIrpRefs ends
    SerialGetNextRequest Starts
    SerialCompleteRequest called
    Complete Request: 7E108AC8 0 0x1
    SerialCompleteRequest ends
    SerialGetNextRequest Ends
    SerialProcessEmptyTransmit starts
    SerialProcessEmptyTransmit ends
    <SerialGetNextWrite Ends
    SerialTryToCompleteCurrent ends
    SerialCompleteWrite routine ends

    /***my first character write ends here, the following are the
    statements for second character write ***///


    SerialEvtIoDeviceControl IOCTL_SERIAL_GET_COMMSTATUS for: 7E108AC8
    SerialGetCommStatus called
    SerialCompleteRequest called
    Complete Request: 7E108AC8 0 0x14
    SerialCompleteRequest ends
    SerialGetCommStatus ends
    SerialEvtIoDeviceControl IOCTL_SERIAL_GET_COMMSTATUS for: 7E108AC8
    SerialGetCommStatus called
    SerialCompleteRequest called
    Complete Request: 7E108AC8 0 0x14
    SerialCompleteRequest ends
    SerialGetCommStatus ends
    SerialEvtIoDeviceControl IOCTL_SERIAL_GET_COMMSTATUS for: 7E108AC8
    SerialGetCommStatus called
    SerialCompleteRequest called
    Complete Request: 7E108AC8 0 0x14
    SerialCompleteRequest ends
    SerialGetCommStatus ends
    SerialEvtIoDeviceControl IOCTL_SERIAL_GET_COMMSTATUS for: 7E108AC8
    SerialGetCommStatus called
    SerialCompleteRequest called
    Complete Request: 7E108AC8 0 0x14
    SerialCompleteRequest ends
    SerialGetCommStatus ends
    SerialEvtIoDeviceControl IOCTL_SERIAL_GET_COMMSTATUS for: 7E108AC8
    SerialGetCommStatus called
    SerialCompleteRequest called
    Complete Request: 7E108AC8 0 0x14
    SerialCompleteRequest ends
    SerialGetCommStatus ends



    Can anyone help me out in solving this problem?

    I am using the KMDF Serial sample as my reference.

    When will the IOCTL_SERIAL_GET_COMMSTATUS be called?

    Thanks in advance
     
    kalyani.vijaykumar, Sep 11, 2007
    #1
    1. Advertisements

  2. kalyani.vijaykumar

    Tim Roberts Guest

    And what are you returning for IOCTL_SERIAL_GET_COMMSTATUS?
     
    Tim Roberts, Sep 13, 2007
    #2
    1. Advertisements

  3. Hi Tim,

    I am calling the SerialGetCommStatus function from
    IOCTL_SERIAL_GET_COMMSTATUS,
    the SerialGetCommStatus function returns STATUS_SUCCESS.

    Thank you
     
    kalyani.vijaykumar, Sep 13, 2007
    #3
  4. kalyani.vijaykumar

    Tim Roberts Guest

    What I'm suggesting is that your IOCTL_SERIAL_GET_COMMSTATUS ioctl is
    returning something that makes Hyperterminal think that things are not
    ready. You need to drill in there and see what SerialGetCommStatus is
    doing.
     
    Tim Roberts, Sep 15, 2007
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.