Jungo WinDriver
Official Documentation
|
This chapter takes you through the process of installing WinDriver on your development platform, and shows you how to verify that your WinDriver is properly installed. The last section discusses the uninstall procedure.
To find out how to install a driver you created on target platforms, refer to Chapter 15: Distributing Your Driver.
You can find below system requirements for Windows, Linux, and Mac.
Please make sure that your development machine fits the following requirements:
Any of the following processor architectures, with a 2.6.x or higher Linux kernel:
ℹ️ Note
Jungo strives to support new Linux kernel versions as close as possible to their release. To find out the latest supported kernel version, refer to the WinDriver release notes that can be found online at WinDriver Release Notes.
libstdc++.so.6
libpng12.so.0
libQt5Gui.so
libQt5Core.so
libQt5Network.so
libQt5PrintSupport5.so
make, gcc, flex, bison
(for installing WinDriver and Kernel Plugins)gcc-multilib
(for compiling 32-bit applications on 64-bit systems)Newer versions of Linux distributions, provide native support of Qt5 instead of Qt4. If your OS supports Qt4 instead of Qt5, use wdwizard_legacy
, wddebug_gui_legacy
, xdma_gui_legacy
instead of the non-prefixed versions. Check out 3.2.2.1. Preparing the System for Installation for instructions how to install the above requirements on various Linux distributions.
Please make sure that your development machine fits the following requirements:
⚠ Attention
Driver installation on Windows requires administrator privileges.
WD1630.EXE
(for 32-bit) or WD1630X64.EXE
(for 64-bit) or WD1630ARM64.EXE
— and follow the installation instructions.The WinDriver installation defines a WD_BASEDIR
environment variable, which is set to point to the location of your WinDriver directory, as selected during the installation. This variable is used during the DriverWizard code generation — it determines the default directory for saving your generated code and is used in the include paths of the generated project/make files. This variable is also used in the sample Kernel PlugIn projects and makefiles.
If the installation fails with an ERROR_FILE_NOT_FOUND
error, inspect the Windows registry to see if the RunOnce key exists in HKEY_LOCAL_MACHINE\SOFTWARE \Microsoft\Windows\CurrentVersion
. This registry key is required by Windows Plug-and-Play in order to properly install drivers using INF files. If the RunOnce
key is missing, create it; then try installing the INF file again.
The following steps are for registered users only:
To register your copy of WinDriver with the license you received from Jungo, follow these steps:
When using the low-level WD_xxx API instead of the WDC_xxx API (which is used by default), refer to the documentation of WD_License() in this manual.
One of the pages in the WinDriver installer is dedicated to setting up your machine for test signing a driver package. This section contains the following options:
Create test certificate
checkbox: Checking this checkbox will create a self-signed test certificate. After the installation, you can view the certificate by double clicking the .cer
file in: $WD_BASEDIR/WinDriver1630_development.cer
, or by viewing the certificate store of the local machine. In order to do that, open the run dialog box (winkey+r) and enter certlm.msc
. You will be able to see the WinDriver1630.development
certificate under 'Personal', 'Trusted Root Certification Authorities' and 'Trusted Publishers' Enable test sign mode
checkbox: Checking this checkbox will switch your machine to test signing mode by enabling the testsigning
boot configuration. This mode enables test-signed drivers to load. ⚠ Attention
After changing the
testsigning
boot configuration, a reboot is required for the changes to take effect. Once these changes take effect, you are not required to do anything else with Windows security settings during the development process (as opposed to disabling digital signature enforcement, which must be done after every reboot).
Enabling or disabling this configuration can be done with⚠ Attention
You must have administrative rights and disable Secure Boot to change the
testsigning
boot configuration.
wdreg.exe
(see Chapter 17.3.5.1.1 Enabling and Disabling Test Signing Mode)In Linux, kernel modules must be compiled with the same header files that the kernel itself was compiled with. Since WinDriver installs kernel modules, it must compile with the header files of the Linux kernel during the installation process.
In modern Linux distributions such as Ubuntu, CentOS and Fedora the kernel headers are usually either already installed with the OS, or are easily obtainable via the distribution's package manager. Our suggestion would be to skip to the next section and in case of failure there try the steps mentioned here.
On other less common Linux kernel/distributions, compiling the kernel itself may be neccesary. If you're using such a kernel, for more info on compiling it, check out the documentation of the Linux Kernel you're using.
The following instructions may vary according to different versions of the distributions.
CentOS:
Browse the web to find exact installation instructions of CMake for your CentOS version.
Ubuntu/Debian:
Fedora (tested on version 36):
⚠ Attention
The path to the installation directory must not contain any spaces.
WD1630LN.tar.gz
/ WD1630LNx86_64.tar
/ WD1630LNARM.tar
/ WD1630LNARM64.tar
Kindly make sure you've performed the appropriate preparations described in
3.2.2.1. Preparing the System for Installation in order for the following instructions to work.
⚠ Attention
The configuration script creates a makefile based on the running kernel. You may select to use another installed kernel source, by executing the script with the
--with-kernel-source=<path>
option, where<path>
is the full path to the kernel source directory — e.g.,/usr/src/linux
. If the Linux kernel version is 2.6.26 or higher, the configuration script generates makefiles that use kbuild to compile the kernel modules. For a full list of the configuration script options, use the--help
option:./configure --help
⚠ Attention
If you are going to use WinDriver for multiple USB devices with the same VID/ PID, add
-DMULTIPLE_SAME_DEVICES
to theEXTRA_CFLAGS
variable inmakefile.usb.kbuild
.
On older Linux environments such as Ubuntu 16.04 that provide Qt4 instead of Qt5, run wdwizard_legacy
instead of wdwizard
.
/dev/windrvr1630
, depending on how you wish to allow users to access hardware through the device. Due to security reasons, by default the device file is created with permissions only for the root user. Change the permissions by modifying your /etc/udev/permissions.d/50-udev.permissions
file. For example, add the following line to provide read and write permissions: windrvr1630:root:root:0666
⚠ Attention
Use the
WinDriver/util/wdreg
script to load the WinDriver kernel module.
The following steps are for registered users only:
To register your copy of WinDriver with the license you received from Jungo, follow these steps:
Kindly make sure you've performed the appropriate preparations described in
3.2.2.1. Preparing the System for Installation in order for the following instructions to work. The following steps assume you have the ability to compile WinDriver's kernel module on your ARM/ARM64 platform and link it with the running kernel's header. If that is not possible with your platform,
see 3.2.2.3.1. Cross compiling the WinDriver kernel module for Linux ARM/ARM64 systems
Starting from WinDriver 14.0.0, Jungo distributes unified ARM and ARM64 versions, in an attempt to support as much platforms as possible. We have tested different platforms to work with WinDriver, but we believe that other platforms with similar credentials should work with these setups.
Therefore we provide an installation script wd_arm_install.sh
or wd_arm64_install.sh
that allows the user to either try differently compiled WinDriver kernel modules manually or automatically, until the user hopefully succeeds in installing them.
In order to start:
or depending on your platform.
Some ARM/ARM64 platforms do not support compilation of kernel modules on the platform itself (which is the classic and recommended way to install WinDriver on Linux). For those cases, we provide a method to cross-compile the WinDriver kernel module on a development machine and then install it on an ARM/ARM64 platform. In order to do this perform the following steps:
On the development machine:
arm-linux-gnueabihf-gcc
for ARM, aarch64-linux-gnu-gcc
for ARM64).for ARM:
or for ARM64:
Follow the instructions in the script and choose one of the options for which type of .ko
file to build. Since your platform may be different from the platforms listed in the script (there are endless platforms and kernel types out there), you can try compiling with different options and trying to install the resulting kernel modules on your platform until you find a version that works. If after trying all versions you have not found a version which works with your platform, feel free to contact sales.nosp@m.@jun.nosp@m.go.co.nosp@m.m for further assistance.
On the ARM/ARM64 platform:
WD1630/redist/LINUX.PRECOMPILED.ARM
or WD1630/redist/LINUX.PRECOMPILED.ARM64
from the development machine to WD1630/redist/LINUX.PRECOMPILED.ARM
or WD1630/redist/LINUX.PRECOMPILED.ARM64
on your platform.Since /dev/windrvr1630
gives direct hardware access to user programs, it may compromise kernel stability on multi-user Linux systems. Please restrict access to DriverWizard and the device file /dev/windrvr1630
to trusted users.
For security reasons the WinDriver installation script does not automatically perform the steps of changing the permissions on /dev/windrvr1630
and the DriverWizard application (wdwizard
).
Therefore, the default way of running all WinDriver related user applications in Linux would require running them with sudo or as root. Some GUI features in the DriverWizard and the Debug Monitor that involve opening a web browser may not work if these applications are launched as root.
Changing the ownership of /dev/windrvr1630
to your user name could be done using the chmod
command in the Linux terminal.
Firstly, disable System Integrity Protection (SIP)
. The instructions on how to do this may vary between different MacOS versions so find the instructions for your specific version.
On MacOS 11 (Big Sur) in order for WinDriver to be able to load you might also need to disable Apple Mobile File Integrity (AMFI)
. This could be done by adding "amfi_get_out_of_my_way=1"
to your boot-args in the following manner:
⚠ Attention
Disalbing SIP and AMFI weakens your system's security mechanisms but is mandatory for WinDriver to run on MacOS and to allow Driver Development in general. Disable these mechanisms at your own risk.
Afterwards, install the dependencies, these steps assume you have the Homebrew package manager installed. If it is not yet installed, kindly install it first, and then run the following commands:
Install Qt5 (required for DriverWizard, Debug Monitor)
Then install CMake (required for compiling generated code and samples)
Then using a Terminal window, run the following commands:
Then using a Terminal window, run the following commands:
IOPCIMatch
.⚠ Attention
If the users enter a VID/PID mask which is too "wide" (covers many devices) this might cause a system crash as MacOS Big Sur and higher does not allow WinDriver to access certain system-reserved devices. The system will reboot and remove the kernel extension and the user will have to run the installation script again and enter different, more specific parameters in order to install WinDriver. Performing a PCI scan on such systems (using the DriverWizard or WDC_PciScanDevices()) will show only the devices that answer to the parameters provided by the user in this stage.
To upgrade to a new version of WinDriver, follow the installation steps for your target operating system, as outlined in the previous Section 3.2. Download and install a new version of WinDriver that matches your development platform and the operating systems and CPU configurations of the target platforms on which you intend the driver to be used.
After the installation, start DriverWizard and enter the new license string, if you have received one. This completes the minimal upgrade steps.
To upgrade your source code:
windrvr1630
or your renamed version of this driver.If you use the generated DriverWizard code or one of the samples from the new WinDriver version, the code will already use the default driver name from the new version. Also, if your code is based on generated/sample code from an earlier version of WinDriver, rebuilding the code with windrvr.h
from the new version is sufficient to update the code to use the new default driver-module name (due to the use of the WD_DEFAULT_DRIVER_NAME_BASE
definition).
If you elect to rename the WinDriver driver module (as outlined in Chapter 17.2), ensure that your code calls WD_DriverName() with your custom driver name. If you rename the driver from the new version to a name already used in your old project, you do not need to modify your code.
<path to WinDriver>/wizard/wdwizard
. On Windows you can also run DriverWizard from the Start menu: Start | Programs | WinDriver | DriverWizard.If you are an evaluation version user, you do not need to register a license.
For PCI cards/USB devices — Insert your card into the PCI bus/your device into the USB slot, and verify that DriverWizard detects it. For ISA cards (Windows and Linux) — Insert your card into the ISA bus, configure DriverWizard with your card's resources and try to read/write to the card using DriverWizard.
This section will help you to uninstall either the evaluation or registered version of WinDriver
You can select to use the graphical wdreg_gui.exe
utility instead of wdreg.exe
.
wdreg.exe
and wdreg_gui.exe
are found in the WinDriver\util
directory
(see Chapter 16: Dynamically Loading Your Driver for details regarding these utilities).
To uninstall WinDriver, please follow these steps:
wdreg
utility:windir%\system32\drivers
directory.windrvr1630.sys
) are found in the windir%\inf directory
.uninstall.exe
utility from the WinDriver installation directory. The uninstall will stop and unload the WinDriver kernel module (windrvr1630.sys
); delete the copy of the windrvr1630.inf
file from the windir%\inf
directory; delete WinDriver from Windows' Start menu; delete the WinDriver installation directory (except for files that you added to this directory); and delete the shortcut icons to the DriverWizard and Debug Monitor utilities from the Desktop.windrvr1630.sys
), but not the entire WinDriver toolkit. Use the wdreg
utility to stop and unload the driver: ⚠ Attention
When running this command,
windrvr1630.sys
should reside in the same directory aswindrvr1630.inf
.
On the development PC, the relevant wdreg
uninstall command is executed for you by the uninstall utility.
If you attempt to uninstall WinDriver while there are open handles to the WinDriver service (windrvr1630.sys
or your renamed driver, or there are connected and enabled Plug-and-Play devices that are registered to work with this service, wdreg
will fail to uninstall the driver. This ensures that you do not uninstall the driver while it is being used.
You can check if the WinDriver kernel module is loaded by running the Debug Monitor utility (WinDriver\util\wddebug_gui.exe
). When the driver is loaded, the Debug Monitor log displays driver and OS information; otherwise, it displays a relevant error message. On the development PC, the uninstall command will delete the Debug Monitor executables; to use this utility after the uninstallation, create a copy of wddebug_gui.exe before performing the uninstall procedure.
windrvr1630.sys
was successfully unloaded, erase the following files (if they exist):windir%\system32\drivers\windrvr1630.sys
windir%\inf\windrvr1630.inf
windir%\system32\wdapi1630.dll
windir%\system32\wdapi1630_arm64.dll
(Windows ARM64)windir%\sysWOW64\wdapi1630_32.dll
(Windows x64)The following commands must be executed with root privileges.
windrvr1630
..windriver.rc
from the /etc directory:.windriver.rc
from $HOME
:For example, # rm -rf ~/WinDriver
.
/usr/lib/libwdapi1630.so
(32-bit x86) / /usr/lib64/libwdapi1630.so
(64-bit x86).
To uninstall WinDriver on MacOS, open a terminal window and type the following commands: