Environment:
- Server: XenApp 6, Windows Server 2008 R2
- XenDesktop Controller: XenDesktop 5.6
- Client: Various (Windows 7 Embedded TC, Windows 7 PC)
Two types of redirection supported for imaging devices:
- TWAIN redirection (XenApp, XenDesktop)
- USB Redirection (XenDesktop only) NOTE: XenApp does support USB Redirection, but not for Image Scanners. For details on USB devices supported by XenApp, refer to CTX816193.
TWAIN Redirection [more]
- The imaging device must be connected locally to the user device and have the associated vendor-supplied TWAIN driver installed
- Citrix online plug-in 11.x or later or the Citrix offline plug-in
- XenApp\XenDesktop 32-bit and 64-bit OSes support TWAIN redirection for 32-bit TWAIN applications only. XenApp does not support 16-bit TWAIN drivers
- Citrix Policies (XenApp\XenDesktop): The Client TWAIN device redirection policy setting must be added to the appropriate policy. To configure image compression, add the TWAIN compression level setting and select the appropriate compression level.
- User Policy
- Enabled by default
- PROCESS: To capture an image, users connect to a server from a client machine that has an imaging device and the associated vendor-supplied TWAIN driver installed locally. When the TWAIN application is run from within this session, the application detects and interacts with the client-side device using a DLL hook process that communicates with the driver on the local client.
- TWAIN Redirection troubleshooting: CTX107411
USB Redirection
- When redirecting USB devices, the endpoint client device must first recognize the USB device to have it mapped to the session. If the device requires a special driver, it must be installed on both the client machine, as well as the Virtual Desktop Agent (VDA) machine. The device can still be mapped without the driver as long as the endpoint recognizes it, but it will not function as expected until the driver is installed on the VDA machine.
NOTE: In some cases, installing the driver locally can break USB redirection. If the driver does not allow the device to be released for redirection, the VDA may not be able to communicate with the device.- When a device is detected, you can view the properties of the device via device manager or 'Printers and Devices'
- It is important to determine the devices vendor ID (VID) and product ID (PID) as well as the device’s Class. This information is usually found on the details tab of the properties of the device.
- Here is an example of a USB device and its defined properties:
- Property = Hardware IDs (VID = 095D, PID = 9205)
- Property=Compatible IDS (Class=01)
- Property = Hardware IDs (VID = 095D, PID = 9205)
- Certain USB classes are blocked by default because they are used mainly only on local workstations. When some devices, such as a smartcard, Keyboard or Mouse, are connected, they will be connected by one of the predefined standard channels. Therefore, these types of devices are blocked by default for the USB channel as their functionality is required on the local endpoint
- Communications and CDC Control (Classes 02 and 0a)
- Human Interface Devices (Class 03)
- USB Hubs (Class 09)
- Smart Card (Class 0b)
- Wireless Controller (Class e0)
- Certain USB classes are allowed by the default USB policy rules
- Audio (Class 01)
- Physical Interface Devices(Class 05)
- Still Imaging (Class 06)
- Printers (Class 07)
- Mass Storage (Class 08)
- Content Security (Class 0d)
- Video (Class 0e)
- Personal Healthcare (Class 0f)
- Application and Vendor Specific (Classes fe and ff)
- Components of USB Redirection
- Receiver – Citrix Client used to connect to XenDesktop\XenApp
- Citrix Remote USB Device Driver (intercepts devices normal driver)
- Configured by four methods
- Desktop Viewer Toolbar (user)
- Preferences must be set to Connect All or Ask each time to be presented with device on XenDesktop
- Connection Center (user)
- Session Security > USB Device must be set to Ask Permission or Full Access
- GPO Computer or User policies (admin)
- Configures settings mentioned above
- Also setting for USB Device Rules
- Allows for blocking or allowing devices based off VID, PID and Device Class
- Registry (admin)
- Devices can be automatically redirected by adding the VID and PID information into a registry key. See this article for details: CTX123015
- Desktop Viewer Toolbar (user)
- VDA (Virtual Desktop Agent) – XenDesktop VM
- Citrix Remote USB Host Controller (communicates with USB Device Driver)
- Citrix USB Service (handles addition\removal of devices, monitors devices)
- Configured by:
- HDX Policy via XenDesktop Controller (admin)
- Client USB device redirection policy must be enabled (disabled by default)
- USB Device Rules
- Allows for blocking or allowing devices based off VID, PID and Device Class
- HDX Policy via XenDesktop Controller (admin)
- Troubleshooting
- HDXMonitor Tool (runs on VDA) – Real time status on USB device connection, provides network performance stats, reports active USB rules in place, delivers USB filtered event log messages http://hdx.citrix.com/hdx-monitor
- When using USB redirection for an imaging device, TWAIN redirection must be disabled. If the scanner is TWAIN compliant, the VDA will not be able to communicate with the device since the TWAIN redirection process is using the device. In my case, I received a message that it the device was “busy or in use”.
- In my case, there also seemed to be an issue with Citrix Receiver 3.0 (online plug-in v13). Downgrading to v 12.3 of the online plug-in or upgrading to version 3.3 (online plug-in v13.3) fixed the USB redirection issue.
- Receiver – Citrix Client used to connect to XenDesktop\XenApp