Skip to content

Add read-only camera identification from MJPEG stream - #20

Merged
phryneas merged 9 commits into
mainfrom
stream-camera-identification
Sep 10, 2026
Merged

phryneas merged 9 commits into
mainfrom
stream-camera-identification

Conversation

@phryneas

@phryneas phryneas commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add cc2camera identify-camera PRINTER to 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:

  • two independent known EF-S7-V1.0.30B cameras with the same encoder signature: no APP0/JFIF, no DRI/restart markers, and the same quantization-table fingerprint;
  • one known EF-S7-V1.0.30D camera with APP0/JFIF 1.02 at 72x72 density, DRI 40, 22 restart markers per 640x360 frame, and a different quantization-table fingerprint;
  • affected 8 MiB 30B cameras with PCB manufacturing codes 0226, 0526 (two units), and 1526;
  • an early 4025 30B camera with a 16 MiB P25Q128H-family flash and materially different firmware/partition geometry.

The four-digit manufacturing code appears to use WWYY order, 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

  • read-only HTTP access only; no USB, HID, ADB, or camera writes;
  • requires three internally consistent frames;
  • bounds multipart lines, headers, frame sizes, and the HTTP timeout;
  • rejects malformed streams, unknown signatures, and mixed signatures;
  • reports that the stream cannot distinguish the two 30B flash-layout variants;
  • never lets a date code, PCB marking or stream result override firmware, capacity, partition-map or erase-geometry validation.

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.

Comment thread README.md Outdated
@phryneas
phryneas merged commit e001416 into main Sep 10, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant