Algorithms and scripts
Automation, scripting, memory maps, checksum algorithms, tools
A Python library to create, read and modify the 256-byte A0h page of SFP EEPROM per SFF-8472. It exposes named fields (vendor, part, serial, wavelength, bit rate, encoding, link lengths, diagnostics options), generates images from scratch or from a binary, and validates/recalculates checkssums. It…
A Raspberry Pi tool for SFP/SFP+ EEPROM: -r prints connector, transceiver spec, wavelength, vendor, part, serial, date and checksums; -d dumps the whole EEPROM; -c recaculates checksums and offers to write the correct value; -m reads DOM sensors (temperature, voltage, bias, power). A vendor variant…
A tutorial on recoding SFP/SFP+ EEPROM so a module works with a different vendor's switch. It uses a Cisco Twingig housing to reach the SFP I2C pins and wires four lines from the Pi GPIO (3.3 V, GND, SDA on GPIO3, SCL on GPIO5). It shows detecting 0x50 (and optional 0x51 DOM) with i2cdetect, points…
A small toolset that reads and writes SFP EEPROM over I2C with a CH341A programmer plus an I2C sniffer. The author found that sigrok/PulseView did not work with the analyser, that a v1.0.5 SFP coder firmware reported success while silently not writing the module (proven by I2C traces), and that the…
A reference post on the memory layout used when programming transceivers: SFP blocks A0h (serial ID/vendor, often write-protected) and A2h (diagnostics, page-select byte 7Fh, page 00h/01h user-writable); QSFP block A0h with page-select 7Fh, page 00h identity write-protected and page 03h user…
A notes repository on hacking SFP/QSFP EEPROM: SFPs present EEPROM at I2C 0x50 and DOM plus vendor/password features at 0x51; locked moddules need a 4-byte password written to 0x51 bytes 0x7b-0x7e. It lists several known unlock passwords and evaluates write methods (off-the-shelf coder limited to…
5votes
4comments
160views
Bench work: re-coding a small batch of SFP+ modules so they carry the vendor string and part number the customer's kit expects. The edit itself is trivial in a hex editor, the write goes through, the read back matches byte for byte what I wrote - and the host still throws the module out. generic…
Homelab switch: a D-Link DGS-1210-28 revision F1 that I flashed with OpenWrt so I could stop fighting the stock web UI. Everything works except the last four ports, which are the copper/fibre combo ones. Switch: D-Link DGS-1210-28 rev F1 Firmware: OpenWrt 21.02.0-rc3 (r16172-2aba3e9784) Ports…
The thread starter documented that 82599-based X520 cards carry an undocumented EEPROM bit (IXGBEDEVICECAPSALLOWANYSFP, lowest bit of the capability word at byte offset 0x58, typically 0xFC locked / 0xFD unlocked) that decides whether non-Intel active SFP+ modules are accepted on ESXi and Windows…
4votes
5comments
132views
I do small batches of module recoding for integrators, and until now everything on my bench has been SFP-shaped: read the 256 bytes at A0h with the serial ID in the first half, read A2h for the diagnostics and thresholds, write the identification block, done. A customer has now turned up with 100G…
4votes
4comments
150views
I keep a shelf of pulled SFPs at home and I would like to be able to read their EEPROM, repair a module whose checksum got mangled, and occasionally recode one for a switch that is picky about vendor strings. Buying a commercial programmer for a handful of modules a year makes no sense here, so I…
We look after the switch management firmware on our own hardware, and ever since the SP/FPGA interface was changed from memory mapped buffers to a FIFO, the transceiver inventory has been coming back as junk on some ports. QSFP28 optics, all of them AFBR-89BDDZ out of the same batch reads go over…
7votes
7comments
390views
I am writing a small poller that pulls temperature, voltage, bias and optical power straight off the modules on our whitebox boxes, so we get a trend line instead of someone eyeballing a link after it has already started erroring. The NOS prints pretty values, but I want the raw numbers with the…
In a NANOG discussion about vendor lock-in, an operator described two concrete failures. First, a third-party optic answered I2C reads too slowly; the switch vendor's polling code did not handle the timeout and crashed the linecard control plane, and the vendor refused to treat it as a bug because…