In optical two-way communication using a single optical fiber, part of the
light transmitted from an apparatus is received as stray light by the
apparatus itself. This occasionally hampers accurate detection of
disconnection from the partner apparatus and of the start of data
communication by the partner apparatus after the establishment of
connection. To overcome this, the timing with which an apparatus
transmits a tone signal after the establishment of connection is compared
with the timing with which the apparatus receives a tone signal from the
partner apparatus, and the two apparatuses use different sets of data
transmission properties (for example, different wavelengths) to
accurately detect disconnection. Moreover, based on the properties of the
received light and the characteristics of the receiving amplifier,
repetition of the same code for longer than a predetermined period is
detected to accurately detect disconnection. Furthermore, in response to
a request for data communication after the establishment of connection, a
tone signal having a different pattern from that used to establish
connection is used to accurately detect the start of data communication.