1

I am building an Arduino-based peripheral for a project at work that interacts with a Service on the PC side that, when auto-detecting the serial port, does so through a WMI search for the Caption.

It therefore looks for any attached USB device the caption of which contains the substring "Arduino".

It then attempts a handshake, and if this is successful it sets up the permanent connection.

So far, so good; the problem is that there is another Arduino attached, which is accessed by a different service to which I have no access.

This other service has no handshake, and given that both Arduinos are identical the best idea that I can think of is to alter an element of the information presented to the WMI database so that I can search in the new service for the altered information.

However I have no idea how, or indeed if, I can alter that information in some way?

My ideal would be to initialise this as part of the code on the Arduino itself, but is this possible? If so, how?

I understand that I could alter the Registry directly but that feels very wrong!

Tombas
  • 111
  • 1
  • 10
  • Does the WMI output tell you which device the string is coming from? – cup Jan 31 '17 at 13:02
  • I harvest the COM port number from the [Caption] element of the USBdevice thus: var usbDevice = Convert.ToString(device["Caption"]) – Tombas Jan 31 '17 at 13:34
  • Could you check the *Name* or the *Description*? – cup Jan 31 '17 at 20:49
  • Yes. I can search for either [Name] or [Description]. – Tombas Feb 01 '17 at 17:57
  • I have this same basic issue (https://stackoverflow.com/questions/45306005/how-to-find-specific-teensy-in-com-list). The best I have come up with is, since the driver is the basic Microsoft driver the only info we have available is from the driver. If we want to write drivers we can sign the INF file and, in there, change the Hardware name. – Tom Padilla Jul 25 '17 at 16:06
  • @TomPadilla I looked at your question but can't comment - not enough rep! What language are you checking in? With .NET languages like C# you should be able to search by PID / VID using a WMI query - have you looked into this? – Tombas Jul 27 '17 at 13:33
  • I have not looked into WMI. I will check that out, thanks. – Tom Padilla Jul 28 '17 at 11:14

0 Answers0