Forum Discussion

MMM-IT's avatar
MMM-IT
Copper Contributor
Nov 09, 2023

Problems under Windows 11 with normal Serial Port acess and with USB to Serial Access

Hello

 

I encounter some problems under Windows 11 23H2 to access a simple Serial Port under .NET in C#.

My earlier installations with Windows 10 and earlier worked fine with that code and since I try on my new Notebook Dell XPS 9720 which only proposes USB3-C ports I added a USB3-C to USB3.1 Switch on which I added different USB to RS232 Adapters.

 

All the adapters work fine under Hypertrm in Windows 11.

 

But when using the Serial.Open function in C# through System.IO.Ports of .Net4 (identical usage as previously in Windows 10, I can't open the port and get the following exception (see attached image).

 

I checked the drivers of the CH340 USB to Serial are the newest Version (updated by Windows) and the device is marked running correct in the control panel. See other image attached.

 

There is one difference I could see in the Windows 11 installation the stack of devices is slightly different in the material configuration. See next image. There is an additional Serenum driver which was not shown on my windows 10 installation.

 

I have no more idea to get the serial port running on my new Win11 installation, anybody out there who encountered the same problem or anybody who has an idea about this ? Any specialists from microsoft around who could help me with this ?

 

Best regards

 

Martin

  • HanErdem's avatar
    HanErdem
    Copper Contributor

    Hello, I solved this problem using a very different method. First, I downloaded a free serial port splitter. With this application, we will clone the real source COM port into two ports with the splitter. For example, the real source will be COM3, and the clones will be COM1 and COM2. Download Realterm.

    • Set the serial port part of our code to COM1.
    • Run our code and get the authorization error. Keep the terminal running.
    • In Realterm, open the serial port to COM2 from the port tab.
    • Close it after connecting.
    • Make sure the terminal where you ran your code remains open.
    • Change the COM1 part in our code to COM2 and save it.
    • Congratulations, you have accessed your serial port secretly from Windows.

    https://freeserialportsplitter.com/ https://sourceforge.net/projects/realterm/files/Realterm/2.0.0.70/Realterm_2.0.0.70_setup.exe/download

    If I record a video, I will add the link here.

  • Mbithy's avatar
    Mbithy
    Copper Contributor

    MMM-IT 

    Do not relie on the windows ch340 driver. It will fail you. Uninstall the driver and download the 2014 WCH.CN driver. This will solve your issue. Guaranteed.

    • MMM-IT's avatar
      MMM-IT
      Copper Contributor
      Unfortunately no solution yet. But cool to know I'm not the only one to encounter that problem, seems strange to me, that there is such a bug in an old but still widely used Serial interface in 2023 in Windows 11.

Resources