Hi Chris, On Tue, 9 Nov 2021 23:14:26 +1000, Chris Drake wrote: > You forgot that we can read words as well as bytes from the current > address... I did not forget anything ;-) > e.g - bold below:- > > [pi@rpi src]$ i2cset -y 1 0x0D 0x09 0x1D # set BMP280 continuous measure > mode > [pi@rpi src]$ i2cget -y 1 0x0d 0x00 w # tell it to start reading at reg > 0, and get the X word > 0x065b > [pi@rpi src]$ *i2cget -y 1 0x0d w* # continue reading (i.e. get the Y > word) > Error: Data address invalid! > Usage: i2cget [-f] [-y] [-a] I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]] > I2CBUS is an integer or an I2C bus name > ADDRESS is an integer (0x03 - 0x77, or 0x00 - 0x7f if -a is given) > MODE is one of: > b (read byte data, default) > w (read word data) > c (write byte/read byte) > Append p for SMBus PEC > [pi@rpi src]$ i2cget -y 1 0x0d w # continue reading (i.e. get the Z word) > Error: Data address invalid! [snip] > > [pi@rpi src]$ *i2cget -y 1 0x0d* # Bug report - happy to read BYTES like > this, but blows up trying to read words... > 0x37 > > [pi@rpi src]$ There is no SMBus command to read a word without prior addressing, and that's the reason why i2cget does not support it. i2cget only supports SMBus-level transactions. Maybe the tool should have been named "smbusget" to make it clearer... Try i2ctransfer instead, which operates at I2C level and can do what you need, assuming your underlying bus master is I2C-capable. Hope that helps, -- Jean Delvare SUSE L3 Support