feature article
Subscribe Now

Sensors in Windows

Microsoft Lays Down the Law

They were late to the party, but they seem to be deciding the menu.

Phones and tablets have accelerated the use of sensors dramatically, pioneered by Apple and Google. Windows 8 has just been released, and yet suddenly Microsoft seems to be calling the shots when it comes to sensor integration in consumer devices and computers.

Why? Well, they are a pretty big elephant, and, even if some might perceive that to make them slow and lumbering (or – gasp! – moving towards irrelevance), they still have a fair bit of leverage in deciding where they get to sit. And, clearly, although the other guys have led the way, Microsoft seems to be saying, “Um, we’ll take over laying out the road forward from here, mkay?” And sensor vendors are listening, making it clear with their new releases that they meet the requirements of the Windows 8 Human Interface Device (HID) spec. So Microsoft is being taken very much seriously.

Originally intended to handle such input peripherals as mice and keyboards, the current HID abstracts the concept of what constitutes a “human”: all sensors, whether or not they reflect input from a human, are managed under the HID umbrella.

At the most basic, the HID is an API. Like with iOS or Android, anyone wanting to make their sensors available on a Windows 8 system must target that API so that application software can access the sensor data.

But it goes beyond just a simple API. There are so many sensors, the number of which keeps increasing, that no system would be successful if it pretended to understand them all. Instead, sensors “describe themselves” to a system via reports that allow the OS to work with the specific sensors in the system.

When the system starts up, the driver needs to know how the sensor will be reporting data; it does this by requesting a “feature report” from the sensor. This defines basic sensor information like the current “reporting interval” (how often the sensor will report data – sort of like reverse polling, if used that way); the minimum reporting interval (the maximum data update frequency for the sensor); the connection type; the sensor sensitivity; and perhaps a human-friendly nickname for the sensor. At the same time, the sensor reports its current state, defining the data fields and value types.

During operation, “input reports” are sent to the driver either asynchronously, based on sensor report timing, or upon request by the driver (presumably based on a request from an application). Again, these reports are self-describing; the data is stored by the driver and, if the report was driven by an application request, is forwarded on to that application.

There are also sensor settings that may change over time – in particular, sensitivity and report frequency. The driver does this by writing a feature report to the sensor – again, usually at the request of an application.

Microsoft has made an attempt to “standardize” certain sensors by grouping them into “categories” and “types.” These, as well as specific sensors from vendors, are identified by a globally unique identifier (GUID). They’ve assigned some; vendors can also assign them.

In creating a sensor taxonomy, they have gone much further than Android has, as shown in Table 1, where the sensors that are officially recognized are listed. In addition to these specific sensors, there are also provisions for “generic” and custom sensors, allowing inclusion of sensors that don’t yet exist or don’t fit into these buckets. Sensors can also be declared individually or in collections.

 20121203_windows8_table1.png

Table 1. Sensors supported by Windows 8, with a comparison against Android. Bold sensors are required by Windows. Android has no required sensors.

Notes:

  1. Not required yet, but may be in the future.
  2. Deprecated.
  3. Required only if a Wireless WAN (WWAN,  like the cellular network) radio exists.

Note that I tried to find out what sensors are supported in iOS, but, unlike Windows and Android, that information doesn’t seem nearly as available. Googling yields numerous books and courses you can pay for, but not much in the way of free information. Welcome to the Apple-controlled universe, I suppose. Maybe I didn’t look hard enough, but if the info is out there, it’s less accessible than that of its competitors.

Microsoft makes a distinction between so-called “physical” sensors – like accelerometers – and so-called “virtual” sensors – like orientation or an inclinometer – that represent data fused from multiple physical sensors. In fact, you might imagine that, as people figure out increasing ways to combine physical sensor inputs to provide new information, the virtual sensor category might be one that grows more quickly than the physical category.

Presumably, data fusion can also take place at the application level. Which gives at least three levels at which fusion can reside: within the sensor itself; in low-level code, yielding a virtual sensor; and as part of an application.

Microsoft has also gone further than the others by requiring a base minimum set of sensors, indicated in bold in the above table. This sets a bar that says that, for any Windows 8 device, regardless of size or usage, there is a base set of sensors that aren’t optional. The assumption would seem to be that every Windows 8 device, regardless of how it’s used, will have to be able to provide, for example, acceleration and rotation information.

If that sensor information is irrelevant for the device at hand, presumably it would be possible to fake Windows out by providing the reports using dummy data – since, clearly, having to provision a system with a nonsensical sensor just for the sake of the OS would be silly with respect to BOM cost – not to mention space. Perhaps the assumption is that, if the system is big enough to run Windows, then the basic sensor set will, through universal harmonic convergence, be relevant.

So, regardless of whether or not you like Windows, or Windows 8 in particular, Microsoft seems to have done a decent job of forcing sensor vendors to take notice. Whether or not the requirements they lay down compromise system architecture openness – and whether or not that’s a good thing – remains to be seen. Right now folks are simply saluting and meeting the requirements.

One thought on “Sensors in Windows”

  1. How do you view Microsoft’s role in specifying sensor interfaces? Useful? No-op? Just part of what needs to be done for getting your sensor supported?

Leave a Reply

featured blogs
Mar 28, 2024
The difference between Olympic glory and missing out on the podium is often measured in mere fractions of a second, highlighting the pivotal role of timing in sports. But what's the chronometric secret to those photo finishes and record-breaking feats? In this comprehens...
Mar 26, 2024
Learn how GPU acceleration impacts digital chip design implementation, expanding beyond chip simulation to fulfill compute demands of the RTL-to-GDSII process.The post Can GPUs Accelerate Digital Design Implementation? appeared first on Chip Design....
Mar 21, 2024
The awesome thing about these machines is that you are limited only by your imagination, and I've got a GREAT imagination....

featured video

We are Altera. We are for the innovators.

Sponsored by Intel

Today we embark on an exciting journey as we transition to Altera, an Intel Company. In a world of endless opportunities and challenges, we are here to provide the flexibility needed by our ecosystem of customers and partners to pioneer and accelerate innovation. As we leap into the future, we are committed to providing easy-to-design and deploy leadership programmable solutions to innovators to unlock extraordinary possibilities for everyone on the planet.

To learn more about Altera visit: http://intel.com/altera

featured chalk talk

Electromagnetic Compatibility (EMC) Gasket Design Considerations
Electromagnetic interference can cause a variety of costly issues and can be avoided with a robust EMI shielding solution. In this episode of Chalk Talk, Amelia Dalton chats with Sam Robinson from TE Connectivity about the role that EMC gaskets play in EMI shielding, how compression can affect EMI shielding, and how TE Connectivity can help you solve your EMI shielding needs in your next design.
Aug 30, 2023
25,885 views