Communicating with a Modem on a Serial Port

how to obtain information about transmission errors such as overrun, framing, parity, and break signals?