473,320 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Available Bluetooth Serial Ports in Vista

I'm using the following code to determine the available serial ports:

ComboBoxPort.Items.Clear()
For Each sp As String In My.Computer.Ports.SerialPortNames
ComboBoxPort.Items.Add(sp)
Next

It worked well in XP, but under Vista (now with SP1) the Bluetooth ports
don't show correctly.
We have half a dozen different brands and types of Bluetooth on various
computers, and all are displaying this behaviour.

I get this list:
COM1
COM3
COM4
COM10ñ
COM12ñ
COM92
COM11

The ñ letters are random and is different every time the sub is called.

Device Manager reliably shows:
Communications Port (COM1)
PCI Serial Port (COM3)
PCI Serial Port (COM4)
Standard Serial over Bluetooth link (COM10)
Standard Serial over Bluetooth link (COM11)
Standard Serial over Bluetooth link (COM12)
Standard Serial over Bluetooth link (COM9)

Any help, please?

--
Dave Harry

Jun 27 '08 #1
2 1955
Hi,

I filter the extra stuff "out" (I've also seen this under XP), in code. The
routine is a little tricky, to handle every combination (that I've seen - it
may not handle everthing that might get thrown at it)... Or, I simply
replace the GetPorts call with a call to System.Management to retrieve the
real names. For some reason, the WMI code in System.Management has no
trouble with this.

I've got this code in my book, but if you send me email, I'll send you a
copy.

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
Jun 27 '08 #2
BTW, I have found that System.Management is not fully supported under Vista
x64 (odd, that), so the filtering scheme seems to be the only method there.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alvin Lau | last post by:
Can I write pocket PC bluetooth program by using C# ? It seems so difficult to find the library? If it is possible , where can i find the reference of these kind of program ? *** Sent via...
1
by: Nathan Young | last post by:
Hello. I have a .net application that utilizes COM ports to communicate with serial devices (namely a GPS). This may not be the right group for this question, but bear with me as I am not sure...
13
by: Al the programmer | last post by:
I need to access the serial ports on my webserver from an asp.net page. I have no problem accessing the serial ports from a windows form application, but the code doesn't work in asp.net. I have...
1
by: henrycortezwu | last post by:
Hi All, I'm trying to connect to a virtual port (COM19, OUTGOING, "Bluetooth Serial Port") using VS2005 System.IO.Ports. When I ran the ff code below here's what happens. 1) VS2005 Compiles w/o...
4
by: Boki | last post by:
Hi All, I am going to use some Bluetotoh API, should I include some special DLL or just call it directly? Best regards, Boki.
5
by: LongBow | last post by:
Hello, Is there a way, in .NET, to determine what are the avialable Serial (Communications) Ports on a Windows OS and is there a way to determine that port isn't being use other than attempting...
2
by: colin | last post by:
Hi, Im having a tiresome amount of trouble with using a bluetooth serial link. The receiving end is a bluetooth-rs232 module conected to my embeded system. The PC has a little usb bluetooth...
2
by: Paul Sijben | last post by:
To automate/ease configuration in my app I am trying to find out to which serial port a certain bluetooth device is connected. With pybluez I can find out which bluetooth devices I have, but it...
1
by: Z.K. | last post by:
I know this is probably not the correct newsgroup, but I can't find anywhere else that is appropriate to post it in. I need to figure out how to write a bluetooth program to access a bluetooth...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.