Skip to content

Fix WebSerial DTR/RTS handling - #38

Open
PY5HC wants to merge 1 commit into
meshcore-dev:masterfrom
PY5HC:fix/webserial-dtr-rts
Open

PY5HC wants to merge 1 commit into
meshcore-dev:masterfrom
PY5HC:fix/webserial-dtr-rts

Conversation

@PY5HC

@PY5HC PY5HC commented Sep 11, 2026

Copy link
Copy Markdown

Summary

Explicitly deassert DTR and RTS after opening the WebSerial port.

Problem

On a Heltec WiFi LoRa 32 V2 (ESP32) running MeshCore Companion firmware v1.17.1-d929643 over CP2102 on Windows/Chrome, the WebSerial port opened successfully but the Companion handshake timed out.

The same behavior was independently reproduced in meshcore_py.

In meshcore_py, RTS was already explicitly deasserted, while DTR was not. Adding DTR = false alongside the existing RTS = false resolved the same APP_START / SELF_INFO handshake timeout.

A startup delay alone did not resolve the issue, and the connection continued to work after the delay was removed. This helped isolate DTR handling as the relevant factor.

Fix

After opening the WebSerial port at 115200 baud, explicitly set:

  • dataTerminalReady: false
  • requestToSend: false

The actual code change is shown in the PR diff.

Validation

Tested with:

  • Heltec WiFi LoRa 32 V2 / ESP32
  • CP2102 USB-UART
  • MeshCore Companion firmware v1.17.1-d929643
  • Firmware build: 14-Aug-2026
  • Windows
  • Chrome WebSerial

Before

  • WebSerial port opens successfully
  • Companion handshake times out

After

  • WebSerial connection succeeds
  • APP_START / SELF_INFO succeeds
  • Device is identified as A232F983
  • Disconnect/reconnect succeeds

Related validation

The equivalent control-line change was also tested independently in meshcore_py:

  • existing RTS handling remained unchanged
  • explicit DTR deassertion was added
  • APP_START / SELF_INFO began succeeding
  • the fix remained effective after removing the temporary startup delay

This confirms that the issue is related to serial control-line handling rather than firmware startup timing.

A separate upstream patch for meshcore_py will be submitted independently.

Scope

This patch is intentionally minimal and only changes WebSerial control-line handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant