USB Device HID Virtualization for OTG Communication
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Non-HID USB devices cannot directly communicate with OTG devices due to the lack of a driver, limiting their ability to transmit data effectively.
Innovation Solution
A method and system that virtualizes a non-HID USB device into a HID device by adding HID descriptors and report descriptors to its driver, enabling communication with OTG devices by using a radio frequency module and processor module to send and receive HID packets, and encode/decode data accordingly.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a non-HID USB device is used, then the device can transmit data to a PC with a USB driver, but the device cannot communicate with OTG devices
Solution Approach 1:
The patent applies universality by enabling the USB device to function in multiple modes - it can operate as a traditional USB device when connected to a PC with a USB driver, and as a HID device when connected to an OTG device. This multi-functionality is achieved through the virtualization layer that dynamically adapts the device interface based on the connection type, allowing one device to serve multiple communication purposes without requiring separate hardware for each mode.
Solution Approach 2:
The patent introduces a virtualization layer as an intermediary between the USB device and the OTG device. This virtualization layer acts as a mediator that translates USB device communications into HID protocol communications, enabling compatibility between devices that would otherwise be incompatible. The virtualization layer handles the protocol conversion and interface adaptation, allowing the USB device to appear as a HID device to the OTG device while maintaining the original USB device functionality.
2Ease of operation
If OTG devices are designed to work with HID devices, then communication is simplified, but non-HID USB devices are excluded from direct communication
Solution Approach 1:
The patent applies copying by creating a virtual HID device interface that replicates the functionality expected by OTG devices. Instead of modifying the OTG device to recognize USB devices, the solution creates a virtual copy of the HID interface that the USB device can present to the OTG device. This virtual HID interface mimics the behavior and protocol of a true HID device, allowing the OTG device to communicate with it as if it were a native HID device, thereby expanding compatibility without changing the OTG device design.
3Reliability
If USB devices require specific drivers for each port type, then communication reliability is ensured, but the complexity of driver installation and configuration increases
Solution Approach 1:
The patent applies dynamics by implementing a dynamic virtualization layer that automatically adapts to different connection types. When the USB device connects to an OTG device, the virtualization layer dynamically transforms the USB interface into a HID interface. When connected to a PC with a USB driver, it operates in standard USB mode. This dynamic adaptation eliminates the need for manual driver configuration and installation, as the system automatically selects the appropriate communication mode based on the connection type, maintaining reliability while simplifying ease of manufacture.
Data Source
Figure 1~2
Figure 3~4
Figure 5
AI summary
The present invention relates to the field of communications, and discloses a USB device communication and transmission method, device and system, which are used to implement communication between a USB device and an OTG device. A USB device communication method includes: receiving, by a USB device, a device type query message sent by a peer device, where a HID descriptor and a HID report descriptor are added to a driver of the USB device; sending, by the USB device according to the HID descriptor and HID report descriptor, a query response message that carries a HID identifier to the peer device, where the HID identifier is used to enable the peer device to identify the USB device as a HID device; and encoding and encapsulating, by the USB device, data to be sent to generate a HID packet, and sending the HID packet to the peer device, or receiving a HID packet from the peer device, and decapsulating and decoding the received HID packet, where the HID packet carries a data type and data usage manner information.