serial port device detection
hi,
i want know is there any mechanism to detect any serial port device is connected or not. My project is hardware monitoring, so i want it is in C code. Is there any option to add kernel patch for getting serial port information ? I tried with setserial and ioctl but i didn't get device is connected or not. Any one know any method pls reply. Thanks and regards Haresh |
Hi there,
Quote:
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 |
As stated not really unless your looking for a particular device. There is no serial port communication standard and using hardware control is optional.
|
Re:
hi
Thank you for u r reply I know there is no standard mechanism. I want at least connected or not, no any further information. I there any option by Interrupt mechanism. I read by ioctl with TIOCMIWAIT, can detect any changes in serial port. Any of u know the code pls reply. Thanks and regards Haresh M V |
AFAIK there isn't.
|
All times are GMT -5. The time now is 02:17 AM. |