eeprog(8)

πŸ“¦
version 4.4 Β· 2 versions
, in arch rolling, fedora 43, fedora 44

πŸ’– eeprog(8) β€” the girlies' guide to poking at EEPROMs πŸ’–

okay so real talk: eeprog is a System Administration manual page, and it's the one you want when you need to read and write 24Cxx EEPROMs connected to the I2C serial bus. She's small, she's mighty, she's giving hardware whisperer. Let's get into it bestie 🫢


✨ SYNOPSIS ✨

eeprog [-fqxdh] [-16|-8] [-r addr[:count]|-w addr] <device> <i2c-addr>

that's the whole vibe in one line, no cap πŸ’…


🌸 DESCRIPTION 🌸

eeprog uses the SMBus protocol β€” which is lowkey the protocol most of the recent chipsets are running on. That's the tea. πŸ“


πŸŽ€ NOTE πŸŽ€

Don't forget to load your i2c chipset and the i2c-dev drivers. fr fr, if you skip this step nothing works and you'll be sitting there like 😭.

Also!! these environment variables can be set instead of the command line arguments:

  • EEPROG_DEV β€” stands in for device
  • EEPROG_I2C_ADDR β€” stands in for i2c-addr

πŸ‘‘ PARAMETERS πŸ‘‘

πŸ¦‹ Address modes πŸ¦‹

  • -8 β€” use 8bit address mode for 24c0x...24C16. this is the [default] btw, so if you say nothing she picks this one πŸ’«
  • -16 β€” use 16bit address mode for 24c32...24C256

πŸ’… Actions πŸ’…

  • -r addr[:count] β€” read count bytes (1 if you omit it) starting from addr, and print them to the standard output
  • -w addr β€” write whatever's coming in on stdin to address addr of the EEPROM
  • -h β€” print this help. the classic "bestie explain" button 🫢

⭐ Options ⭐

  • -x β€” set hex output mode
  • -d β€” Dummy mode: display what would have been done. it's the rehearsal, not the performance ✨
  • -f β€” disable warnings and don't ask confirmation. she just goes. no questions asked πŸ’€
  • -q β€” quiet mode 🀫

🌈 Bus 🌈

  • device β€” the device file representing the I2C bus (eg. /dev/i2c-0)
  • i2c-addr β€” the I2C bus address of the EEPROM (eg. 0x3A)

🧚 EXAMPLES 🧚

Read 64 bytes from the EEPROM at address 0x54 on bus 0 starting at address 123 (decimal)

eeprog /dev/i2c-0 0x54 -r 123:64

Print the hex codes of the first 32 bytes read from bus 1 at address 0x22

eeprog /dev/i2c-1 0x51 -x -r 0x22:0x20

Write the current timestamp at address 0x200 of the EEPROM on bus 0 at address 0x33

date | eeprog -f /dev/i2c-0 0x33 -w 0x200

see how the pipe just hands her the timestamp? iconic behaviour, she ate that 🍽️


πŸ’œ AUTHOR πŸ’œ

Stefano Barbato β€” the mastermind, the moment, the main character πŸ‘‘


and that's the whole page bestie!! this one ships with i2c-tools, dated Jul 2013, and lives at section 8 of the manual. slay, go read some EEPROMs πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from