Serial port

Hi again everybody

What are minimum setting for a serial driver to be able to read data from
port? I am trying to read a COM2 ( \Device\Serial1 ). I confiqure baudrate
to 9600 (after writing read result is 2540H ), line control to one stop bit
(STOP_BIT_1) , eight data bits (8) and no parity (NO_PARITY) . Then I try to
read port with sending IRP_MJ_READ. After read IoCallDriver never returns.
If I read port via HyperTerminal settings must be “9600 8-N-1” and Flow
control NONE.

What I am missing…

Jussi Rytilahti

Hi Jussi:

What are minimum setting for a serial driver to be able to read data from
port?

One way is to use IOCTL_SERIAL_GET_PROPERTIES, then use the SettableBaud
field to get the baud rates supported.

Regards,
William Michael Jones “Mike”

“Jussi Rytilahti” wrote in message
news:xxxxx@ntdev…
> Hi again everybody
>
> What are minimum setting for a serial driver to be able to read data from
> port? I am trying to read a COM2 ( \Device\Serial1 ). I confiqure
> baudrate to 9600 (after writing read result is 2540H ), line control to
> one stop bit (STOP_BIT_1) , eight data bits (8) and no parity (NO_PARITY)
> . Then I try to read port with sending IRP_MJ_READ. After read
> IoCallDriver never returns. If I read port via HyperTerminal settings must
> be “9600 8-N-1” and Flow control NONE.
>
> What I am missing…
>
> Jussi Rytilahti
>
>
>

Jussi Rytilahti wrote:

What are minimum setting for a serial driver to be able to read data from
port? I am trying to read a COM2 ( \Device\Serial1 ). I confiqure baudrate
to 9600 (after writing read result is 2540H ), line control to one stop bit
(STOP_BIT_1) , eight data bits (8) and no parity (NO_PARITY) . Then I try to
read port with sending IRP_MJ_READ. After read IoCallDriver never returns.
If I read port via HyperTerminal settings must be “9600 8-N-1” and Flow
control NONE.

What I am missing…

Are you sure there is somebody at the other end of the port transmitting
data at the same baud rate?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi

There is a microcontroller in the other end of a serial line. If I check
data with a HyperTerminal I will receive right data with a settings “9600
8-N-1” and Flow control NONE. Microcontroller sends data continually.

Jussi

“Tim Roberts” kirjoitti viestissä:xxxxx@ntdev…
> Jussi Rytilahti wrote:
>
>>What are minimum setting for a serial driver to be able to read data from
>>port? I am trying to read a COM2 ( \Device\Serial1 ). I confiqure
>>baudrate
>>to 9600 (after writing read result is 2540H ), line control to one stop
>>bit
>>(STOP_BIT_1) , eight data bits (8) and no parity (NO_PARITY) . Then I try
>>to
>>read port with sending IRP_MJ_READ. After read IoCallDriver never returns.
>>If I read port via HyperTerminal settings must be “9600 8-N-1” and Flow
>>control NONE.
>>
>>What I am missing…
>>
>
> Are you sure there is somebody at the other end of the port transmitting
> data at the same baud rate?
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
>

Hi Jussi,

(1) Are trying to call the serial driver from another driver? Have you
tried to write a communications application yourself to talk to the
hardware. I would search the Web from some sample code to read the Serial
Port from an application. That is one thing you may find useful. There are
also some books on Serial Communications with Windows that have sample
applications. I would use the Web first to find the sample Windows
applications.

(2) If you are trying to read / write the Serial Port from another driver.
I would set breakpoints in the Serial Driver as well. I would keep it
simple at first and do Synchronous Reads / Writes at first.

(3) There is also the Portmon tool to compare the Serial Api’s between
Hyperterm and your application. This can be gotten from Sysinternals.com.

Regards,
William Michael Jones “Mike”

“Jussi Rytilahti” wrote in message
news:xxxxx@ntdev…
> Hi
>
> There is a microcontroller in the other end of a serial line. If I check
> data with a HyperTerminal I will receive right data with a settings “9600
> 8-N-1” and Flow control NONE. Microcontroller sends data continually.
>
> Jussi
>
> “Tim Roberts” kirjoitti viestissä:xxxxx@ntdev…
>> Jussi Rytilahti wrote:
>>
>>>What are minimum setting for a serial driver to be able to read data from
>>>port? I am trying to read a COM2 ( \Device\Serial1 ). I confiqure
>>>baudrate
>>>to 9600 (after writing read result is 2540H ), line control to one stop
>>>bit
>>>(STOP_BIT_1) , eight data bits (8) and no parity (NO_PARITY) . Then I try
>>>to
>>>read port with sending IRP_MJ_READ. After read IoCallDriver never
>>>returns.
>>>If I read port via HyperTerminal settings must be “9600 8-N-1” and Flow
>>>control NONE.
>>>
>>>What I am missing…
>>>
>>
>> Are you sure there is somebody at the other end of the port transmitting
>> data at the same baud rate?
>>
>> –
>> Tim Roberts, xxxxx@probo.com
>> Providenza & Boekelheide, Inc.
>>
>>
>>
>
>
>