Bluetooth stack inserts invalid COM port names into registry

The MS Bluetooth stack inserts corrupt serial port names into the registry at:

HKLM\HARDWARE\DEVICEMAP\SERIALCOMM\Device\BtModemNNN

after pairing with Bluetooth serial devices.

Viewing or exporting entry using regedit all appears to be correct, but (e.g.) SerialPort.GetPortNames() returns (e.g.) COM4Ԭ

This appears to be propogated from corrupt entries stored under HKLM\SYSTEM\CurrentControlSet\Enum\BTHENUM\

The corruption appears to be caused by the lack of a 0x0000 null terminator at the appropriate of the REGSZ entry.

The problem can be worked around by manually editing the registry entries and re-saving them, but this is less than ideal, and certainly would be beyond the skills of many users.

PLEASE can this be fixed.

Hi,

Welcome to Microsoft Community and thank you for your interest in Windows 10.

I suggest you to update the Bluetooth driver or update it from the manufacturer’s website sand check if it helps.

We recommend not to change any settings in registry.

DISCLAIMER: Important this section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756 (http://support.microsoft.com/kb/322756/ )

Hope this information was helpful and do let us know if you need further assistance. We will be glad to assist.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Can you detail the steps to fix this manually?  When you make the fix does it keep the change after re-boot?  I was having problems probably caused by this using the Windows 10 BT Stack.  I removed it an now I'm using the Toshiba Stack.  I would rather go back to the windows version as the Toshiba fix adds a lot of extra features I don't need.  Thanks in advance.  :)

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi,

I suggest you to update the Bluetooth driver or update it from the manufacturer’s website sand check if it helps.

We recommend not to change any settings in registry.

:

Hope this information was helpful and do let us know if you need further assistance. We will be glad to assist.

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

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Use regedit on the REGSZ value called "PortName" under registry Keys like:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\BTHENUM\{00001101-0000-1000-8000-00805f9b34fb}_LOCALMFG&0000\8&2e8757f5&0&000000000000_00000000\Device Parameters

If there's no entry for PortName, than move to the next registry section under BTHENUM.

The value for PortName will appear correct, but it actually isn't correct in the registry hive, so just open it, change it, then change it back to what is was (e.g. COM4).

Do this for all COMnn entries under BTHENUM

This is entirely at your own risk, make sure you have a registry backup before starting.

It does however resolve the problem. 

Dave

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated March 25, 2023 Views 1,121 Applies to: