Dango OS
Dango OS is a Rust companion-device system for ESP-Mosaico V1.2 / ESP32-S31 with a 480 × 480 AMOLED touch display. Its UI combines a directly drawn Home character, native LVGL pages, Lua applications, and composed transitions.
The EmbedScope adapter adds structured logs, metrics, an LVGL object tree, final-display capture, synthetic input, and a retained crash summary. It uses a dedicated USB CDC function alongside the existing console, application installation, and OTA channel.
Prepare the source and toolchain
Clone Dango OS and prepare its firmware toolchain. The application's embedscope feature controls diagnostics and is disabled by default.
The adapter uses escope-protocol, escope-agent, and escope-lvgl, selected together by the application's embedscope feature.
Use the firmware's rust-toolchain.toml, Espressif RISC-V GCC/newlib, and host libclang. The firmware's .cargo/config.toml contains local tool paths that may need environment overrides on another machine. Follow the Dango source build instructions for the platform toolchain.
Build with the feature
From the Dango source root:
The feature enables the diagnostic module, second CDC, UI-thread Agent, final-display capture, and rs_lvgl_ui diagnostics. cargo fw builds the release firmware; deploy it using the Dango installation or OTA procedure for the intended device. A build without embedscope omits this diagnostic path.
Normal and diagnostic firmware
embedscope is disabled by default. Cargo features select diagnostic functionality independently of the debug/release optimization profile:
The cargo fw alias already includes --release. An explicitly enabled feature remains present in a release build; --release does not disable it. Returning to plain cargo fw selects the feature-disabled artifacts without requiring cargo clean.
The device continues running its installed image. Installing an image without the feature removes the Agent, diagnostic CDC, and capture buffers. Dango's original console logs and OTA remain available.
Download the host CLI as shown in Quick start.
Select the second CDC and assert DTR
The console uses CDC communication/data interfaces 0/1. EmbedScope uses 2/3. The host metadata exposes different sides of that CDC pair:
Select the enumerated diagnostic path. Paths can change and are not portable across machines. A typical macOS diagnostic path is /dev/cu.usbmodemmosaico_s31_r13; confirm enumeration and identity before using it.
The adapter's receive path waits for asserted DTR. Inspect the device model, firmware build, boot/session, and declared capabilities in the response. One process uses a physical diagnostic port at a time. The separate console CDC can continue to carry its own protocol.
Inspect native and Lua pages
The Dango adapter builds a custom owned tree on the UI thread. It includes widget kinds, label text, and page names for native and Lua LVGL pages. Its application metadata is independent of NativeTree's class/layout classification and empty names.
Home character drawing lives outside the LVGL object tree. Capture reads a fixed mirror of the last completed final display upload, covering Home, normal screens, and slide composition. It is not panel GRAM readback or a camera observation.
Use the current tree and image to choose coordinates, then send one tap:
The example coordinates are the center of the display; the control at that location depends on the current page. Input uses the unified application route. Tap acceptance can precede a page switch, and tree/display sampling is independent. Refresh again after navigation completes.
For visual inspection, launch cargo run -p escope-desktop -- /dev/cu.usbmodemmosaico_s31_r13 from EmbedScope, check DTR, and connect. See Desktop Inspector.
Collect runtime evidence
Interpret Dango measurements by their actual source:
Structured rs_lvgl_ui.stats logs provide UI update information. Retain their target, device time, and loss markers. A quiet diagnosis may need a smaller --logs count because each record has a fixed three-second wait.
crash show reads the retained platform summary with available build/boot attribution. Check that attribution before associating a retained crash with the running firmware. Use Collect a diagnosis for report interpretation and Troubleshooting for reconnect, capture, and missing-data failures.