ArduinoUno_R3_Front

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, as far as I can tell, 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, 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
;

[Version]
Signature = "$Windows NT$"
Class     = USBDevice
ClassGUID = {88BAE032-5A81-49f0-BC3D-A4FF138216D6}
Provider  = %ManufacturerName%
CatalogFile = WinUSBInstallation.cat
DriverVer=09/04/2012,13.54.20.543

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

[Manufacturer]
%ManufacturerName% = Standard,NTamd64

[Standard.NTamd64]
%DeviceName% =USB_Install, USB\VID_2342&PID_0043

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

[ClassInstall32]
AddReg = ClassInstall_AddReg

[ClassInstall_AddReg]
HKR,,,,%ClassName%
HKR,,NoInstallClass,,1
HKR,,IconPath,%REG_MULTI_SZ%,"%systemroot%\system32\setupapi.dll,-20"
HKR,,LowerLogoVersion,,5.2

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

[USB_Install]
Include = winusb.inf
Needs   = WINUSB.NT

[USB_Install.Services]
Include =winusb.inf
Needs   = WINUSB.NT.Services

[USB_Install.HW]
AddReg=Dev_AddReg

[Dev_AddReg]
HKR,,DeviceInterfaceGUIDs,0x10000,"{b4c121ba-85a8-49f7-8073-4f88e4d3985f}"

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

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

[SourceDisksNames]
1 = %DiskName%

[SourceDisksFiles]
WinUsbCoInstaller2.dll=1
WdfCoInstaller01011.dll=

[Strings]
ManufacturerName="Arduino"
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

New Episode of UX This

UX This Episode 9 AKA The Power and the Pain of PowerPoint

On the world’s greatest podcast Ariel and Ryan discuss the highly popular and successful application Microsoft PowerPoint. We heart PowerPoint the most when used the least.

Some things we talked about

 

Contact us and let us know what you think via twitter.

Ariel Leroux -  @Leonai_art Ryan Lane – @futileboy

via OGR Shows » UX This http://ogrshows.com/shows/podcasts/uxthis-podcasts/565

New Episode of UX This

UX This Episode 9 AKA The Power and the Pain of PowerPoint

On the world’s greatest podcast Ariel and Ryan discuss the highly popular and successful application Microsoft PowerPoint. We heart PowerPoint the most when used the least.

Some things we talked about

 

Contact us and let us know what you think via twitter.

Ariel Leroux -  @Leonai_art Ryan Lane – @futileboy

via OGR Shows » UX This http://ogrshows.com/shows/podcasts/uxthis-podcasts/565

New Episode of UX This

uxthis-logo300In this episode, Ariel Leroux is joined by special guest, Kevin Gamache, Search Engine Optimization specialist, who challenges Ariel and the Below the Fold Myth with his insights into the world of search engines and their abilities to effectively rank contents of any given website.

Does the argument stand up, or will Ariel be able to change his opinion on “The fold” and how it relates to search engine rankings?

You’ll just have to listen to find out!

 

Contact us and let us know what you think via twitter.

Ariel Leroux -  @Leonai_art
Ryan Lane – @futileboy

via OGR Shows » UX This http://ogrshows.com/shows/podcasts/uxthis-podcasts/547

New Episode of UX This

uxthis-logo300In this episode, Ariel Leroux is joined by special guest, Kevin Gamache, Search Engine Optimization specialist, who challenges Ariel and the Below the Fold Myth with his insights into the world of search engines and their abilities to effectively rank contents of any given website.

Does the argument stand up, or will Ariel be able to change his opinion on “The fold” and how it relates to search engine rankings?

You’ll just have to listen to find out!

 

Contact us and let us know what you think via twitter.

Ariel Leroux -  @Leonai_art
Ryan Lane – @futileboy

via OGR Shows » UX This http://ogrshows.com/shows/podcasts/uxthis-podcasts/547

New Episode of UX This

Iuxthis-logo300t’s our lucky number 7 show! Join us while we talk about the world of haptic technology or haptics. It’s that magic that can bring the real feel of things to your user experience.

Things we mentioned on this episode:

 

Contact us and let us know what you think via twitter.

Ariel Leroux -  @Leonai_art
Ryan Lane – @futileboy

via OGR Shows » UX This http://ogrshows.com/shows/podcasts/uxthis-podcasts/510

New Episode of UX This

uxthis-logo300Welcome to another episode of the world’s number one user experience podcast. In this episode, we talk about being compassionate, empathetic, and a team player as a UX professional, and how being humble enables a UXer to become increasingly better, in all areas of their life, personally and professionally.

In this episode, we referenced

 
Ariel also invents a new way to brush your teeth, with an iRobot Roomba!

Imagine THIS bad boy in your mouth!

Imagine THIS bad boy in your mouth!

Thank you for downloading, listening, and keeping up on our shows.

Cheers,

Ariel Leroux & Ryan Lane


A quick note for clarification
I (this is Ariel behind the keyboard) mentioned how/why I began following Whitney on twitter and sometimes I’ll see people who post comments about something that I can identify with, and then twitter suggests other individuals like this person, and after looking at their tweets I begin following them too.  So it could have been one of those circumstances.


via OGR Shows » UX This http://ogrshows.com/shows/podcasts/uxthis-podcasts/484

FUTURIST, USER EXPERIENCE DESIGNER & DEVELOPER