Q:

How to detect signals at the serial COM1 port? 

I have a infrared device (both transmitter and receiver).  I've connected the receiver to the serial COM port and I send IR signals using the transmitter. 
I'd like to monitor theese signals and whenever there is no signal, invoke another thread (sms sending code). 
If I check the signals on hiperterminal, I get some unreadable values. 
What should I look for as a NO CARRIER value to see if there is no data being recieved so I execute the second thread? 
e.g
if(signals!=null)
{
    //do nothin
} 
else
{
    //thread2();
}

A:

Head over to rxtx.org for a free serial port library for Java under Windows, Linux or OSX.   All the details and sample code can be found in this WikiBook. 
The section on events, like getting notifications on control signal changes, is here 

