USB device support in Wine
Damjan Jovanovic is working on USB support in Wine now. Also there are patches developed by Alexander Morozov (Etersoft) for USB software protection tokens support. 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
Run
patch -p1 < 0001*.txt patch -p1 < 0002*.txt
in Wine source directory to apply patches.Only for versions before 1.1.22. Run
tools/make_makefiles
in 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
lsusb
You will see lines like this:
Bus 001 Device 002: ID 0529:0001 Aladdin Knowledge Systems HASP v0.06
Here 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
lsusb
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.
History
http://www.winehq.org/pipermail/wine-devel/2008-July/067114.html
http://www.winehq.org/pipermail/wine-patches/2008-October/062560.html
http://www.winehq.org/pipermail/wine-devel/2008-October/069571.html
http://www.winehq.org/pipermail/wine-devel/2009-January/072260.html
http://www.winehq.org/pipermail/wine-devel/2010-September/086710.html
http://www.winehq.org/pipermail/wine-devel/2011-July/090908.html

MoinMoin
Python