Touch TXT send forensics — repro and decision tree
Firmware with always-on tracing: serial @115200 plus on-device Settings → Diag panel (same lines mirrored).
One-shot repro (after flash)
- Cold boot (disconnect USB/power briefly), reconnect serial.
- Send DM messages:
aaa→ wait 3s →bbb→ wait 3s →ccc. - Press RST on the board; confirm Diag shows a new
BOOT #…line. - Send
ddd. - Capture: full serial log, Diag screenshot, and receiver-side hash column for each send.
What to look for in logs
BOOT #N r=R—Nmust increment only on real resets. IfNjumps between send #1 and #2 without you pressing RST → silent reboot.SEND#k boot=N— per UI send;bootshould matchBOOT #until next reset.TX BUF len=… crc=…— if CRC matches between sends with different text → UI/composer bug; if CRC differs butTX_COMPOSE h=matches → bug below compose.TX_COMPOSE … seq=… p0_15=…— must change between sends; includes FreeRTOS stack HWM (stk=) and RTC (rtc=/uniq=).TX_ENQUEUE/TX_DEQUEUE/TX_START/RADIO_TX_START/TX_DONE— same hash should flow; if compose hash ≠ dequeue hash → queue/pool issue; ifTX_STARTraw differs fromRADIO_TX_START→ unlikely (same buffer); if compose differs but radio raw matches → radio replay/driver.
Decision tree (after capture)
-
Boot count changes between send #1 and #2?
→ Treat as silent reset; use logs + WDT/boot reason to find crash site. RNG seeding (initTxtTxUniquenessFromRng) still prevents identical ciphertext across resets once root reset is fixed. -
Boot stable, TX BUF CRC same for different text?
→ UI path bug (composer buffer). -
CRC differs, TX_COMPOSE hash identical?
→ compose / pool path (e.g.composeMsgPacketnot reflecting new text). -
TX_COMPOSE differs, TX_DEQUEUE / TX_START differ?
→ Trace further toward radio; if on-air hash on peer still stuck → receiver/tooling.
Merged binary
Build touch env, then merge target:
python3 -m platformio run -e heltec_v4_tft_companion_radio_usb_tcp_touch -t mergebin
Artifact: .pio/build/heltec_v4_tft_companion_radio_usb_tcp_touch/firmware-merged.bin (copy to out/ with a dated name for flashing).