On Feb 6, 3:27*pm, Sushma <sushma.ye...@gmail.com> wrote:
> Hi All,
>
> I had developed a USB-Serial driver with WDF architecture. I have a
> query regarding congiguring of Serial port using DOS commands. I used
> the command "mode COM3:19200,n,8,1" to set baud rate to 19200 from
> command prompt. The output is:
>
> Status for device COM3:
> -----------------------
> * * Baud: * * * * * *1200
> * * Parity: * * * * *None
> * * Data Bits: * * * 7
> * * Stop Bits: * * * 1
> * * Timeout: * * * * OFF
> * * XON/XOFF: * * * *OFF
> * * CTS handshaking: OFF
> * * DSR handshaking: OFF
> * * DSR sensitivity: OFF
> * * DTR circuit: * * ON
> * * RTS circuit: * * ON
>
> The baud rate is always set to 1200 even though i use any other baud
> rate to set. I had debugged the driver and could see that 19200 is
> being received and able to properly handle it. With the native COM
> port i could see the configuration was done properly with all baud
> rates.
>
> With all other terminal applications like hyperterminal or any other
> application i was able to configure properly in my driver.
>
> Is there anything additional parameters i need to set in driver when
> using DOS commands.
>
> Any help is much appreciated.
>
> Thanks You.
>
> Regards,
> Sushma.
I did the following sequence of steps
1. Opened a terminal application like hyperterminal with baud rate say
19200,no parity,8,1.
2. Closed the hyperterminal.
3. I opened a Win32 application which opens COM port using CreatFile()
and then used GetCommState() to retrieve the DCB structure. I observed
that baud rate is set to 1200 in DCB. Default settings are displayed.
I performed same steps for native COM port (COM1). After step #3 the
baud rate was shown as 19200.
I think i'm missing some settings while closing the port. or flushing
out serial port settings when EvtFileClose() is called. or missing
something???
Can any one throw some light on this scenario.
Regards,
Sushma
|