Open soul4soul opened 5 years ago
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...
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.
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.
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.