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.
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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
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