Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

w2ksp4.exe, WwwxxXdbf, procmail "FROM_MAILER" patch, Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF

Links

XODOX
Impressum

#1: Available Bluetooth Serial Ports in Vista

Posted on 2008-04-21 03:45:40 by Dave Harry

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

Report this message

#2: Re: Available Bluetooth Serial Ports in Vista

Posted on 2008-04-21 21:00:05 by Dick Grier

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.

Report this message

#3: Re: Available Bluetooth Serial Ports in Vista

Posted on 2008-04-22 18:56:20 by Dick Grier

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.

Report this message