Getting "OSError: [Errno 121] Remote I/O error" when trying to access LCD screens over I2C (python in raspberry)

1.2k Views Asked by At

I have been updating an old raspberry intercom project I found on Github a while ago as a beginner project, everything was working good on the handheld stations until I got to the Operator basestation, witch has 4 LCD screens connected to my raspberry via an I2C Multiplexer.

For some unknown reason when I run the code I get this error:

Traceback (most recent call last):
  File "/home/admin/intercom/ic_basestation_pi3.py", line 354, in <module>
    bus.write_byte(0x70, 0xFF)
  File "/usr/local/lib/python3.9/dist-packages/smbus2/smbus2.py", line 414, in write_byte
    ioctl(self.fd, I2C_SMBUS, msg)
OSError: [Errno 121] Remote I/O error

Here is the code snippet from where the error is ocurring (I can post the whole code/GitHub repo if needed)


bus = smbus2.SMBus(1)
bus.write_byte(0x70, 0xFF)
device = ssd1306(port=0, address=0x3c, rotate=0)

clearBG("Start")

I have checked all of my VCC & GND lines and the I2C connectors and it all seems fine

If needed here's the result from "i2cdetect -y 1":

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --   

Can anyone please help me to fix this issue?

1

There are 1 best solutions below

0
On

Just from looking at the i2cdetect output, your sensors are probably not connected correctly. You should see 3c listed.