Skip to content

newtmgr fails with "Unknown baud rate" for non-standard rates (e.g. 1Mbaud) on macOS #37

Description

@Bedmonds91

Same root cause as apache/mynewt-newtmgr#227 — mcumgr depends on the same unmaintained github.com/tarm/serial.

On macOS, newtmgr's serial transport (github.com/tarm/serial) hard-errors on any baud rate that isn't one of a fixed set of termios constants — e.g. 1000000 baud (needed for some MCUboot bootloaders' serial recovery mode) fails immediately with "Unknown baud rate 1000000", even though the device/port itself is fine.

tarm/serial actually already has a dead, commented-out IOSSIOSPEED implementation in serial_posix.go (the standard way to set arbitrary baud rates on Darwin) — it was just never finished (uses os.NewError, which doesn't exist in modern Go) or wired into openPort().

I finished it here: https://github.com/Bedmonds91/tarm-serial-fork (tag v0.0.1) — includes build instructions for newtmgr specifically in the README.

tarm/serial looks unmaintained (no commits in years), so rather than PR there, flagging it here — newtmgr could either point its go.mod at a patched fork like mine, or (better long-term) migrate off tarm/serial entirely to something actively maintained like go.bug.st/serial, which already supports arbitrary macOS baud rates natively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions