Getting wrong serial-port names from bluetoothdevice (c#)

Posted by wurlog on Stack Overflow See other posts from Stack Overflow or by wurlog
Published on 2010-03-26T11:44:32Z Indexed on 2010/03/26 11:53 UTC
Read the original article Hit count: 267

Filed under:
|
|

To get all avaliable Serialports from the system i use the following command.

SerialPort.GetPortNames

It works fine for the mainboard serial port, but with the bluetooth device i get the wrong portnames.

For Example: Instead of COM7 i get sometimes COM70 or COM7ö. Its always 1 letter to much.

any suggestens?

PS: I am using newest Visual Studio Express in Windows 7 PPS: The dirty hack to cut the last letter didn't work because i don't know which one is the bluetooth serial port (with various bluetoothstick or devices it changes the number of the comport) and after trying various sticks i reached COM10, ergo COM100 or COM10f

© Stack Overflow or respective owner

Related posts about c#

Related posts about serial-port