Recommendations for Continua USB PHDC Device Driver Interoperability March 2012 Executive Summary This paper defines the Continua Health Alliance position on USB PHDC driver interoperability as it pertains to Continua Design Guidelines 1.5. Potential problems with interoperability related to Windows * USB PHDC device drivers are evaluated and recommendations that developers of PAN Managers for USB transport can implement. Based on the analysis of these problems, recommendations for a Continua strategy is discussed and the handling of generic Windows drivers based on WinUSB and LibUSB are provided. This paper does not cover application level interoperability beyond the development of USB drivers.
Contents Executive Summary... 1 Introduction... 2 Background and Description of USB PHDC Drivers Issues... 3 Presentation of Continua USB Devices to User... 4 Figure 1 Windows Device Manager... 4 Interoperability of USB PHDC Managers... 5 Generic USB Drivers... 6 Figure 2 USB PHDC Driver from Generic USB Driver... 6 Figure 3 Interface GUID... 6 Native OS Driver... 7 Integration of New Continua Devices with Existing Managers... 8 Conclusions and Recommendations... 9 Step I: Initial Approach... 9 Step II: OS Vendor Certified Device INF File... 9 Step III: OS Vendor Certified Universal INF File... 9 The Best: Native OS Driver... 9 Continua Recommendation for Use of Generic USB Drivers... 10 Glossary... 11 References... 11 Legal... 11 Introduction Continua Health Alliance strives to ensure interoperability for all Continua certified devices. USB devices are prevalent in the healthcare realm and must adhere to these interoperability requirements. This paper provides the background and description of issues in regard to the development of Continua USB PHDC drivers. This includes how a Continua USB device is presented to the user, interoperability of generic or native USB drivers, and the integration of new Continua devices with existing managers. This paper concludes with recommendations for the implementation of these device drivers (Native and Generic). 2
Background and Description of USB PHDC Drivers Issues A Continua USB PHDC Manager is interchangeable with the Continua Application Hosting Device (AHD). Continua USB PHDC Managers operating on major consumer operating systems (OS) require a USB PHDC class driver to enable wired connectivity with Continua PAN USB devices. Currently there are no native USB PHDC drivers provided with any major OS on the market (e.g., MS Windows, Mac OS or Linux). A Continua AHD must deploy its own USB PHDC driver which can result in interoperability issues. It is in the interest of Continua Health Alliance to provide guidance in following areas, until a native USB PHDC driver is available in each OS: Seamless presentation of Continua USB devices to the end user Interoperability of multiple USB PHDC Managers deployed on the same end user system Integration of new Continua certified devices with existing USB PHDC Managers 3
Presentation of Continua USB Devices to User The end user experience with USB-based devices starts with the device manager on the operating system. For troubleshooting and usability reasons, the Continua devices should have a consistent appearance in the operating system. For example, the Windows OS provides a device manager view of all connected devices (see Figure 1). Figure 1 - Windows Device Manager The device driver (USB PHDC driver) is responsible for providing the OS with information necessary to display the connected device details. The information consists of: Setup GUID 1 Device Class Name Device Name Recommendation: All Continua USB PHDC Driver solutions should be consistent in use of the Setup GUID and Device Class Name Continua should facilitate consistent use of the Device Name provided by the device manufacturer 1 The Setup GUID responsible for the device appearance in the OS is different from Interface GUID related to the device API mentioned later in this document. 4
Interoperability of USB PHDC Managers As mentioned earlier, there currently is no native Continua USB PHDC driver available for Windows or any other OS. In theory, the Continua USB PHDC device vendors should provide a way for applications, such as Continua Managers, to access the device. Historically, this has meant to implement a function driver for the device and installing the driver in the operating system. Currently, this responsibility was de facto moved to the USB Manager side, because the Continua certification process does not require device manufacturers to provide a driver with a standard API for the device. In this situation, there is potential for multiple drivers to be installed for the same USB PHDC device on the same system. Each of these drivers could have a different API. Depending on the driver the OS selects for the connected device, some managers may not have access to the device if they are designed for a driver with a different API. Recommendation: The problem of Manager interoperability is difficult to solve. A single USB PHDC driver native to an OS for all PHDC class devices is the only way to ensure real interoperability with multiple connecting Managers [1]. In most situations the generic USB drivers available for major operating systems can be used and Continua can, at a minimum, provide guidelines to improve interoperability between managers using the same generic driver 5
Generic USB Drivers Device drivers require significant development effort and some devices are simple enough that they do not require the full support of a custom function driver. The generic USB driver is a software library that uses external information to make any USB device available to the operating system. The external information is usually provided in a text file with a.inf extension (INF File). See Figure 2. Figure 2 - USB PHDC Driver from Generic USB Driver USB PHDC Driver Generic USB Driver INF file A INF file B Device A Device B Currently there are two major generic USB drivers available: 1. LibUSB: Open source for Windows, LINUX,and etc. 2. WinUSB: Part of the Windows OS starting with XP SP3 The advantage of using the generic USB drivers is that the API defined by the driver can be utilized by Continua Managers for any new devices of the same class as long as the INF file is constructed correctly: This means consistent use of the same industry-wide Interface GUID value within the device class for a particular generic USB driver Figure 3 - Interface GUID Driver API (Uses Interface GUID to discover and communicate with the device) Generic USB Driver INF File Interface GUID mapping Info from USB Device Vendor ID Product ID 6
Figure 3 illustrates the use of the Interface GUID. The device manufacturer supplies the Vendor ID and Product ID. This is mapped to a GUID representing the interface for the class of devices, for this paper, the USB PHDC class. A Manager application uses the generic driver API with the Interface GUID to communicate with the device. NOTE: The API is different between LibUSB and WinUSB. Thus, the manufacturer should provide separate INF files, each with a distinct Interface GUID, for each generic driver. Recommendation: To allow Continua USB PHDC Managers to discover and communicate with agents, Continua should provide guidelines for use of generic USB drivers on major operating systems: Continua USB PHDC Driver based on generic USB drivers should use consistent industry-wide Interface GUIDs in the INF files. The Interface GUID shall be specific to a particular driver API (e.g. LibUSB or WinUSB) Native OS Driver There are some limitations with use of generic OS drivers. The MSDN document, How to Use WinUSB to Communicate with a USB Device [1] provides a comparison of WinUSB drivers with drivers developed using the Windows Driver Foundation (WDF) framework. The best solution for interoperability is the native OS driver which supports concurrent access to the device and is supplied as part of the operating system. This results in: A seamless use experience with the device class A solution for Multiple Manager / Concurrency Issues A Standard API for all Managers The elimination of driver signing Recommendation: To allow Continua USB PHDC Managers to discover and communicate with any USB PHDC agent seamlessly, Continua should strive to provide OS native USB PHDC drivers for all major operating systems on the market. 7
Integration of New Continua Devices with Existing Managers To improve the use experience there is benefit to driver signing. This eliminates the security risk warning on most major operating systems. To accomplish this for non-native Windows OS drivers and generic drivers with INF files, Microsoft must certify the INF file (through the WHQL 2 process). This is either provided per device (Product ID, Vendor ID) or with one INF file covering multiple devices. An INF file is based on the driver s Interface Global Unique ID (GUID). As mentioned previously, if the INF file is not certified by Microsoft, a security warning is displayed to the end-user during driver installation. Each agent device manufacturer must provide its USB Product ID and Vendor ID to the driver manufacturer (for generation of the driver s INF file) before the manager can interface to it. Recommendation: Continua should facilitate the Product ID and Vendor ID information for certified Continua Devices Continua should provide a path for OS vendor certification and signing of generic USB driver INF files Continua should drive the adoption of OS native USB PHDC drivers 2 Indications are that the security message is completely avoided with WHQL certification because certification will result in the release of the driver with the next Service Pack. Thus, driver installation is not required.. 8
Conclusions and Recommendations Step I: Initial Approach Publish INF file creation recommendation on Setup GUID, Interface GUID, and string values for each driver API (see Continua Recommendation for Use of Generic USB Drivers) Host a database of PID and VID and unsigned INF files for certified devices NOTE: The Unsigned INF file results in a warning message to the user. Step II: OS Vendor Certified Device INF File Publish INF file creation recommendation on Setup GUID, Interface GUID, and string values for each driver API (see Continua Recommendation for Use of Generic USB Drivers) Host a database of OS Vendor certified and signed INF files for individual certified devices NOTE: INF files for Windows OS need certification through the Microsoft WHQL process for all Continua certified devices. Step III: OS Vendor Certified Universal INF File Publish INF file creation recommendation on Setup GUID, Interface GUID, and string values for each driver API (see Continua Recommendation for Use of Generic USB Drivers) Provide OS Vendor certified and signed single universal INF file for all current and future Continua devices that are used with major generic USB Drivers NOTE: INF files for Windows OS need certification through the Microsoft WHQL process for all Continua certified devices. The Best: Native OS Driver OS Vendors (e.g., Microsoft) provide a native PHDC driver (does not need an INF file) NOTE: This solution is not available in MS Windows OS as of Win 7. 9
Continua Recommendation for Use of Generic USB Drivers Continua Health Alliance recommends that Managers for USB PHDC that provide a USB PHDC driver based on a generic USB driver use the following values in the INF file: Attribute INF File Element WinUSB Value LibUSB Value Device Class GUID [Version]/ ClassGUID {182A3B42-D570-4066-8D13- C72202B40D78} {EB781AAF-9C70-4523-A5DF- 642A87ECA567} Device Class Text [Version]/Class PHDC libusb-win32 devices [Strings]/ClassName Interface GUID [Dev_AddReg] {B8B610DE-FB41-40A1-A4D6- N/A AB28E87C5F08} Device GUID [Strings]/DeviceGUID N/A D0C36FAA-CE6D-4887-A3AA- 6FC42D3037E5} NOTE: Continua should negotiate the API, Setup, Interface GUID, and the class name with OS vendors that create native drivers. 10
Glossary Term AHD GUID PAN API USB PHDC Description Application Hosting Device Global Unique Identifier Personal Area Network An application programming interface USB device class that represents Personal Healthcare Devices References [1] How to Use WinUSB to Communicate with a USB Device http://msdn.microsoft.com/en-us/windows/hardware/gg487341 Legal Continua is a trademark of Continua Health Alliance and CONTINUA HEALTH ALLIANCE and the CONTINUA HEALTH ALLIANCE logo are registered service marks of Continua Health Alliance. *Other names and brands may be claimed as the property of others. Copyright 2012 Continua Health Alliance. All rights reserved. 11