WO2015127893A1 - 能力确定方法、能力配置方法、主机、终端设备及系统 - Google Patents

能力确定方法、能力配置方法、主机、终端设备及系统 Download PDF

Info

Publication number
WO2015127893A1
WO2015127893A1 PCT/CN2015/073303 CN2015073303W WO2015127893A1 WO 2015127893 A1 WO2015127893 A1 WO 2015127893A1 CN 2015073303 W CN2015073303 W CN 2015073303W WO 2015127893 A1 WO2015127893 A1 WO 2015127893A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
host
capability
supported
overlapping
Prior art date
Application number
PCT/CN2015/073303
Other languages
English (en)
French (fr)
Inventor
王业麒
Original Assignee
华为终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为终端有限公司 filed Critical 华为终端有限公司
Priority to US15/115,448 priority Critical patent/US10169277B2/en
Priority to JP2016554187A priority patent/JP6280992B2/ja
Priority to EP15754861.1A priority patent/EP3091441A4/en
Publication of WO2015127893A1 publication Critical patent/WO2015127893A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/387Information transfer, e.g. on bus using universal interface adapter for adaptation of different data processing systems to different peripheral devices, e.g. protocol converters for incompatible systems, open system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/36Handling requests for interconnection or transfer for access to common bus or bus system

Definitions

  • the present invention relates to a terminal device, and in particular, to a terminal device capability determining method, a terminal device capability configuration method, a host, a terminal device, and a terminal device configuration system.
  • multi-function devices such as Universal Serial Bus (USB)
  • USB Universal Serial Bus
  • the multi-function device switches to the function 2 mode and operates in the function 2 mode.
  • common multi-function devices such as USB 3G network card
  • USB virtual CD mode work in USB virtual CD mode in the default working mode.
  • the user installs the CD-ROM driver, it works as a modem or network card.
  • a USB re-enumeration ie lookup
  • the USB device has multiple configurations, each of which implements different functions, such as C1: Modem; C2: Net Adapter; C3: Global Positioning System (GPS),
  • the host (Host) allows the USB device to work in different functional modes by setting different configurations.
  • the host since the capability supported by the host is not exactly the same as the capability supported by the USB device, the host cannot automatically configure according to the capability supported by the host or the capability of the USB device, thereby reducing the user experience.
  • the embodiment of the present invention provides a method for determining a capability of a terminal device, a method for configuring a terminal device, a configuration system for a host device, a terminal device, and a terminal device, to solve the problem in the prior art that the host and the terminal device are incompletely supported. Similarly, the host cannot flexibly configure the terminal device according to the capabilities it supports.
  • the first aspect provides a method for determining capability of a terminal device, including:
  • the host acquires the capabilities supported by the terminal device
  • Determining, by the host, the terminal device according to the capability supported by the terminal device and the capability supported by the host The capability supported by the host, and the capability supported by the terminal device and the host is used as an overlapping capability; the overlapping capability is used for configuring the capability of the terminal device;
  • the method further includes: when receiving the message that the configuration succeeded by the terminal device is successful, enumerating at least one sub-device that configures the overlapping capability in the terminal device ;
  • the host acquires the capabilities supported by the terminal device, including:
  • the host starts the corresponding driver according to the MS_COMP_ID, and parses the MS SUBCOMP_ID by the driver to obtain the capability supported by the terminal device.
  • the second aspect provides a capability configuration method for a terminal device, where the method includes:
  • the terminal device sends its own supported capabilities to the host;
  • the overlapping capability is a capability that the host determines, according to the capability supported by the terminal device and the capability supported by the host, that is supported by the terminal device and the host;
  • the terminal device is configured according to the overlapping capability.
  • the method further includes: sending, by the terminal device, a configuration success message to the host, so that the host enumerates the overlapping capability configured on the terminal device At least one child device, and driving loading the at least one child device, so that the at least one child device implements a function corresponding to the overlapping capability.
  • the terminal device sends the capability supported by the terminal device to the host, including:
  • the terminal device sends the MS_COMP_ID and the MS SUBCOMP_ID to the host through the descriptor, so that the host starts the corresponding driver through the MS SUBCOMP_ID, and after the MS SUBCOMP_ID is parsed by the driver, the capability supported by the terminal device is obtained. .
  • the third aspect provides a host, including:
  • An obtaining unit configured to acquire capabilities supported by the terminal device
  • a determining unit configured to determine, according to the capability supported by the terminal device and the capability supported by the host, the capabilities supported by the terminal device and the host, and the capabilities supported by the terminal device and the host are The overlapping capability is used for configuring the capability of the terminal device;
  • a sending unit configured to send the overlapping capability to the terminal device.
  • the method further includes:
  • a receiving unit configured to receive a message that the configuration succeeded by the terminal device is successful
  • An enumeration unit configured to: when the receiving unit receives the message that the configuration is successful, enumerate at least one child device in the terminal device that configures the overlapping capability;
  • a loading unit configured to perform driving loading on the at least one child device, so that the at least one child device implements a function corresponding to the overlapping capability.
  • the acquiring unit includes:
  • a code receiving unit configured to receive a descriptor sent by the terminal device, where the descriptor includes an MS_COMP_ID and an MS SUBCOMP_ID;
  • a startup unit configured to start a corresponding driver according to the MS_COMP_ID
  • a parsing unit configured to parse the MS SUBCOMP_ID by the driver initiated by the starting unit, to obtain the capability supported by the terminal device.
  • the fourth aspect provides a terminal device, including:
  • a first sending unit configured to send the capability supported by the terminal device to the host
  • a receiving unit configured to receive an overlapping capability sent by the host, where the overlapping capability is the host according to the Determining the capabilities supported by the terminal device and the capabilities supported by the host, and determining the capabilities supported by the terminal device and the host;
  • a configuration unit configured to configure the overlapping capability.
  • the method further includes: sending, by the second sending unit, a message that the configuration succeeds to the host, so that the host enumerates the configuration device on the terminal device And at least one sub-device that overlaps the capability, and performs driving loading on the at least one sub-device, so that the at least one sub-device implements the function corresponding to the overlapping capability.
  • the first sending unit is specifically configured to send the MS_COMP_ID and the MS SUBCOMP_ID to the host by using a descriptor, In order to enable the host to start the corresponding driver through the MS SUBCOMP_ID, and parse the MS SUBCOMP_ID by the driver, the capability supported by the terminal device is obtained.
  • a fifth aspect provides a configuration system of a terminal device, where the system includes: a host and a terminal device connected to the host, where
  • the host is configured to acquire the capability supported by the terminal device, and determine, according to the capability supported by the terminal device and the capability supported by the host, the capability supported by the terminal device and the host, and the terminal device And an ability supported by the host as an overlapping capability; the overlapping capability is used for configuring the capability of the terminal device; and transmitting the overlapping capability to the terminal device;
  • the terminal device is configured to receive the overlapping capability, and configure according to the overlapping capability.
  • the terminal device is further configured to send a message that the configuration is successful to the host;
  • the host is further configured to, when receiving the message that the configuration is successfully sent by the terminal device, enumerate at least one sub-device that configures the overlapping capability in the terminal device, and drive the at least one sub-device Loading, so that the at least one child device implements the function corresponding to the overlapping capability.
  • the acquiring, by the host, the capability supported by the terminal device specifically: the receiving, by the host, the terminal a descriptor sent by the device, where the descriptor includes an MS_COMP_ID and an MS SUBCOMP_ID; the corresponding driver is started according to the MS_COMP_ID, and the MS SUBCOMP_ID is parsed by the driver to obtain the capability supported by the terminal device.
  • the host first determines the capability supported by the terminal device (that is, the overlapping capability), and notifies the terminal device of the overlapping capability, so that the terminal device configures the overlapping capability, and then, The host enumerates at least one sub-device in the overlapping capability, and drives and loads the at least one sub-device, so that the at least one sub-device has its corresponding function, and implements automatic loading of different drivers to meet different Functional terminal equipment. That is to say, when the functions supported by the host device and the terminal device (such as the USB device) are not completely the same, the host and the terminal device perform function negotiation, find out the functions supported by both of the devices, and perform driver loading, thereby improving the user experience. At the same time, the number of times that the terminal device reports the corresponding interface for use by the host when enumerating the functions required by the host is reduced.
  • FIG. 1 is a flowchart of a method for determining capability of a terminal device according to an embodiment of the present invention
  • FIG. 2 is another flowchart of a method for determining capability of a terminal device according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for configuring capability of a terminal device according to an embodiment of the present disclosure
  • FIG. 4 is another flowchart of a method for configuring capability of a terminal device according to an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of a host according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of another host according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • FIG. 8 is another schematic structural diagram of a terminal device according to an embodiment of the present disclosure.
  • FIG. 9 is another schematic structural diagram of a host according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a USB device according to an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of a configuration system of a terminal device according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for determining capability of a terminal device according to an embodiment of the present invention, where the method includes:
  • Step 101 The host acquires the capability supported by the terminal device.
  • the terminal device when the terminal device is connected to the host, the terminal device sends the MS_COMP_ID and the MS SUBCOMP_ID to the host through the descriptor (or USE descriptor), and after receiving the descriptor, the host initiates the corresponding response through the MS_COMP_ID. Driving, and parsing the MS SUBCOMP_ID by the driver to obtain the capability supported by the terminal device.
  • the MS_COMP_ID and the MS SUBCOMP_ID are both distinguished names defined in the MS_OS_Descripter, and are not described in detail herein.
  • the terminal device in this embodiment is described by taking a USB device as an example, but is not limited thereto.
  • the USB device specifically has the following functional features:
  • USB device There is usually a USB interface on the USB device.
  • the USB device is connected to the host through the USB interface.
  • the USB device can store MS_COMP_ID and MS_SUBCOMP_ID, such as USB ⁇ MS_COMP_TEST&MS_SUBCOMP_ID, and the italic part is determined by the USB device.
  • MS_COMP_ID and MS_SUBCOMP_ID may be generated according to the command.
  • TEST is the drive matching keyword, so that after receiving the MS_COMP_TEST, the host matches the special driver corresponding to the TEST.
  • the special driver functions to parse the MS_SUBCOMP_ID with the capability supported by the terminal device;
  • the SUBCOMP_ID is a bit conversion ( BIT MAP) A string corresponding to a number.
  • Each bit in the BIT MAP represents a function supported by the current device, such as:
  • Network adapter (Net Adapter);
  • GPS Global Positioning System
  • SUB COMP 0xD (1101) If the value of SUB COMP is 0xD (1101), it means that the current USB device can support both Modem and GPS and BT.
  • the HOST can match the received special driver by the received MS_COMP_ID, and parse the received MS SUBCOMP_ID by the special driver to obtain the capability of the current USB device. For example, when the capability of the USB device is 5, Indicates that the USB device supports both Modem, GPS, and BT.
  • the TEST corresponds to the USB interface
  • the USB interface can correspond to other drivers in addition to the special driver, which is not limited in this embodiment.
  • Step 102 The host determines, according to the capability supported by the terminal device and the capability supported by the host, the capability supported by the terminal device and the host, and the capability supported by the terminal device and the host as an overlapping capability;
  • the overlapping capability is used for configuring the capability of the terminal device;
  • a certain manner is determined by: the host performs the operation between the capability supported by the USB device and the capability supported by the host, and obtains the capability that both the host and the USB device can support.
  • the host and the USB device are both The ability to support is called overlapping capability. It should be noted that the manner of determining the overlapping capability is not limited to this operation, and may be performed by other operations, which is not limited in this embodiment.
  • the Host driver only supports Modem and BT
  • the USB device supports Modem, GPS and BT at the same time.
  • the result of the AND operation is 0x9 (1001), indicating that both Host and USB devices can support both Modem and BT.
  • Step 103 Send the overlapping capability to the terminal device.
  • the Host driver sends the overlapping capability obtained after the operation to the USB device, so that the terminal device configures the overlapping capability.
  • the host can send the overlapping capability obtained by the operation to the USB device by using a command customized by the USB vendor (USB Vendor), and the USB device performs the configuration of the overlapping capability according to the command, and After the configuration is successful, the host sends a successful configuration message.
  • USB Vendor USB Vendor
  • the host first acquires all the supported capabilities of the terminal device, and then determines the capability supported by the terminal device (ie, the overlapping capability), and notifies the terminal device of the overlapping capability, so that the terminal device configures the overlapping capability. . That is to say, when the capabilities supported by the host device and the terminal device (such as the USB device) are not completely the same, the host and the terminal device perform function negotiation, and find out the functions supported by the two to perform configuration, thereby implementing the capability according to the support.
  • the terminal device is flexibly configured and the user experience is also improved.
  • FIG. 2 is another method for determining capability of a terminal device according to an embodiment of the present invention.
  • a flowchart, the method comprising:
  • Steps 201 to 203 are detailed in steps 101 to 103;
  • Step 204 When receiving the message that the configuration succeeded by the terminal device is successful, enumerating at least one child device in the terminal device that configures the overlapping capability;
  • the host When receiving the configuration success message sent by the USB device, the host enumerates at least one child device according to the overlapping capability (that is, the virtual device logically divided by the USB device, referred to herein as a child device). For example, if the overlap ability with the operation is 0x9, the host can enumerate two sub-devices, one is a Modem, and the other is a BT, and one of the sub-devices can be enumerated, which is not limited in this embodiment.
  • Step 205 Perform driving loading on the at least one sub-device, so that the at least one sub-device implements a function corresponding to the overlapping capability.
  • the two child devices are driven and loaded, and after the driver loading is completed, the two child devices themselves have the function corresponding to the overlapping capability.
  • the host first determines the capability supported by the terminal device (that is, the overlapping capability), and notifies the terminal device of the overlapping capability, so that the terminal device configures the overlapping capability, and then the host enumerates the configuration device. At least one sub-device that overlaps the capability, and the at least one sub-device is driven to be loaded, so that the at least one sub-device has a function corresponding to the overlapping capability. That is to say, when the capabilities supported by the host and the terminal device (such as the USB device) are not exactly the same, the host and the terminal device perform function negotiation, find out the functions supported by both the host and the driver to load, and reduce the enumeration of the terminal device. The number of times has improved the user experience. At the same time, different drivers are also used to meet the needs of different terminal devices.
  • FIG. 3 is a flowchart of a method for configuring capability of a terminal device according to an embodiment of the present disclosure, where the method includes:
  • Step 301 The terminal device sends the capability supported by the terminal device to the host.
  • the terminal device takes a USB device as an example.
  • the USB device sends the supported capability to the host, so that the host can receive the USB device support capability according to its own capabilities and USB.
  • the capabilities supported by the device determine the capabilities that both support. In this embodiment, the capabilities supported by both are called overlapping capabilities. Thereafter, the host transmits the determined overlapping capability to the terminal device.
  • the host can determine the capabilities supported by the host and the USB device through the AND operation, but is not limited thereto, and can also determine the capabilities supported by the host and the USB device through other similar calculation methods.
  • the terminal device after connecting to the host, sends the MS_COMP_ID and the MS SUBCOMP_ID to the host by using a descriptor, and after receiving the descriptor, the host drives the driver corresponding to the MS_COMP_ID and passes the After the driver parses the MS SUBCOMP_ID, the driver supports the capabilities of the USB device.
  • Step 302 The terminal device receives the overlapping capability sent by the host, where the overlapping capability is supported by the terminal device and the host determined by the host according to the capability supported by the terminal device and the capability supported by the host.
  • Ability
  • the terminal device can receive the overlapping capability supported by the host and the terminal device sent by the host by using a vendor-defined command.
  • Step 303 The terminal device is configured according to the overlapping capability.
  • the terminal device configures the function corresponding to the overlapping capability to the corresponding at least one child device.
  • the terminal device sends a successful configuration message to the host, so that the host enumerates at least one sub-device configured with the overlapping capability on the terminal device, and Driving loading the at least one child device to enable the at least one child device to implement the function corresponding to the overlapping capability.
  • the terminal device (such as a USB device) first informs the host of the capability supported by the host, so that the host determines the capability supported by the terminal device (ie, the overlapping capability), and notifies the terminal device of the overlapping capability.
  • the terminal device In order to facilitate the terminal device to configure the overlapping capabilities. That is to say, when the capabilities supported by the host and the terminal device are not completely the same, the host and the terminal device perform function negotiation, and find out the capabilities supported by both of the terminals to notify the terminal device, so that the terminal device performs corresponding configuration. That is, the host can flexibly configure the functions of the terminal device according to the capabilities of the host and the capabilities of the terminal device.
  • FIG. 4 is another flowchart of a method for configuring capability of a terminal device according to an embodiment of the present invention, where the method includes:
  • Step 404 The terminal device sends a message that the configuration is successful to the host, so that the host enumerates at least one child device configured with the overlapping capability on the terminal device, and the at least one child device is Driving loading is performed to enable the at least one child device to implement a function corresponding to the overlapping capability.
  • the Host sends a configuration success message.
  • the Host enumerates the corresponding at least one child device in the terminal device according to the result of the AND operation. If the result of the AND operation is 0x9, the two child devices are enumerated, and one is a Modem. One is BT. After that, the host loads the drivers for the two child devices, so that the two child devices that load the driver have the related functions of overlapping capabilities.
  • the terminal device (such as a USB device) first informs the host of the capability supported by the host, so that the host determines the capability supported by the terminal device (ie, the overlapping capability), and notifies the terminal device of the overlapping capability.
  • the host can then enumerate the child device configuring the overlapping capability and install the driver for the child device. That is to say, when the capabilities supported by the host and the terminal device are not completely the same, the host and the terminal device perform function negotiation to find out the capabilities supported by both of the devices and the loading of the driver, which not only reduces the number of enumerations, but also improves the number of enumerations.
  • the user experience At the same time, the host can flexibly configure the functions of the terminal device according to the capabilities of the host and the capabilities of the terminal device.
  • a USB device can be conveniently used, and different Host drivers are provided to meet the needs of different users, so that the development work of the USB device manufacturer can be reduced.
  • device manufacturers can also support all USB devices with a single driver, reducing the development and certification costs of the Host driver.
  • an embodiment of the present invention further provides a host, and a schematic structural diagram thereof is shown in FIG. 5.
  • the device includes: an obtaining unit 51, a determining unit 52, and a sending unit 53. among them,
  • the acquiring unit 51 is configured to acquire the capability supported by the terminal device.
  • the obtaining unit 51 includes: a code receiving unit, a starting unit, and a parsing unit,
  • the code receiving unit is configured to receive a descriptor sent by the terminal device, where the descriptor includes an MS_COMP_ID and an MS SUBCOMP_ID; the starting unit is configured to start a corresponding driving according to the MS_COMP_ID; the parsing unit, The driver for starting by the startup unit parses the MS SUBCOMP_ID to obtain the capability supported by the terminal device.
  • the determining unit 52 is configured to determine, according to the capability supported by the terminal device and the capability supported by the host, the capabilities supported by the terminal device and the host, and support the terminal device and the host Capability as an overlapping capability; the overlapping capability is used for configuring the capability of the terminal device;
  • the sending unit 53 is configured to send the overlapping capability to the terminal device, so that the terminal device configures the overlapping capability, where the sending unit 53 sends the overlapping capability to the terminal device, where The overlapping capability is sent to the terminal device by a vendor-defined command, so that the terminal device configures the overlapping capability.
  • the embodiment is based on the foregoing embodiment of FIG. 5, the host further includes: a receiving unit 61, an enumerating unit 62, and a loading unit 63. Show, among them,
  • the receiving unit 61 is configured to receive a message that the configuration succeeded by the terminal device is successful
  • the enumeration unit 62 is configured to: when the receiving unit receives the message that the configuration is successful, enumerate at least one child device in the terminal device that configures the overlapping capability;
  • the loading unit 63 is configured to perform driving loading on the at least one sub-device, so that the at least one sub-device implements a function corresponding to the overlapping capability.
  • the embodiment of the present invention further provides a terminal device, and the result is shown in FIG. 7.
  • the terminal device includes: a first sending unit 71, a receiving unit 72, and a configuration unit 73, where
  • the first sending unit 71 is configured to send the capability supported by the terminal device to the host. Specifically, the MS_COMP_ID and the MS SUBCOMP_ID are sent to the host by using a descriptor, so that the host starts the corresponding driver by using the MS SUBCOMP_ID. And after the MS SUBCOMP_ID is parsed by the driver, the capability supported by the terminal device is obtained.
  • the receiving unit 72 is configured to receive the overlapping capability sent by the host, where the overlapping capability is determined by the host according to the capability supported by the terminal device and the capability supported by the host, where the terminal device and the host are determined.
  • the capability of the host is received by the host, and the capability of the host and the terminal device, which is sent by the host, is received by the vendor-defined command.
  • the configuration unit 73 is configured to configure the overlapping capability
  • the embodiment is based on the embodiment of FIG. 7, the terminal device further includes: the second sending unit 81, and a schematic structural diagram thereof is shown in FIG.
  • the second sending unit 81 is configured to send a message that the configuration is successful to the main after the configuration unit 73 performs the configuration according to the overlapping capability.
  • the device is configured to enumerate at least one sub-device configured with the overlapping capability on the terminal device, and perform driving loading on the at least one sub-device to enable the sub-device to implement a function corresponding to the overlapping capability.
  • the terminal device may be a USB device, and may be another storage device, which is not limited in this embodiment.
  • the embodiment of the present invention further provides a host, which is shown in FIG. 9.
  • the host 9 includes: a USB interface 91 and a processor 92, where
  • the processor 92 is configured to acquire, by using the USB interface 91, the capability supported by the terminal device, and determine, according to the capability supported by the terminal device and the capability supported by the host, the capabilities supported by the terminal device and the host, and The capability supported by both the terminal device and the host is used as an overlapping capability; the overlapping capability is used for configuring the capability of the terminal device;
  • the processor 92 is further configured to send the overlapping capability to the terminal device by using the USB interface 91, so that the terminal device configures the overlapping capability.
  • the processor 92 is further configured to, when receiving, by the USB interface 91, a configuration success message sent by the terminal device, enumerating at least one of the terminal devices configured to perform the overlapping capability. And driving, loading, by the device, the at least one child device, so that the at least one child device implements a function corresponding to the overlapping capability.
  • the processor acquires the capability supported by the terminal device by using the USB interface, including: the host receiving the descriptor sent by the terminal device, where the descriptor includes an MS_COMP_ID and an MS SUBCOMP_ID; and correspondingly starting according to the MS_COMP_ID And drive the MS SUBCOMP_ID through the driver to obtain the capability supported by the terminal device.
  • the sending, by the processor, the overlapping capability to the terminal device by using a USB interface includes: sending the overlapping capability to the terminal device by using a vendor-defined command.
  • the embodiment of the present invention further provides a USB device, which is shown in FIG. 10, and the USB device 10 includes: a USB interface 11 and a processor 12, where
  • the processor 12 is configured to send, by the UEB interface 11, the capability supported by the USB device to the host, and receive, by using the UEB interface 11, the overlapping capability sent by the host, where the overlapping capability is the host according to the Determining the capabilities supported by the terminal device and the capabilities supported by the host, and determining the capabilities supported by the terminal device and the host;
  • the processor 12 is further configured to perform according to the overlapping capability.
  • the processor 12 is further configured to send, by using the UEB interface 11, a configuration success message to the host, so that the host enumerates at least the overlapping capability configured on the terminal device. a child device, and driving loading the at least one child device, so that the at least one child device implements a function corresponding to the overlapping capability.
  • the processor sends the capability supported by the USB device to the host through the USB interface, including: sending, by using a descriptor, the MS_COMP_ID and the MS SUBCOMP_ID to the host, so that the host starts the corresponding driver by using the MS SUBCOMP_ID, and passes the After the driver parses the MS SUBCOMP_ID, the driver supports the capability supported by the terminal device.
  • the processor receives the overlapping capability sent by the host by using a USB interface, and includes: receiving, by a vendor-defined command, the capability of the host sent by the host and the capability supported by the USB device.
  • FIG. 11 is a schematic structural diagram of a system for configuring a terminal device according to an embodiment of the present invention.
  • the configuration system 13 of the terminal device includes: a host 111, and a terminal device 112 connected to the host 111. ,among them,
  • the host 111 is configured to acquire the capability supported by the terminal device 112, and determine the capabilities supported by the terminal device 112 and the host 111 according to the capabilities supported by the terminal device 112 and the capabilities supported by the host, and The capability supported by both the terminal device 112 and the host 111 is used as an overlapping capability; the overlapping capability is used for configuring the capability of the terminal device; and the overlapping capability is sent to the terminal device;
  • the terminal device 112 is configured to receive the overlapping capability and perform configuration according to the overlapping capability.
  • the terminal device 112 is further configured to send a message that the configuration is successful to the host 111;
  • the host 111 is further configured to, when receiving the message that the configuration succeeded by the terminal device 112, enumerate at least one sub-device configured by the terminal device 112 to perform the overlapping capability, and perform the sub-device Drive The loading is performed to enable the child device to implement the function corresponding to the overlapping capability.
  • the acquiring, by the host 111, the capability supported by the terminal device 112 includes: receiving, by the host, a descriptor sent by the terminal device, where the descriptor includes an MS_COMP_ID and an MS SUBCOMP_ID; and starting according to the MS_COMP_ID Corresponding driver, and parsing the MS SUBCOMP_ID by the driver to obtain the capability supported by the terminal device.
  • USB device needs to meet the needs of three different customers.
  • One customer requires Modem+GPS+SD function, one customer requires Modem function, and another customer requires NetAdapter+BT function;
  • the USB device reports MS_COMP USB ⁇ MS_COMP_HUAWEI&MS_SUBCOMP_1F to the host, indicating that the USB supports all of the above ports.
  • the driving ability value is 0x15 (Modem+GPS+SD is required);
  • the value of the driver 2 is 0x01 (only Modem is required);
  • driver three The ability value of driver three is 0x06 (requires Net Adapter and BT).
  • the host and the USB device perform capability negotiation to determine that the host and the USB device respectively satisfy three different customers. Demand, and then provide drivers for these three customers.
  • the device manufacturer only needs to produce a USB device, and then provides different Host drivers according to the user type, so as to meet the needs of the user.
  • USB vendors only provide one Host driver, but support all USB products from this vendor.
  • Driver 1 has a capability value of 0x1F, which supports all ports.
  • USB device one's ability: USB ⁇ MS_COMP_HUAWEI&MS_SUBCOMP_01, only Modem
  • USB device 2 capabilities USB ⁇ MS_COMP_HUAWEI&MS_SUBCOMP_11, with Modem+SD
  • the device manufacturer can support all USB devices with one driver, which reduces the development and certification cost of the Host driver.
  • the embodiment of the invention can flexibly configure the USB function according to the capability supported by the host and the capability supported by the USB device, thereby satisfying different user requirements and improving user satisfaction.
  • the present invention can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is a better implementation. the way.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product, which may be stored in a storage medium such as a ROM/RAM or a disk. , an optical disk, etc., includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments.

Abstract

本发明实施例公开了一种终端设备的能力确定方法、终端设备的能力配置方法、主机、终端设备及系统,所述终端设备的能力确定方法包括:主机获取终端设备支持的能力;主机根据端设备支持的能力与主机支持的能力,确定终端设备和主机均支持的能力,并将终端设备和主机均支持的能力作为重叠能力;所述重叠能力用于终端设备进行能力的配置;将重叠能力发送给终端设备。本发明实施例解决了由于主机与终端设备支持的能力不完全相同,主机不能依据自身支持的能力对终端设备进行灵活配置的问题。

Description

能力确定方法、能力配置方法、主机、终端设备及系统 技术领域
本发明涉及终端设备,特别涉及一种终端设备的能力确定方法、终端设备的能力配置方法、主机、终端设备及终端设备的配置系统。
背景技术
通常情况下,多功能设备,比如通用串行总线(USB,Universal Serial Bus)设备,是按照默认的功能(比如功能1)模式工作,当满足一定条件后(比如安装了功能2的驱动),则该多功能设备切换为功能2模式,并以功能2的模式工作。其中,常见的多功能设备,比如USB 3G上网卡,默认工作模式时以USB虚拟光盘方式工作,当用户安装了光盘驱动程序后,则以调制解调器(modem)或者网卡的方式工作。但是,在每次使用时,需要进行一次USB的重新枚举(即查找),降低了用户体验。
基于此,通常使用多个配置(Multi configuration)来实现多功能的选择。也就是说,USB设备存在多个配置(Configuration),每个Configuration实现不同的功能,比如C1:Modem;C2:网络适配器(Net Adapter);C3:全球定位系统(GPS,Global Positioning System)等,主机(Host)通过设置不同的配置让USB设备工作在不同的功能模式下。
但是现有的实现方式中,由于主机支持的能力与USB设备支持的能力不完全相同,主机不能自动依据自身支持的能力或者USB设备的能力进行配置,从而降低了用户体验。
发明内容
本发明实施例中提供了一种终端设备的能力确定方法、终端设备的配置方法、主机、终端设备及终端设备的配置系统,以解决现有技术中,由于主机与终端设备支持的能力不完全相同,主机不能依据自身支持的能力对终端设备进行灵活配置的问题。
为了解决上述技术问题,本发明实施例公开了如下技术方案:
第一方面提供了一种终端设备的能力确定方法,包括:
主机获取终端设备支持的能力;
主机根据所述终端设备支持的能力与所述主机支持的能力,确定所述终端设备和 主机均支持的能力,并将所述终端设备和主机均支持的能力作为重叠能力;所述重叠能力用于所述终端设备进行能力的配置;
将所述重叠能力发送给所述终端设备。
在第一方面的第一种可能的实现方式中,还包括:在接收到所述终端设备发送的配置成功的消息时,枚举出所述终端设备中配置所述重叠能力的至少一个子设备;
对所述至少一个子设备进行驱动加载,以使所述至少一个子设备实现所述重叠能力对应的功能。
结合第一方面或第一方面的第一种可能的实现方式中,在第二种可能的实现方式中,
所述主机获取终端设备支持的能力,包括:
所述主机接收所述终端设备发送的描述符,所述描述符中包括MS_COMP_ID和MS SUBCOMP_ID;
所述主机根据所述MS_COMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析,得到所述终端设备支持的能力。
第二方面提供了一种终端设备的能力配置方法,所述方法包括:
终端设备将自身支持的能力发送给主机;
所述终端设备接收所述主机发送的重叠能力,所述重叠能力为所述主机根据所述终端设备支持的能力与所述主机支持的能力,确定的所述终端设备和主机均支持的能力;
所述终端设备按照所述重叠能力进行配置。
在第二方面的第一种可能的实现方式中,还包括:所述终端设备将配置成功的消息发送给所述主机,以便于所述主机枚举出所述终端设备上配置所述重叠能力的至少一个子设备,并对所述至少一个子设备进行驱动加载,使所述至少一个子设备实现所述重叠能力对应的功能。
结合第二方面或第二方面的第一种可能的实现方式中,在第二种可能的实现方式中,所述终端设备将自身支持的能力发送给主机,包括:
所述终端设备通过描述符将MS_COMP_ID和MS SUBCOMP_ID发送给主机,以便于主机通过所述MS SUBCOMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析后,得到所述终端设备支持的能力。
第三方面提供了一种主机,包括:
获取单元,用于获取终端设备支持的能力;
确定单元,用于根据所述终端设备支持的能力与所述主机支持的能力,确定所述终端设备和所述主机均支持的能力,并将所述终端设备和所述主机均支持的能力作为重叠能力;所述重叠能力用于所述终端设备进行能力的配置;
发送单元,用于将所述重叠能力发送给所述终端设备。
在第三方面的第一种可能的实现方式中,还包括:
接收单元,用于接收所述终端设备发送的配置成功的消息;
枚举单元,用于在接收单元接收到所述配置成功的消息时,枚举出所述终端设备中配置所述重叠能力的至少一个子设备;
加载单元,用于对所述至少一个子设备进行驱动加载,以使所述至少一个子设备实现所述重叠能力对应的功能。
结合第三方面或第三方面的第一种可能的实现方式中,在第二种可能的实现方式中所述获取单元包括:
代码接收单元,用于接收所述终端设备发送的描述符,所述描述符中包括MS_COMP_ID和MS SUBCOMP_ID;
启动单元,用于根据所述MS_COMP_ID启动对应的驱动;
解析单元,用于通过所述启动单元启动的驱动对所述MS SUBCOMP_ID进行解析,得到所述终端设备支持的能力。
第四方面提供了一种终端设备,包括:
第一发送单元,用于将所述终端设备支持的能力发送给主机;
接收单元,用于接收所述主机发送的重叠能力,所述重叠能力为所述主机根据所 述终端设备支持的能力与所述主机支持的能力,确定的所述终端设备和主机均支持的能力;
配置单元,用于对所述重叠能力进行配置。
在第四方面的第一种可能的实现方式中,还包括:第二发送单元,用于将配置成功的消息发送给所述主机,以便于所述主机枚举出所述终端设备上配置所述重叠能力的至少一个子设备,并对所述至少一个子设备进行驱动加载,使所述至少一个子设备实现所述重叠能力对应的功能。
结合第四方面或第四方面的第一种可能的实现方式中,在第二种可能的实现方式中,所述第一发送单元,具体用于通过描述符将MS_COMP_ID和MS SUBCOMP_ID发送给主机,以便于主机通过所述MS SUBCOMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析后,得到所述终端设备支持的能力。
第五方面提供了一种终端设备的配置系统,所述系统包括:主机以及与所述主机连接的终端设备,其中,
所述主机,用于获取所述终端设备支持的能力;并根据所述终端设备支持的能力与所述主机支持的能力,确定所述终端设备和主机均支持的能力,并将所述终端设备和主机均支持的能力作为重叠能力;所述重叠能力用于所述终端设备进行能力的配置;以及将所述重叠能力发送给所述终端设备;
所述终端设备,用于接收所述重叠能力,并按照所述重叠能力进行配置。
在第五方面的第一种可能的实现方式中,
所述终端设备,还用于将配置成功的消息发送给所述主机;
所述主机,还用于在接收到所述终端设备发送的配置成功的消息时,枚举出所述终端设备中配置所述重叠能力的至少一个子设备,对所述至少一个子设备进行驱动加载,以使所述至少一个子设备实现所述重叠能力对应的功能。
结合第五方面或第五方面的第一种可能的实现方式中,在第二种可能的实现方式中,所述主机获取所述终端设备支持的能力,具体包括:所述主机接收所述终端设备发送的描述符,所述描述符中包括MS_COMP_ID和MS SUBCOMP_ID;根据所述MS_COMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析,得到所述终端设备支持的能力。
由上述实施例可知,本发明实施例中,主机先确定与终端设备均支持的能力(即重叠能力),并将该重叠能力告知终端设备,以便于该终端设备对重叠能力进行配置,之后,主机枚举出配置所述重叠能力内的至少一个子设备,对所述至少一个子设备进行驱动加载,以使该至少一个子设备具有其对应的功能,实现了自动加载不同驱动以满足具备不同功能的终端设备。也就是说,当主机与终端设备(比如USB设备)支持的功能不完全相同时,主机与终端设备进行功能协商,找出二者均支持的功能进行配置并进行驱动加载,提高了用户体验,同时也减少了终端设备在接收到主机需要的功能时,枚举上报对应接口供主机使用的次数。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种终端设备的能力确定方法的流程图;
图2为本发明实施例提供的一种终端设备的能力确定方法的另一流程图;
图3为本发明实施例提供的一种终端设备的能力配置方法的流程图;
图4为本发明实施例提供的一种终端设备的能力配置方法的另一流程图;
图5为本发明实施例提供的一种主机的结构示意图;
图6为本发明实施例提供的一种主机的另一结构示意图;
图7为本发明实施例提供的一种终端设备的结构示意图;
图8为本发明实施例提供的一种终端设备的另一结构示意图;
图9为本发明实施例提供的一种主机的另一结构示意图;
图10为本发明实施例提供的一种USB设备的结构示意图;
图11为本发明实施例提供的一种终端设备的配置系统的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参阅图1,图1为本发明实施例提供的一种终端设备的能力确定方法的流程图,所述方法包括:
步骤101:主机获取终端设备支持的能力;
在该步骤中,当终端设备连接到主机(Host)上时,该终端设备通过描述符(或USE描述符)将MS_COMP_ID和MS SUBCOMP_ID发送给主机,主机在接收到描述符后,通过MS_COMP_ID启动对应的驱动,并通过所述驱动对所述MS SUBCOMP_ID进行解析,得到将该终端设备支持的能力。其中,MS_COMP_ID和MS SUBCOMP_ID均是MS_OS_Descripter中定义的专有名称,在此不再详细描述。
本实施例的终端设备以USB设备为例来说明,但并不限于此,该实施例中,USB设备具体下述功能特征:
在USB设备上通常有一个USB接口,USB设备通过该USB接口与主机连接,该USB设备上可以存储MS_COMP_ID和MS_SUBCOMP_ID,比如USB\MS_COMP_TEST&MS_SUBCOMP_ID,斜体字部分由USB设备决定的,当然,该USB设备也可以在接收到主机发送的命令后,根据该命令生成对应的MS_COMP_ID和MS_SUBCOMP_ID。其中,TEST为驱动匹配关键字,以便于主机在接收到MS_COMP_TEST后,根据TEST匹配对应的特殊驱动,该特殊驱动的作用是解析MS_SUBCOMP_ID,得带终端设备所支持的能力;SUBCOMP_ID为一个位变换(BIT MAP)数字对应的字符串,BIT MAP中每一位代表一个当前设备所支持的功能,如:
0001h:调制解调器(Modem);
0010h:网络适配器(Net Adapter);
0100h:全球定位系统(GPS,Global Position System);
1000h:比特流(BT,BitTorrent)。
如果SUB COMP的值为0xD(1101),则代表当前的USB设备可以同时支持Modem和GPS和BT。
之后,HOST可以通过接收到的所述MS_COMP_ID匹配对应的特殊驱动,通过该特殊驱动对接收到的所述MS SUBCOMP_ID进行解析,得到当前USB设备的能力,比如,当USB设备的能力为5时,表示USB设备同时支持Modem、GPS和BT等。
需要说明的是,本实施例中,TEST与USB接口对应,而USB接口除了对应特殊驱动,还可以对应其他的驱动,本实施例不作限制。
步骤102:主机根据所述终端设备支持的能力与所述主机支持的能力,确定所述终端设备和主机均支持的能力,并将所述终端设备和主机均支持的能力作为重叠能力;所述重叠能力用于所述终端设备进行能力的配置;
该步骤中,一种确定方式为:主机把USB设备支持的能力与自身所支持的能力进行与运算,得到主机和USB设备均能支持的能力,本实施例中将所述主机和USB设备均能支持的能力称为重叠能力。需要说明的是,确定所述重叠能力的方式并不限于此与运算,还可以通过其他的运算方式,本实施例不作限制。
比如Host驱动只支持Modem和BT,而USB设备同时支持Modem、GPS和BT,那么与运算的结果就是0x9(1001),表示Host和USB设备均能同时支持Modem和BT。
步骤103:将所述重叠能力发送给所述终端设备。
该步骤中,Host驱动把与运算后得到的重叠能力发给USB设备,以便于所述终端设备对所述重叠能力进行配置。
可选的,在该实施例中,主机可以通过USB厂商(USB Vendor)自定义的命令将与运算后得到的重叠能力发送给USB设备,USB设备根据该命令进行所述重叠能力的配置,并在配置成功后,向Host发送配置成功的消息。
本发明实施例中,主机先获取终端设备所有支持的能力,然后确定与终端设备均支持的能力(即重叠能力),并将该重叠能力告知终端设备,以便于该终端设备对重叠能力进行配置。也就是说,当主机与终端设备(比如USB设备)支持的能力不完全相同时,主机与终端设备进行功能协商,找出二者均支持的功能进行配置,从而实现了依据自身支持的能力对终端设备进行灵活配置,同时也提高了用户体验。
还请参阅图2,图2为本发明实施例提供的一种终端设备的能力确定方法的另一 流程图,所述方法包括:
步骤201至步骤203详见步骤101至步骤103;
步骤204:在接收到所述终端设备发送的配置成功的消息时,枚举出所述终端设备中配置所述重叠能力的至少一个子设备;
主机在接收到配置USB设备发送的配置成功消息时,按照所述重叠能力枚举出至少一个子设备(即USB设备按照逻辑划分的虚拟设备,本文中称为子设备)。比如,如与运算得到的重叠能力为0x9,则主机可以枚举出两个子设备,一个是Modem,一个是BT,也可以枚举出其中的一个子设备,本实施例不作限制。
步骤205:对所述至少一个子设备进行驱动加载,以使所述至少一个子设备实现所述重叠能力对应的功能。
该步骤中,如果主机枚举出两个子设备,则对这两个子设备进行驱动加载,驱动加载完成后,这两个子设备自身具有所述重叠能力对应的功能。
本发明实施例中,主机先确定与终端设备均支持的能力(即重叠能力),并将该重叠能力告知终端设备,以便于该终端设备对重叠能力进行配置,之后,主机枚举出配置所述重叠能力的至少一个子设备,对所述至少一个子设备进行驱动加载,以使该至少一个子设备具有重叠能力对应的功能。也就是说,当主机与终端设备(比如USB设备)支持的能力不完全相同时,主机与终端设备进行功能协商,找出二者均支持的功能进行配置以及驱动加载,减少终端设备的枚举次数,提高了用户体验。同时也实现了通过不同驱动来满足不同终端设备的需求。
还请参阅图3,图3为本发明实施例提供的一种终端设备的能力配置方法的流程图,所述方法包括:
步骤301:终端设备将自身支持的能力发送给主机;
该步骤中,终端设备以USB设备为例,当并不限于此,所述USB设备将自身支持的能力发送给主机,以便于主机在接收到USB设备支持的能力后,根据自身的能力与USB设备支持的能力,确定二者均支持的能力,本实施例中,将二者均支持的能力称为重叠能力。之后,主机将该确定的重叠能力发送给终端设备。
其中,主机可以通过与运算来确定主机与USB设备均支持的能力,但并不限于此,还可以通过其他类似的计算方法来确定主机与USB设备均支持的能力。
可选的,在该实施例中,终端设备在连接到主机后,通过描述符将MS_COMP_ID和MS SUBCOMP_ID发送给主机,该主机在接收到该描述符后,驱动将与MS_COMP_ID对应的驱动,并通过该驱动对MS SUBCOMP_ID进行解析后,得到所述USB设备支持的能力。
步骤302:所述终端设备接收所述主机发送的重叠能力,所述重叠能力为所述主机根据所述终端设备支持的能力与所述主机支持的能力,确定的所述终端设备和主机均支持的能力;
可选的,该步骤中,终端设备可以通过厂商自定义的命令接收所述主机发送的所述主机与所述终端设备均支持的重叠能力。
步骤303:所述终端设备按照所述重叠能力进行配置。
终端设备将所述重叠能力对应的功能配置到对应的至少一个子设备上。
可选的,该终端设备在按照所述重叠能力进行参数配置后,将配置成功的消息发送给主机,以便于主机枚举出所述终端设备上配置所述重叠能力的至少一个子设备,并对所述至少一个子设备进行驱动加载,使所述至少一个子设备实现所述重叠能力对应的功能。
本发明实施例中,终端设备(比如USB设备),先将自身支持的能力告知主机,以便于主机确定其与终端设备均支持的能力(即重叠能力),并将该重叠能力告知终端设备,以便于终端设备配置该重叠的能力。也就是说,当主机与终端设备支持的能力不完全相同时,主机与终端设备进行功能协商,找出二者均支持的能力告知终端设备,以便于终端设备进行对应的配置。即主机可以根据主机的能力和终端设备的能力进行灵活配置终端设备的功能。
还请参阅图4,图4为本发明实施例提供的一种终端设备的能力配置方法的另一流程图,所述方法包括:
步骤401至步骤403详见步骤301至步骤303;
步骤404:所述终端设备将配置成功的消息发送给所述主机,以便于所述主机枚举出所述终端设备上配置所述重叠能力的至少一个子设备,并对所述至少一个子设备进行驱动加载,使所述至少一个子设备实现重叠能力对应的功能。
该步骤中,终端设备进行重叠能力的相应配置后,反馈Host一个配置成功消息, 而Host收到这个配置成功消息后,会根据与运算的结果,枚举出该终端设备中对应的至少一个子设备,如与运算的结果为0x9,则枚举出两个子设备,一个是Modem,一个是BT。之后,主机为两个子设备进行的驱动加载,从而使加载驱动的这两个子设备具有重叠能力的相关功能。
本发明实施例中,终端设备(比如USB设备),先将自身支持的能力告知主机,以便于主机确定其与终端设备均支持的能力(即重叠能力),并将该重叠能力告知终端设备,以便于终端设备配置该重叠的能力,然后,主机就可以枚举出配置该重叠能力的子设备,并为该子设备安装驱动。也就是说,当主机与终端设备支持的能力不完全相同时,主机与终端设备进行功能协商,找出二者均支持的能力进行配置以及驱动的加载,不但减少了枚举的次数,还提高了用户体验。同时主机也可以根据主机的能力和终端设备的能力灵活配置终端设备的功能。
同时,本发明实施例中,可以很方便的使用一个USB设备,通过提供不同的Host驱动来满足不同用户的需求,这样就可以减少USB设备厂商的开发工作。另外,设备厂商还可以用一个驱动支持所有的USB设备,降低了Host驱动的开发认证成本。
基于上述方法的实现过程,本发明实施例还提供一种主机,其结构示意图如图5所示,所述装置包括:获取单元51,确定单元52和发送单元53。其中,
所述获取单元51,用于获取终端设备支持的能力;
其中,所述获取单元51包括:代码接收单元,启动单元和解析单元,
所述代码接收单元,用于接收所述终端设备发送的描述符,所述描述符中包括MS_COMP_ID和MS SUBCOMP_ID;所述启动单元,用于根据所述MS_COMP_ID启动对应的驱动;所述解析单元,用于通过所述启动单元启动的驱动对所述MS SUBCOMP_ID进行解析,得到所述终端设备支持的能力。
所述确定单元52,用于根据所述终端设备支持的能力与所述主机支持的能力,确定所述终端设备和所述主机均支持的能力,并将所述终端设备和所述主机均支持的能力作为重叠能力;所述重叠能力用于所述终端设备进行能力的配置;
所述发送单元53,用于将所述重叠能力发送给所述终端设备,以便于终端设备对所述重叠能力进行配置;其中,发送单元53将所述重叠能力发送给所述终端设备,具体通过厂商自定义的命令将所述重叠能力发送给所述终端设备,以便于终端设备对所述重叠能力进行配置。
所述主机中各个单元的功能和作用的实现过程详见上述方法中对应步骤的实现过程,在此不再赘述。
可选的,在另一实施例中,该实施例在上述图5实施例的基础上,所述主机还包括:接收单元61,枚举单元62和加载单元63,其结构示意图如图6所示,其中,
所述接收单元61,用于接收所述终端设备发送的配置成功的消息;
所述枚举单元62,用于在接收单元接收到所述配置成功的消息时,枚举出所述终端设备中配置所述重叠能力的至少一个子设备;
所述加载单元63,用于对所述至少一个子设备进行驱动加载,以使所述至少一个子设备实现所述重叠能力对应的功能。
所述主机中各个单元的功能和作用的实现过程详见上述方法中对应步骤的实现过程,在此不再赘述。
相应的,本发明实施例还提供一种终端设备,其结果示意图如图7所示,所述终端设备包括:第一发送单元71,接收单元72和配置单元73,其中,
所述第一发送单元71,用于将所述终端设备支持的能力发送给主机;具体用于通过描述符将MS_COMP_ID和MS SUBCOMP_ID发送给主机,以便于主机通过所述MS SUBCOMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析后,得到所述终端设备支持的能力。
所述接收单元72,用于接收所述主机发送的重叠能力,所述重叠能力为所述主机根据所述终端设备支持的能力与所述主机支持的能力,确定的所述终端设备和主机均支持的能力;其中,接收所述主机发送的重叠能力具体为通过厂商自定义的命令接收所述主机发送的所述主机与终端设备均支持的能力。
所述配置单元73,用于对所述重叠能力进行配置;
所述终端设备中各个单元的功能和作用的实现过程详见上述方法中对应步骤的实现过程,在此不再赘述。
可选的,在另一实施例中,该实施例在图7实施例的基础上,所述终端设备还包括:所述第二发送单元81,其结构示意图如图8所示,所述第二发送单元81用于在所述配置单元73按照所述重叠能力进行配置成功后,将配置成功的消息发送给所述主 机,以便于所述主机枚举出所述终端设备上配置所述重叠能力的至少一个子设备,并对所述至少一个子设备进行驱动加载,使所述子设备实现重叠能力对应的功能。
可选的,终端设备可以是USB设备,还可以是其他的存储设备,本实施例不作限制。
所述终端设备中各个单元的功能和作用的实现过程详见上述方法中对应步骤的实现过程,在此不再赘述。
相应的,本发明实施例还提供一种主机,其结构示意图如图9所示,所述主机9包括:USB接口91和处理器92,其中,
所述处理器92,用于通过所述USB接口91获取终端设备支持的能力,根据所述终端设备支持的能力与所述主机支持的能力,确定所述终端设备和主机均支持的能力,并将所述终端设备和主机均支持的能力作为重叠能力;所述重叠能力用于所述终端设备进行能力的配置;以及
所述处理器92,还用于将所述重叠能力通过所述USB接口91发送给所述终端设备,以便于终端设备对所述重叠能力进行配置。
可选的,所述处理器92,还用于在通过所述USB接口91接收所述终端设备发送的配置成功的消息时,枚举出所述终端设备中配置所述重叠能力的至少一个子设备,对所述至少一个子设备进行驱动加载,以使所述至少一个子设备实现所述重叠能力对应的功能。
可选的,所述处理器通过USB接口获取终端设备支持的能力,包括:所述主机接收所述终端设备发送的描述符,所述描述符中包括MS_COMP_ID和MS SUBCOMP_ID;根据所述MS_COMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析,得到所述终端设备支持的能力。
可选的,所述处理器通过USB接口将所述重叠能力发送给所述终端设备,包括:通过厂商自定义的命令将所述重叠能力发送给所述终端设备。
所述主机中的USB接口和处理器的功能和作用的实现过程详见上述方法中对应步骤的实现过程,在此不再赘述。
本发明实施例还提供一种USB设备,其结构示意图如图10所示,所述USB设备10包括:USB接口11和处理器12,其中,
所述处理器12,用于通过所述UEB接口11将USB设备支持的能力发送给主机;以及通过所述UEB接口11接收所述主机发送的重叠能力,所述重叠能力为所述主机根据所述终端设备支持的能力与所述主机支持的能力,确定的所述终端设备和主机均支持的能力;
所述处理器12,还用于按照所述重叠能力进行配置。
可选的,所述处理器12,还用于通过所述UEB接口11将配置成功的消息发送给所述主机,以便于所述主机枚举出所述终端设备上配置所述重叠能力的至少一个子设备,并对所述至少一个子设备进行驱动加载,使所述至少一个子设备实现重叠能力对应的功能。
可选的,所述处理器通过USB接口将USB设备支持的能力发送给主机,包括:通过描述符将MS_COMP_ID和MS SUBCOMP_ID发送给主机,以便于主机通过所述MS SUBCOMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析后,得到所述终端设备支持的能力。
可选的,所述处理器通过USB接口接收所述主机发送的重叠能力,包括:通过厂商自定义的命令接收所述主机发送的所述主机的能力与USB设备均支持的能力。
所述USB设备中的USB接口和处理器的功能和作用的实现过程详见上述方法中对应步骤的实现过程,在此不再赘述。
还请参阅图11,图11为本发明实施例提供的一种终端设备的配置系统的结构示意图,所述终端设备的配置系统13包括:主机111,以及与所述主机111连接的终端设备112,其中,
所述主机111,用于获取所述终端设备112支持的能力;并根据所述终端设备112支持的能力与所述主机支持的能力,确定所述终端设备112和主机111均支持的能力,并将所述终端设备112和主机111均支持的能力作为重叠能力;所述重叠能力用于所述终端设备进行能力的配置;以及将所述重叠能力发送给所述终端设备;
所述终端设备112,用于接收所述重叠能力,并按照所述重叠能力进行配置.
可选的,所述终端设备112,还用于将配置成功的消息发送给所述主机111;
所述主机111,还用于在接收到所述终端设备112发送的配置成功的消息时,枚举出所述终端设备112中配置所述重叠能力的至少一个子设备,对所述子设备进行驱 动加载,以使所述子设备实现所述重叠能力对应的功能。
可选的,所述主机111获取所述终端设备112支持的能力,具体包括:所述主机接收所述终端设备发送的描述符,所述描述符中包括MS_COMP_ID和MS SUBCOMP_ID;根据所述MS_COMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析,得到所述终端设备支持的能力。
所述系统中的主机和终端设备的功能和作用的实现过程详见上述方法中对应步骤的实现过程,在此不再赘述。
为了便于本领域技术人员的理解,下面以具体的应用实例来说明。
本发明应用实例一:
假设USB设备,需要满足三种不同客户的需求,一种客户要求有Modem+GPS+SD功能,一种客户要求有Modem功能,另一种客户要求有NetAdapter+BT功能;
首先,定义USB设备的功能码:
00000001(0x01):modem
00000010(0x02):NetAdapter
00000100(0x04):GPS
00001000(0x08):BT
00010000(0x10):SD
USB设备向主机上报MS_COMP USB\MS_COMP_HUAWEI&MS_SUBCOMP_1F,表示USB支持上述全部端口。
同时主机需要提供三种HOST驱动:
驱动一的能力值为0x15(需要Modem+GPS+SD);
驱动二的能力值为0x01(只需要Modem);
驱动三的能力值为0x06(需要Net Adapter和BT)。
主机与USB设备进行能力协商,确定出主机和USB设备分别满足三种不同客户的 需求,然后分别为这三种客户提供驱动。
本发明实施例中,设备厂商只需要生产一种USB设备,然后根据用户类型,给用户提供不同的Host驱动,即可满足用户的需求。
本发明应用实例二:
USB厂商只提供一个Host驱动,但是要支持这个厂商的全部USB产品。
定义功能码:
00000001(0x01):modem
00000010(0x02):NetAdapter
00000100(0x04):GPS
00001000(0x08):BT
00010000(0x10):SD
驱动一的能力值为0x1F,即支持全部的端口。
USB设备一的能力:USB\MS_COMP_HUAWEI&MS_SUBCOMP_01,只有Modem
USB设备二的能力:USB\MS_COMP_HUAWEI&MS_SUBCOMP_11,有Modem+SD
…………
这样,设备厂商可以用一个驱动支持所有的USB设备,降低了Host驱动的开发认证成本。
本发明实施例可以根据Host支持的能力和USB设备支持的能力灵活配置USB功能,从而满足不同用户需求,提高了用户满意度。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种 过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。

Claims (15)

  1. 一种终端设备的能力确定方法,其特征在于,包括:
    主机获取终端设备支持的能力;
    主机根据所述终端设备支持的能力与所述主机支持的能力,确定所述终端设备和主机均支持的能力,并将所述终端设备和主机均支持的能力作为重叠能力;所述重叠能力用于所述终端设备进行能力的配置;
    将所述重叠能力发送给所述终端设备。
  2. 根据权利要求1所述的方法,其特征在于,还包括:
    在接收到所述终端设备发送的配置成功的消息时,枚举出所述终端设备中配置所述重叠能力的至少一个子设备;
    对所述至少一个子设备进行驱动加载,以使所述至少一个子设备实现所述重叠能力对应的功能。
  3. 根据权利要求1或2所述的方法,其特征在于,所述主机获取终端设备支持的能力,包括:
    所述主机接收所述终端设备发送的描述符,所述描述符中包括MS_COMP_ID和MS SUBCOMP_ID;
    所述主机根据所述MS_COMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析,得到所述终端设备支持的能力。
  4. 一种终端设备的能力配置方法,其特征在于,包括:
    终端设备将自身支持的能力发送给主机;
    所述终端设备接收所述主机发送的重叠能力,所述重叠能力为所述主机根据所述终端设备支持的能力与所述主机支持的能力,确定的所述终端设备和主机均支持的能力;
    所述终端设备按照所述重叠能力进行配置。
  5. 根据权利要求4所述的方法,其特征在于,还包括:
    所述终端设备将配置成功的消息发送给所述主机,以便于所述主机枚举出所述终端设备上配置所述重叠能力的至少一个子设备,并对所述至少一个子设备进行驱动加载,使所述至少一个子设备实现所述重叠能力对应的功能。
  6. 根据权利要求4或5所述的方法,其特征在于,所述终端设备将自身支持的能 力发送给主机,包括:
    所述终端设备通过描述符将MS_COMP_ID和MS SUBCOMP_ID发送给主机,以便于主机通过所述MS SUBCOMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析后,得到所述终端设备支持的能力。
  7. 一种主机,其特征在于,包括:
    获取单元,用于获取终端设备支持的能力;
    确定单元,用于根据所述终端设备支持的能力与所述主机支持的能力,确定所述终端设备和所述主机均支持的能力,并将所述终端设备和所述主机均支持的能力作为重叠能力;所述重叠能力用于所述终端设备进行能力的配置;
    发送单元,用于将所述重叠能力发送给所述终端设备。
  8. 根据权利要求7所述的主机,其特征在于,还包括:
    接收单元,用于接收所述终端设备发送的配置成功的消息;
    枚举单元,用于在接收单元接收到所述配置成功的消息时,枚举出所述终端设备中配置所述重叠能力的至少一个子设备;
    加载单元,用于对所述至少一个子设备进行驱动加载,以使所述至少一个子设备实现所述重叠能力对应的功能。
  9. 根据权利要求7或8所述的主机,其特征在于,所述获取单元包括:
    代码接收单元,用于接收所述终端设备发送的描述符,所述描述符中包括MS_COMP_ID和MS SUBCOMP_ID;
    启动单元,用于根据所述MS_COMP_ID启动对应的驱动;
    解析单元,用于通过所述启动单元启动的驱动对所述MS SUBCOMP_ID进行解析,得到所述终端设备支持的能力。
  10. 一种终端设备,其特征在于,包括:
    第一发送单元,用于将所述终端设备支持的能力发送给主机;
    接收单元,用于接收所述主机发送的重叠能力,所述重叠能力为所述主机根据所述终端设备支持的能力与所述主机支持的能力,确定的所述终端设备和主机均支持的能力;
    配置单元,用于对所述重叠能力进行配置。
  11. 根据权利要求10所述的终端设备,其特征在于,还包括:
    第二发送单元,用于在所述配置单元按照所述重叠能力进行配置成功后,将配置成功的消息发送给所述主机,以便于所述主机枚举出所述终端设备上配置所述重叠能力的至少一个子设备,并对所述至少一个子设备进行驱动加载,使所述至少一个子设备实现所述重叠能力对应的功能。
  12. 根据权利要求10或11所述的终端设备,其特征在于,所述第一发送单元,具体用于通过描述符将MS_COMP_ID和MS SUBCOMP_ID发送给主机,以便于主机通过所述MS SUBCOMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析后,得到所述终端设备支持的能力。
  13. 一种终端设备的配置系统,其特征在于,所述系统包括:主机以及与所述主机连接的终端设备,其中,
    所述主机,用于获取所述终端设备支持的能力;并根据所述终端设备支持的能力与所述主机支持的能力,确定所述终端设备和主机均支持的能力,并将所述终端设备和主机均支持的能力作为重叠能力;所述重叠能力用于所述终端设备进行能力的配置;以及将所述重叠能力发送给所述终端设备;
    所述终端设备,用于接收所述重叠能力,并按照所述重叠能力进行配置。
  14. 根据权利要求13所述的系统,其特征在于,
    所述终端设备,还用于将配置成功的消息发送给所述主机;
    所述主机,还用于在接收到所述终端设备发送的配置成功的消息时,枚举出所述终端设备中配置所述重叠能力的至少一个子设备,对所述至少一个子设备进行驱动加载,以使所述至少一个子设备实现所述重叠能力对应的功能。
  15. 根据权利要求13或14所述的系统,其特征在于,
    所述主机获取所述终端设备支持的能力,具体包括:所述主机接收所述终端设备发送的描述符,所述描述符中包括MS_COMP_ID和MS SUBCOMP_ID;根据所述MS_COMP_ID启动对应的驱动,并通过该驱动对所述MS SUBCOMP_ID进行解析,得到所述终端设备支持的能力。
PCT/CN2015/073303 2014-02-26 2015-02-26 能力确定方法、能力配置方法、主机、终端设备及系统 WO2015127893A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US15/115,448 US10169277B2 (en) 2014-02-26 2015-02-26 Capability determining method, capability configuration method, host, terminal device, and system
JP2016554187A JP6280992B2 (ja) 2014-02-26 2015-02-26 能力判定方法、能力構成方法、ホスト、端末装置、およびシステム
EP15754861.1A EP3091441A4 (en) 2014-02-26 2015-02-26 Capability determination method, capability configuration method, host, terminal device and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410067075.1A CN104866332A (zh) 2014-02-26 2014-02-26 能力确定方法、能力配置方法、主机、终端设备及系统
CN201410067075.1 2014-02-26

Publications (1)

Publication Number Publication Date
WO2015127893A1 true WO2015127893A1 (zh) 2015-09-03

Family

ID=53912182

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/073303 WO2015127893A1 (zh) 2014-02-26 2015-02-26 能力确定方法、能力配置方法、主机、终端设备及系统

Country Status (5)

Country Link
US (1) US10169277B2 (zh)
EP (1) EP3091441A4 (zh)
JP (1) JP6280992B2 (zh)
CN (1) CN104866332A (zh)
WO (1) WO2015127893A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11461216B1 (en) 2020-05-18 2022-10-04 Vignet Incorporated Monitoring and improving data collection using digital health technology

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040203296A1 (en) * 2002-11-15 2004-10-14 Globespan Virata Inc. Method and system for attaching a USB network adapter supporting both RNDIS and non-RNDIS capable operating systems
CN1780282A (zh) * 2004-11-26 2006-05-31 华为技术有限公司 一种终端共享主机的实现方法
US20130282930A1 (en) * 2007-12-14 2013-10-24 Microsoft Corporation Metadata retrieval for multi-function devices

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6894706B1 (en) * 1998-09-18 2005-05-17 Hewlett-Packard Development Company, L.P. Automatic resolution detection
US6411724B1 (en) * 1999-07-02 2002-06-25 Koninklijke Philips Electronics N.V. Using meta-descriptors to represent multimedia information
CN1879427A (zh) * 2003-11-13 2006-12-13 汤姆森许可贸易公司 集成蜂窝/pcs-pots通信系统
JP4725397B2 (ja) 2006-04-05 2011-07-13 セイコーエプソン株式会社 Usb複合デバイス,usb通信システム,及びusb通信方法
EP1898306A1 (en) * 2006-09-11 2008-03-12 Research In Motion Limited Method and apparatus for variably enabling USB interaction
IT1397374B1 (it) * 2009-12-30 2013-01-10 St Microelectronics Srl Soluzione integrata per l'individuazione dei componenti difettosi in dispositivi di memoria
CN102063320B (zh) * 2011-01-06 2013-08-28 华为终端有限公司 工作模式切换方法、usb设备和主机设备
JP2013175167A (ja) 2012-01-27 2013-09-05 Panasonic Corp 電子機器

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040203296A1 (en) * 2002-11-15 2004-10-14 Globespan Virata Inc. Method and system for attaching a USB network adapter supporting both RNDIS and non-RNDIS capable operating systems
CN1780282A (zh) * 2004-11-26 2006-05-31 华为技术有限公司 一种终端共享主机的实现方法
US20130282930A1 (en) * 2007-12-14 2013-10-24 Microsoft Corporation Metadata retrieval for multi-function devices

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3091441A4 *

Also Published As

Publication number Publication date
EP3091441A4 (en) 2017-03-22
EP3091441A1 (en) 2016-11-09
US20170177524A1 (en) 2017-06-22
US10169277B2 (en) 2019-01-01
JP2017509987A (ja) 2017-04-06
JP6280992B2 (ja) 2018-02-14
CN104866332A (zh) 2015-08-26

Similar Documents

Publication Publication Date Title
TWI507985B (zh) 可自動化連續安裝作業系統的電子裝置及其相關方法與系統
US9274988B2 (en) Mode switching method of electronic device and associated electronic device
US8171502B2 (en) Methods, devices and computer program products for automatically installing device drivers from a peripheral device onto a host computer
EP3223152B1 (en) Method and server for presenting initialization degree of hardware in server
EP2661064B1 (en) Method for identifying universal serial bus host, and electronic device thereof
US8650332B2 (en) Method for switching working mode, USB device, and host device
US20080126628A1 (en) Methods, devices and computer program products for automatically providing an alternate usb configuration of a usb compliant peripheral device for exposure to a host computer
US20130031277A1 (en) Method for identifying version type of windows operating system on a host by a usb device
WO2018040746A1 (zh) 一种驱动程序的安装方法及装置、电子设备
WO2018076792A1 (zh) 一种arm设备中磁盘管理的方法、装置和arm设备
JP5129770B2 (ja) ネットワーク装置
US6785807B1 (en) Method and system for providing bootcode support in a data processing system that uses a communications port that utilizes a first communications protocol, an external device that utilizes a second communications protocol, and a device driver that is loaded in response to booting to communicate with the external device through the communications port
WO2010115366A1 (zh) 设备驱动方法、装置及通信系统
EP2821882A1 (en) Computer device and method for converting working mode of universal serial bus connector of the computer device
US7293168B2 (en) System and method for initially configuring and booting a device using a device identifier
WO2012100504A1 (zh) 一种无线通讯方法、系统及无线通讯终端
TWI361380B (en) Electronic devices and methods for managing mass storage devices
WO2015176366A1 (zh) 通用串行总线的驱动方法、计算机及复合设备
WO2015127893A1 (zh) 能力确定方法、能力配置方法、主机、终端设备及系统
EP2487598A1 (en) Data card upgrading method and device
WO2013189388A2 (zh) 一种接入usb网卡的方法、usb网卡及pc
WO2012155606A1 (zh) 一种无线通信终端及其驱动方法
US7100038B2 (en) System and method for device parameter persistence
US9390041B2 (en) Method for processing device connection, combination device and host device
EP3322130B1 (en) Communications device configuration method and communications device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15754861

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2015754861

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2015754861

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 15115448

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2016554187

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE