Results 1 to 4 of 4

Thread: USB Port searching

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    54

    USB Port searching

    I'm writing user software which configures the firmware for an electronic device.
    It computer is linked to the device via USB.

    How do you find which number port to write for?

    I can set up a search to find used ports, but if the user has a device using port 4 for example, how can I check it is a USB device?

    I am using VB6.

    Thanks guys

  2. #2
    Fanatic Member namrekka's Avatar
    Join Date
    Feb 2005
    Location
    Netherlands
    Posts
    639

    Re: USB Port searching

    Opens that driver a virtual comm port? Then try to open in VB via MSCOMM ports 1 to 16. React on the error codes.

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2002
    Posts
    54

    Re: USB Port searching

    MSCOMM was a good start, thanks.

    I get error code 8002 - invalid port number if the port doesn't exist, which is great.

    If there are 2 ports that are being used, how can I tell which is the virtual USB port please?

  4. #4
    Fanatic Member namrekka's Avatar
    Join Date
    Feb 2005
    Location
    Netherlands
    Posts
    639

    Re: USB Port searching

    Sometimes 2 ports are used. However 1 port you will use for communication. With MSCOMM its a little problem to get the descriptions. (With API's you can get descriptions but these descriptions are sometimes not reliable).
    What I normally do is just try wich one is the good one and store that port for next session. With BlueTooth you must build in a delay for testing if the port is open or not. Sometimes even 2 sec!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width