TouchPhat, OSError: [Errno 121] Remote I/O error

Hi.

I have a new touchphat attached to a raspberry pi 3.
and i2c is enabled.

i get the following error on importing touchphat:
Traceback (most recent call last):
File “touchphattest.py”, line 1, in
import touchphat
File “/usr/lib/python3/dist-packages/touchphat/init.py”, line 13, in
dh = cap1xxx.Cap1166(i2c_addr=0x2c)
File “/usr/lib/python3/dist-packages/cap1xxx.py”, line 283, in init
self.product_id = self._get_product_id()
File “/usr/lib/python3/dist-packages/cap1xxx.py”, line 469, in _get_product_id
return self._read_byte(R_PRODUCT_ID)
File “/usr/lib/python3/dist-packages/cap1xxx.py”, line 494, in _read_byte
return self.i2c.read_byte_data(self.i2c_addr, register)
OSError: [Errno 121] Remote I/O error

Running i2cdetect gives me the following:
$ 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: – -- – -- – -- – --

Any help would be appreciated.

output of i2cdetect -l is as following:

$ i2cdetect -l
i2c-1 i2c bcm2835 I2C adapter I2C adapter

It’s not being detected over i2c. How is it connected to the Pi 3, female header soldered on the touch phat or hammer header etc?

female header soldered on the touch phat.

Also, i just tried it with another raspberry pi 3. and it worked completely fine.
So it is an hardware issue on the raspberry pi 3 that i was using before? Any hints on fixing that? (assuming its fixable)

Same Micro SD card used in both Pi 3’s?

same SD card, same touch phat. only the Pi3’s are different

It’s a hardware fault then. Unless you can see some physical damage thats easily repairable, I don’t think there is much you can do to fix it? You didn’t maybe plug your pHat in one row off on the GPIO or something? I’d reattach it to the not working Pi one more time, if it still doesn’t work I think your SOL as far as using i2c on that Pi goes. And there may other bits not working as well, depending on what chip is damaged etc.

that must be it.
other hats which dont use i2c are working on that raspi. so i think may be only i2c is broken.
anyways thanks a lot for your replies @alphanumeric !

Yeah, the Pi doesn’t have a BIOS in the traditional sense, like a PC does. The firmware is on the Micro SD card. So enabling hardware is for the most part done via the config.txt.
If i2c works on one Pi with that Micro SD card, its enabled and all the software is in place to make it work.
Not working with that same Micro SD card in another same model Pi means something is broken hardware wise. We know its not the phat because that works with the good Pi. If you only just bought that Pi I’d see about returning and or getting a replacement for it. I don’t think its anything you did.

1 Like