You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As reported by Jim Darby: I've had some very strange errors when not running as root and using pigpiod. Sometimes when you read from a SPI device you get back more data than you sent. This shouldn't be possible and I'm still investigating.
The text was updated successfully, but these errors were encountered:
I have come across a similar issue when using I2C via the GPIO socket implementation over a slow wireless network. I did not observe the problem when running the same code locally on the Pi via the loopback interface.
I think the problem might stem from PiGpioPacket#decode assuming that all the data for the packet, including the payload, is already available from the socket stream.
I have been able to solve this in a local build of pi4j which, rather than assuming all the bytes currently available, depending on the command (e.g. I2CRI, I2CRD) takes packets p3 value as a hint for the content length to expect.
This works for my I2C use cases. I don't have an SPI or serial project on the go at the moment, so have not been able to validate those cases.
I'd be happy to tidy my code an raise a PR for this if that would be helpful.
As reported by Jim Darby:
I've had some very strange errors when not running as root and using pigpiod. Sometimes when you read from a SPI device you get back more data than you sent. This shouldn't be possible and I'm still investigating.
The text was updated successfully, but these errors were encountered: