Getting an Ardunio Uno working with Windows 8.1 apps

I started down the windy twisty road of attempting to get a native Windows 8.1 app to talk to an Arduino via the USB. Trouble began with the old tried and true method of just talking directly via serial. That option, phlebologist as far as I can tell, click doesn’t seem to exist any longer. So I dug in to the Windows.Devices.Usb part of the runtime. I should stop right here and point out a small problem with this solution. It will require you to swap drivers if you are writing and deploying code to your Arduino. This solution is really only going to best for machines that you have an app running on and your Processing code and hardware is complete. I quickly found that the native Arduino drivers will not work this way due to the requirement for using WinUsb.sys. Well I wasn’t going to be stopped there so I went ahead and made my own special Windows 8.1 INF for the Arduino Uno. Another reminder here, mind that the Arduino IDE won’t be able to talk to the hardware once you make the driver switch, but your Windows 8 app will. So while you’re developing you will need to swap drivers back and forth, or use dedicated machines. One other thing here is that the custom driver will not work unless you boot your machine in to the special mode that allows for unsigned drivers. Please follow this excellent steps from Denver Dias on his post installing unsigned drivers in Windows 8.1.

Here’s the code for my ArduinoWin81.inf:

; Installs WinUsb

Signature = "$Windows NT$"
Class     = USBDevice
ClassGUID = {88BAE032-5A81-49f0-BC3D-A4FF138216D6}
Provider  = %ManufacturerName%
CatalogFile =

; ========== Manufacturer/Models sections ===========

%ManufacturerName% = Standard,NTamd64

%DeviceName% =USB_Install, USBVID_2342&PID_0043

; ========== Class definition ===========

AddReg = ClassInstall_AddReg


; =================== Installation ===================

Include = winusb.inf
Needs   = WINUSB.NT

Include =winusb.inf
Needs   = WINUSB.NT.Services



; If your INF needs to copy files, you must not use the DefaultDestDir directive here.

; ================= Source Media Section =====================

1 = %DiskName%


ClassName="Universal Serial Bus devices"
DeviceName="Arduino for Win 8.1"
REG_MULTI_SZ = 0x00010000


You’ll need to go and create this document first.

Make sure you have your Arduino plugged in and then open up Control Panel > Hardware and Sound > Device Manager

Right click on the Arduino Uno and select uninstall. To keep the device from auto setting the official Arduino back you’ll need to click that Delete the driver for this device option. Don’t worry the actual driver will still be in your Arduino install folder when you need it again.

Then select Action > Scan for hardware changes

You should now have an unknown device like this:

Right click on the Unknown device and select Update driver software. Which will open this dialog

Select Browse my computer for driver software

Then instead of searching for your INF file click the Let me pick from a list of device drivers…

Now for the most unintuitive part, thanks to Microsoft’s odd UX here, scroll all the way down to Universal Serial Bus devices and select it

Select Next and the Have Disk… button

Then put the path to your INF file here.

If you click browse you might be surprised to find that it won’t let you select your INF file. I believe this is a bug in Windows. If you just put the whole path in here and click OK all will be good. That is if you followed the steps mentioned above and rebooted your machine in to the mode that allows unsigned drivers. Which is silly since we’re using WinUsb.sys from Microsoft, but I’ll let it slide for now.

You should see you Arduino for Win 8.1 under Model select and Next. You might get some warning messages, just click Yes on all of them.

If you see this:

Congratulation! We almost there!

Now go ahead and fire up Visual Studio and create a new or open an existing Windows 8.1 app. If you don’t have one you can start with the sample USB CDC Control app.

Once you have your solution open and ready to go right click on the Package.appmanifest and select View Code.

Inside the Capabilities section of the XML you’ll need to add this:

<m2:devicecapability name="usb">

The VID is the Vendor Identifier number for the Arduino Uno and the PID is the Product Identifier. If you’re using a different model of Arduino, you can get these numbers from the Device Manager

The class ID of 02 * * denotes a class of cdcControl which is what we’ll need for the Arduino. You can learn more about this by reading how to add USB device capabilities to the app manifest.

That should be everything you need to get your Arduino Uno correctly configured to work. I’m working on another post on how to actually write the code to talk to and retrieve data from your device.

If you want to get a jump start on that please read How to connect to a USB device over on MSDN

You can buy your own drone at Toys R Us

The second episode of world’s greatest user experience podcast UX This, caries diet visit is fresh out of the oven and ready for you to enjoy. In this episode we talk about user experience roles and the types of responsibilities the various roles have.
The second episode of world’s greatest user experience podcast UX This, diet visit is fresh out of the oven and ready for you to enjoy. In this episode we talk about user experience roles and the types of responsibilities the various roles have.
Your site looks great, but I noticed that you haven’t had a blog post in the last 30 days. I’m sure you are just too busy to write blog posts every week, page even here in January.

Luckily now you don’t have to!

Blogmutt can get you your choice of original blog posts every week for only $79/month. Click to find out what Inc. Magazine and the Wall St. Journal already know: “We work like a dog to fill up your blog!”
Continue reading “You can buy your own drone at Toys R Us”