BT

InfoQ Homepage News Programming with Connected Devices in Windows 8.1

Programming with Connected Devices in Windows 8.1

Bookmarks

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.

Rate this Article

Adoption
Style

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.

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

Community comments

  • Updates

    by Jonathan Allen /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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

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

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.