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
Summary
#38 (issue #29) made
tg_uv2pimportable via a pyserial shim, so the Quansheng TG-UV2+ now registers, appears in the catalog, and its.imgfiles 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_TWOWebSerialPipe(web/python/runtime_bridge.py) has nostopbitshandling — the assignment just sets an inert instance attribute.web/js/serial.js:150hardcodesstopBits: 1inport.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.mjsviaserialport) has the same gap: it never passes a stop-bits setting either.Possible direction
Plumb serial framing parameters (at least
stopbits) fromWebSerialPipeattribute assignments through the JS bridge, reopening or reconfiguring the port when a driver changes them mid-session (Web Serial only acceptsstopBitsatopen()time, so this likely means close/reopen with the current baud rate). Mirror the same inNodeSerialBridgefor the agent CLI.Scope notes
tg_uv2pis affected today: it is the sole runtime-imported driver that setspipe.stopbits(idrptouches pyserial only in its__main__test helper).🤖 Generated with Claude Code