White Paper 6: 1-Wire Drivers Installation Guide for Windows
Abstract: The software application developer has two options for installing 1-Wire® device drivers on Microsoft Windows® 32- and 64-bit platforms (Windows 2008, Windows Vista®, 2003, and XP). The first option uses Maxim's 1-Wire Drivers installation program; the second option is to develop a custom installation program. This application note discusses the installation process for 1-Wire drivers. It explains which drivers and DLLs go with which 1-Wire port adapter (USB, serial port, and parallel port). It also lists the subdirectory to which each DLL and driver must be copied and the appropriate registry key(s) that need to be created. This White Paper also covers the installation of both the TMEX API and the 1-Wire API for .NET.
Introduction
This White Paper discusses the installation process of the 1-Wire drivers for the following Microsoft Windows 32-bit and 64-bit operating systems: 2008, Windows Vista, 2003, and XP. There are two ways to accomplish a 1-Wire drivers installation. The first option uses Maxim's 1-Wire Drivers installation program, and the second option is to develop a custom installation program.
1-Wire Drivers Installation Program
The easiest option for a 1-Wire software developer is to use the installation program created by Maxim. Also known as the TMEX RTE (runtime environment), the 1-Wire Drivers installation program performs a comprehensive install of all 1-Wire adapter drivers. Other files installed include application programming interface (API) libraries (TMEX and the 1-Wire API for .NET), along with supporting dlls and documentation. The installation also writes the necessary registry keys for the software's proper functioning. The 1-Wire Drivers installation program is available for download.
There are two approaches for distributing the 1-Wire Drivers installation package in its entirety when deploying a custom 1-Wire application. One approach is to notify the end customer to download and install the 1-Wire Drivers package. This is the easiest method, but it requires the end user to install two separate software pieces. The first software piece is the 1-Wire Drivers package and the second is the software developer's custom 1-Wire application. The second approach is to make a custom installation program that not only installs the developer's own program, but spawns the 1-Wire Drivers. This can be done easily since the 1-Wire Drivers package can be installed silently, without any user interaction required. For more information, see the 1-Wire Drivers Installation Project section below.
Creating Custom Installation Programs
Some 1-Wire software application developers either desire to, or are required to, make a single installation program that includes their custom 1-Wire application, the necessary 1-Wire drivers, and other API libraries. Many developers do not need the entire 1-Wire Drivers installation, but only the drivers necessary for their application. To make a custom driver installation, the software developer must understand the interdependencies among the different 1-Wire drivers and API libraries. Figure 1 below illustrates those interdependencies.
Determining which files are needed for a custom installation requires the developer to know which API is being used and which hardware adapter(s) will be supported. The API could be either a derivative of the 1-Wire API for Java™ (such as the .NET support) or the TMEX API. For a more complete discussion of both APIs and a list of hardware adapters supported by the 1-Wire Drivers, please see the documentation included in the 1-Wire SDK for Windows available for download.
Table 1 lists the files and adapter dependencies involved in a 1-Wire Drivers custom installation. Each file is described, along with the file's destination directory on the customer's computer. Note that variables are used to represent the destination directories, as those directories can differ for each Microsoft installation. The default windows\system directory, for example, depends on the operating system used (i.e., C:\windows\system32 or C:\winnt\system32). These system directories are represented in Table 1 as %SYS%. The windows directory is also represented as a variable, %WIN%. The application directory to which the 1-Wire application is copied is represented by %APP%. Table 2 lists the appropriate registry entries to complete a custom installation.
Figure 1. 1-Wire drivers and API connectivity.
Table 1. 1-Wire Drivers File List with Installation Instructions
(Please note that the XX in the file names of the DLLs indicates the Microsoft platform: "32" for 32-bit and "64" for 64-bit Windows.)
Files
Description
Copy to Destination Subdirectory
1-Wire Adapter Type
OneWireAPI.NET.dll
.NET interface to the 1-Wire API for J#
Preferably, copied to end-user application's directory. Requires that Microsoft's .NET 2.0 redistributable and Visual J# 2.0 Second Edition redistributable be installed on end-user's computer.
WDFCoInstaller01005.dll WinUSBCoInstaller.dll DS2490WinUSB_x86.cat DS2490WinUSB_x86.inf or DS2490WinUSB_x64.cat DS2490WinUSB_x64.inf
Appropriate registry keys set through Windows plug-and-play installation of WinUSB through the *.inf file.
Installation of .NET Files
The .NET 1-Wire software requires the Windows operating system on which it runs (either 32-bit or 64-bit) to have the .NET runtime installed, along with the Visual J# redistributable. Specifically, the .NET Framework version 2.0 and Visual J# redistributable version 2.0 Second Edition are required. These files can be downloaded from Microsoft's .NET website.
After downloading, perform a search in the search box by using the appropriate keywords. For the .NET framework use ".net 2.0 redistributable" as keywords; for the J# redistributable, use "J# 2.0 redistributable" as keywords. Click on the first item in the results list for each search. Download and installation instructions should appear.
The .NET 1-Wire support is a Microsoft Visual J# compiled version of the 1-Wire API for Java. It comes in the form of a single DLL file, OneWireAPI.NET.dll. To install this file, simply copy it to the folder where the parent application (i.e., the application that needs the .NET file) resides. Thus, a developer only needs to copy the .dll file to the folder to which the 1-Wire .NET program is copied.
Besides the OneWireAPI.NET.dll, the developer must also install the TMEX API files and drivers. For complete instructions on this installation, see section below, Installation of TMEX API Files and Drivers.
Installation of TMEX API Files and Drivers
For a list of all TMEX API files and drivers and a description of where these files need to be copied, please
see Table 1 above. Also, review the necessary registry entries for the associated files and drivers in Table 2.
The TMEX API files and drivers consist of a main dll library, IBFSXX.DLL (where XX is either 32 or 64, depending upon whether the OS is 32-bit or 64-bit), along with adapter dependent files. The TMEX API files are where a developer can pick and choose which dll files and drivers need to be installed. If a developer only wants DS2480B-based adapters supported (e.g., the DS9097U), for example, the custom installation program only needs to install the main TMEX dll library and the adapter-dependent library file, IB97UXX.DLL. (Again, XX is either 32 or 64, representing a 32- or 64-bit OS.) The developer's custom install must also ensure that the appropriate registry entries are written. In this case the registry entries specified would need to be written from the Registry Entries in Table 2.
Special Considerations for USB
There are special considerations for installing the 1-Wire USB files. Together, all the device driver USB files are known as a driver package. The developer is encouraged to write the installation program to "pre-install" the 1-Wire USB driver package. Then after the driver package is pre-installed, the user plugs in a 1-Wire USB adapter. The resulting plug-and-play event will finish the installation process.
To pre-install the USB driver package, Microsoft developed special Driver Install Frameworks (DIFx) tools. These tools allow plug-and-play device driver installation to "just work." Three categories of the DIFx tools exist: DIFxApp, DPInst, and DIFxAPI. The category used in the 1-Wire Drivers installation is DIFxApp, which stands for Driver Install Frameworks for Applications. Using DIFxApp, the Microsoft Windows Installer can install signed driver packages along with custom applications that use the driver. This is the method used by most custom 1-Wire software vendors. This is also the method used in the current 1-Wire Drivers installation. The DIFxApp tools are located in the Windows Driver Kit (WDK) under the "redist" subdirectory. The DIFxApp tools consist of a merge module for Windows Installer projects, and a WixLib object for Windows Installer for XML (WIX) projects. The 1-Wire Drivers installation project is a WIX project. See Appendix A for more information about 1-Wire USB Adapter (DS9490) Installation Help.
1-Wire Drivers Installation Project
As mentioned above, the 1-Wire Drivers installation project was written as a Microsoft's Windows Installer for the XML (WIX) project. WIX is an open-source toolset released by Microsoft that builds Windows installation packages from XML source code. The toolset supports a command line environment that developers can integrate into their build processes to build custom MSI installation packages. The WIX toolset is downloadable.
The WIX source code for the 1-Wire Drivers installation project is available as a free download from the 1-Wire Drivers web page. Specifically look for the "files only" hyperlink and download the most current 1-Wire Drivers installation source. This download consists of a zip archive that contains the XML source to the install and every file necessary to recreate the 1-Wire Drivers MSI installation package. As mentioned above, besides the WIX toolset the 1-Wire Drivers WIX project only needs the Windows Driver Kit (WDK). The WDK is where the WixLib object for installing plug-and-play drivers is found. The WDK is available from Microsoft through Microsoft Connect.
When compiled, the above-mentioned 1-Wire Drivers WIX project outputs an MSI installation package. When the installation package is double-clicked, the program msiexec.exe is actually executed with the *.msi file as an input to the program. This means that the msiexec.exe program can be called programmatically by other installs or from a command line. This process is how a "silent" install can be performed with the 1-Wire Drivers. From a command line, type: msiexec /package 1-WireDrivers.msi /quiet /norestart. This will start a silent, or "quiet," install with no UI or user interaction required. Replace the 1-WireDrivers.msi file name in the command-line example above with the most current 1-Wire Drivers MSI file name. Consult the Windows Installer SDK for additional documentation on the command-line syntax of msiexec.exe. The Windows Installer SDK is bundled with the Platform SDK, which is available as a free download from Microsoft. Search for the Platform SDK.
Conclusion
This White Paper assists the software developer who wants, or needs, to perform a custom installation of all, or a subset of, 1-Wire drivers and API files. The installation process covers the 1-Wire Drivers for the following Microsoft Windows 32-bit and 64-bit operating systems: 2008, Windows Vista, 2003, and XP. If more clarification is needed on the installation of a particular file, or if other software technical-support questions arise, the developer is encouraged to post questions to Maxim's web-based discussion forum. To subscribe, go to the Maxim Discussion Board and sign up. Engineers at Maxim and other 1-Wire software/hardware developers monitor the web forum. Alternately, a developer can send a question and receive a technical-support answer: iButton Contacts and Support.
Appendix A: 1-Wire USB Adapter (DS9490) Installation Help
This appendix provides troubleshooting tips for 1-Wire USB adapter installations. Please see the 1-Wire Drivers website for the latest information and downloadable installation packages.
Troubleshooting the 1-Wire USB Device Driver Installation
Make sure that the most current version of the 1-Wire Drivers has been
downloaded.
Log into an account with administrator privileges. This is required for installing devices drivers. See the note at the end of this document.
Uninstall previous 1-Wire Drivers versions before installing the above drivers.
Attempt to install the drivers mentioned in step 1 by double-clicking on the installation program's icon and following the instructions closely.
After installation if difficulties persist, please look in the Device Manager to see if the 1-Wire USB adapter has been installed correctly. (It will appear in a list of hardware devices attached to the computer.) To do this, double-click System from the Control Panel. Then choose the correct tab (usually the Hardware tab) by clicking on it. Then click on the button labeled Device Manager.
With the USB adapter plugged in, the Device Manager should show either of two entries: 1Wire Devices or 1-Wire Devices. The following pictures show a successful install on Windows XP (with USB adapter plugged in).
If the following error appears, indicated below by a yellow circle with an exclamation mark under the "1Wire Devices" entry, then try "Updating" the device driver by right-clicking the entry and then clicking on the "Update Drivers" menu option. (Keep the USB adapter plugged in.)
Follow the instructions. When prompted for the new driver, browse to the <applications> folder. This is the default applications folder where the installation program puts the helper utility and readme files. For 32-bit operating systems, this is: C:\Program Files\Maxim Integrated Products\1-Wire Drivers x32\WinUSB_Driver. For 64-bit operating systems, this is: C:\Program Files\Maxim Integrated Products\1-Wire Drivers x64\WinUSB_Driver. The USB driver and related files should be in the \WinUSB folder. Then proceed to finish the Update Driver wizard.
The driver should now be correctly installed. See the picture in Step 6 above where the "Device Manager" with the 1-Wire USB adapter's driver is successfully installed.
Hand-Installing the 1-Wire USB Adapter's Device Driver
Four files are necessary to hand-install the 1-Wire USB adapter (DS9490) device driver. The first two files are coinstaller dlls: WDFCoInstaller01005.dll and WinUSBCoInstaller.dll. These files install the Windows Driver Framework (WDF) and WinUSB, respectively. The last two files have slightly different names based on the type of OS (i.e., either 32-bit or 64-bit). The first file is the signed catalog file, DS2490WinUSB_x86.cat or DS2490WinUSB_x64.cat; the second is the inf file, DS2490WinUSB_x86.inf or DS2490WinUSB_x64.inf. After the 1-Wire Drivers installation occurs, these four files can be found in the <applications>\WinUSB folder.
Alternatively, download an up-to-date "files only" version of the 1-Wire
Drivers from its download website. Extract the files to a specified directory.
Log into an account with administrator privileges. This is required for installing device drivers. See note below on how to determine account privileges.
Plug in the DS9490 1-Wire USB adapter.
If the Add Hardware (or Add New Hardware) Wizard does not run in response to plugging in the DS9490, you may already have a failed install. Check the Troubleshooting the 1-Wire USB Adapter Device Driver Installation section above for details on how to fix this installation.
Follow the instructions and when asked to browse for the driver. Please browse to the directory containing the files listed in step 1 above.
Finish the Add Hardware wizard.
Note: To determine the Windows XP account privileges follow these steps:
Log on to Windows with the user account in question.
Click Start > Control Panel.
Double-click the User Accounts icon.
Accounts are listed as Computer Administrator and Password Protected for XP, and Computer Administrator Password Protected, and simply Password Protected for Windows Vista.
White Paper Revision History
09/19/02: Version 1.0—Initial release.
09/13/04: Version 2.0—Added .NET descriptions. Added USB troubleshooting appendix. Reflected changes from Version 3.2x versions of 1-Wire Drivers to version 4.00 version of 1-Wire Drivers (added "pre-install" of USB inf file section, consolidated all USB inf files into single file, etc).
12/11/06: Version 2.1—Made a minor change to a ds1410d.sys registry key entry in Table 2. The Start key's value was changed from "2" to "1". This change was made for compatibility of driver loading under Microsoft Windows Vista and is reflected in 1-Wire Drivers with versions greater than 4.00.
09/12/07: Version 3.0—Made major revisions to the entire document to reflect the new 1-Wire Drivers install packages: version 4.01 beta 2 (and up) for 32-bit Microsoft operating systems (Windows XP and up), and version 4.01 beta (and up) for 64-bit Microsoft operating systems. Mentions of OWCOM were removed. WinUSB replaced legacy USB driver files. Registry entries were changed for TMEX API dlls. Pre-installation of USB files was updated to use Microsoft DIFx tools. Simulating a 'First-time' Install section was removed.
Note: If an earlier version of this document is required, please visit the Internet Archive's "Wayback Machine". In the search box, type in the URL http://www.ibutton.com and click on the "Take Me Back" button.
The DS1410D has been replaced by the DS1410E. The DS1410E is no longer recommended for new designs.
1-Wire is a registered trademark of Maxim Integrated Products, Inc.
Java is a trademark of Sun Microsystems, Inc.
Windows is a registered trademark of Microsoft Corp.
Windows Vista is a registered trademark of Microsoft Corp.