CodingBox Documentation

Internal & external calibration

A photodiode does not output dBm and a thermistor does not output °C. Somewhere the raw sensor reading has to be turned into an engineering value — and SFF-8472 allows that to happen either inside the module or on the host, using constants the module provides. Getting this wrong is the usual reason a switch displays absurd DDM values for a module that works perfectly.

Two calibration modes

ModeDeclared byWho convertsWhat the monitor bytes contain
InternalA0h byte 92 bit 5the module's microcontrollerfinal values in standard units (1/256 °C, 100 µV, 2 µA, 0.1 µW)
ExternalA0h byte 92 bit 4the hostraw A/D counts; host applies constants from A2h 56–95

Almost every modern module is internally calibrated. Externally calibrated modules are older or cost-optimised designs; their values read as garbage on hosts that skip the conversion.

External calibration constants — A2h bytes 56–95

BytesConstantFormatApplies to
56–75Rx_PWR(4) … Rx_PWR(0)five IEEE-754 single-precision floatsRx power (4th-order polynomial)
76–77Tx_I slopeunsigned fixed-point 8.8Tx bias
78–79Tx_I offsetsigned 16-bitTx bias
80–81Tx_PWR slopeunsigned 8.8Tx power
82–83Tx_PWR offsetsigned 16-bitTx power
84–85T slopeunsigned 8.8temperature
86–87T offsetsigned 16-bittemperature
88–89V slopeunsigned 8.8Vcc
90–91V offsetsigned 16-bitVcc
92–94reserved
95CC_DMIchecksum of bytes 0–94

The conversion formulas

Rx_PWR (µW)      = Rx4·raw⁴ + Rx3·raw³ + Rx2·raw² + Rx1·raw + Rx0
Tx_I   (µA)      = Tx_I_slope · raw + Tx_I_offset
Tx_PWR (0.1 µW)  = Tx_PWR_slope · raw + Tx_PWR_offset
T      (1/256 °C)= T_slope · raw + T_offset
V      (100 µV)  = V_slope · raw + V_offset

For an internally calibrated module the constants are ignored; many vendors still fill them with identity values (slope 1.0, offset 0, Rx polynomial 0,0,0,1,0) so that a host applying them anyway gets the right answer.

Average vs OMA

A0h byte 92 bit 3 says how Rx power is expressed: average power (1) or OMA — optical modulation amplitude (0). Nearly all modules report average power; OMA appears on some multi-mode Ethernet optics where the standard specifies sensitivity that way. Comparing an OMA figure with an average-power sensitivity spec misleads by up to ~3 dB.

Symptoms of a calibration problem

What you seeLikely cause
Temperature of 0 °C or −128 °C, Vcc 0.00 Vhost reads raw counts from an externally calibrated module without converting
Rx power impossibly high (+10 dBm) or always −40 dBmwrong calibration mode assumed, or zeroed constants
Values differ wildly between two switch models with the same moduleone host honours byte 92, the other assumes internal
Tx power identical on every module of a batchnot calibration — a constant Tx (DDM levels)

In CodingBox

CodingBox reads byte 92, applies external calibration constants when the module declares them, and shows both raw and converted values, so a module that a switch displays wrongly can be judged on the bench. The constants block 56–95 is editable in the EEPROM editor with CC_DMI recalculated automatically — useful for repairing modules whose calibration area was overwritten.