Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOError: [Errno 121] Remote I/O error #10

Closed
titusece opened this issue Jan 17, 2018 · 4 comments
Closed

IOError: [Errno 121] Remote I/O error #10

titusece opened this issue Jan 17, 2018 · 4 comments

Comments

@titusece
Copy link

Hello,

I am getting the below error when I run the examples.
Installed the libraries based on the README.

Seems my slave address is 0x77, but python code is using 0x76, thats why I am getting this issue ?

BTW, this one works, its C code.
https://github.com/twartzek/bme680-raspberry

But I would like to use python.

pi@picontainer1:~/bme680/examples $ 
pi@picontainer1:~/bme680/examples $ python --version
Python 2.7.13
pi@picontainer1:~/bme680/examples $ 
pi@picontainer1:~/bme680/examples $ 
pi@picontainer1:~/bme680/examples $ ls
indoor-air-quality.py  read-all.py  temp-press-hum.py
pi@picontainer1:~/bme680/examples $ python read-all.py
Traceback (most recent call last):
  File "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 285, in _get_regs
    return self._i2c.read_byte_data(self.i2c_addr, register)
IOError: [Errno 121] Remote I/O error
pi@picontainer1:~/bme680/examples $ 
pi@picontainer1:~/bme680/examples $ 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: -- -- -- -- -- -- -- 77                         
pi@picontainer1:~/bme680/examples $ 
pi@picontainer1:~/bme680/examples $ 

Thanks for the help.

@titusece
Copy link
Author

titusece commented Jan 17, 2018

Hello,

Edited the following file for I2C address.
https://github.com/pimoroni/bme680/tree/master/library/bme680/__init__.py

    def __init__(self, i2c_addr=I2C_ADDR_PRIMARY, i2c_device=None):
TO
    def __init__(self, i2c_addr=I2C_ADDR_SECONDARY, i2c_device=None):

Where,
I2C_ADDR_PRIMARY => 0x76
I2C_ADDR_SECONDARY=> 0x77

@Gadgetoid
Copy link
Member

Are you using our add-on board, or a generic bme680 breakout/your own hardware?

@djcaff263
Copy link

I am have the same issue but this didn't fix it for me. My I2C address is also 0x77 and im using a Adafruit bme680 chip.

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

@StefanFabian
Copy link

Instead of modifying the library you can also just pass bme680.BME680(i2c_addr=bme680.I2C_ADDR_SECONDARY) to the constructor of the sensor class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants