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

**URL:** <https://forums.pimoroni.com/t/touchphat-oserror-errno-121-remote-i-o-error/10253>\
**Category:** Support\
**Created:** [March 25, 2019, 2:27pm UTC](https://forums.pimoroni.com/t/touchphat-oserror-errno-121-remote-i-o-error/10253 "2019-03-25T14:27:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![idhem](https://avatars.discourse-cdn.com/v4/letter/i/da6949/32.png) [@idhem](https://forums.pimoroni.com/u/idhem)\
**Post date:** [March 25, 2019, 2:27pm UTC](https://forums.pimoroni.com/t/touchphat-oserror-errno-121-remote-i-o-error/10253/1 "2019-03-25T14:27:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![idhem](https://avatars.discourse-cdn.com/v4/letter/i/da6949/32.png) [@idhem](https://forums.pimoroni.com/u/idhem)\
**Post date:** [March 25, 2019, 2:31pm UTC](https://forums.pimoroni.com/t/touchphat-oserror-errno-121-remote-i-o-error/10253/2 "2019-03-25T14:31:51Z")

</div>

output of i2cdetect -l is as following:

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

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [March 25, 2019, 3:18pm UTC](https://forums.pimoroni.com/t/touchphat-oserror-errno-121-remote-i-o-error/10253/3 "2019-03-25T15:18:47Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![idhem](https://avatars.discourse-cdn.com/v4/letter/i/da6949/32.png) [@idhem](https://forums.pimoroni.com/u/idhem)\
**Post date:** [March 25, 2019, 4:00pm UTC](https://forums.pimoroni.com/t/touchphat-oserror-errno-121-remote-i-o-error/10253/4 "2019-03-25T16:00:33Z")

</div>

> [@alphanumeric](#):
>
> female header soldered on the touch

## 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)

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [March 25, 2019, 5:26pm UTC](https://forums.pimoroni.com/t/touchphat-oserror-errno-121-remote-i-o-error/10253/5 "2019-03-25T17:26:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![idhem](https://avatars.discourse-cdn.com/v4/letter/i/da6949/32.png) [@idhem](https://forums.pimoroni.com/u/idhem)\
**Post date:** [March 25, 2019, 5:41pm UTC](https://forums.pimoroni.com/t/touchphat-oserror-errno-121-remote-i-o-error/10253/6 "2019-03-25T17:41:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [March 25, 2019, 6:55pm UTC](https://forums.pimoroni.com/t/touchphat-oserror-errno-121-remote-i-o-error/10253/7 "2019-03-25T18:55:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![idhem](https://avatars.discourse-cdn.com/v4/letter/i/da6949/32.png) [@idhem](https://forums.pimoroni.com/u/idhem)\
**Post date:** [March 25, 2019, 7:22pm UTC](https://forums.pimoroni.com/t/touchphat-oserror-errno-121-remote-i-o-error/10253/8 "2019-03-25T19:22:59Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [March 25, 2019, 8:04pm UTC](https://forums.pimoroni.com/t/touchphat-oserror-errno-121-remote-i-o-error/10253/9 "2019-03-25T20:04:27Z")

</div>

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.
