Open miniboom360 opened 5 years ago
I have the same problem on linux arm with Go 1.14. Handling of syscall error EINTR should be ignored.
for {
n, err := s.Read(buf)
switch err := err.(type) {
case syscall.Errno:
if err == syscall.EINTR {
// interruption by signal - ignore it (e.g. caused by Go)
continue
}
}
}
break;
}
Hello, I running on macOS sierra 10.12.6. I tried exactly as the example (except the port name, port name is cu.usbserial1 in my macBook). I sucessfully write string to the port but failed to read from it. it always return error. the error is called "read /dev/cu.usbserial1: interrupted system call", i've tried several times to send, but Disappointing results. any suggestions?
here is the code:
`import ( "fmt" "github.com/tarm/serial" "testing" )
func TestTarmSerialDataRecvAndSend(t *testing.T) { c := &serial.Config{ Name: "/dev/cu.usbserial1", Baud: 9600, }
} `