pkg/term

CSTOPB set for a serial port in OS X 10.6

Opened this issue · 0 comments

My serial port, by default, has one stop bit. After opening it with term.Open, it is set to two.

In shell, stty -a -f /dev/cu.usbserial prints out the following cflags:

cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
-dtrflow -mdmbuf

However, once I open the port (with RawMode), CSTOPB seems set. I added a debug print for termios.Tcgetattr(uintptr(t.fd), &attr): 36608. CSTOPB is 1024 on my computer and is therefore set.

I do not understand serial communication enough to figure out whether the issue pops up in the initialization of the port or somewhere else.