ENG [#IOT] #RaspberryPi2 and #Windows10, List of connected devices to the Raspberry Pi 2 (7 on N)

Hello!

New post for Windows 10 and Raspberry Pi 2 series

  1. Hardware and software (1 on N)
  2. Boot from SD card in the device (2 of N)
  3. Hello World mode! (3 of N)
  4. Visual Studio deployment process and Web Management app (4 on N)
  5. Hello Blinky !!! (5 on N)
  6. Some admin tasks, like change password and change name (6 on N)
  7. List of connected devices in the Raspberry Pi 2 (7 on N)
  8. Deploy an app using the deploy package (8 on N)

Today we will use a little class DeviceInformation which was quite improved in Windows 8.1 to list all the devices connected to our Raspbery PI.

The example is quite simple, just an async call to DeviceInformation.FindAllAsync(), a some LINQ to eliminate duplicates

Clipboard02

The output we have is something similar to this one

  1. Generic SU32G SD Card
    1. {-\\?\STORAGE#Volume#{06b09fe3-ebbb-11e4-8d8e-806e6f6e6963}#0000000004800000#{53f5630d-b6bf-11d0-94f2-00a0c91efb8b id}
  2. MINWINPC
    1. {-\\?\ACPI#A_-_ARM_Family_7_Model_C07_Revision___5#1#{dbe4373d-3c81-40cb-ace4-e0e5d05f0c9f id}
  3. Generic USB Hub
    1. -Id \\?\USB#VID_0424 & PID_EC00 #5 & 3753427a & 0 & 1 #{a5dcbf10-6530-11d2-901f-00c04fb951ed}
  4. Generic Non-PnP Monitor
    1. -Id \\?\DISPLAY#Default_Monitor#1 & 8713bca & 0 & UID0 #{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}
  5. Microsoft GS Wavetable Synth
    1. {-Id \\?\SWD#MMDEVAPI#MicrosoftGSWavetableSynth#{6dc23320-ab33-4ce4-80d4-bbb3ebbf2814}
  6. Microsoft USB Optical Mouse
    1. -Id \\?\USB#VID_045E & PID_0737 #5 & 3753427a & 0 & 5 #{a5dcbf10-6530-11d2-901f-00c04fb951ed}

In addition to the name property, it is important to take take a look at the ID property, which shows the full path to access the device. For example, in the list, the 6th item is the mouse, and we can infer the values of Vendor Id and Product Id very easily

  • ID:VID_045E&PID_0737\\?\USB# #5 & 3753427a & 0 & 5 #{a5dcbf10-6530-11d2-901f-00c04fb951ed}
  • Vendor Id = 045E
  • Product Id = us

Which are always useful when working with connected devices.

Just as a curiosity, this is part of the output of the same app run in local mode on my laptop. This Universal apps is liking me 😉

Clipboard04

As always the code on GitHub that can be downloaded from here.

Saludos @ Home

/El Bruno

MSDN Device Information, https://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.devices.enumeration.deviceinformation.aspx

Advertisements

11 thoughts on “ENG [#IOT] #RaspberryPi2 and #Windows10, List of connected devices to the Raspberry Pi 2 (7 on N)”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.