Translations of this page: 日本語
USB device support in Wine
Damjan Jovanovic is working on USB support in Wine now.
There are patches developed by Alexander Morozov (Etersoft) for USB software protection tokens support. These patches are only meant for USB dongles; they will not help with other types of USB devices. Below you can see instructions how to use them.
Note: Drivers which depend on modules other than ntoskrnl.exe, hal.dll, usbd.sys will not work. Imported modules can be seen using winedump -j import driver.sys.
How to build Wine with USB patches
Download patches for your Wine version from ftp://ftp.etersoft.ru/pub/people/amorozov/usb
patch -p1 < 0001*.txt patch -p1 < 0002*.txtin Wine source directory to apply patches.
Only for versions before 1.1.22. Run
tools/make_makefilesin Wine source directory.
- Build Wine. See the section COMPILATION in the README file in Wine source directory.
How to use USB device drivers
Installing device drivers is not supported in Wine now. So you need to copy driver(s) and some registry keys from Windows system where your device was installed.
Note: This instruction is only for cases when only one driver is needed for a device.
Determine your device vendor and product IDs. Connect your device to Linux system and run
You will see lines like this:
Bus 001 Device 002: ID 0529:0001 Aladdin Knowledge Systems HASP v0.06Here 0529 is a vendor ID and 0001 is a product ID.
Import HKLM\System\CurrentControlSet\Enum\USB\Vid_<vid>&Pid_<pid> and HKLM\System\CurrentControlSet\Services\<driver name> from Windows registry as NT4 .reg files. Here <vid> is vendor ID, <pid> is product ID, <driver_name> is a string from HKLM\System\CurrentControlSet\Enum\USB\Vid_<vid>&Pid_<pid>\<instance id>\Service.
Copy a driver. Driver path is contained in Windows registry in HKLM\System\CurrentControlSet\Services\<driver_name>\ImagePath.
Set permissions for your USB device. Run
to know bus and device numbers. Typically usb devices are in /dev/bus/usb. Run
chmod a+rw /dev/bus/usb/<bus number>/<device number>with root privileges. This will allow all to use your USB device until replugging it or rebooting your PC. Later if a device works with Wine you can create an udev rule for setting permissions.