go-serial
go-serial copied to clipboard
A cross-platform serial library for go-lang.
platform: windows 10   ```golang package main import ( "encoding/binary" "encoding/hex" "fmt" "log" "time" "go.bug.st/serial" ) var testCOM = "COM23" var step uint8 type ReadPkgCallback func([]byte) func main() {...
panic: runtime error: index out of range [0] with length 0 ``` goroutine 883 [running]:\ngo.bug.st/serial/enumerator.retrievePortDetailsFromDevInfo(0xc00011f3b0, 0xc000121560, 0x5, 0x0) /go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_windows.go:351 +0x365 go.bug.st/serial/enumerator.nativeGetDetailedPortsList(0x0, 0x0, 0x0, 0x0, 0x0) /go/pkg/mod/go.bug.st/[email protected]/enumerator/usb_windows.go:299 +0x1b1 go.bug.st/serial/enumerator.GetDetailedPortsList(...) /go/pkg/mod/go.bug.st/[email protected]/enumerator/enumerator.go:31 ```...
Thank you for the great package. I would like to send a break signal to the port. How do I accomplish this? It like when using TeraTerm you send the...
I added support for sending an arbitrary length break signal Linux has a TCSBRKP ioctl which does it in a single ioctl but all the other unixes did not support...
The ReadIntervalTimeout on windows platform is set to -1, which causes the timeout function to work improperly. I tried to set it to 1 in serial_windows.go, then the function worked...
```go mode := &serial.Mode{ BaudRate: 115200, } port, err := serial.Open("/dev/cu.usbserial-1410", mode) if err != nil { log.Fatal(err) } defer port.Close() if err := port.ResetOutputBuffer(); err != nil { log.Fatal(err)...
Like `*net.Conn.Read()` or `*os.File.Read()` when a timeout occurs, return an error that can be checked with `os.IsTimeout()`
Hi, select syscall has a limitations: > select() can monitor only file descriptors numbers that are less than FD_SETSIZE (1024)—an unreasonably low limit for many modern applications—and this limitation will...
## Feature Request: Report the Interface Number in addition to the PID/VID/SN. Often now with composite USB devices, there may be multiple interfaces with the same VID/PID/SN and it would...
Many USB devices are composite devices that contain multiple interfaces. If such a device has two or more serial ports (comm ports) then they have the same VID, PID and...