USB device support in wine
USB device support is implemented via libusb-0.1/1.0 by Alexander Morozov from Etersoft (amorozov@etersoft.ru).
Patches:
ftp://ftp.etersoft.ru/pub/people/amorozov/usb
If you want to try use USB devices in Wine, you should clone the Wine Git repository (see http://wiki.winehq.org/GitWine), change directory to Wine source root. If you want to apply the patches to wine 1.1.28 do
git checkout wine-1.1.28
and apply these patches with git am:
git am *.txt
For older versions of patches (before 1.1.22) you should also run
tools/make_makefiles
before building.
Patch for wine-1.2-rc4 is available on http://snnicky.com/wine-1.2-rc4/
http://snnicky.com/wine-1.2-rc4/0001-Add-support-of-native-Windows-drivers-for-USB-tokens.txt
This is Alexander Morozov's patches combined into one file and updated to be applicable to wine-1.2-rc4. Done by Nikolaj Shurkaev.
For using native USB driver should copy HKLM\System\CurrentControlSet\Enum\USB\Vid_<vid>&Pid_<pid> and HKLM\System\CurrentControlSet\Services\<driver_name> from Windows registry. Where <vid> means vendor id, <pid> means product id. In Linux one may run
lsusb -v
to get detailed information about connected USB devices and to check vid and pid.
Example of data taken from WIndows registry:
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\USB\Vid_073d&Pid_0025\5&6d75465&0&1]
"ClassGUID"="{36FC9E60-C465-11CF-8056-444553540000}"
"HardwareID"=hex(7):55,53,42,5c,56,69,64,5f,30,37,33,64,26,50,69,64,5f,30,30,32,\
35,26,52,65,76,5f,30,32,30,30,00,55,53,42,5c,56,69,64,5f,30,37,33,64,26,50,\
69,64,5f,30,30,32,35,00,00
"Service"="DRIVERNAME"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\DRIVERNAME]
"ErrorControl"=dword:00000001
"ImagePath"="system32\\drivers\\DRIVERNAME.sys"
"Start"=dword:00000003
"Type"=dword:00000001
When editing registry in the example above you could also write "HardwareID"="USB\\VID_073d&Pid_0025\\..." The driver should be put in the directory specified by HKLM\System\CurrentControlSet\Services\<driver_name>\ImagePath. Also you need to have permissions to read/write to USB device.
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
