eeprog(8) System Administration eeprog(8)

eeprog - reads and writes 24Cxx EEPROMs connected to I2C serial bus

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

eeprog uses the SMBus protocol used by most of the recent chipsets.

Don't forget to load your i2c chipset and the i2c-dev drivers.

The following environment variables could be set instead of the command line arguments:


EEPROG_DEV device
EEPROG_I2C_ADDR i2c-addr

Address modes

-8
Use 8bit address mode for 24c0x...24C16 [default]
-16
Use 16bit address mode for 24c32...24C256
Read count (1 if omitted) bytes from addr and print them to the standard output
Write input (stdin) at address addr of the EEPROM
Print this help
Set hex output mode
Dummy mode, display what *would* have been done
Disable warnings and don't ask confirmation
Quiet mode
Device file representing the I2C bus (eg. /dev/i2c-0)
I2C bus address of the EEPROM (eg. 0x3A)

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 /dev/i2c-0 0x33 -w 0x200

Stefano Barbato

Jul 2013 i2c-tools