-
Notifications
You must be signed in to change notification settings - Fork 15
OSError: [Errno 121] Remote I/O error on second run #8
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
Comments
How are you stopping the first run of the program? ? After stopping the first run, try power cycling the MLX before the second run. You can just pull the VIN wire out for a bit and put it back in. |
MLX has a terrible i2c interface, the chip may require a power cycle if you stop it mid-conversion? |
I tried the power cycle, but it didn't fix the problem. I also made the infinite loop finite with a counter, so that I don't need to manually terminate the script with Ctrl+C, but the results were the same as before. Then I commented some lines of the script to check if the bus initialization or the value reading causes the problem. The only thing that fixed it when I commented the |
well, thats the line that reads the sensor ;) is there any other MLX library that works? we could see if they do something different andra, can you try downloading the 'raw' python file and uninstalling from pip so you can make adjustments to the library to try different things? |
@ladyada Sure, I'd be glad to help in any way. Could you tell me how should I do that? That's my first python project to be honest :) I think I know how to uninstall the library with pip, but could you assist me with the "raw python file" usage? I also have an Adafruit ADS1115 and a ATSAMD09 seesaw, I'm not sure if they can assist the testing in any way. |
@kattni @caternuson do either of you have an MLX sensor you can also try with? |
@ladyada Sorry, I do not :( |
@ladyada It looks like I do have one. I need to get it assembled, and then try it on Pi. |
@ladyada I found this piece of code online for a different MLX90393 (it works for Adafruit's MLX90393 too). It runs every time without fail even after a ctrl+C interrupt. I noticed that if I run this code first, then run your guys' simpletest code, it would run fine. However, it does not convert the numbers into microteslas. |
This sensor appears to want repeated starts. The sensor appears to be somewhat forgiving about the repeated starts since it was working for the most part without them in the current driver. But by aborting the read loop and starting over the sensor was in a bad state and wouldn't play nice. A power cycle does fix this, but you have to pull all the wires - it stays back powered through the logic pins. Not sure why same thing does not happen on a native CP board (M4, etc). Anywho, checkout PR #10 for a possible fix. |
excellent find and analysis @caternuson! |
Update transceive for repeated start for #8
merged! |
@andrasfuchs Please try the 1.3.0 release when it becomes available: |
Thank you guys for your efforts! I can confirm that it works perfectly now. |
When I run the adafruit_mlx90393_simpletest.py script for the first time, it runs correctly.
[note: I made some formatting changes, but I didn't touch the sensor communication instructions]
But when I run the exact same script again, I get "OSError: [Errno 121] Remote I/O error":

I tried to disable and re-enable the I2C bus on my Raspberry Pi 3 Model B, but the only thing that fixed it was restarting the Pi, so I need to restart it every single time I want to test the sensor.
The text was updated successfully, but these errors were encountered: