Repository navigation
cyberpunkunicorn-os 0.1.4: a reader that takes no commands is woken or named - #18
Merged
Merged
Conversation
…r named
Daniel's 0.1.3 logs: the PN532 ACKed its I2C address but every one of 43 polls
in 30 s ended 'no ack', about 700 ms each, i.e. every transfer ran into Wire's
timeout, even on a fresh power-up. readerOpen now asks for the firmware version
at 100 kHz and logs the answer; if none comes it frees the bus (9-clock recovery)
and starts the chip again once. A wait that sees 4 'no ack' polls in a row does
the same once, then ends with CARD_READER_STUCK ('reader_stuck' over the remote
protocol) instead of spinning to the timeout. Timeout replies also carry the ms.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Aw32AU4vVqCSEoNA5aP3U
hellofrequencylab
marked this pull request as ready for review
October 21, 2026 15:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Daniel's 0.1.3 logs from 2026-10-21 show a stuck reader. The PN532 ACKs its I2C address, and
hat.probesays it is live. But every one of the 43 polls in a 30 s placard write ended with "no ack", even right after a fresh power-up.Each poll took about 700 ms. With fast NACKs a poll takes about 120 ms. At 700 ms, every I2C transfer is running into Wire's 50 ms timeout, so something is holding the bus.
What changed:
readerOpen()now asks the chip for its firmware version at 100 kHz and prints the answer on serial ([freq] PN532 firmware ...). That line shows up in the website's device log.hatI2CRecover()), starts the chip again and asks once more. If it still doesn't answer, it returns the newCARD_READER_STUCK.waitCard()handles a reader that stops mid-wait. After 4 "no ack" polls in a row it does the same recovery once, then returnsCARD_READER_STUCKinstead of spinning to the timeout.reader_stuck. The timeout reply now includes the elapsed ms.freqCLI.Not built locally: this container can't reach the PlatformIO registry (403 on tool-scons). This PR's CI build is the compile check. Not yet run on the board.
Generated by Claude Code