I've added some info about the I2C commands for the Hauwei MA5671A and Alcatel-Lucent G-010S-P
https://www.dslreports.com/forum/r32230041-Internet-Bypassing-the-HH3K-up-to-2-5Gbps-using-a-BCM57810S-NICThe I2C bus SFP MOD-DEF(1) pin 5 and MOD-DEF(2) pin 4 allow for some special commands on chip address 0x51 ie. soft eeprom via sfp_i2c daemon.
Hauwei MA5671A0x79 - Enable(0) / Disable(1) serial console (Doesn't work)
0xE3 - Set sfp_a2_info environment variable ie. SFF-8472 A2h (Contains Serial Number, MAC Address, LOID Password)
0xE5 - Reboot (Kills PID 1)
0xE6 - Change ToD
0x80 (On Page 0x62) - Enable/Disable VLAN trunking
Alcatel-Lucent G-010S-P0xE3 - Set sfp_a2_info environment variable ie. SFF-8472 A2h (Contains Serial Number, MAC Address, LOID Password)
0xE5 - Reboot (Kills PID 1)
0xE6 - Change ToD
Examples:Enable VLAN trunking:
i2cset -y 1 0x51 0x7F 0x62
i2cset -y 1 0x51 0x80 1
Reboot
i2cset -y 1 0x51 0xE5 1
I did not attempt to change sfp_a2_info since I have no need. Based on a brief look at the disassembly it might be reading the data from address 0x80 and it does the conversion to base64 so it must sent as raw hex. Maybe someone on this forum has the time to figure things out.
The Huawei seems to have a back door to enable the serial console but it didn't trigger on address 0x79 but if I modified the binary to change the address to 0xE1 it worked without a problem so there must be some extra to use 0x79. Again maybe someone else has the time to further investigate.