Reading bytes from the serial unexpected terminated with the error
error(syscall.Errno) golang.org/x/sys/windows.ERROR_OPERATION_ABORTED (995)
Sample code
The sample code below
serialMode := &serial.Config{Name: "COM4", Baud: baudRate, Size: 8, Parity: serial.ParityNone, StopBits: 1}
port, err := serial.OpenPort(serialMode)
for {
reader := bufio.NewReader(port)
reply, err := reader.ReadBytes('\x0a')
if err != nil {
panic(err)
}
fmt.Println(reply)
}
Other info
Platform: Windows 10
Golang: go version go1.21.3 windows/amd64
Serial interface: USB to Serial
Reading bytes from the serial unexpected terminated with the error
Sample code
The sample code below
Other info
Platform: Windows 10
Golang: go version go1.21.3 windows/amd64
Serial interface: USB to Serial