Wednesday, November 5, 2014

Configuring USB device filters and redirecting Human Interface Devices (HIDs) in View Client (1011600)

Purpose

This article provides information about Human Interface Devices not being redirected as a standard practice in VMware View, and information on how to get them to redirect if necessary.
By default, View Client for Windows excludes certain devices from the drop down menu for configuring redirection:
  • Human Interface Devices (HIDs), such as USB keyboards, mice, and authentication tokens.
  • Any Bluetooth device that is paired with an HID.
  • Smart card readers and USB authentication tokens that present themselves as smart card readers. These devices are redirected separately so that they are available for authentication on the remote desktop.
USB VoIP telephones are not excluded from redirection, even though they have an attached keypad, which is an HID.
 
This article applies to View 5.0.x and earlier releases. 

From View Manager 3.1.1, you can configure the devices that are listed as being available for redirection.
Notes:
  • Microsoft Remote Desktop Protocol (RDP) prevents HIDs that are plugged in locally, such as the console keyboard, from affecting remote RDP sessions. USB redirection makes devices appear to be plugged in locally, so RDP also prevents such devices from affecting the remote sessions. RDP also blocks the redirection of USB smart cards for remote sessions. This restriction does not apply to PCoIP.
  • VMware PCoIP redirects the console session so that local HIDs and USB devices can be connected to remote desktop sessions. You must use PCoIP as the display protocol for a desktop if you want to redirect HIDs and USB devices for the console session.
  • For View Agent on Vista or Windows 7 systems, Windows Mobile Device Center (WMDC) can prevent the redirection of USB devices for RDP sessions. This restriction does not apply to PCoIP or RGS.

Resolution

You must first find out the class GUID and the vendor and product ID of the devices that are plugged into the client. You can then use these values to configure redirection filters for the computer on which you want to run View Client.
Note: You must have installed the full version of View Client on the computer, and you must have plugged in the devices that you want to include or exclude from being available for redirection.
You can use Device Manager to find out the class GUIDs as well as the vendor and product ID of devices. However, for some devices you might have to look in the View Client log file for this information.

Windows Clients

To find out the class GUID and the vendor and product ID (VID and PID) of connected devices from Device Manager:
  1. On the computer where you have installed View Client, open Device Manager.
  2. Browse to the selected device, right-click it, and click Properties.

    Note: Ensure you choose the correct device. Redirecting a mouse or keyboard disconnects it from your client machine.
  3. Click the Details tab and select the available options:

    • From the dropdown, select Device class GUID.  Record the value of the class GUID that is displayed within curly brackets.

      Example: If the displayed value is {50DD5230-BA8A-11D1-BF5D-0000F805F530}, make a note of the 50DD5230-BA8A-11D1-BF5D-0000F805F530 portion.
    • Select Hardware IDs from the dropdown, and record the Vid_<xxxx<&Pid_<xxxx> portion of the displayed value.

      Example: If the displayed value is USB\Vid_08e6&Pid_3437&Rev_0100, make a note of the Vid_08e6&Pid_3437&Rev_0100portion. 
Device Manager might not display the class GUID and vendor and product IDs for all devices. In that case, you can find out these values from the View Client log file.

Note:  Logging level must be set to Trace logging to locate the class GUID, vendor and product IDs. For information on changing the logging levels, see Changing the log file behavior in VMware View components (1025887).
  1. Examine the contents of the log file ( debug-yyyy-mm-dd-xxxxxx.txt). For more information, see Location of VMware View log files (1027744).
  2. In the log file, locate the DEVICE entries for the connected devices.
  3. Make a note of the values of CLASSGUID as well as of the vendor and product ID portion of HARDWAREID for each device.
  4. Set the value of TraceEnabled in the registry to False when you have obtained the device entries that you need.
For example, see this entry in the log file for a USB smart card reader:
DEVICE =
DEVICEID = "USB\VID_08E6&PID_3437\5&8AFA75C&0&1"
SERVICE = "GTwinUSB"
DEVICEDESC = "USB Smart Card Reader"
CLASS = "SmartCardReader"
CLASSGUID = "50DD5230-BA8A-11D1-BF5D-0000F805F530"
DRIVER = "{50DD5230-BA8A-11D1-BF5D-0000F805F530}\0009"
FRIENDLYNAME = ""
LOCATION_INFORMATION = "USB SmartCard Reader"
DEVTYPE = ""
HARDWAREID = "USB\Vid_08e6&Pid_3437&Rev_0100"
COMPATIBLEIDS = "USB\Class_0b&SubClass_00&Prot_00"
VID = "08E6"
PID = "3437"
VENDOR = "Gemplus"
PDO_NAME = "\Device\USBPDO-12"
ALLCLASSGUIDS = "50DD5230-BA8A-11D1-BF5D-0000F805F530"
The class GUID for the device is 50DD5230-BA8A-11D1-BF5D-0000F805F530. The vendor and product ID is Vid_08e6&Pid_3437. Some composite devices have multiple class GUIDs for their various components. USB redirection treats all class GUIDs for a single device as being equivalent.
After obtaining the class GUID and the vendor and product ID of the devices that are plugged into the client, you can use the values to configure redirection filters for the computer on which you want to run View Client.
Note: Make a backup of the registry before making any changes to it.
To exclude certain device classes or individual devices from being available for redirection, or to make individual devices available for redirection:
  1. On the computer where you have installed View Client, open Registry Editor.
  2. Browse to the key:

    • 32bit versions of Windows: HKLM\Software\VMware, Inc.\VMware VDM\USB
    • 64bit versions of Windows: HKLM\Software\Wow6432node\VMware, Inc.\VMware VDM\USB. 
      Note: If the key does not exist, you must create it.
  3. Modify the key as needed:

    • To exclude a class of device from being available for redirection, create a new Multi-String value named ClassFilters if it does not already exist, and add the class GUID value to the ClassFilters key. To exclude all device classes, specify a single hyphen character ( -) for the value.

      Note: A blank or non-existent entry for ClassFilters is equivalent to specifying the smart card reader class GUID ( 50DD5230-BA8A-11D1-BF5D-0000F805F530). Specifying a hyphen ( -) in ClassFilters to exclude all devices class GUIDs or specifying any other class GUIDs to ClassFilters has the side effect of making smart card readers available for redirection.

      In View 4.x and later, you can set the registry value HKLM\Software\VMware, Inc.\VMware VDM\USB\AllowSmartcardsto TRUE to include smart card readers. By default, this value is set to FALSE.

      In View 3.1.x, add the smart card reader class GUID to ClassFilters to exclude smart card readers.
    • To exclude an individual device from being available for redirection, create a new Multi-String value namedHardwareIDFilters if it does not already exist, and add the vendor and product ID value for the device to HardwareIDFilters.

      Example: A HardwareIDFilters entry for a USB device that has VID 08E6 and PID 3437 is VID_08E6&PID_3437.
    • To make an individual device available for redirection, create a new Multi-String value named AllowHardwareIDs if it does not already exist, and add the vendor and product ID value for the device to AllowHardwareIDs. This makes the device available for redirection, even if you have excluded its device class.

      Example: An AllowHardwareIDs entry for a USB device that has VID 08E6 and PID 3437 is VID_08E6&PID_3437.
  4. Exit Registry Editor.
  5. Open the View Client, connect to the desktop, and test the configuration by attempting to redirect the devices to the desktop.

Linux Clients

To identify the vendor and product ID on a Linux client, log in as root and run the lsusb command. This command lists all USB device details including the vendor and product IDs.
  • To exclude a USB device, run this command:

    vmware-view --usb=exid:usb1,usb2
    where usb1 and usb2 are the USB devices to be excluded.

    Example:

    vmware-view --usb=exid:vid169apid3184,vid148fpid2770
  • To include a USB device, run this command:

    vmware-view --usb=inid:usb1,usb2
    where usb1 and usb2 are the USB devices to be included.

    Example:

    vmware-view --usb=inid:vid0x160apid0x3184,vid0x148fpid0x2770
Note: The lsusb command shows the VID and PID in the hexadecimal format without the leading 0x. When using VID and PID, be sure to prefix them with 0x.

No comments:

Post a Comment