Skip to content

TG-UV2+ live clone runs at wrong stop-bit setting: WebSerialPipe ignores driver stopbits #39

Description

@jasiek

Summary

#38 (issue #29) made tg_uv2p importable via a pyserial shim, so the Quansheng TG-UV2+ now registers, appears in the catalog, and its .img files load. But a live clone against real hardware has a remaining gap: the driver configures two stop bits at ident time, and the Web Serial bridge silently ignores it.

  • chirp/chirp/drivers/tg_uv2p.py:129 (do_ident): radio.pipe.stopbits = serial.STOPBITS_TWO
  • WebSerialPipe (web/python/runtime_bridge.py) has no stopbits handling — the assignment just sets an inert instance attribute.
  • web/js/serial.js:150 hardcodes stopBits: 1 in port.open().

So a real TG-UV2+ clone would run 8N1 instead of 8N2 and likely fail ident. The Node agent-CLI path (scripts/test-radio-harness.mjs via serialport) has the same gap: it never passes a stop-bits setting either.

Possible direction

Plumb serial framing parameters (at least stopbits) from WebSerialPipe attribute assignments through the JS bridge, reopening or reconfiguring the port when a driver changes them mid-session (Web Serial only accepts stopBits at open() time, so this likely means close/reopen with the current baud rate). Mirror the same in NodeSerialBridge for the agent CLI.

Scope notes

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions