Make a note of the 4 digit numbers of interest, in this case VID is 0403, PID is 6001. A dialog box pops up, select the Details tab and Hardware ID's property. Select the port of interest, in this case COM8, right click and select Properties. Here's what I see on my machine when the Arduino board is plugged in. Open the device manager and expand the list of COM ports. Note that the device must be plugged in to make it visible. The information you need is located in the Device Manager, sometimes in more than one place. The intersection of the 2 lists is the COM port desired. My approach is to compile an array of all COM port numbers that were historically allocated to a particular VID/PID combination.įrom there it is simple to compare the list of COM ports open now to the list of comports that were allocated to the VID/PID. Most USB serial port devices have unique hardware ID's, so as you plug in more serial devices, each device is then allocated a unique COM port number. The lazy way is to display a list of all knownĬomports and get the user to select the correct one. I needed to write an application that interacted with an Arduino board via its COM port.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |