Translations of this page: http://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Flag_of_Japan.svg/22px-Flag_of_Japan.svg.png日本語


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

  1. Download patches for your Wine version from ftp://ftp.etersoft.ru/pub/people/amorozov/usb

  2. Run

    patch -p1 < 0001*.txt
    patch -p1 < 0002*.txt 
    in Wine source directory to apply patches.
  3. Only for versions before 1.1.22. Run

    tools/make_makefiles 
    in Wine source directory.
  4. 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.

  1. 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.
  2. 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.

  3. Copy a driver. Driver path is contained in Windows registry in HKLM\System\CurrentControlSet\Services\<driver_name>\ImagePath.

  4. 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

USB (last edited 2014-04-08 20:47:47 by RosanneDiMesio)