UART broken wire detection
No there is no general answer. If you use a tranceiver like MAX232, it won't give you information if RX cable is connected or not. Some RS232 tranceiver models do give information whether valid RX levels are detected. If you use direct CMOS/TTL connection, simply put a pull-down resistor and if RX line is low then there is nothing connected.