Repository navigation
Conversation
Cleanup build
Wombat-Firmware now counts packets with a corrupt count byte or an out-of-range address, mod 16, in the high nibble of REG_RW_MOT_DONE (kipr/Wombat-Firmware#12). Without a reader on the host, those lost writes are silent. WombatDevice::transfer() watches the nibble and logs a warning when it moves, at most once every 5 seconds, and once more on close if any are still unreported. The first value seen is the baseline. A step of -1 is ignored: the firmware's main loop can briefly write back the previous count. Older firmware leaves the nibble at 0, so it never warns. get_motor_done already masks the low four bits and is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
twells46
added a commit
to twells46/kipr-firmware-dev
that referenced
this pull request
Oct 12, 2026
Attacked Wombat-Firmware PR 12 (oscar/dma-write-bounds, 80ad31a on master 4814ab8), which clamps handle_dma()'s count byte to 42 and skips writes to addresses < 3 or >= 153. No regression for legitimate traffic, on the host harness or on hardware (H1-H10). Two trade-offs were found (A9, A10 in pr12.md): - A9: a count above 42 is corrupt; the firmware now recovers the real count from where the zero padding starts, and applies nothing if the body is as suspect as the count. - A10: rejected packets were invisible to the host; the firmware counts them mod 16 in the unused bits 7:4 of REG_RW_MOT_DONE. The firmware fix for both is Wombat-Firmware 6896e00, pushed to PR 12 with the review comment in pr12-comment.md. The host side of A10 is twells46/libwallaby#3. Both are verified on hardware. Adds: - pr12/pr12.md: attack summary, falsifiers, tests, results, and log - harness.sh and harness_*.c: host harness comparing handle_dma() across two refs - pr12_hw.py, pr12_warn.py, pr12_h10.py: hardware tests and the libkipr smoke test - firmware-a9-a10.patch and libwallaby-spi-rejects.patch - wombat.bin and build-info for every image built, run output, and flash logs Also ignores __pycache__ under investigation/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
twells46
force-pushed
the
master
branch
2 times, most recently
from
October 23, 2026 15:12
f29ddd3 to
1dd6cc8
Compare
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.
Host side of kipr/Wombat-Firmware#12.
What and why
Wombat-Firmware#12 makes the firmware repair or drop corrupt SPI packets instead of desynchronizing. That leaves the host with no sign that writes were lost. The firmware now counts those packets, mod 16, in bits 7:4 of
REG_RW_MOT_DONE, which were unused. This PR reads that counter and warns.Changes
module/core/src/device/wombat/wombat_device.cpp:WombatDevice::transfer()checks the counter after every good transfer.[core/wombat] [W]: co-processor rejected N corrupt SPI packet(s); some writes may have been lost.Nothing else changes.
get_motor_donealready masks the low four bits. Older firmware leaves the nibble at 0, so this never warns against it.Verification
Tested on a Wombat with the firmware from Wombat-Firmware#12 (
6896e00), using a build ofmaster(cf56155) plus this change:analog(0)at about 100 Hz with no bad frames: 0 warnings.spidevevery 10th call: 4 warnings (1, 48 and 48 at 5 s spacing, then 19 at exit). They total 116, the number injected.motor,off,freeze,mav,mrp/mtpwith the done bit), servos, digital, analog and button reads all behave the same as with stock libkipr 1.2.4. Three injected rejected frames gave one warning for 3 and left the motor done bit set.🤖 Generated with Claude Code