bme680-python icon indicating copy to clipboard operation
bme680-python copied to clipboard

IOError: [Errno 121] Remote I/O error

Open smallblackdog opened this issue 6 years ago • 16 comments

Hi,

I'm having a similar problem to https://github.com/pimoroni/bme680-python/issues/10 but the issue isn't my i2c address I think (it's 0x76 as defined for the primary in the constants file).

Any suggestions? I'm not really sure where to look.

Thanks,

pi@mypi:~ $ python2.7 Pimoroni/bme680/examples/read-all.py 
Traceback (most recent call last):
  File "Pimoroni/bme680/examples/read-all.py", line 6, in <module>
    sensor = bme680.BME680()
  File "/usr/local/lib/python2.7/dist-packages/bme680/__init__.py", line 25, in __init__
    self.chip_id = self._get_regs(CHIP_ID_ADDR, 1)
  File "/usr/local/lib/python2.7/dist-packages/bme680/__init__.py", line 296, in _get_regs
    return self._i2c.read_byte_data(self.i2c_addr, register)
IOError: [Errno 121] Remote I/O error
pi@mypi:~ $ 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 --                         

smallblackdog avatar Jan 19 '19 09:01 smallblackdog

What BME680 board are you using, and how is it connected?

Gadgetoid avatar Jan 21 '19 10:01 Gadgetoid

Ah yes, sorry, I should have mentioned that to begin with.

I'm using the Pimoroni BME680 Breakout board on a Pi Zero W running Raspbian Stretch (full install). BME680 software installed using the curl command from the readme. i2c enabled.

Pi has a Hammer Header. I've soldered the female connector into the BME680 board and have it plumbed in to pins 1,3,5,7,9; gnd on pin 9 matching the text on the board.

Thanks,

smallblackdog avatar Jan 21 '19 17:01 smallblackdog

Sorry for the monumental delay getting back to you- did you ever get to the bottom of this?

Gadgetoid avatar Feb 15 '19 20:02 Gadgetoid

Just came across this issue. in my case it was because the bme680 needs some time to init (5 min or so) then it worked. @Gadgetoid

georghildebrand avatar Oct 21 '19 19:10 georghildebrand

Also have this error. Was there ever any solution?

lokijota avatar Jan 18 '20 00:01 lokijota

I'm also having this exact issue, any solutions?

kurisubrooks avatar Jan 20 '20 07:01 kurisubrooks

Answering myself -- for me the error was that I was reading from 76 and the device is on 77. Fixed that and it's working fine.

lokijota avatar Jan 20 '20 08:01 lokijota

Checking i2cdetect it's definitely connected to 0x76, i've only started having problems with this since adding the official Raspberry Pi touchscreen, which also uses i2c for communicating touch...

kurisubrooks avatar Jan 20 '20 10:01 kurisubrooks

@kurisubrooks Is it the Pimoroni BME680 breakout that you're using?

sandyjmacdonald avatar Jan 20 '20 10:01 sandyjmacdonald

Yes it is @sandyjmacdonald

kurisubrooks avatar Jan 20 '20 11:01 kurisubrooks

Can you confirm whether it works without the touchscreen, or does it seem to be a permanent error now?

sandyjmacdonald avatar Jan 20 '20 12:01 sandyjmacdonald

It works correctly without the touchscreen. It appears to be related to the Pimoroni Breakout Garden (I2C board), as I soldered headers to the BME680 breakout and wired it without the breakout garden, and it appears to work correctly even with the touch screen.

However, with the touchscreen connected to the stacking headers on the Breakout Garden, the functionality of the connected I2C breakouts appeared to be compromised. Occasionally the BME680 would 'work', but I use this term very loosely as it would often report false data every few loops, giving values like -182°C and 740hPa. Without, however, there is no issue.

kurisubrooks avatar Jan 21 '20 05:01 kurisubrooks

Hi - I tried connecting to my Raspberry Pi 3 Model B to the BME680 breakout using the female 1x5 right-angle header and then the 1x5 male header but have been experiencing the same [Errno 121] Remote I/O error issue. I've followed all the steps outlined in https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-bme680-breakout

When running python3 read-all.py I get...

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/usr/local/lib/python3.7/dist-packages/bme680/__init__.py", line 25, in __init__
    self.chip_id = self._get_regs(CHIP_ID_ADDR, 1)
  File "/usr/local/lib/python3.7/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

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
  File "/usr/local/lib/python3.7/dist-packages/bme680/__init__.py", line 25, in __init__
    self.chip_id = self._get_regs(CHIP_ID_ADDR, 1)
  File "/usr/local/lib/python3.7/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

And when running python read-all.py I get...

Traceback (most recent call last):
  File "read-all.py", line 15, in <module>
    sensor = bme680.BME680(bme680.I2C_ADDR_SECONDARY)
  File "build/bdist.linux-armv7l/egg/bme680/__init__.py", line 45, in __init__
  File "build/bdist.linux-armv7l/egg/bme680/__init__.py", line 319, in _get_regs
IOError: [Errno 121] Remote I/O error

When I run i2cdetect -y 1 it shows...

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

I have tried swapping-out each of the cables individually but I get the same error every time. Here are some pictures of my latest set-up...

pi2 pi3 pi1

nicrivard avatar Apr 14 '21 09:04 nicrivard

Hello, I have the same issue. I have tried a lot of different things. Please help :)

LeniaMarga avatar May 04 '21 16:05 LeniaMarga

@nicrivard you've probably figured it out by now- but it's going to need soldering! Unsoldered pin headers are literally square pegs into round holes and don't make a great connection.

@LeniaMarga any luck since?

Gadgetoid avatar Feb 11 '22 11:02 Gadgetoid

@Gadgetoid, so you would never plug cables of I2C sensors directly to the 40-pin GPIO header? You would solder I2C sensor cables always directly to the Raspberry board, is it what you say? That's pretty crazy in case you want to exchange some components.

thomasgalliker avatar Jan 02 '23 09:01 thomasgalliker