Skip to content

OpenEPaperLink Phase 1: owner-controlled tag push via the AP's local API - #4

Merged
Hoggormino merged 3 commits into
local-all-fixesfrom
oepl-support
Sep 23, 2026
Merged

Hoggormino merged 3 commits into
local-all-fixesfrom
oepl-support

Conversation

@Hoggormino

Copy link
Copy Markdown
Owner

Adds owner-controlled OpenEPaperLink (OEPL) support to TagTinker, rebased onto local-all-fixes. Three commits: the module, its host unit test, and a CI job.

What this does

A self-contained oepl module that shapes the OEPL access point's documented POST /imgupload request and manages the owner's config + tag allow-list, plus a read-only status/preview scene. It transmits nothing — the Flipper has no IP stack, so live push needs the Phase 2 ESP32-bridge frame and a real AP. This is the fully-testable FAP-side core.

The AP does all radio and rendering; the Flipper is a UI/controller. No proprietary retail-ESL protocol, no pairing, no radio, no discovery probing.

Safety model

  • Only tags on the owner's allow-list (APP_DATA/oepl_tags.txt) can be targeted — every request build is gated by tagtinker_oepl_is_allowed().
  • No secrets compiled in: AP host/port and an optional token live in APP_DATA/oepl.conf, read at runtime, never logged.
  • The owner names their AP and lists their own tags; nothing scans the network.

Contents

  • oepl/tagtinker_oepl.{c,h} — config loader, owned-tag allow-list, MAC normalizer, /imgupload multipart request builder (pure, testable).
  • scenes/tagtinker_scene_oepl.c — status screen + dry-run request preview (no send); reuses the existing text_box view.
  • Wiring: application.fam, the scene table/enum, a main-menu entry.
  • test/ — a host unit test that compiles the real module against stub furi/storage headers (no SDK/hardware). ./test/run_oepl_test.sh → 24/24.
  • .github/workflows/oepl-test.yml — runs that test on every PR (ubuntu, gcc, seconds). The repo's first host test; closes the "no test harness" gap.
  • docs/oepl-integration-plan.md — the 6-point plan and Phase 1/2 split.

Verification

  • ufbt build passes on the rebased tree (includes custom-size + OEPL): Target 7, API 87.1, no warnings.
  • OEPL host tests: 24/24 (MAC normalize, config/allow-list load from fixtures, the safety gate, exact /imgupload bytes + Content-Length).
  • /imgupload fields (mac, dither, file) confirmed against the OEPL wiki; the tag-DB endpoint path stays configurable.

Not in this PR

  • End-to-end push (Phase 2 ESP32-bridge frame + a real AP to test).
  • Tag-DB discovery/parsing (lands with the bridge that can fetch it).

Additive only; existing behaviour unchanged.

🤖 Generated with Claude Code

Hoggormino and others added 3 commits September 23, 2026 10:03
…cal API

TagTinker gains an OpenEPaperLink (OEPL) module that shapes the AP's
documented POST /imgupload request and manages the owner's config and tag
allow-list. This is the FAP-side, fully-testable core; it transmits nothing.
Live push needs the Phase 2 ESP32-bridge frame and a real access point.

Safety model:
- Only tags on APP_DATA/oepl_tags.txt can be targeted; every request build is
  gated by tagtinker_oepl_is_allowed().
- No proprietary retail-ESL protocol, no radio, no pairing, no discovery
  probing. The owner names their AP and lists their own tags.
- No secrets compiled in: AP host/port and an optional token live in
  APP_DATA/oepl.conf, read at runtime, never logged.

Contents:
- oepl/tagtinker_oepl.{c,h}: config loader, owned-tag allow-list, MAC
  normalizer, and the /imgupload multipart request builder (pure, testable).
- scenes/tagtinker_scene_oepl.c: read-only status screen with a dry-run
  request preview for the first owned tag (no transmission). Reuses the
  existing text_box view.
- Wiring: application.fam sources, scene table + enum, a main-menu entry.
- docs/oepl-integration-plan.md: the 6-point plan and the Phase 1/2 split.

Additive only; existing behaviour unchanged. ufbt build passes (Target 7,
API 87.1). Pure logic validated by a host reference test (21/21). The
/imgupload fields (mac, dither, file) are confirmed against the OEPL wiki;
the tag-DB endpoint path stays configurable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The repo had no unit harness (the earlier tests/ was removed in f144730).
This adds one that compiles the REAL oepl/tagtinker_oepl.c off-device against
stub furi/storage headers, so it needs no Flipper SDK or hardware and runs in
CI.

- test/oepl_test.c: 24 checks over MAC normalization, config + owned-tag
  allow-list loading (from test/fixtures/), the allow-list safety gate, and
  the exact POST /imgupload bytes + Content-Length.
- test/stubs/{furi.h,storage/storage.h}: minimal stubs; storage is backed by
  stdio with APP_DATA_PATH rooted at $OEPL_TEST_ROOT so the loaders read
  fixture files.
- test/run_oepl_test.sh: cc/clang/gcc runner (exit 0 = pass).
- test/fixtures/, test/README.md.

Not part of the FAP build (application.fam lists sources explicitly). The
tests transmit nothing and touch no network or radio. Verified: all 24 pass;
ufbt build unaffected (Target 7, API 87.1).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds .github/workflows/oepl-test.yml — a standalone GitHub Actions workflow
that compiles the real oepl/tagtinker_oepl.c against the test/stubs headers and
runs test/run_oepl_test.sh on ubuntu-latest (gcc, ~seconds, no SDK).

Standalone because the test/ harness and the existing build.yml currently live
on different branches; once they share a branch the job can be lifted into
build.yml verbatim. Verified locally: the exact CI command exits 0 (24/24).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Hoggormino
Hoggormino merged commit 7632bea into local-all-fixes Sep 23, 2026
1 check passed
@Hoggormino
Hoggormino deleted the oepl-support branch September 23, 2026 08:17
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