Peanup
Menu
PEANUP / ENGINEERINGREV. 0.2

From a local frame
to physical pigment.

These notes separate what the legacy application proves, what can be rebuilt with standard techniques and what still requires a Peanup hardware loop. They are implementation guidance, not campaign promises.

EEvidenceObserved in the binary, resources or recovered constants RRebuildReproducible with documented platform techniques HHardwareRequires controller documentation, capture or measurement
02 / ARCHITECTURE

Local first.
BLE only when updating.

The V1 path keeps capture, composition, six-color conversion and the gallery on the phone. A prepared frame is transferred nearby; the e-paper holds it after disconnect.

E: The recovered application links AVFoundation, PhotosUI, CoreImage, CoreBluetooth, ActivityKit and local file storage. Its core workflow does not require a photo-processing backend.

R: Isolate the image renderer from transport. A device profile owns panel size, color codes, packing, GATT identifiers and controller capabilities; the UI consumes stable progress states rather than protocol bytes.

  1. 01Input

    Camera, library, text or information-card bitmap.

  2. 02Render

    Crop, tone-map, quantize and dither locally.

  3. 03Transfer

    Negotiate a profile, pace blocks and persist pending work.

  4. 04Refresh

    Wait for the device result before marking the frame complete.

03 / PANEL PROFILE

Lock geometry first.
Then integrate the controller.

The manufacturer's Tentative Specification V0.2 defines SE0368NW34-CNG-A0 as a 3.68-inch AM EPD: 528 × 792 pixels, a 51.84 × 77.76 mm active area and a 56.24 × 86.54 × 0.87 mm panel module.

MATRIX
528 × 792
Portrait pixel matrix
ACTIVE AREA
51.84 × 77.76 mm
Visible image area
MODULE
56.24 × 86.54 × 0.87 mm
Excludes Peanup enclosure
WHITE
30% min. / 35% typ.
White reflectivity
CONTRAST
8:1 min. / 10:1 typ.
Surface reflectance ratio
TEMPERATURE
0–50°C
Panel operating range
BUS

24-pin / SPI

The panel exposes a 24-pin FPC and write-only 3-wire or 4-wire SPI. Controller operations must not be interrupted while BUSY is low; final command sequences follow the production controller documentation.

PANEL POWER

3.0 V typical

VDD is 2.8–3.6 V. The table lists 60 mW typical panel power, 50 μA Sleep with RAM retained and 1 μA Deep sleep without RAM retention. These are not Peanup whole-device figures.

PROVISIONAL LIMITS

Hardware loop required

Refresh time and panel weight remain TBD. The stated condition is indoor only, up to 2000 lux. Outdoor behavior, refresh speed and whole-device battery life require separate validation.

SPEC CONSISTENCY

The table lists both a 94 μm pixel pitch and DPI 259, while 51.84 mm / 528 pixels and 77.76 mm / 792 pixels both yield about 98.18 μm, or 258.7 PPI. Engineering and product pages use the result calculated from the pixel matrix and active area.

04 / IMAGE PIPELINE

One composition,
six physical codes.

The render target is 528 × 792 pixels. Preserve source aspect ratio and render against the selected hardware profile; never stretch an image to fit.

01 / GEOMETRY

Orient & crop

Normalize EXIF orientation, crop to the active panel profile and resize with a high-quality filter.

02 / TONE

Map the image

Control black and paper points, local contrast and saturation before palette assignment.

03 / COLOR

Quantize & dither

Choose the nearest calibrated pigment under a perceptual distance, then distribute residual error.

04 / WIRE

Index & pack

Pack color indexes according to the negotiated controller profile. Exact frame length follows the production panel matrix.

0x0Black0x1White0x2Yellow0x3Red0x5Blue0x6Green
panelWidth = 528
panelHeight = 792
pixelCount = panelWidth * panelHeight  // 418,176 pixels
// Wire length still depends on final palette depth and controller framing.

Geometry boundary: The website Canvas may use independent logical coordinates, but final output must render at 528 × 792. H: The production controller profile must still define palette order, bit depth, waveform and packet framing.

05 / DITHER ENGINE

A rendering system,
not a single filter.

A stable preview and a high-quality final write have different needs. Keep the source in linear or well-defined color space, use serpentine scanning for diffusion, clamp propagated error and treat text separately from photographs.

Floyd–SteinbergDIV / 16

Balanced four-neighbor diffusion and a practical compatibility baseline.

AtkinsonDIV / 8

Diffuses only part of the error for a crisper, higher-contrast result.

Jarvis–Judice–NinkeDIV / 48

A wider three-row kernel for smooth photographic tone transitions.

StuckiDIV / 42

Wide diffusion with slightly stronger edge retention than JJN.

BurkesDIV / 32

A two-row kernel that balances detail, memory and processing cost.

Sierra 3 / 2 / LiteDIV / 32 / 16 / 4

Three quality and cost levels for final output through responsive preview.

REALTIME

Ordered 4 × 4 / 8 × 8

Bayer thresholds are deterministic across frames, making them suitable for a responsive camera preview.

BALANCED

Floyd–Steinberg / Stucki

Error diffusion preserves local detail while keeping computation practical for the final frame.

PHOTO

Perceptual / Spectra Mix

Palette-aware tone mapping can preserve photographic structure, but legacy special mixing behavior is not yet fully recovered.

Content-aware ruleDisable or constrain cross-edge diffusion for typography, QR-like geometry and one-pixel lines. Validate photographs against a fixed reference set rather than tuning on color patches alone.

06 / CORE BLUETOOTH

Discover, negotiate,
pace, confirm.

FDF PROFILEFDF0 service

Recovered characteristics: FDF1 and FDF2.

FEF PROFILEFEF0 service

Recovered characteristics: FEF1 and FEF2.

  1. 01Scan target service
  2. 02Connect peripheral
  3. 03Discover service & characteristics
  4. 04Handshake & profile capability
  5. 05Send indexed blocks with pacing
  6. 06Wait for final ACK & refresh result
  7. 07Persist outcome & disconnect
NORMAL PATH

Write with response

Prefer the reliable CoreBluetooth path. Advance only after the system write callback or a protocol-level acknowledgement.

FAST PATH

Write without response

Enable only after capability negotiation. Respect maximumWriteValueLength and peripheralIsReady(toSendWriteWithoutResponse:) for backpressure.

The recovered response parser accepts leading values 01 / 02 / 03 / 05 / 06, but their complete business meaning is not yet bound to outbound commands. UUID discovery is not proof of direction, authentication or packet safety.

07 / POWER MODEL

The panel holds.
The system returns to sleep.

  1. IDLE

    MCU sleep with a deliberately bounded discovery strategy.

  2. CONNECT

    Temporarily advertise and negotiate a useful connection interval.

  3. TRANSFER

    Raise BLE activity while pacing blocks against the peripheral buffer.

  4. REFRESH

    Stop unnecessary radio work while the controller drives the panel waveform.

  5. RETURN

    Record completion, disconnect and restore the lowest valid power state.

H: Static e-paper retention does not establish whole-device standby current. Measure the assembled product, including MCU, BLE advertising, PMIC, charger, NFC and leakage, at multiple temperatures and refresh frequencies.

08 / VALIDATION BOUNDARIES

Build from evidence.
Measure the rest.

E / CONFIRMED LEGACY EVIDENCE

Local photo repository and thumbnails; six-color mode; recovered palette codes and nibble packing; FDF/FEF service families; normal and fast writes; indexed blocks; final acknowledgement and refresh waiting; QuickLZ-related alignment checks.

R / REBUILDABLE NOW

Capture and import, device-profile crop, local preview, standard ordered and error-diffusion algorithms, persistent pending jobs, CoreBluetooth scan/connect skeleton, backpressure, progress UI and fault injection with a simulated transport.

H / REQUIRES THE DEVICE

Characteristic properties and directions, outbound control bytes, packet headers and endianness, ACK semantics, checksum or CRC, QuickLZ version and framing, controller color order, refresh waveform, real throughput, thermal behavior, battery capacity and whole-device power.

V1 ARCHITECTURE DECISIONOn-device rendering + nearby BLE transfer + e-paper retention

Add always-on networking only if unattended or remote updates become a validated core need.