====== SFP GPON ONU EEPROM Editing ====== ===== Add 2500Base-X ===== Credit: https://github.com/Anime4000/RTL960x/discussions/250#discussion-6288339 ==== Prerequisites ==== * OpenWrt router with: * SFP port(s) (any speed) with I2C bus * Packages ''ethtool-full'' ''i2c-tools'' * [[https://sfptotal.io/software|SFPTotal Wizard]] (Windows software, only used to calculate checksum at 0x3f) ==== Steps ==== - On OpenWrt - Dump EEPROM:\\ ''ethtool -m //**[ethX]**// raw on > /tmp/sfp.bin'' - On Windows desktop - Copy EEPROM to Windows desktop (run in Windows Terminal):\\ ''scp -O root@192.168.1.1:/tmp/sfp.bin .'' - Open sfp.bin in SFPTotal Wizard - Set the bits in SFPTotal Wizard according to the EEPROM Bits table below - Take note of the checksum in 0x3F (first green byte) - On OpenWrt - Set the SFP EEPROM bits in OpenWrt according to the EEPROM Bits table below * ''i2cset -y 5 0x50 0x06 0x00'' * ''i2cset -y 5 0x50 0x0a 0x05'' * ''i2cset -y 5 0x50 0x0c 0x1f'' * ''i2cset -y 5 0x50 0x3f 0x//**[Refer to SFPTotal Wizard]**//'' - Physically re-seat the SFP - Verify the new speeds are detected:\\ ''ethtool -m //**[ethX]**//''\\ Supported link modes: 2500baseX/Full 1000baseX/Full ==== EEPROM Bits ==== ^ Address ^ Old Setting ^ New Setting ^ | ''0x06'' | ''0x02'' | ''0x00'' | | ''0x0A'' | ''0x00'' | ''0x05'' | | ''0x0C'' | ''0x0D'' | ''0x1F'' | | ''0x3F'' (Checksum) | :!: Use SFPTotal to calculate! :!: ||