table of contents
eeprog(8) | System Administration | eeprog(8) |
NAME¶
eeprog - reads and writes 24Cxx EEPROMs connected to I2C serial bus.
SYNOPSIS¶
eeprog [-fqxdh] [-16|-8] [-r addr[:count]|-w addr] <device> <i2c-addr>
DESCRIPTION¶
eeprog uses the SMBus protocol used by most of the recent chipsets.
NOTE¶
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
PARAMETERS¶
Address modes
- -8
- Use 8bit address mode for 24c0x...24C16 [default]
- -16
- Use 16bit address mode for 24c32...24C256
- Actions
- -r addr[:count]
- Read count (1 if omitted) bytes from addr and print them to the standard output
- -w addr
- Write input (stdin) at address addr of the EEPROM
- -h
- Print this help
- Options
- -x
- Set hex output mode
- -d
- Dummy mode, display what *would* have been done
- -f
- Disable warnings and don't ask confirmation
- -q
- Quiet mode
- Bus
- device
- Device file representing the I2C bus (eg. /dev/i2c-0)
- i2c-addr
- 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 /dev/i2c-0 0x33 -w 0x200
SEE ALSO¶
AUTHOR¶
Jul 2013 | i2c-tools |