SMBUS on the RPI gives IOError: [Errno 121] Remote I/O error

Viewed 26483

I have tried communication between RPi3 and stm32 over I2C. First of all I have installed i2c-tools and python-smbus. All in All I have used python script on the RPI as below:

import smbus
bus = smbus.SMBus(1)
address = 0x0A
data = [1,2,3,4,5,6,7,8]
bus.write_i2c_block_data(address, 0, data)

When I run script, I can see following error:

IOError: [Errno 121] Remote I/O error

STM32 is configured as I2C slave, both device are connected correctly(SDA, SCL and GND). How do I know that? I have made program using BCM2835 library. C program worked correctly. C program sent buffer without any errors. STM32 also received buffer without any errors. Can you tell me, what I have been doing wrong?

Thank you in advance.

1 Answers
Related