Windows 10: Bluetooth virtual COM port names corrupt when returned by GetPortNames.

Discus and support Bluetooth virtual COM port names corrupt when returned by GetPortNames. in Windows 10 Drivers and Hardware to solve the problem; My employer has a custom software product written in VB.NET and compiled with Visual Studio 2019 Professional that is run on tablet computers. The... Discussion in 'Windows 10 Drivers and Hardware' started by ProductCoder, Aug 17, 2022.

  1. Bluetooth virtual COM port names corrupt when returned by GetPortNames.


    My employer has a custom software product written in VB.NET and compiled with Visual Studio 2019 Professional that is run on tablet computers. The software uses Bluetooth virtual COM ports for serial communication, and has been working since the mid-2000’s on multiple brands of tablet computer under Windows XP Pro, Windows 7 Pro, and Windows 10 Pro. We recently had to change the hardware due to supply chain disruption, and the new tablet hardware is running Windows 10 IoT Enterprise. The software saves virtual COM port selections to its settings file, but cannot reload the settings from t

    :)
     
    ProductCoder, Aug 17, 2022
    #1

  2. Bluetooth virtual COM port names corrupt when returned by GetPortNames.

    My employer has a custom software product (written in VB.NET and compiled with Visual Studio 2019 Professional) that is run on tablet computers. The software uses Bluetooth virtual COM ports for serial communication, and has been working since the mid-2000’s on multiple brands of tablet computer under Windows XP Pro, Windows 7 Pro, and Windows 10 Pro. We recently had to change the hardware due to supply chain disruption, and the new tablet hardware is running Windows 10 IoT Enterprise. The software saves virtual COM port selections to its settings file, but cannot reload the settings from the file later due to the virtual COM port names being corrupted when returned by System.IO.Ports.SerialPort.GetPortNames() after a reboot. (And changing the software to recognize the corrupted names is not a reliable fix, because the corruption may randomly change in the future depending on the contents of memory etc.)

    This affects only the Bluetooth virtual COM ports. (The system also uses a USB to serial adapter for RS232 communication, and its virtual COM port is unaffected.) The Bluetooth virtual COM port names are correct in Device Manager, in the registry, and when retrieved via a PowerShell script and do not change after a reboot. They are corrupt when retrieved via System.IO.Ports.SerialPort.GetPortNames() before a reboot, but corrupted after rebooting. The problem persists after all Windows updates have been installed, and after the Intel Bluetooth driver has been updated to the optional driver provided by Windows Update.

    After the Bluetooth virtual COM port names are corrupted, using Device Manager to change a Bluetooth virtual serial port’s COM port number causes its virtual COM port name to be returned correctly by System.IO.Ports.SerialPort.GetPortNames() until the computer is rebooted. The user can log in and out of privileged and unprivileged logins (including the root Administrator) as long as the computer is not rebooted, and the correct COM port names will be returned. After a reboot (either by Shutdown and power up or by Restart) the Bluetooth virtual COM port names are again corrupted the same way as before. This is repeatable. To be clear about the origin of the problem, the COM port names are corrupt when returned to VB by System.IO.Ports.SerialPort.GetPortNames(), The corruption is not happening later in the program.

    This problem bears a resemblance to the problem in a forum post from 2018 regarding Windows 10 x64 10586.104 )“Bluetooth stack inserts invalid COM port names into registry” Redirecting). In both cases the names returned by the System.IO.Ports.SerialPort.GetPortNames() function are corrupted. However, the workaround presented in 2018 involved editing the corrupted COM port names in the registry, and the names are not corrupt in the registry this time. Therefore, the workaround provided in the forum thread is not applicable (I tried). The corrupted COM port names are also not found anywhere in the registry by a registry search, so it isn’t that they are just hiding in a different registry location. Also note that the corruption was in a similar form but was not identical to the 2018 incident.

    Windows 10 IoT Enterprise

    Version: 21H2

    Installed on: 8/‎2/‎2022

    OS build: 19044.1889

    Experience: Windows Feature Experience Pack 120.2212.4180.0

    Windows Update history

    Problem existed before installing Windows updates.

    Problem still existed after all Windows Updates were installed as of 8/16/2022.

    Problem still existed after optional Intel Bluetooth driver update provided by Windows Update.

    Is there a reliable workaround for this problem, or is an update from Microsoft needed?
     
    ProductCoder, Aug 18, 2022
    #2
  3. perdrix52 Win User
    Bluetooth stack inserts invalid COM port names into registry

    The drivers are all up to date as at 11 February on Windows 10 x64 10586.104. This is the MICROSOFT Bluetooth stack, so you can't fob this bug off on anyone else.

    This is the code that gets the port names:

    foreach (string s in System.IO.Ports.SerialPort.GetPortNames())

    {

    comboBoxComPort.Items.Add(s);

    }

    So they are corrupt as returned by the system APIs.

    So, again, please fix this.

    Dave
     
    perdrix52, Aug 18, 2022
    #3
  4. Bluetooth virtual COM port names corrupt when returned by GetPortNames.

    With Windows 10, can't open any Bluetooth virtual com ports

    I try your recommendation but nothing.

    the zebra says that the problem is from win10.

    https://km.zebra.com/kb/index?page=content&id=SO8986&actp=LIST

    in windows 8.1 the printer and bluetooth virtual ports works great for any devices which works via bluetooth.

    I think that Microsoft hasn't solve the problem (SPP ports) as well as think. Maybe Microsft programmers should check the code again. Bluetooth virtual COM port names corrupt when returned by GetPortNames. :)

    Thanks friend.
     
    PetrosTsig, Aug 18, 2022
    #4
Thema:

Bluetooth virtual COM port names corrupt when returned by GetPortNames.

Loading...
  1. Bluetooth virtual COM port names corrupt when returned by GetPortNames. - Similar Threads - Bluetooth virtual COM

  2. Problem to connect to virtual COM port in Windows 10

    in Windows 10 Software and Apps
    Problem to connect to virtual COM port in Windows 10: I have a bluetooth module in my new Board I have a good communication with My android Cellphone but when I Start to develop an APP with C# App in Windows 10, I had a problem.I can see the virtual port, but I can not open that and I can not send any thing on that.I recive this...
  3. Bluetooth virtual COM port names corrupt when returned by GetPortNames.

    in Windows 10 Gaming
    Bluetooth virtual COM port names corrupt when returned by GetPortNames.: My employer has a custom software product written in VB.NET and compiled with Visual Studio 2019 Professional that is run on tablet computers. The software uses Bluetooth virtual COM ports for serial communication, and has been working since the mid-2000’s on multiple brands...
  4. Bluetooth virtual COM port names corrupt when returned by GetPortNames.

    in Windows 10 Software and Apps
    Bluetooth virtual COM port names corrupt when returned by GetPortNames.: My employer has a custom software product written in VB.NET and compiled with Visual Studio 2019 Professional that is run on tablet computers. The software uses Bluetooth virtual COM ports for serial communication, and has been working since the mid-2000’s on multiple brands...
  5. Virtual COM Port problem

    in Windows 10 Drivers and Hardware
    Virtual COM Port problem: I recently bought a laser etching device that uses STMicroelectronics Virtual COM Port driver. I downloaded and installed the driver, and I was able to get the driver to appear under Ports in the Device Manager. When I check the properties, I get "This device cannot start....
  6. Bluetooth virtual COM port

    in Windows 10 Drivers and Hardware
    Bluetooth virtual COM port: Hello everyone I'm having trouble to open connection with a bluetooth device with a virtual com port SPP. I'm able to pair it Through bluetooth settings>advanced settings > Com port > add and everything goes fine. But when I want to open the connection with a software Here...
  7. Virtual COM ports

    in Windows 10 Drivers and Hardware
    Virtual COM ports: I am using Windows 10 and cannot find the COM and LPT settings I need to assign virtual COM ports. ?? https://answers.microsoft.com/en-us/windows/forum/all/virtual-com-ports/b0ef4b1f-c1ca-46aa-89a6-aa052ab3a0ca
  8. Unable to install virtual com ports.

    in Windows 10 Drivers and Hardware
    Unable to install virtual com ports.: Unable to install driver for virtual com ports. The installer says that the installation was successful but the comports do not appear in the Device Manager list. The specific software is SiliconLabs Dual CP210XUSB to UART Bridge Enhanced COM PORT. The SiliconLabs links...
  9. Unable to install virtual com ports.

    in Windows 10 Drivers and Hardware
    Unable to install virtual com ports.: Unable to install driver for virtual com ports. The installer says that the installation was successful but the comports do not appear in the Device Manager list. The specific software is SiliconLabs Dual CP210XUSB to UART Bridge Enhanced COM PORT. The SiliconLabs links...
  10. Virtual COM port

    in Windows 10 Drivers and Hardware
    Virtual COM port: Looking for software to create a virtual COM port in a 2018 Microsoft Surface (LTE/4g model) https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware/virtual-com-port/e2876692-3b02-49a7-a38e-3ffbfd70d472