I am using smbus2 to perform write read operation. Occasionally, I can see the write read read as shown below. Even though first read is NACK, is it an expected behavior of smbus2 or software i2c that 2nd read start immediately? Sometimes I can even see 3 reads. I never observe this when I am using hardware i2c.

from smbus2 import SMBus, i2c_msg

write = i2c_msg.write(self.deviceAddr, tx_byte_array) 
read = i2c_msg.read(self.deviceAddr, read_length)
self.bus.i2c_rdwr(write, read)


enter image description here

  • If you're unfamiliar w/ I2C protocol, perhaps you should do some research before asking questions?
    – Seamus
    Commented Jun 27 at 4:32
  • Actually I want to ask if this is an expected behavior of the smbus2 or software i2c. Because my script does not ask to do so
    – Sam
    Commented Jun 27 at 7:40
  • Perhaps my question is not clear, but I do not know why you think I do not understand I2C. I am asking about the behavior of smbus2 library and software i2c, not the behavior of i2c. Could you give me more hints about what is wrong with my question?
    – Sam
    Commented Jun 28 at 3:13


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.