jacobsa / go-serial

A Go library for dealing with serial ports.
Apache License 2.0
626 stars 120 forks source link

Error opening serial port: SYS_IOCTL: inappropriate ioctl for device #45

Closed bseishen closed 1 year ago

bseishen commented 5 years ago

Trying to get this working in Windows Subsystem for Linux. "SYS_IOCTL: inappropriate ioctl for device" when trying to open the port.

AlexxIT commented 3 years ago

You need compile this little cpp app. And check output. Then change constants in code: https://github.com/jacobsa/go-serial/blob/15cf729a72d49e837fa047a4142fa6e4d5ab45a1/serial/open_linux.go#L14-L25

Same problem on mips https://github.com/jacobsa/go-serial/issues/27

But @philipgreat fix was very helpful.