RUI Studio Help

HMI UART

Protocol configurator and HMI UART monitor: set variables and pages. Not the USB burn link.

Use a monitor or a host MCU to change UI variables and pages over the protocol. Keep three roles separate:

  1. Panel (slave): STM32 + RA8889. It receives frames, writes ui_vars, and refreshes.
  2. Debug host: Studio Tools → HMI UART monitor, or SSCom.
  3. Product host: another MCU. Compile dwin_var.h / dwin_table.c into the host project.

dwin_var.h is not for the panel firmware. The panel uses UI_VAR_* from UIMap.

USB resource-pack flashing (Tools → Operate the device over USB-CDC) is a different command set. Do not mix it on the same wire. Do not let the monitor and the product MCU share one USART at the same time.

Configure the protocol first

Tools → Protocol configurator, or the protocol icon on the serial toolbar.

New projects default to variable/action driven (RUI core). You can also pick DGUS-compatible or TJC. OK writes the current project. Export emits rui_protocol_config.h.

Wiring and baud follow the configurator and the current demo (often 115200, 8N1). Cross TX/RX between the USB-UART and the panel.

Using the monitor

  1. Tools → HMI UART monitor.
  2. Pick COM and the same baud as the panel, then Open.
  3. The title area shows the protocol template name.
  4. Refresh rescan ports and rebuild variable/page lists from the project.
ButtonRole
Read version / read pageAsk the panel
Jump pageSwitch to the page in the dropdown
Write variableEncodes from the type dropdown (bool, int, float, string) — no hand-built HEX
Read variableRead the current value
Send HEXSends the frame as pasted

Names like password are masked; the log does not show plaintext.

The CRC checkbox affects TX from this PC only. RX tries both with and without CRC.

Log: blue is the monitor, green is the panel. You can hide heartbeats, search names or HEX, and export SSCom vectors.

VP

Without a DGUS import, the wire VP is the 1-based index of bindable scalars in Variable design. Nameless rows and arrays show and cannot use 82/83.

VPs change when the table changes. Trust the current table / RuiBuilder_UIMap.h.