An apparatus for using a serial port device in a time division multiplexing manner, wherein the apparatus comprises: a first serial port, a second serial port, a switching circuit, and a signal interface, wherein: the switching circuit is configured to select to receive data sent by one serial port from the first serial port and the second serial port, and output the data to the signal interface; the signal interface is coupled to a first serial port device and a second serial port device outside the apparatus; the first serial port is directly coupled to the signal interface by using the switching circuit and configured to, when the switching circuit selects to receive first data sent by the first serial port, send the first data to the first serial port device corresponding to the first serial port by using the switching circuit and the signal interface; the first serial port is further configured to receive fourth data sent by the first serial port device directly from the signal interface; the second serial port is configured to receive, directly from the signal interface, second data sent by the second serial port device corresponding to the second serial port in a process of communication between the first serial port and the first serial port device, and determine whether the second data indicates that the second serial port device needs to receive third data sent by the second serial port; and if the second data received by the second serial port indicates that the second serial port device needs to receive the third data sent by the second serial port, instruct the switching circuit to select to receive the third data sent by the second serial port; and the second serial port is coupled to the signal interface by using the switching circuit and further configured to, when the switching circuit selects to receive the third data sent by the second serial port, send the third data to the second serial port device by using the switching circuit and the signal interface. the switching circuit is configured to select to receive data sent by one serial port from the first serial port and the second serial port, and output the data to the signal interface; the signal interface is coupled to a first serial port device and a second serial port device outside the apparatus; the first serial port is directly coupled to the signal interface by using the switching circuit and configured to, when the switching circuit selects to receive first data sent by the first serial port, send the first data to the first serial port device corresponding to the first serial port by using the switching circuit and the signal interface; the first serial port is further configured to receive fourth data sent by the first serial port device directly from the signal interface; the second serial port is configured to receive, directly from the signal interface, second data sent by the second serial port device corresponding to the second serial port in a process of communication between the first serial port and the first serial port device, and determine whether the second data indicates that the second serial port device needs to receive third data sent by the second serial port; and if the second data received by the second serial port indicates that the second serial port device needs to receive the third data sent by the second serial port, instruct the switching circuit to select to receive the third data sent by the second serial port; and the second serial port is coupled to the signal interface by using the switching circuit and further configured to, when the switching circuit selects to receive the third data sent by the second serial port, send the third data to the second serial port device by using the switching circuit and the signal interface.