WSL icon indicating copy to clipboard operation
WSL copied to clipboard

WSL2 not able to access physical com port (Not USB!)

Open dat422 opened this issue 1 year ago • 4 comments

Windows-Version: Microsoft Windows 11 Pro Version 24H2 (OS Build 26100.4351) WSL Version: 2.4.13.0 Kernel Version: 5.15.167.4-1

I am trying to access a physical RS-422 serial port (D-Sub 9) from WSL2 on Windows 11 Pro Version 23H2 using Python. This is not a USB serial device — it is a real COM port. The industrial PC has four dedicated physical COM ports.

What I see:

  • The device works fine when connecting from native Windows using COM1.
  • In WSL2, /dev/ttyS0 through /dev/ttyS3 are visible.
  • I tried connecting via all of them, but none of them work.
  • I have checked the Windows registry for the serial device map and it looks fine.
  • I know about usbipd for USB devices

dat422 avatar Jul 03 '25 12:07 dat422

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

github-actions[bot] avatar Jul 03 '25 12:07 github-actions[bot]

/question

dat422 avatar Jul 03 '25 14:07 dat422

Diagnostic information
Found '/question', adding tag 'question'

github-actions[bot] avatar Jul 03 '25 14:07 github-actions[bot]

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!