# US 12,008,381 B2 · Universal serial bus (USB) redirection for USB human interface device (HID) class devices

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,008,381 B2
- Document ID: US12008381B2
- Status: Granted
- Kind: B2
- Application number: 18/355,329
- Filed: 2023-07-19
- Published: 2023-11-16
- Granted: 2024-06-11
- Earliest claimed: 2021-05-25
- Assignees: VMware, Inc.
- Applicants: VMWare LLC
- Inventors: Zhongzheng Tu; Joe Huiyong Huo; Mingsheng Zang; Jinxing Hu; Yueting Zhang
- Web page: https://patentgrep.com/patent/US12008381B2

## CPC

- G06F 9/4411: {Configuring for operating with peripheral devices; Loading of device drivers}
- G06F 9/4418: {Suspend and resume; Hibernate and awake}
- G06F 9/45537: {Provision of facilities of other operating environments, e.g. WINE (I/O emulation G06F13/105)}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 13/382: {using universal interface adapter}
- G06F 13/4282: {on a serial bus, e.g. I2C bus, SPI bus (on daisy chain buses G06F13/4247)}
- G06F 2213/0042: Universal serial bus [USB]
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques for implementing improved USB redirection of USB HID class devices are provided. In one set of embodiments a client system can receive, from a virtual desktop running on a server system, a poll message directed to an HID interface of a USB HID class device plugged into the client system and identify a polling thread associated with the HID interface. The client system can further save a copy of the poll message in the polling thread and initiate local polling of the HID interface, where the local polling comprises providing, via the polling thread, the copy of the poll message to the HID interface.

## Claims

### Claim 1

A method for redirecting a Universal Serial Bus (USB) human interface device (HID) class device from a client system to a virtual desktop running on a server system, the method comprising:
generating, by a guest USB device driver within the virtual desktop, a poll message directed to an HID interface of the USB HID class device;
determining, by the server system, whether the generated poll message is a first poll message for the HID interface;
upon determining that the generated poll message is the first poll message, sending, by the server system, the generated poll message to the client system; and
upon determining that the generated poll message is not the first poll message:
removing, by the server system from a server-side queue, a poll reply received from the client system in response to a previously sent poll message; and
providing, by the server system, the poll reply to the guest USB device driver.

### Claim 2 (depends on 1)

The method of claim 1 wherein upon receiving the poll reply, the guest USB device driver processes the poll reply and generates a next poll message directed to the HID interface.

### Claim 3 (depends on 1)

The method of claim 1 wherein the server-side queue is associated with the HID interface.

### Claim 4 (depends on 1)

The method of claim 1 wherein the determining, sending, removing, and providing are performed by a guest USB stack of a Virtual Desktop Infrastructure (VDI) agent running within the virtual desktop.

### Claim 5 (depends on 1)

The method of claim 1 further comprising:
upon receiving from the client system poll replies generated by the HID interface, adding the poll replies to the server-side queue.

### Claim 6 (depends on 1)

The method of claim 1 wherein upon receiving the generated poll message, the client system:
identifies a polling thread associated with the HID interface;
saves a copy of the generated poll message in the polling thread; and
initiates client-side polling of the HID interface, the client-side polling comprising providing, via the polling thread, the copy of the generated poll message to the HID interface.

### Claim 7 (depends on 6)

The method of claim 6 further comprising:
determining that the server-side queue has become inactive; and
sending, to the client system, a notification to pause the client-side polling of the HID interface.

### Claim 8

A non-transitory computer readable storage medium having stored thereon program code executable by a server system, the program code embodying a method for redirecting a Universal Serial Bus (USB) human interface device (HID) class device from a client system to a virtual desktop running on the server system, the method comprising:
generating, by a guest USB device driver within the virtual desktop, a poll message directed to an HID interface of the USB HID class device;
determining whether the generated poll message is a first poll message for the HID interface;
upon determining that the generated poll message is the first poll message, sending the generated poll message to the client system; and
upon determining that the generated poll message is not the first poll message:
removing, from a server-side queue, a poll reply received from the client system in response to a previously sent poll message; and
providing the poll reply to the guest USB device driver.

### Claim 9 (depends on 8)

The non-transitory computer readable storage medium of claim 8 wherein upon receiving the poll reply, the guest USB device driver processes the poll reply and generates a next poll message directed to the HID interface.

### Claim 10 (depends on 8)

The non-transitory computer readable storage medium of claim 8 wherein the server-side queue is associated with the HID interface.

### Claim 11 (depends on 8)

The non-transitory computer readable storage medium of claim 8 wherein the determining, sending, removing, and providing are performed by a guest USB stack of a Virtual Desktop Infrastructure (VDI) agent running within the virtual desktop.

### Claim 12 (depends on 8)

The non-transitory computer readable storage medium of claim 8 wherein the method further comprises:
upon receiving from the client system poll replies generated by the HID interface, adding the poll replies to the server-side queue.

### Claim 13 (depends on 8)

The non-transitory computer readable storage medium of claim 8 wherein upon receiving the generated poll message, the client system:
identifies a polling thread associated with the HID interface;
saves a copy of the generated poll message in the polling thread; and
initiates client-side polling of the HID interface, the client-side polling comprising providing, via the polling thread, the copy of the generated poll message to the HID interface.

### Claim 14 (depends on 13)

The non-transitory computer readable storage medium of claim 13 wherein the method further comprises:
determining that the server-side queue has become inactive; and
sending, to the client system, a notification to pause the client-side polling of the HID interface.

### Claim 15

A server system comprising:
a virtual desktop comprising a guest Universal Serial Bus (USB) driver; and
a non-transitory computer readable medium having stored thereon program code for redirecting a USB human interface device (HID) class device from a client system to the virtual desktop, the program code causing the server system to:
generate, via the guest USB device driver, a poll message directed to an HID interface of the USB HID class device;
determine whether the generated poll message is a first poll message for the HID interface;
upon determining that the generated poll message is the first poll message, send the generated poll message to the client system; and
upon determining that the generated poll message is not the first poll message:
remove, from a server-side queue, a poll reply received from the client system in response to a previously sent poll message; and
provide the poll reply to the guest USB device driver.

### Claim 16 (depends on 15)

The server system of claim 15 wherein upon receiving the poll reply, the guest USB device driver processes the poll reply and generates a next poll message directed to the HID interface.

### Claim 17 (depends on 15)

The server system of claim 15 wherein the server-side queue is associated with the HID interface.

### Claim 18 (depends on 15)

The server system of claim 15 wherein the determining, sending, removing, and providing are performed by a guest USB stack of a Virtual Desktop Infrastructure (VDI) agent running within the virtual desktop.

### Claim 19 (depends on 15)

The server system of claim 15 wherein the program code further causes the server system to:
upon receiving from the client system poll replies generated by the HID interface, add the poll replies to the server-side queue.

### Claim 20 (depends on 15)

The server system of claim 15 wherein upon receiving the generated poll message, the client system:
identifies a polling thread associated with the HID interface;
saves a copy of the generated poll message in the polling thread; and
initiates client-side polling of the HID interface, the client-side polling comprising providing, via the polling thread, the copy of the generated poll message to the HID interface.

### Claim 21 (depends on 20)

The server system of claim 20 wherein the program code further causes the server system to:
determine that the server-side queue has become inactive; and
send, to the client system, a notification to pause the client-side polling of the HID interface.
