PURPOSE: To reduce the effect of a fault of a modulator-demodulator to be exerted on data transmission by setting automatically the modulator-demodulator to the test state when a terminal device executes no data transmission to attain the own test.
CONSTITUTION: When the terminal device is in a data transmission state, an ER (terminal device ready) signal 11 is set, a transmission data 8 is modulated by a modulator 1 through a selecting circuit 4 and the result is outputted to a transmission line 9. Furhter, the signal from a reception line 10 is demodulated by a demodulator 2 and a reception data 12 is produced. When the terminal device is not in the data transmission state, the ER signal 11 is not set and a pattern generator 5, error detector 6, display device 7 and a loopback circuit 3 are activated. A test pattern from the pattern generator is brought into the loopback state and an error is detected by the detector 6.