-
Notifications
You must be signed in to change notification settings - Fork 0
UART Protocol
Roman Kuraev edited this page Jul 10, 2026
·
2 revisions
The original F103 sensor/display controller communicates with the EMW3165's STM32F411 over USART2 at 115200 8N1. Rewair keeps this interface so the stock sensor and display firmware remain in service.
*CMDLLLLLLLL\0field\0value\0...#
-
CMDis a four-byte ASCII token. -
LLLLLLLLis the eight-digit uppercase hexadecimal payload length. - The payload is a sequence of NUL-separated fields.
-
#terminates the frame.
The receiver validates the header, declared length, and trailer before handing a frame to the bridge.
Current firmware sends:
| Token | Purpose |
|---|---|
NETW |
Network state, RSSI, address, and MAC |
TINF |
Timezone and daylight-saving transition data derived from the saved POSIX rule |
TIME |
Current wall-clock time |
DISP |
Display mode |
SCOR |
Calculated score and sensor-index display data |
Current firmware handles these incoming frames explicitly:
| Token | Purpose |
|---|---|
SENS |
Sensor readings used for status, scoring, and MQTT |
REDY |
Sensor-board ready indication |
RUNN |
Running/liveness indication |
BTST |
Boot/self-test state |
TEST |
Test lifecycle state |
NETD |
Network-down request/state |
NETR |
Network-restart request/state |
The stock firmware contains more tokens than Rewair currently needs. Their names and likely roles are retained here without claiming complete semantics:
- Display and interaction:
SLEP,NOTI,SUND,KNCK,ALRM,TUTO,MESG,LEDS - Identity and status:
VERS,SCCD,DVID,MACA,SSID,WVER,SVER,WLOG,WSTA - Update and control:
HASH,UPGR,DOWN,FNOW,FDEF,DEBG,BOOT - Test lifecycle:
TEND
Some tokens may be bidirectional request/response pairs. Direction and payload meaning should be treated as unknown until observed on the wire or confirmed in the F103 firmware.
-
DISP mode clockshows the clock. -
DISP mode defaultblanked the display on the tested unit. -
MESG message hello timeout 5usesmessageandtimeoutfield names. -
LEDS color white blink 0produces a steady white LED. -
SCORrequires the emptyindexandsensorseparators used by the bridge.
- Which boot-context frames are mandatory before the F103 starts
SENS? - Whether
SCORis ever emitted spontaneously by the F103. - Whether
DOWNrefers to network state, firmware download state, or both. - Which unimplemented tokens are required to clear any F103-side error state.