An apparatus and method are provided for setting the AC and DC bias levels
of a laser diode in an optoelectronic transceiver so as to control the
device's extinction ratio. An optical output of the transceiver is looped
back to an optical input of the transceiver. The method includes setting
a DC bias level for the laser diode, setting an AC bias level for the
laser diode to each of a predefined sequence of AC bias level settings,
and receiving from the transceiver a sequence of optical output power
measurements, the sequence of optical output power measurements including
an average optical output power measurement corresponding to each of the
AC bias level settings in the predefined sequence. From the received
sequence of optical output power measurements preferred AC and DC bias
level settings are determined and stored in the transceiver so as to
control the AC and DC bias levels of the laser diode.