Close

Phase-2# Hello SFP from Arduino

A project log for Optical Power Meter (with SFP and DDM protocol)

DIY Optical Power Meter with SFP (Small Form-factor Pluggable transceiver) and DDM (Digital diagnostics monitoring ) protocol

oakkar7oakkar7 04/30/2017 at 14:211 Comment

The first trial is using existing Lib for DDM interfacing. But there is not much such library and the only one in my eye is SloMusti, Arduino library for interfacing SFP modules and reading DDM.

https://github.com/SloMusti/sfpddm

Unluckily, lib is not work in the first try. SloMusti Github page said that “For communication the specified I2C library is internally initialized, the default Arduino I2C library is not reliable enough and can not be used. Please obtain and install the I2C library by Wayne Truchsess http://dsscircuits.com/articles/arduino-i2c-master-library.html”.

Anwyaw, SloMusti Lib is very informative and structurally formatted and it help me alot how to do things.

So, I try to write my own I2C code snaps with Arduino building lib and it worked. So, I developed by own SFPDDM Lib from scratch. My idea is keep it simple and forward. The first step is to read raw data format from SFP/DDM registers (96-117). These reg are used for monitoring, alarm, control and debugging. Each function of these register and explanations are worth to read from Finisar Application note.

https://www.finisar.com/sites/default/files/downloads/an-2030_digital_diagnostic_monitoring_interface_sfp_optical_transceivers.pdf

Connection pin outs <--> Arduino UNO are as follow. Be sure to use 5V-3.3V level shifter board.

VeeTs - GND

VeeRs - GND

VccRs - 3.3V

VccTs - 3.3V

MOD-DEF(2) - SDA (4)

MOD-DEF(2) - SDA (5)

MOD-DEF(2) - GND

Then, I tried to read reg(96) with normal I2C Lib (Arduino buildin) and print it out to UART. Then, phrase and formatted.

The first trial output, output from reading DDM register. Look promising.


Discussions

Agung Setyo Nugroho wrote 03/05/2022 at 14:28 point

Hi, Oakkar!

I want to ask you about your project with SFP. Currently, I build the same project like you but I still have some difficulties. In my setup is not having button, but I just copy all the code from your project on your GitHub. In my purpose project is just to read the measurement continously from SFP which are the power transmitter (TX) and the receiver power (RX). When I run it, I get TX and RX always inf even I use fiber optic patch cord with bending. Could you help me to solve my problem? Thank you

  Are you sure? yes | no