Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to connect on WSL #16

Open
marcelb98 opened this issue Oct 15, 2020 · 1 comment
Open

Not able to connect on WSL #16

marcelb98 opened this issue Oct 15, 2020 · 1 comment

Comments

@marcelb98
Copy link

When I try to connect to a serial port from Windows Subsystem for Linux, this is not possible.

The code:

c, err := serial.Open(port, serial.WithBaudrate(9600), serial.WithParity(serial.NoParity),serial.WithDataBits(8),serial.WithStopBits(serial.OneStopBit), serial.WithReadTimeout(1000))
defer c.Close()
if err != nil {
   fmt.Print(port+" ")
   fmt.Println(err)
}

gives the error:

/dev/ttyS3 operating system error: inappropriate ioctl for device

If the code is compiled for Windows the connection is possible. Connecting to the serial console from WSL using screen is also possible. Any ideas?

@albenik
Copy link
Owner

albenik commented Nov 6, 2020

@marcelb98 I don enough time to investigate it, sorry. But will be glad to accept a PR if you or someone consider to make it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants