Skip to content

v1.3.0

Latest

Choose a tag to compare

@manio manio released this 26 Nov 08:49
· 15 commits to main since this release

What's Changed

@manio's work:

  • Hardware H.264 Codec for the Video Overlay
    • Added a Sophgo CVI hardware codec backend (overlay_hw_accel = "cvi", also probed by auto after V4L2) for the Milk-V Duo S (SG2000/SG2002), built on the vendor cvi_mpi libraries.
    • Made it work with a strict car head unit that only advertises MEDIA_CODEC_VIDEO_H264_BP: CAVLC entropy plus a patched SPS/PPS (zero-latency VUI, constrained-baseline flags), a tolerant decoder (no hard error while no picture is ready, display queue 0, longer first-frame wait), and fixed-QP rate control by default (h264_encoder_qp, else 26) instead of 4 Mbit/s CBR. AA_PROXY_CVI_RC=cbr and AA_PROXY_CVI_QP override this.
    • The official Raspberry Pi 3, 4 and Zero 2 W images now ship the bcm2835-codec module, so hardware acceleration there only needs a higher gpu_mem (README updated).
  • Video Overlay
    • Added anchor-based positioning (9 positions: anchor_horizontal, anchor_vertical, offset_x_px, offset_y_px). box_margin_right_px/box_margin_bottom_px still work and the default stays bottom-right.
    • Cluster and auxiliary displays can now have their own overlay file (overlay_<id>.json, with its own text, style and TTF font, re-read live). The file must exist when the phone connects; displays without one behave as before.
    • /overlay takes an optional ?display=<id>, supports DELETE, and has a new GET /overlay/displays; the Overlay Editor got a display selector.
  • Bluetooth Call Audio (bt_sco)
    • Fixed the mic uplink: the HU microphone is now low-passed and properly resampled to 8 kHz (plain decimation caused hiss, and 44.1 kHz sources got a wrong rate and pitch shift), and the uplink latency is kept bounded when the mic and SCO clocks drift (drops back from >60 ms to 15 ms).
    • Fixed the media bridge: SCO audio is converted to the sample rate of the sink (a 16 kHz GUIDANCE sink played the voice 3x slower), the latency creep with fixed cadence is gone (cadence_ms = 0 is the new default and paces each packet by its own duration), and HU ACKs for the bridge's own DATA are no longer forwarded to the phone.
    • SCO links that don't carry linear PCM (transparent, mSBC/LC3) are no longer bridged. Repeated error logs are rate-limited, the HSP responder answers only AT commands, and subnormal biquad state in the enhanced resampler is flushed (slow on some ARM cores).
  • USB Gadget (FunctionFS)
    • Unbind of the MTP-stage gadget moved off the async worker, and FFS endpoints are no longer touched when the host never enabled the gadget. That ioctl blocked a tokio worker (wchan=ffs_epfile_ioctl) and stopped the runtime heartbeat. An error is returned instead, so the gadget is torn down and retried.
  • Bluetooth
    • bt_connect_attempt_timeout_secs is clamped to 5–20 s (0 keeps the built-in 20 s), because longer values let bluer's own timeout fire first and bring back br-connection-busy.
  • Fixes
    • Fixed aa-proxy-rs aborting on startup on low-RAM boards (e.g. aaw2b, no Wi-Fi AP and no Bluetooth since v1.2.0): rusty_h264 was installing rusty_alloc as the global allocator and reserving a 1 GiB arena. Now built without default features (global-alloc). Reported by @denisfrench, refs #141.
    • Fixed closing the SDR geometry dialog by its backdrop, and the duplicated /sdr-ui/current fetch.
    • Config field descriptions are now HTML-escaped (the overlay_font_path tags used to make the rest of the page bold/italic, and <subnet>/<iface> placeholders were hidden). Reported by @Deadknight.
  • Media Tap
    • Added opt-in media_tap_keyframe_toggle (experimental): toggles video focus native→projected on tap connect for real video channels, so a client no longer waits ~65 s for the next IDR (injected displays already did this). Based on @freezed23's work, closes #142.
  • Build System
    • Docker binary builds no longer use io-uring (which refuses to start the real FunctionFS path) and now match the Buildroot feature flags via CARGO_FEATURE_FLAGS; the cross-build containers use a vendored OpenSSL, applied only inside the container.
  • Housekeeping
    • README: overlays on cluster/auxiliary displays, dashboard-preview example, CVI/hardware acceleration docs. Bump version to 1.3.0.

@Deadknight's work:

  • Web Interface
    • Split the dashboard into pages with a left page-navigation rail (#/<page> routes) and a separate right-hand tools rail.
    • Added an Overlay Editor page: visual editor for the overlay text, 9 anchor positions, colors, padding, border and spacing, with a canvas preview. It ships with Telemetry, Temperature and DTC alert templates.
    • Added a Dynamic Overlay Builder: overlay text from a list of fields (dynamic REST/WS values, existing websocket topics or static text) with label, unit, decimals, fallback and color, plus LIVE/SAMPLE/WAITING/STALE badges and curl/WebSocket examples. Closes #149.
    • Replaced the WASM hooks panel with a WASM Store page: Installed (upload/delete) and Discover (catalog from aa-proxy/wasm-catalog-registry, size and SHA-256 verified before upload).
    • Turned the Display Margins drawer into an SDR UI Editor page with connection/profile status chips, stored vehicle profiles and a per-vehicle/per-phone profile editor with a geometry dialog.
    • Added an SDR Info page (read-only viewer of the ServiceDiscoveryResponse with raw JSON copy/download) and a Display Injection page (web version of the companion app screen).
  • Overlay Data API
    • Added dynamic overlay sources with per-field TTL ({{ws.overlay.<source>.<field>}}), partial merging updates, and an authenticated API: POST/GET /overlay/data and /ws/overlay. It is disabled (503) unless OVERLAY_DATA_TOKEN (16–256 chars) is set.
    • Added the /overlay API (GET/PUT, atomic write) for the companion app.
  • SDR Snapshot
    • Every observed ServiceDiscoveryResponse is now persisted to /data/aa-proxy-rs/last-service-discovery-response.json (mode 0600), and GET /service-discovery-response falls back to it after a restart. The x-sdr-source header says whether the answer came from memory or disk.
  • WASM Hooks
    • The hook list reports the sha256 of each hook, so the companion app can tell which version is installed. Closes #148.

@romariofilho's work:

  • Navigation Status Injection
    • Added a synthetic navigation_status_service (inject_navigation_status) for head units that don't advertise it (e.g. GAC Aion, Desay SV IC2254/49), so VehicleEnergyForecast (0x8008) from Maps is published on the vehicle_energy_forecast websocket topic and WASM hooks see ctx.nav_channel.
    • Send INSTRUMENT_CLUSTER_START after the injected channel opens, like a real cluster HU, because navigation apps only start sending status after receiving it. Closes #146.
  • Bluetooth
    • Added bt_connect_attempt_timeout_secs (shorter per-attempt limit, and success only counts if the device is really connected) and bt_connect_max_delay_secs (backoff cap, 1–60 s, default 15). Closes #147.
  • Bluetooth Call Audio (bt_sco)
    • Added the "enhanced" SCO downlink resampler (polyphase sinc 6x upsampler with a low shelf and a soft exciter, for less metallic call voice).
    • Added bt_sco_media_bridge_start_on_timeout (do not cut into the music with silence when a voice note opens SCO) and bt_sco_hsp_responder (answer the phone's HSP control channel, so Android routes call audio to the SCO listener).

@korhojoa's work:

  • WASM Hooks
    • Added WASM hook uploads over raw PUT bodies, a battery topic input (documented as reserved), and a private WASI folder per hook, so hooks can save state.

Full Changelog: v1.2.0...v1.3.0

Buildroot:

  • Milk-V Duo S: added hardware H.264/H.265 codec support via the new cvi-osdrv (out-of-tree cv181x_* and cvi_vc_driver kernel modules, VPU firmware coda980.bin/monet.bin) and cvi-mpi (libsys/libvenc/libvdec, linked with libatomic) packages, plus an S01cvi-vc init script. aa-proxy-rs is built with the cvi feature whenever cvi-mpi is selected — @manio
  • Raspberry Pi 3, 4 and Zero 2 W: bcm2835-codec is built as a module (V4L2 hardware H.264 for the overlay) and loaded from S00modules only if present. gpu_mem is intentionally unchanged — @manio
  • aaw1: reverted disabling wasm-scripting — the ~1 GiB allocation refused by the kernel came from rusty_alloc (global allocator of rusty_h264), not from wasmtime, and is fixed in aa-proxy-rs itself — @manio
  • CI: allow overriding the aa-proxy-rs ref via workflow_dispatch (aa_proxy_rs_ref) — @manio
  • milkv-duos: download the riscv toolchain to a fixed filename, so a leftover file in /tmp no longer breaks the tar/rm steps — @manio

Full BR Changelog: aa-proxy/buildroot@740b7f4...17b6ffb

Contributors

@manio, @Deadknight, @romariofilho, @korhojoa