# Pimoroni BME680: OSError: \[Errno 121\] Remote I/O error

**URL:** <https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404>\
**Category:** Support\
**Created:** [August 17, 2018, 3:14pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404 "2018-08-17T15:14:22Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex.tower](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@alex.tower](https://forums.pimoroni.com/u/alex.tower)\
**Post date:** [August 17, 2018, 3:14pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/1 "2018-08-17T15:14:22Z")

</div>

Hi

I have some problem with Pimoroni BME680.  
I verified chatting on Discord my soldering and plugging in position are ok.

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: – -- – -- – -- 76 –

python read-all.py  
Traceback (most recent call last):  
File “read-all.py”, line 6, in   
sensor = bme680.BME680()  
File “build/bdist.linux-armv6l/egg/bme680/ **init**.py”, line 37, in **init**  
File “build/bdist.linux-armv6l/egg/bme680/ **init**.py”, line 141, in set\_filter  
File “build/bdist.linux-armv6l/egg/bme680/ **init**.py”, line 281, in \_set\_bits  
File “build/bdist.linux-armv6l/egg/bme680/ **init**.py”, line 296, in \_get\_regs  
IOError: [Errno 121] Remote I/O error  
pi@relayPi:~/bme680/examples $ python3 read-all.py  
Traceback (most recent call last):  
File “read-all.py”, line 6, in   
sensor = bme680.BME680()  
File “/usr/local/lib/python3.4/dist-packages/bme680/ **init**.py”, line 40, in **init**  
self.get\_sensor\_data()  
File “/usr/local/lib/python3.4/dist-packages/bme680/ **init**.py”, line 241, in get\_sensor\_data  
self.set\_power\_mode(FORCED\_MODE)  
File “/usr/local/lib/python3.4/dist-packages/bme680/ **init**.py”, line 225, in set\_power\_mode  
self.\_set\_bits(CONF\_T\_P\_MODE\_ADDR, MODE\_MSK, MODE\_POS, value)  
File “/usr/local/lib/python3.4/dist-packages/bme680/ **init**.py”, line 281, in \_set\_bits  
temp = self.\_get\_regs(register, 1)  
File “/usr/local/lib/python3.4/dist-packages/bme680/ **init**.py”, line 296, in \_get\_regs  
return self.\_i2c.read\_byte\_data(self.i2c\_addr, register)  
OSError: [Errno 121] Remote I/O error

Only once I got this output, then always I/O error  
python3 read-all.py  
Calibration data:  
par\_gh1: -13  
par\_gh2: -19929  
par\_gh3: 18  
par\_h1: 638  
par\_h2: 1036  
par\_h3: 0  
par\_h4: 45  
par\_h5: 20  
par\_h6: 120  
par\_h7: -100  
par\_p1: 36271  
par\_p10: 30  
par\_p2: -10474  
par\_p3: 88  
par\_p4: 3899  
par\_p5: -79  
par\_p6: 30  
par\_p7: 31  
par\_p8: -1321  
par\_p9: -3139  
par\_t1: 26327  
par\_t2: 26442  
par\_t3: 3  
range\_sw\_err: 1  
res\_heat\_range: 1  
res\_heat\_val: 45

Initial reading:  
gas\_index: None  
gas\_resistance: None  
heat\_stable: False  
humidity: None  
meas\_index: None  
pressure: None  
status: None  
temperature: None  
Traceback (most recent call last):  
File “read-all.py”, line 37, in   
sensor.set\_gas\_heater\_temperature(320)  
File “/usr/local/lib/python3.4/dist-packages/bme680/ **init**.py”, line 196, in set\_gas\_heater\_temperature  
temp = int(self.\_calc\_heater\_resistance(self.gas\_settings.heatr\_temp))  
File “/usr/local/lib/python3.4/dist-packages/bme680/ **init**.py”, line 376, in \_calc\_heater\_resistance  
var1 = ((self.ambient\_temperature \* self.calibration\_data.par\_gh3) / 1000) \* 256  
TypeError: unsupported operand type(s) for \*: ‘NoneType’ and ‘int’

Could you please help?

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [August 17, 2018, 4:07pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/2 "2018-08-17T16:07:47Z")

</div>

Do you have an alternate i2c baudrate set in `/boot/config.txt` something like `dtparam=i2c_baudrate=XXX`?

---

<div class="post-metadata">

**Author:** ![s0litaire](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/s0litaire/32/4711_2.png) [@s0litaire](https://forums.pimoroni.com/u/s0litaire)\
**Post date:** [October 27, 2018, 4:37pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/3 "2018-10-27T16:37:27Z")

</div>

getting the same kind of error on my rPi3+

Calibration data:  
par\_gh1: -21  
par\_gh2: -14972  
par\_gh3: 18  
par\_h1: 652  
par\_h2: 1033  
par\_h3: 0  
par\_h4: 45  
par\_h5: 20  
par\_h6: 120  
par\_h7: -100  
par\_p1: 36444  
par\_p10: 30  
par\_p2: -10442  
par\_p3: 88  
par\_p4: 4718  
par\_p5: -119  
par\_p6: 30  
par\_p7: 41  
par\_p8: -2544  
par\_p9: -2638  
par\_t1: 26167  
par\_t2: 26652  
par\_t3: 3  
range\_sw\_err: 0  
res\_heat\_range: 1  
res\_heat\_val: 40

Initial reading:  
gas\_index: None  
gas\_resistance: None  
heat\_stable: False  
humidity: None  
meas\_index: None  
pressure: None  
status: None  
temperature: None  
Traceback (most recent call last):  
File “/home/pi/scripts/read-all.py”, line 37, in   
sensor.set\_gas\_heater\_temperature(320)  
File “/usr/local/lib/python2.7/dist-packages/bme680/ **init**.py”, line 196, in set\_gas\_heater\_temperature  
temp = int(self.\_calc\_heater\_resistance(self.gas\_settings.heatr\_temp))  
File “/usr/local/lib/python2.7/dist-packages/bme680/ **init**.py”, line 376, in \_calc\_heater\_resistance  
var1 = ((self.ambient\_temperature \* self.calibration\_data.par\_gh3) / 1000) \* 256  
TypeError: unsupported operand type(s) for \*: ‘NoneType’ and ‘int’

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [November 1, 2018, 2:28pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/4 "2018-11-01T14:28:49Z")

</div>

Could you try running:

```auto
python -c "from bme680 import __version__ ;print( __version__ )"

```

Or in a Python repl running:

```auto
import bme680
print(bme680. __version__ )

```

In both your cases I can’t see a `t_fine` entry in your calibration data which points to the `_calc_temperature` method failing or not being called, but no error has occured at that point.

---

<div class="post-metadata">

**Author:** ![alex.tower](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@alex.tower](https://forums.pimoroni.com/u/alex.tower)\
**Post date:** [November 1, 2018, 4:30pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/6 "2018-11-01T16:30:13Z")

</div>

> [@gadgetoid](#):
>
> python -c “from bme680 import **version** ;print( **version** )”

python -c “from bme680 import **version** ;print( **version** )”  
1.0.5

---

<div class="post-metadata">

**Author:** ![alex.tower](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@alex.tower](https://forums.pimoroni.com/u/alex.tower)\
**Post date:** [November 1, 2018, 4:32pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/7 "2018-11-01T16:32:11Z")

</div>

No I have no i2c baudrate entry in `/boot/config.txt`.  
The sensor works perfectly in a Raspberry 3, it does not in a Raspberry Zero with Raspbian GNU/Linux 9.4 (Stretch).

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [November 12, 2018, 10:35am UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/8 "2018-11-12T10:35:54Z")

</div>

How’s it connected to the Raspberry Pi Zero- how’s the Pi Zero header itself connected?

---

<div class="post-metadata">

**Author:** ![alex.tower](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@alex.tower](https://forums.pimoroni.com/u/alex.tower)\
**Post date:** [November 15, 2018, 7:09am UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/9 "2018-11-15T07:09:47Z")

</div>

I reinstalled last Raspbian lite distro and rerun the full install script. The Breakout is connected as described in the website, to pins 1, 3, 5, 7, 9. I did not actually connect pin 7, but it should not harm, right?  
Now I get this error, both with python3 and python  
IOError: [Errno 121] Remote I/O error

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [November 15, 2018, 9:21am UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/10 "2018-11-15T09:21:42Z")

</div>

See anything with `sudo i2cdetect -y 1`?

---

<div class="post-metadata">

**Author:** ![alex.tower](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@alex.tower](https://forums.pimoroni.com/u/alex.tower)\
**Post date:** [November 15, 2018, 6:25pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/11 "2018-11-15T18:25:17Z")

</div>

> [@gadgetoid](#):
>
> `sudo i2cdetect -y 1`

sudo 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: – – – – – – 76 –

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [November 15, 2018, 8:00pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/12 "2018-11-15T20:00:13Z")

</div>

Sorry just saw that’s in your first post- _facepalm_ I’m not exactly firing on all cylinders!

Hmm- that’s the default i2c address for the BME680. What on earth is going on- I wonder.

Are you moving the same SD card between both Pi’s when testing?

Do you have any other i2c devices to verify there’s not something wrong with the Pi Zero? Sorry if I retreat the same ground!

---

<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:** [November 15, 2018, 8:49pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/13 "2018-11-15T20:49:05Z")

</div>

You say you don’t have pin 7 hooked up. Are you connecting it to the Pi via jumper wires? Is there a header soldered onto the BME680?

---

<div class="post-metadata">

**Author:** ![alex.tower](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@alex.tower](https://forums.pimoroni.com/u/alex.tower)\
**Post date:** [November 15, 2018, 10:02pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/14 "2018-11-15T22:02:05Z")

</div>

I have a luminosity sensor (tsl2561) to test. I could try and let you know

---

<div class="post-metadata">

**Author:** ![alex.tower](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@alex.tower](https://forums.pimoroni.com/u/alex.tower)\
**Post date:** [November 15, 2018, 10:05pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/15 "2018-11-15T22:05:51Z")

</div>

I soldered the header but nevertheless I’m using jumper wires, I have other jumpers on the second row and the header does not fit well. I have another breakout working on a Raspberry 3, maybe I should try if the problematic one works on the Raspi3 to understand where the problem is (whether the breakout or the Raspberry Zero)

---

<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:** [November 15, 2018, 11:11pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/16 "2018-11-15T23:11:48Z")

</div>

Phil @gadgetoid , didn’t we see a similar problem in another thread where jumper wires were used?  
@alex.tower make sure the jumpers are all the same length, and away from anything that might cause electrical interference. Maybe even swap them out just in case one of them is a dud or something?

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [November 16, 2018, 9:56am UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/17 "2018-11-16T09:56:36Z")

</div>

@alphanumeric yes, jumper wires can be a bit hit and miss! Due to anything from just poor quality connections/worn out cables, to coupling in noise or causing crosstalk between the data/clock lines.

@alex.tower it sounds voodoo but if your jumper cables are still connected in a single ribbon you might want to separate them out into individual strands.

---

<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:** [November 16, 2018, 10:15am UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/18 "2018-11-16T10:15:08Z")

</div>

I use the female to female jumpers all the time to connect sensor breakout boards to a Proto Hat or Proto Zero. Male header \< jumper \> male header. Mine are all separated. I’m fussy about what color wire I use for what function, and the ones I want to use are never all side by side ,lol.  
One thing I do do, when its going to become a permanent setup. Is remove the single shells from the ends and plug them all into a multi pin shell. So its all just the one plug with the wires in the correct order.

---

<div class="post-metadata">

**Author:** ![alex.tower](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@alex.tower](https://forums.pimoroni.com/u/alex.tower)\
**Post date:** [December 1, 2018, 6:59pm UTC](https://forums.pimoroni.com/t/pimoroni-bme680-oserror-errno-121-remote-i-o-error/8404/19 "2018-12-01T18:59:15Z")

</div>

> [@alphanumeric](#):
>
> jumper wires

Sorry, but I use jumper wires on my Raspberry 3 and another BME680 breakout without no issues, I do not think the problem is caused by those.
