apache / apache/mynewt-mcumgr-cli

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

Open
#37 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
83
Forks
43
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing newtmgr’s serial transport dependency from go.mod and inspect how it reaches tarm/serial’s serial_posix.go and openPort(). Compare the proposed patched fork or go.bug.st/serial support for arbitrary macOS baud rates, then verify that a 1000000-baud connection no longer fails with “Unknown baud rate.”

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.