kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.
Other
216 stars 91 forks source link

Exited with code null #25

Open jvondrus opened 10 years ago

jvondrus commented 10 years ago

Hello, I have a problem with some non-handled error from your i2c module.

My code works very well for many days when I'm using RPi i2c-tool command (i2cget, i2cset), but it has hight CPU load. I switched to your i2c node/coffee script before few days, it's works well and fast, but I'm getting error now. That error has no notice, no warning... node just exit with code null. Error appear randomly, sometime after 30min, sometime after 6 hours of run.

node supervisor says: "Exited with code null", so I don't have notice and log for inspect error part.

supervisor watching program and restart it after error, but I prefer inspect error and fix it. Is any way how to make i2c debug mode to work? I'm not good on coffeescript :(

Thank you very much.

jvondrus commented 10 years ago

It's looks, that problem is at Write section. I'm using i2ctool for write data to i2c and Node running without error for few days.

jvondrus commented 10 years ago

Problem is not only at Write section :(

Exit with code null will come around 1 time of 1 000 at Writing. At Reading it is around 1 time of 50 000.

Debug mode doesn't works, I cant inspect where is problem, but It's looks that problem is somewhere at coffee script at some unhanded i2c state.

kelly commented 10 years ago

I haven't encountered this issue. If you see the problem in the code, submit a pull request.

jvondrus commented 10 years ago

Code of your node and coffee module looks good. It's could be anywhere, source c code, h code, some node source ... Debug mode will be good, but it don't works on my device :(

I2C is temporary bus type at my project now, I will switch to RS485 later, I2C is too slow and it has length limit.

rzr commented 3 years ago

Is this issue still relevant on latest @abandonware's fork ?

https://libraries.io/npm/@abandonware%2Fi2c/usage

Relate-to: https://github.com/kelly/node-i2c/issues/97