Windows Vista Forums

Available Bluetooth Serial Ports in Vista
  1. #1


    Dave Harry Guest

    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


      My System SpecsSystem Spec

  2. #2


    Dick Grier Guest

    Re: Available Bluetooth Serial Ports in Vista

    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.



      My System SpecsSystem Spec

  3. #3


    Dick Grier Guest

    Re: Available Bluetooth Serial Ports in Vista

    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.



      My System SpecsSystem Spec

Available Bluetooth Serial Ports in Vista problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial Ports and Vista John Germany Vista hardware & devices 4 24 Jan 2008
Serial Ports in Vista? on.jolt@gmail.com Vista hardware & devices 5 16 Apr 2007
Serial Ports in Vista? on.jolt@gmail.com Vista General 5 16 Apr 2007
How to enumerate serial ports under vista? Fred Hebert Vista General 0 13 Mar 2007
serial ports ? ralf Vista General 2 08 Feb 2007