OT: detecting a device connected to com1 or not on enumertion from application program...

Hi all,

In the process of serial communication in win32 MFC programming, after enumerating the serial port, I would like to extend a feature ,
detecting any other serial device is connected or the other device is switched off or not on enumeration of a particular serial port…

how can i do this…can anybody suggest me some best way to detecting any device attached to com port on enumerating the port…
I need to know this very urgently…pls give me some suggestions…

TIA,

Shiva P

THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE
and may contain confidential and privileged information. If the reader of this message
is not the intended recipient, you are notified that any dissemination, distribution
or copy of this communication is strictly Prohibited.If you have received this message
by error, please notify the sender immediately, return the original mail to the sender
and delete the message from your system.

Take a look at serenum.sys source code in DDK. Based on your requirement, you can modify the source to write your own enumerator.

Hope this helps!

regards,
Vijay
----- Original Message -----
From: Shiva Prasad T. S.
To: NT Developers Interest List
Sent: Wednesday, July 09, 2003 12:10 PM
Subject: [ntdev] OT: detecting a device connected to com1 or not on enumertion from application program…

Hi all,

In the process of serial communication in win32 MFC programming, after enumerating the serial port, I would like to extend a feature ,
detecting any other serial device is connected or the other device is switched off or not on enumeration of a particular serial port…

how can i do this…can anybody suggest me some best way to detecting any device attached to com port on enumerating the port…
I need to know this very urgently…pls give me some suggestions…

TIA,

Shiva P

You are currently subscribed to ntdev as: xxxxx@moschip.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE
and may contain confidential and privileged information. If the reader of this message
is not the intended recipient, you are notified that any dissemination, distribution
or copy of this communication is strictly Prohibited.If you have received this message
by error, please notify the sender immediately, return the original mail to the sender
and delete the message from your system.

thanx vijay, I am aware of it…

But the device is not a pnp serial device…assume just i had connected the other side to a system which runs a serial comm. program…, atleast, i need to detect that the null modem cable is connected to some active serial comm source…

any more ideas…??

thanx,

Shiva P
----- Original Message -----
From: Vijay Anand
To: NT Developers Interest List
Sent: Wednesday, July 09, 2003 12:55 PM
Subject: [ntdev] Re: OT: detecting a device connected to com1 or not on enumertion from application program…

Take a look at serenum.sys source code in DDK. Based on your requirement, you can modify the source to write your own enumerator.

Hope this helps!

regards,
Vijay
----- Original Message -----
From: Shiva Prasad T. S.
To: NT Developers Interest List
Sent: Wednesday, July 09, 2003 12:10 PM
Subject: [ntdev] OT: detecting a device connected to com1 or not on enumertion from application program…

Hi all,

In the process of serial communication in win32 MFC programming, after enumerating the serial port, I would like to extend a feature ,
detecting any other serial device is connected or the other device is switched off or not on enumeration of a particular serial port…

how can i do this…can anybody suggest me some best way to detecting any device attached to com port on enumerating the port…
I need to know this very urgently…pls give me some suggestions…

TIA,

Shiva P

You are currently subscribed to ntdev as: xxxxx@moschip.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE
and may contain confidential and privileged information. If the reader of this message
is not the intended recipient, you are notified that any dissemination, distribution
or copy of this communication is strictly Prohibited.If you have received this message
by error, please notify the sender immediately, return the original mail to the sender
and delete the message from your system.

You are currently subscribed to ntdev as: xxxxx@rassit.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE
and may contain confidential and privileged information. If the reader of this message
is not the intended recipient, you are notified that any dissemination, distribution
or copy of this communication is strictly Prohibited.If you have received this message
by error, please notify the sender immediately, return the original mail to the sender
and delete the message from your system.

THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE
and may contain confidential and privileged information. If the reader of this message
is not the intended recipient, you are notified that any dissemination, distribution
or copy of this communication is strictly Prohibited.If you have received this message
by error, please notify the sender immediately, return the original mail to the sender
and delete the message from your system.

Thanks Steive-O,

But if i have just a null modem cable with Tx and Rx and ground connected
to a serial comm source at other end, is there any way in this case…

Is it possible to determine using any writefile and reading back operation…

Thanks…

Shiva P

----- Original Message -----
From: “Stevie-O”
To: “NT Developers Interest List”
Sent: Wednesday, July 09, 2003 1:47 PM
Subject: [ntdev] Re: OT: detecting a device connected to com1 or not on
enumertion from application program…

> Shiva Prasad T. S. wrote:
>
> > thanx vijay, I am aware of it…
> >
> > But the device is not a pnp serial device…assume just i had connected
> > the other side to a system which runs a serial comm. program…,
> > atleast, i need to detect that the null modem cable is connected to some
> > active serial comm source…
> >
> > any more ideas…??
> >
> > thanx,
> >
> > Shiva P
> >
>
> The most common (and reliable – which, admittedly, is not very) method
for
> determining this is via DTR. When a serial port is opened by an
application,
> DTR is normally asserted; when it is closed, it is normally deasserted.
>
> –
> - Stevie-O
>
> Real Programmers use COPY CON PROGRAM.EXE
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rassit.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE
> and may contain confidential and privileged information. If the reader of
this message
> is not the intended recipient, you are notified that any dissemination,
distribution
> or copy of this communication is strictly Prohibited.If you have received
this message
> by error, please notify the sender immediately, return the original mail
to the sender
> and delete the message from your system.
>
>

THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE
and may contain confidential and privileged information. If the reader of this message
is not the intended recipient, you are notified that any dissemination, distribution
or copy of this communication is strictly Prohibited.If you have received this message
by error, please notify the sender immediately, return the original mail to the sender
and delete the message from your system.

There is no absolute in how serial devices connect. Some may raise DTR/RTS and jumper DSR to DCD. Others may pass all pins twisting DTR/DSR, TX/RX, RTS/CTS as necessary. The point is that simply seeing a line control bit go high does not tell you that a modem has connected or that anything at all is on the other end. DSR and DCD could easily be causing an interrupt because someone plugged in a half duplex cable. All you REALLY know, without an established protocol and handshake is that … oh … DSR is high. And that is really all you know.

Someone suggested sending a bunch of stuff. Big whoop, if the other end is open or not terminated properly or your twisted passes to close to a poorly shielded power line, you could easily be getting noise when you think someone is sending.


Gary G. Little
Seagate Technologies, LLC
xxxxx@seagate.com
“Shiva Prasad T. S.” wrote in message news:xxxxx@ntdev…
Hi all,

In the process of serial communication in win32 MFC programming, after enumerating the serial port, I would like to extend a feature ,
detecting any other serial device is connected or the other device is switched off or not on enumeration of a particular serial port…

how can i do this…can anybody suggest me some best way to detecting any device attached to com port on enumerating the port…
I need to know this very urgently…pls give me some suggestions…

TIA,

Shiva P

THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE ADDRESSEE
and may contain confidential and privileged information. If the reader of this message
is not the intended recipient, you are notified that any dissemination, distribution
or copy of this communication is strictly Prohibited.If you have received this message
by error, please notify the sender immediately, return the original mail to the sender
and delete the message from your system.