Hi there,
Quote:
Originally Posted by hareshmv
i want know is there any mechanism to detect any serial port device is connected or not.
|
that depends on the device. If it repeatedly tries to send some data, it can be identified by that data. But if that device behaves more or less passive, I don't think there's an easy way to detect it. You can, of course, take the initiative and regularly send a particular string, to which the device should respond in a particular way. But that means you have to probe for that certain device yoe expect, which might disturb others.
It's like you want to detect if someone is standing in front of your door: If that person rings the door bell or makes some other loud noise, you can clearly tell there's somebody, maybe even recognize who it is, without opening the door. But if the person is very quiet, you have to open the door again and again and take a look outside, or ask into the darkness outside: "Is anybody there? - Tina, is that you?"
USB, for example, is different because the USB protocol requires that every device newly attached to the bus identifies itself. But the older interfaces don't support that style of hot-plugging - you can connect a device any time, but it's usually not detected automatically.
[X] Doc CPU