Skip to content

Latest commit

 

History

History
61 lines (32 loc) · 4.31 KB

EyeGazeIoctl.md

File metadata and controls

61 lines (32 loc) · 4.31 KB

HID Minidriver Eye Tracker Sample (DMF/VHF)

This HID minidriver sample demonstrates how to write a HID minidriver for eye trackers using the Driver Module Framework (DMF) and the Virtual HID Framework (VHF). This is a reference implementation to match the HID specification for eye trackers.

Technical Notes

The driver utilizes I/O control codes (IOCTLs) to allow a user mode application to communicate with the driver. The included test app is capable of sending either mouse coordinates to the driver or "fake data" which sends a bouncing-line test pattern.

The use of the DMF brings a number of advantages. The driver itself has been built such that it can be used as is, extended, wrapped, etc. More documentation can be found at in the announcement blog post and WinHEC 2018 presentation.

For manufacturers this sample should provide the ultimate flexibility - use the driver as-is to pass in data from a user-mode process. As development progresses you can modify, wrap or extend the driver as needed.

Compiling

To compile, you must install the Windows Driver Kit and you must install Spectre mitigation libraries.

You will need to download the most current EyeGazeIoctl driver implementation. You will need to build the Dmf.sln followed by the DmfSamples/DmfSamples.sln. Be sure to build for the appropriate platform, such as x64 or x86.

Finally, build EyeGazeIoctlTestApp.

Driver Installation

In an administrator prompt, run devcon install EyeGazeIoctl.inf root\EyeGazeIoctl from the output directory of Dmf\DmfSamples\EyeGazeIoctl. If devcon.exe is not in your path, then it is located at C:\Program Files (x86)\Windows Kits\10\Tools\x64\devcon.exe or similar.

NOTE: Devcon WILL FAIL unless you have a kernel debugger running. Local kernel debugging is NOT sufficient.

Accept the Windows Security prompt.

Windows Security Prompt

If successful, you will see an entry in Device Manager listed as Samples->EyeGazeIoctl Device

EyeGazeIoctl Driver Installed

Running

The sofware test application (EyeGazeIoctlTestApp.exe) needs no arguments to run. Also note that EyeGazeIoctlTestApp.exe needs to be run from an administrative prompt or from Visual Studio running in administrator mode.

EyeGazeIoctlTestApp Running

Testing

An easy way to see the driver working is to install the Windows Community Toolkit Sample App. Once installed, open the app and navitage to Gaze->Gaze Tracing. If prompted, be sure to authorize eye gaze for the application. If the everything is working properly you should see a series of dots bouncing around the screen. The dots represent the gaze data being sent from GhostHidFrameProc.

Windows Community Toolkit - Test

Also included in this repository is GazeTracing, a simple application which replicates the functionality of the GazeTracing page of the Windows Community Toolkit Sample App noted above.

textvhid is a tool which dumps lots of information about the driver - raw report data, structure, results of HID queries, etc.

Related Topics

Creating UMDF-based HID Minidrivers

Human Input Devices Design Guide

Human Input Devices Reference

UMDF HID Minidriver IOCTLs