BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Programming with Connected Devices

by Jonathan Allen on Jun 26, 2013 |

A major emphasis of WinRT 8.1 is the ability to control devices over HID, Bluetooth, and USB interfaces. These devices range from toys and gadgets to Point of Sale (POS) hardware to powerful 3D printers.

For standardized hardware, six “Device Scenario APIs” are offered:

  • Fingerprints replace passwords
  • Read barcodes and magnetic strips
  • Use Geofence to trigger events
  • Manage virtual smart cards
  • Print to 3D printers
  • Scan documents and images

For custom hardware WinRT developers can fall back on the new “Device Protocol APIs” for HID, USB, and Bluetooth.

Custom SDKs

Hardware developers are encouraged to release device specific SDKs. These SDKs will usually be expressed as a Windows Runtime Component that wraps the underlying Device Protocol API. For example, a SDK for a robotic arm would translate methods such as MoveUp, MoveDown, Open/Close Hand into the binary messages that the hardware expects.

Launch on Connect

Hardware developers can opt-in to Autiplay functionality. Once they do that, WinRT apps can register themselves as a Launch on Connect handler for the device. Like file type and URL protocol handlers, the user will be prompted if multiple applications are registered for the same device.

This is paired with Device Background Tasks, which allow apps to run for up to ten minutes. Device Background Tasks are primarily used for synchronizing data between the computer and device.

Device Metadata

In addition to the Autoplay support, devices can expose metadata packages that includes device icons, application auto-install information, other crucial information. To make this easier, a new device metadata editor is being offered. This tool first asks what your scenario is. Options include:

  • Device and App (i.e. matching Windows Store app)
  • Device-only (used for legacy device)
  • Broadband Device

The tool then validates the metadata package against the scenario using the same tests that Microsoft’s compatibility labs use. When errors are detected, links to MSDN are offered. If the tests are successful, the tool will emit a device data file to be included in the Windows Store app.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Updates by Jonathan Allen

Musical Instrument Digital Interface (MIDI) devices are not going to be supported in Windows 8.1. Microsoft is considering this in a future version.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT