Can no longer reference an I2C address which isn't present.
The IO Pi Plus is a 32 channel MCP23017 GPIO expander for the Raspberry Pi
04/02/2021
Posted by:
PeterB
I am moving the application to Pi4/RasPiOS Lite, and up to date ABE libraries..
I find that a call such as "iop1=IOPi(0x20)" now fails if address 20 doesn't exist on the I2C bus whereas it didn't cause a problem previously. Clearly, I will be able program around this, but it caught me out.
Is this change because of Pi3 -> Pi4 (unlikely), ArchLinux -> Debian (possible) or updated libraries (most likely)?
The error reported is:
Traceback (most recent call last):
File "Main.py", line 57, in <module>
main()
File "Main.py", line 21, in main
Initialise.Load()
File "/home/automate/Initialise.py", line 89, in Load
exec(string[1])
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.7/dist-packages/IOPi/IOPi.py", line 117, in __init__
self.__bus.write_byte_data(self.__ioaddress, self.IOCON, self.__conf)
OSError: [Errno 121] Remote I/O error
04/02/2021
Posted by:
andrew
I have made some changes to the IO Pi library over the last year, mostly optimizing the code and adding more validation and error handling.
Having said that the "OSError: [Errno 121] Remote I/O error" message is not one of the changes I have made and I believe it is a part of the I2C class that comes with Python so the error showing up now could be due to the move from ArchLinux to Debian.
You can find a list of the changes that I made to the IO Pi library in the change log in our GitHub repository. The last time I made a change to the library that would break backward compatibility was in 2017 when the IOPi class was renamed from ABE_IOPi.
06/02/2021
Posted by:
PeterB
This would suggest that there is some customisation of (fairly) standard libraries for different distributions.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.