RS485 locker controller drops frame bytes during burst unlocks on Debian Linux
A developer running an edge controller on a Raspberry Pi CM4 with Debian 12 reports that its RS485 link misreads status replies during busy periods. When several unlock requests arrive back-to-back, or polling overlaps an unlock, serial reads return partial frames or time out. The software then wrongly logs that a door failed to open, even though the solenoid physically released. Attempts so far include a threading lock around bus access, a lower USB latency timer, and a longer read timeout, none of which fully fixed the problem. The author is now asking whether clearing the input buffer before writing is discarding valid replies, or whether a byte-by-byte frame parser would be the better fix.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in