go-serial icon indicating copy to clipboard operation
go-serial copied to clipboard

Address Non-Standard Baud Rate Caching

Open jalius opened this issue 7 months ago • 6 comments

Addresses https://github.com/bugst/go-serial/issues/207.

Fixes a case where read-modify-write of serial settings fails in serial.Open() and serial.Port.SetMode() when a non-standard baud rate is returned by the OS via getTermSettings, ultimately causing setTermSettings to fail with EINVAL.

jalius avatar May 20 '25 23:05 jalius

@deadprogram @twpayne @fbettag @pho @cmaglie Does this PR look reasonable? Anyone on a Mac? More details in https://github.com/bugst/go-serial/issues/207

jalius avatar Jun 25 '25 22:06 jalius

@jalius why are you @-mentioning me? I can subscribe to the notifications that I'm interested in, so why spam me?

twpayne avatar Jun 25 '25 23:06 twpayne

@deadprogram @twpayne @fbettag @pho @cmaglie Does this PR look reasonable? Anyone on a Mac? More details in #207

looks reasonable.

fbettag avatar Jul 12 '25 06:07 fbettag

Why not use B115200 as default value?

deadprogram avatar Jul 12 '25 06:07 deadprogram

Why not use B115200 as default value?

I don't have a strong opinion on this. Can we make a strong case for either value as a default? In the end, the value is overwritten by the subsequent syscall in setSpecialBaudRate.

jalius avatar Jul 17 '25 18:07 jalius

Why not use B115200 as default value?

I don't have a strong opinion on this. Can we make a strong case for either value as a default? In the end, the value is overwritten by the subsequent syscall in setSpecialBaudRate.

It just was a value that was unexpected, which caught my eye. No particular reason.

deadprogram avatar Jul 17 '25 18:07 deadprogram