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

Add support for WSL1 #31

Open
soul4soul opened this issue Apr 30, 2019 · 3 comments
Open

Add support for WSL1 #31

soul4soul opened this issue Apr 30, 2019 · 3 comments

Comments

@soul4soul
Copy link

It is now possible to access windows serial devices from WSL. It would be great to see support for this in libserialport.

The first issue I ran into when attempting to use libserialport on WSL was port enumeration using sp_list_ports. The directory /sys/class/tty doesn't exist on WSL. I was using the Ubuntu 18.04 image.

@soul4soul soul4soul changed the title Add support for WSL Add support for WSL1 May 10, 2019
@thestumbler
Copy link

I would be very interested in this as well. My team is developing some multiplatform software, and due to a variety of factors my main machine with this client has to be a Windows box on which I run WSL extensively. Is it as simple as copying linux.c to, say, wsl.c, and changing the directory names? Surely not...

@thestumbler
Copy link

Any further thoughts on this issue? On a project of mine, I'm finally getting around to refactoring a multi-platform flash programming tool stm32flash so that it uses libserialport instead of its own internal code. Problem is, now I won't be able to use it within WSL any more once the change is complete. While I haven't dug deep into the code, it appears that this project uses posix calls to access the serial port, not unlike libserialport. Since it is able to work under WSL, this leads me to think (without really knowing the details), that making libserialport to work under WSL isn't a huge task.

@soul4soul
Copy link
Author

From what I remember the main code change is related to port enumeration. The way WSL exposes and shows available ports is different but once the port handle is identified the control of the port is the same. I haven't looked since I opened this issue so I could be all wet.

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