i2cset
writes a value to a specified register of an I2C device
TLDR
SYNOPSIS
i2cset [options] i2cbus deviceaddress registeraddress value [mode]
DESCRIPTION
i2cset writes a value to a specified register of an I2C device. This allows configuration of I2C peripherals, setting parameters, or controlling device behavior.
All addresses and values should be specified in hexadecimal notation. The command will prompt for confirmation before writing unless the -y flag is used.
PARAMETERS
-y
Disable interactive confirmation (dangerous on some hardware)b
Byte mode - write single byte (default)w
Word mode - write 16-bit valuec
Consecutive byte modes
SMBus block modei
I2C block mode
CAVEATS
Writing to I2C registers can cause hardware damage or unexpected behavior. Always verify device addresses and register meanings before writing. Some devices may become unresponsive or require power cycling after incorrect writes. Requires root privileges or i2c group membership.
HISTORY
i2cset is part of the i2c-tools package, providing userspace write access to I2C devices. The I2C protocol was developed by Philips (now NXP) in 1982 for low-speed peripheral communication.

