2

Do I need to buy VID/PID USB identifiers when using virtual COM port through usbser.sys driver on Windows or is the device being tied to a unique COM port sufficient?

Edwin Evans
  • 2,726
  • 5
  • 34
  • 47

1 Answers1

2

The only real advantage to having your own VID and PID is that your device is more identifiable as your product, rather than something generic. Also, you can never guarantee you will be on a certain COM port, as something else may have taken that port number, no matter how obscure.

I would say that unless you are really bothered about your device coming up as something generic in device manager (and you have installed the drivers in a set-up program, so you don't get generic device installed messages on first plug-in) it's not worth bothering. The best bet to find your device is send a quick ID string down each port you can open (starting with your 'unique' one) to identify your COM port by the response.

There may even be some driver-signing woes to get involved with if you have your own PID and VID too (dependent on the USB-chipset vendor).

Adrian Taylor
  • 452
  • 2
  • 3
  • If we don't have our own VID/PID, could we have a conflict with another device that is taking this same approach? If we send down an ID string, what do you think the chance would be of that command messing up some other device? In terms of driver signing, I asked this related question about avoiding warning when using a built-in driver" and don't know whether I can avoid signing in my case. – Edwin Evans Sep 14 '11 at 20:02
  • There may be other devices using the same chip and driver, but they'll just get a different COM port: no problem with that. Any device that you can connect to isn't doing anything at that time, so you'll only upset something whose firmware isn't particularly well written (nothing should have a problem with receiving a bit random text or a binary code of some sort). This is what serial mouse drivers do anyway (I had some kit that got mistakenly recognized for a mouse once, so best to make your ID sequence bullet-proof). – Adrian Taylor Sep 14 '11 at 20:12
  • OK cool. One clarification though, what do you mean that any device that you can connect to isn't doing anything at that time? Is that because it wouldn't be possible to open the COM port if some other device was using it? – Edwin Evans Sep 14 '11 at 20:18
  • Actually I'm still a bit confused. If 2 different devices are using usbser.sys, would they show up as 2 different/independent COM ports? They should, right? – Edwin Evans Sep 14 '11 at 20:20