Add read-only camera identification from MJPEG stream - #20
Merged
Merged
Conversation
phryneas
commented
Sep 10, 2026
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.
Summary
Add
cc2camera identify-camera PRINTERto identify known CC2 stock-camera revisions without removing the camera or attaching a USB cable.The command connects only to
http://PRINTER:8080/, reads three MJPEG frames, and compares stable JPEG encoder structure against the observed 30B and 30D fingerprints. Unknown or inconsistent signatures fail closed instead of being guessed. The main README now leads working-camera identification with this read-only path before hardware disassembly.The 30B result identifies a camera family, not fix compatibility. Hardware evidence now shows distinct early 16 MiB and affected 8 MiB variants sharing the same 30B PCB label.
Evidence used
Manual analysis in the development session found:
EF-S7-V1.0.30Bcameras with the same encoder signature: no APP0/JFIF, no DRI/restart markers, and the same quantization-table fingerprint;EF-S7-V1.0.30Dcamera with APP0/JFIF 1.02 at 72x72 density, DRI 40, 22 restart markers per 640x360 frame, and a different quantization-table fingerprint;0226,0526(two units), and1526;402530B camera with a 16 MiB P25Q128H-family flash and materially different firmware/partition geometry.The four-digit manufacturing code appears to use
WWYYorder, but it is supporting evidence rather than a compatibility cutoff. The supplied streams, dumps and photographs remain outside the repository. Only structural metadata, aggregate observations and hashes are committed; contributor identities are not recorded.Safety / behavior
Tests
Added synthetic tests for known-signature matching, fail-closed behavior, multipart framing/bounds, and address validation, plus CLI tests that verify the command does not touch USB/HID/ADB paths and does not claim that every 30B is affected.
Manual local comparison against the three supplied captures resolves both independent 30B samples as 30B and the known 30D sample as 30D. The complete offline suite passes: 161 tests.