1

I have a pi 3 running Win10 IoT and 3 arduino pro mircos connected via usb. When I try to search via VID & PID for the arduinos I get back nothing:

var aqs = UsbDevice.GetDeviceSelector(vid, pid);
var arduinoDevices = await DeviceInformation.FindAllAsync(aqs);
//arduinoDevices contains 0 objects

However if I get all devices then search for ones with "Arduino" in the name I can find them. I actually get 6 back.

var devices = await DeviceInformation.FindAllAsync();
var arduinoDevices = devices.Where(x => x.Name.StartsWith("Arduino")).ToArray();
//arduinoDevices contains 6 objects

I'm guessing for each physical device there is an entry for accessing the board and another for accessing the bootloader. Is this correct? How do I know which is which?

The weird thing is when I look at the VID & PID from the 6 objects they show the same values I was searching for using the first block of code above. Is this a bug in Windows IoT, the Arduino, or am I doing something wrong?

If I search by VID & PID for other USB devices I can find them so I'm leaning towards it being something specific with the Arduino. On the default Win10 IoT dashboard I can see my 3 arduinos listed under "Connected devices" which leads me to believe there is a way to get the device entries I am looking for.

3
  • I cannot remember correctly now but there is something specific about searching using vid,pid - Some extra code was needed or a specific was needed. You passing those parameters as strings? Int's? Maybe it would be easier to use the find all devices and filter out using vid and pid that way (I think that was how I solved it) Commented Jul 25, 2016 at 7:02
  • UsbDevice.GetDeviceSelector(uint, uint) is the method signature. I define two constants that are passed in: const uint vid = 0x2341; const uint pid = 0x8036; Commented Jul 25, 2016 at 19:07
  • Instead of using the USB stuff in the Windows IoT extensions I am looking into using Windows Remote Arduino (blogs.windows.com/buildingapps/2016/02/04/…) and using UsbSerial class to send commands from the pi to the arduino. Commented Jul 25, 2016 at 19:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.