Supercharge Your Innovation With Domain-Expert AI Agents!

USB (universal serial bus) device communication method and device and electronic device

A technology for device communication and electronic devices, which is applied in the direction of electrical digital data processing, instruments, etc., and can solve problems such as poor compatibility of USB devices.

Active Publication Date: 2014-10-01
LENOVO (BEIJING) CO LTD
View PDF5 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In view of this, the embodiment of the present application provides a USB device communication method, device and electronic device to solve the problem of poor compatibility between different USB devices in the existing Android system

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • USB (universal serial bus) device communication method and device and electronic device
  • USB (universal serial bus) device communication method and device and electronic device
  • USB (universal serial bus) device communication method and device and electronic device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0058] figure 1 It is a schematic flowchart of a USB device communication method provided in Embodiment 1 of the present application.

[0059] Such as figure 1 As shown, the method includes the following steps:

[0060] S101: Obtain a USB device identifier of a USB device connected to a USB bus interface, and generate a USB device node corresponding to the USB device.

[0061]When the USB device is connected to the USB bus interface, the USB host controller communicates with the USB device, inquires about the USB device, and obtains the device identification of the USB device. In the embodiment of the present application, the USB device identifier is universal, and the device identifier of each USB device will be fixed after the USB device is produced, that is, a USB device corresponds to a unique device identifier.

[0062] In addition, after the USB device identifier is obtained, a corresponding USB device node is generated on the system bus.

[0063] S102: Map the USB d...

Embodiment 2

[0078] In other embodiments of the present application, in addition to reading the collected data of the USB device, the system may also need to send some instructions to the USB device in order to control the USB device, for example: when the USB device is a camera, when the system According to the image collected by the camera, when the shooting angle needs to be adjusted, an angle adjustment command can be sent to the camera.

[0079] For this, as image 3 As shown, in the embodiment of the present application, the method may also include the following steps:

[0080] S106: Receive a write operation instruction generated according to the found data format.

[0081] The format of the write operation command here must be the data format found, otherwise the USB device will not be able to recognize the write operation command. In the specific implementation, the system can first generate the initial command according to the user input or automatically, and when it needs to b...

Embodiment 3

[0085] Figure 4 It is a schematic structural diagram of a USB device communication device provided in Embodiment 3 of the present application.

[0086] The communication device is connected to a USB bus, and the USB bus is provided with a plurality of interfaces for connecting USB devices, and at least one USB device is connected to the USB bus.

[0087] Such as Figure 4 As shown, the USB device communication device includes: an acquiring unit 1 , a device node generating unit 2 , a mapping unit 3 , a searching unit 4 and a reading unit 5 .

[0088] The obtaining unit 1 is used to obtain the USB device identification of the USB device connected to the USB bus interface.

[0089] In the embodiment of the application, the acquisition unit 1 may be a USB host controller, and when the USB device is connected to the USB bus interface, the USB host controller communicates with the USB device, inquires about the USB device, and acquires the USB device device ID. In the embodime...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a USB (universal serial bus) device communication method and device and an electronic device. The method includes: acquiring USB device identifiers of USB devices connected to USB bus interfaces and generating USB device nodes corresponding to the USB devices; mapping the USB device nodes as HID (human interface device) nodes; searching for data formats corresponding to the USB device identifiers in a preset database; reading data that the HID device nodes transmit according to the searched data formats. Compared with the prior art, the USB device communication method and device and the electronic device have the advantages that installing a driver for each USB device is not required, the connected USB devices are mapped into the corresponding standard HID input devices, data is transmitted through the mapped standard HID input devices and the USB devices, the data that hardware acquires can be read through standard HID interfaces, and a system can be compatible with different USB devices without a great deal of drive development and debugging work.

Description

technical field [0001] The present application relates to the technical field of mobile communication, in particular to a USB device communication method, device and electronic device. Background technique [0002] Android (Chinese translation: Android) system is an operating system applied to terminals such as mobile phones or tablet computers, and is currently the most popular mobile terminal intelligent platform. [0003] Due to the strong openness of the Android system, any mobile terminal manufacturer is allowed to join in, making it more useful and open. With the increasing abundance of users and applications, the existing Android smart operating system is becoming more and more powerful, and the supported There are more and more peripherals. For example, the android smart operating system can exchange data with existing 3D sensors, cameras, GPS locators, flashlights, and NFC chips through USB interfaces. [0004] However, due to the inconsistency of the manufacturer...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F13/38
Inventor 张一冰
Owner LENOVO (BEIJING) CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More