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

i'm getting lots of "Error: , Remote I/O error" #36

Closed
nielsnl68 opened this issue Sep 26, 2017 · 6 comments
Closed

i'm getting lots of "Error: , Remote I/O error" #36

nielsnl68 opened this issue Sep 26, 2017 · 6 comments
Labels

Comments

@nielsnl68
Copy link

@nielsnl68 nielsnl68 commented Sep 26, 2017

Hello,

lately i created a set of node-red nodes with your library as basis. And everything works very well most of the time. Except i'm getting "Error: , Remote I/O error" error sometimes.
I use node-red on a Raspberry Pi3 connected to a couple of arduino's.

Not sure where the issue is coming from.

@fivdi

This comment has been minimized.

Copy link
Owner

@fivdi fivdi commented Sep 26, 2017

All variants of the Raspberry Pi have an I2C hardware bug which prevents I2C clock stretching from functioning correctly. A symptom of this bug is "remote I/O errors". To avoid this issue do not use I2C devices which stretch the I2C clock with a Raspberry Pi.

Arduino UNOs are not particularly fast and it's relatively easy to implement code that is not fast enough to prevent an Arduino UNO from stretching the I2C clock.

I would imagine that you are seeing this issue here.

The default baudrate on the raspberry Pi is 100000. It can be lowered to 10000 by adding the following line to /boot/config.txt and rebooting the Pi.

dtparam=i2c_baudrate=10000

Give this a try to see if it helps.

If it does help you could increase the baudrate bit by bit to determine what the max baudrate is that functions correctly.

An alternative would be to catch the error and retry.

@fivdi

This comment has been minimized.

Copy link
Owner

@fivdi fivdi commented Sep 29, 2017

There's no todo for i2c-bus here so I'll go ahead and close the issue.

@fivdi fivdi closed this Sep 29, 2017
@emilbayes

This comment has been minimized.

Copy link

@emilbayes emilbayes commented Oct 5, 2017

This issue helped me too. Thanks!

@fivdi fivdi added the question label Jan 4, 2018
@fivdi

This comment has been minimized.

Copy link
Owner

@fivdi fivdi commented Apr 28, 2018

If you are having issues communicating with an I2C device connected to a Raspberry Pi and the issues are related to the hardware I2C clock stretching bug consider using software I2C rather than hardware I2C. See Configuring Software I2C on the Raspberry Pi for further details.

@msi-matthew

This comment has been minimized.

Copy link

@msi-matthew msi-matthew commented Sep 20, 2018

@fivdi Do you have an example of the a catch/retry?

@fivdi

This comment has been minimized.

Copy link
Owner

@fivdi fivdi commented Sep 20, 2018

There's an example using try/catch in i2cscan.js. The example doesn't retry but that shouldn't be too difficult to figure out using the example as a starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.