Skip to content

[Bug]: Station G2 TCP connection drops repeatedly when MeshMonitor is connected (2.7.21 alpha) #10101

@rancur

Description

@rancur

Category

WiFi

Hardware

Station G2

Is this bug report about any UI component firmware like InkHUD or Meshtatic UI (MUI)?

  • Meshtastic UI aka MUI colorTFT
  • InkHUD ePaper
  • OLED slide UI on any display

Firmware Version

2.7.21.1370b23 (alpha)

Description

The Station G2 repeatedly drops its TCP connection when MeshMonitor maintains a persistent connection on port 4403. The device accepts the TCP connection, begins the config exchange (LoRa config request), then drops the connection — cycling between connected and disconnected every few minutes.

The device is reachable on the network (HTTP on port 80 responds, TCP port 4403 accepts connections), but the Meshtastic protocol-level connection fails during or shortly after the config handshake.

Symptoms:

  • MeshMonitor connects successfully, requests LoRa config
  • Device drops the connection during config exchange
  • MeshMonitor reconnects, same cycle repeats
  • Pattern: connected → config request → disconnected → reconnect delay → repeat
  • The device web UI (/) responds normally throughout — only the TCP API connection drops

Environment:

  • Station G2 connected via WiFi on IoT VLAN (192.168.3.x)
  • MeshMonitor v3.12.0 running on Docker (Synology NAS), connecting via MESHTASTIC_NODE_IP
  • Active Arizona mesh network (~600+ nodes)
  • Virtual Node enabled on MeshMonitor side

Workaround: Rebooting the Station G2 (via POST /restart) temporarily restores the connection, but it drops again after some time. Currently using a watchdog script that monitors MeshMonitor's connection status and auto-reboots the G2 when it disconnects.

Likely related: This appears to be the same heap memory leak reported in #9632 (Heltec V4 / RAK4631), but affecting the Station G2. In that issue, heap usage continuously increases when a TCP client like MeshMonitor maintains a persistent connection, eventually causing the device to crash/disconnect. The symptoms here (periodic disconnects on a ~1-2 hour cycle) are consistent with a slow memory leak exhausting available heap.

MeshMonitor logs showing the cycle:

[INFO] [DataEventEmitter] Connection status: connected
[INFO] Node reconnect notification sent
[INFO] Skipping module config request on reconnect (already fetched this session)
[INFO] Virtual node server already initialized, refreshing connected clients with fresh config
[INFO] [DataEventEmitter] Connection status: disconnected
[INFO] Node disconnect notification sent
[INFO] [DataEventEmitter] Connection status: connected
[INFO] Node reconnect notification sent
[INFO] Skipping module config request on reconnect (already fetched this session)
[INFO] Virtual node server already initialized, refreshing connected clients with fresh config
[INFO] [DataEventEmitter] Connection status: disconnected
[INFO] Node disconnect notification sent

After a fresh reboot of the G2, the connection is stable initially but degrades over time:

[INFO] [DataEventEmitter] Connection status: connected
[INFO] Requesting LoRa config from device...
[INFO] GetConfigResponse structure: ["lora","payloadVariant"]
[INFO] Session passkey received from local node and stored (expires in 290 seconds)
[INFO] Starting remote admin scanner with 60 minute interval
[INFO] Starting time sync scheduler with 15 minute interval

Steps to Reproduce

  1. Connect a Station G2 to WiFi
  2. Point MeshMonitor (or any persistent TCP client) at the G2's IP on port 4403
  3. Wait 1-2 hours
  4. Observe repeated connect/disconnect cycling in MeshMonitor logs

Relevant log output

[INFO] [DataEventEmitter] Connection status: disconnected
[INFO] Node disconnect notification sent
[INFO] [DataEventEmitter] Connection status: connected
[INFO] Node reconnect notification sent
[INFO] Requesting LoRa config from device...
[INFO] [DataEventEmitter] Connection status: disconnected
[INFO] Node disconnect notification sent
[INFO] No device config available yet - returning null

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-logsDevice logs requested for triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions