CN107329520B - USB interface connection method, device and system of mobile terminal - Google Patents

USB interface connection method, device and system of mobile terminal Download PDF

Info

Publication number
CN107329520B
CN107329520B CN201710440028.0A CN201710440028A CN107329520B CN 107329520 B CN107329520 B CN 107329520B CN 201710440028 A CN201710440028 A CN 201710440028A CN 107329520 B CN107329520 B CN 107329520B
Authority
CN
China
Prior art keywords
mobile terminal
usb hub
active
charging
usb
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201710440028.0A
Other languages
Chinese (zh)
Other versions
CN107329520A (en
Inventor
刘山荣
杨冬东
顾凌华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710440028.0A priority Critical patent/CN107329520B/en
Publication of CN107329520A publication Critical patent/CN107329520A/en
Application granted granted Critical
Publication of CN107329520B publication Critical patent/CN107329520B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1632External expansion units, e.g. docking stations
    • 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/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • Telephone Function (AREA)

Abstract

The present disclosure provides a method, a device and a system for connecting a USB interface of a mobile terminal, wherein the method for connecting the USB interface of the mobile terminal comprises: when detecting that the USB interface of the mobile terminal is inserted into the OTG line connected with the main port of the active USB HUB, starting to establish connection with the external equipment connected with the auxiliary port of the active USB HUB; when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed; the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal. After being connected with the active USB HUB through the OTG line, the mobile terminal can communicate with external equipment connected to the active USB HUB; and meanwhile, the voltage output of the mobile terminal is closed, and the mobile terminal is set to be in a charging mode, so that the mobile terminal can be charged through the active USB HUB.

Description

USB interface connection method, device and system of mobile terminal
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a method, a device, and a system for connecting a USB interface of a mobile terminal.
Background
Currently, a Universal Serial Bus (USB) interface is provided on many mobile terminals, and the charging, data connection, and external device connection of the mobile terminals are all through the USB interface. When the USB interface is connected with a charger or a computer, the mobile terminal is charged, and when the USB interface is connected with external equipment, the mobile terminal supplies power to the external equipment, and the external equipment can be a mouse, a keyboard and the like. Thus, this USB interface is either connected to a charger to be charged; or connect external device, supply power to external device. Some mobile terminals are prone to cause too fast power consumption under the condition that the requirements of the mobile terminals on external devices are high.
Disclosure of Invention
The embodiment of the disclosure provides a USB interface connection method, device and system of a mobile terminal. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a USB interface connection method of a mobile terminal, the method including:
when detecting that a Universal Serial Bus (USB) interface of the mobile terminal is inserted into an OTG line connected with a main port of an active USB HUB (HUB), starting to establish connection with external equipment connected with a slave port of the active USB HUB;
when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed;
the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal.
After the mobile terminal is connected with the active USB HUB through the OTG line, the mobile terminal is used as a USB main device and is connected with an external device through the active USB HUB, so that the mobile terminal can communicate with the external device connected on the active USB HUB; meanwhile, the voltage output of the mobile terminal is closed, and the mobile terminal is set to be in a charging mode, so that the mobile terminal can be charged through the active USB HUB; the mobile terminal can be charged and simultaneously can be connected with the external equipment for communication.
In one embodiment, before initiating the establishment of a connection with an external device connected to the slave port of the active USB HUB, the method further comprises:
and receiving a switching instruction input by a user, wherein the switching instruction is used for indicating to close the output of the power line pin after establishing connection with the external equipment, and charging the mobile terminal through the active USB HUB.
The user can actively set the mode of the mobile terminal, and the user can use the mobile terminal more flexibly.
In one embodiment, establishing a connection with an external device connected to a slave port of an active USB HUB includes:
when the power line pin of the USB interface is detected to be matched with the power line pin of the main port of the active USB HUB, voltage is output outwards through the power line pin of the USB interface;
and connecting a data line pin of a control unit connected with the mobile terminal on the USB interface, and finishing enumeration of the control unit on the external equipment through the data line pin.
When the slave port of the active USB HUB is connected with the external equipment, USB detection and USB enumeration are carried out, the configuration between the mobile terminal and the external equipment is completed, and the mobile terminal can communicate with the external equipment.
In one embodiment, the method further comprises:
the charging voltage in the charging mode is set to a voltage lower than a preset threshold.
When the mobile terminal works in a charging mode, if the charging voltage is too high, loss may be generated on the mobile terminal, and therefore the charging voltage is set, so that the charging voltage is lower than a preset threshold value, the charging voltage is ensured not to be too high, and the charging safety of the mobile terminal is ensured.
In one embodiment, turning off the voltage output of the mobile terminal includes:
and controlling to close the voltage output of the mobile terminal through an internal logic circuit.
The control of the power line pin is realized very conveniently through an internal logic circuit, and the realization is very easy.
According to a second aspect of the embodiments of the present disclosure, there is provided a mobile terminal including: the charging device comprises a connecting module, a voltage output module and a charging module;
the connection module is used for starting to establish connection with external equipment connected with a slave port of the active USB HUB when detecting that a Universal Serial Bus (USB) interface of the mobile terminal is inserted into an OTG (on-the-go) line connected with the master port of the active USB HUB;
the voltage output module is used for closing the voltage output of the mobile terminal when the connection between the mobile terminal and the external equipment is determined to be finished;
and the charging module is used for charging the mobile terminal by connecting a charging circuit of the USB interface in the mobile terminal with a power line pin of the active USB HUB and utilizing the active USB HUB.
In one embodiment, the mobile terminal further comprises a receiving module;
and the receiving module is used for receiving a switching instruction input by a user, the switching instruction is used for indicating to close the output of the power line pin after establishing connection with the external equipment, and the mobile terminal is charged through the active USB HUB.
In one embodiment, the connection module includes a detection submodule and an enumeration submodule;
the detection submodule is used for outputting voltage outwards through the power line pin of the USB interface when detecting that the power line pin of the USB interface is matched with the power line pin of the main port of the active USB HUB;
and the enumeration submodule is used for connecting a data line pin of a control unit connected with the mobile terminal on the USB interface and completing the enumeration of the control unit on the external equipment through the data line pin.
In one embodiment, the charging module includes a voltage setting submodule;
and the setting submodule is used for setting the charging voltage in the charging mode to be lower than the voltage of the preset threshold value.
In one embodiment, the voltage output module includes a logic control sub-module;
and the logic control submodule is used for controlling the voltage output of the mobile terminal to be closed through the internal logic circuit.
According to a third aspect of the embodiments of the present disclosure, there is provided a mobile terminal including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when detecting that a Universal Serial Bus (USB) interface of the mobile terminal is inserted into an OTG line connected with a main port of an active USB HUB (HUB), starting to establish connection with external equipment connected with a slave port of the active USB HUB;
when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed;
the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal.
In one embodiment, the processor may be further configured to:
and receiving a switching instruction input by a user, wherein the switching instruction is used for indicating to close the output of the power line pin after establishing connection with the external equipment, and charging the mobile terminal through the active USB HUB.
In one embodiment, the processor may be further configured to:
when the power line pin of the USB interface is detected to be matched with the power line pin of the main port of the active USB HUB, voltage is output outwards through the power line pin of the USB interface;
and connecting a data line pin of a control unit connected with the mobile terminal on the USB interface, and finishing enumeration of the control unit on the external equipment through the data line pin.
In one embodiment, the processor may be further configured to:
the charging voltage in the charging mode is set to a voltage lower than a preset threshold.
In one embodiment, the processor may be further configured to:
and controlling to close the voltage output of the mobile terminal through an internal logic circuit.
According to a fourth aspect of the embodiments of the present disclosure, a USB connection system is provided, where the USB connection system includes a mobile terminal, an active USB HUB and an external device, the mobile terminal is electrically connected to the active USB HUB through an OTG line of a USB interface, and the external device is electrically connected to the active USB HUB through the USB interface;
the mobile terminal is the mobile terminal described in the second aspect or any embodiment of the second aspect, or the mobile terminal is the mobile terminal described in the third aspect or any embodiment of the third aspect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating a USB interfacing method of a mobile terminal according to an exemplary embodiment;
FIG. 2 is a schematic diagram illustrating a connection relationship of pins between an OTG line and a USB interface according to an exemplary embodiment;
fig. 3 is a flowchart illustrating a USB interfacing method of a mobile terminal according to an exemplary embodiment;
FIG. 4 is a schematic diagram illustrating a mobile terminal in connection with an active USB HUB in accordance with an exemplary embodiment;
FIG. 5 is a block diagram of a mobile terminal shown in accordance with an example embodiment;
FIG. 6 is a block diagram of a mobile terminal shown in accordance with an example embodiment;
FIG. 7 is a block diagram of a mobile terminal shown in accordance with an example embodiment;
FIG. 8 is a block diagram of a mobile terminal shown in accordance with an example embodiment;
FIG. 9 is a block diagram of a terminal device shown in accordance with an example embodiment;
FIG. 10 is a block diagram of a terminal device shown in accordance with an example embodiment;
FIG. 11 is a block diagram of a terminal device shown in accordance with an example embodiment;
FIG. 12 is a block diagram illustrating a USB connection system in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
At present, a plurality of mobile terminals are provided with a USB interface, and the USB interface is connected with a charger to be charged; or connect external device, to external device power supply, under the condition that mobile terminal is more to external device demand, very easily lead to mobile terminal power consumption too fast. According to The technical scheme provided by The embodiment of The disclosure, when a Universal Serial Bus (USB) interface of a mobile terminal is detected to be inserted into an OTG (On The Go) line connected with a master port of an active USB HUB (English: HUB), connection between external equipment connected with a slave port of The active USB HUB is established; when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed; the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal. After the mobile terminal is connected with the active USB HUB through the OTG line, the mobile terminal is used as a USB main device and is connected with an external device through the active USB HUB, so that the mobile terminal can communicate with the external device connected on the active USB HUB; meanwhile, the voltage output of a charging circuit in the mobile terminal is closed, and the mobile terminal is set to be in a charging mode, so that the mobile terminal can be charged through the active USB HUB; the mobile terminal can be charged and simultaneously can be connected with the external equipment for communication.
Fig. 1 is a flowchart illustrating a USB interface connection method of a mobile terminal according to an exemplary embodiment, where the connection method includes steps 101 and 103:
in step 101, when it is detected that the USB interface of the mobile terminal is inserted into the OTG line connected to the master port of the active USB HUB, connection between the external devices connected to the slave ports of the active USB HUB is started.
The mobile terminal can be a tablet computer, a smart phone and other terminal equipment with a USB interface.
When two devices are connected together through a USB interface, one device serves as a USB master device (english: Host), and the other device serves as a USB Slave device (english: Slave). For example, when a flash disk is inserted into a computer, the computer is a USB master device, and the flash disk is a USB slave device; for another example, a keyboard is connected to a tablet computer, the tablet computer is a USB master device, and the keyboard is a USB slave device. In this disclosure, when the mobile terminal inserts the OTG line connected to the main port of the active USB HUB through the USB interface, the mobile terminal is configured as a main device, and may perform data transmission with an external device through the OTG line.
For the active USB HUB, one USB interface can be expanded into a plurality of interfaces, when the mobile terminal is connected with the master port of the active USB HUB, the USB interface of the mobile terminal is equivalently expanded into a plurality of USB interfaces, the mobile terminal is used as a USB master device, and the external device connected to the slave port of the active USB HUB is used as a USB slave device.
In one embodiment, the OTG line has 5 pins: 2 data line (D +/D-) pins; 1 power line (English: Voltage Bus, vbus) pin; 1 ground wire (GND) pin; 1 is an identification line (USB _ ID) pin; and the pins of the USB interface have 4: 2 data line (D +/D-) pins; 1 vbus pin; 1 GND pin. As shown in fig. 2, fig. 2 is a schematic diagram illustrating a connection relationship between pins of an OTG line and a USB interface according to an exemplary embodiment, in fig. 2, a USB _ ID pin of the OTG line is grounded, which indicates that a mobile terminal is a USB host device. It should be noted that the vbus pin is used for charging or discharging, and the data line pin is used for transmitting data.
In step 102, when it is determined that the connection with the external device is completed, the voltage output of the mobile terminal is turned off.
Because when mobile terminal's USB interface inserted the OTG line of the main port of connecting active USB HUB, mobile terminal supplied power to external equipment through the vbus pin as USB master, and in this disclosure, active USB HUB does not need mobile terminal to supply power outward to mobile terminal's charging, consequently, closes mobile terminal's voltage output.
In one embodiment, turning off the voltage output of the mobile terminal includes: and controlling to close the voltage output of the mobile terminal through an internal logic circuit. The control of the power line pin is realized very conveniently through an internal logic circuit, and the realization is very easy. In one embodiment, the internal logic of the mobile terminal may include a charging Integrated Circuit (chargei).
In step 103, the mobile terminal is charged by the active USB HUB by connecting a charging circuit connected to the USB interface in the mobile terminal to a power line pin of the active USB HUB.
It should be noted that the charging Circuit of the mobile terminal may include an electronic Integrated Circuit (soc), and the mobile terminal may adjust whether the mobile terminal is discharged or charged by setting an operation mode of the charging ic (including a charging mode and a discharging mode).
In one embodiment, the method further comprises: the charging voltage in the charging mode is set to a voltage lower than a preset threshold. When the mobile terminal works in a charging mode, if the charging voltage is too high, loss may be generated on the mobile terminal, and therefore the charging voltage is set, so that the charging voltage is lower than a preset threshold value, the charging voltage is ensured not to be too high, and the charging safety of the mobile terminal is ensured.
According to the connection method provided by the embodiment of the disclosure, when the USB interface of the mobile terminal is detected to be inserted into the OTG line connected with the main port of the active USB HUB, the connection between the external equipment connected with the auxiliary port of the active USB HUB is established; when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed; the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal. After the mobile terminal is connected with the active USB HUB through the OTG line, the mobile terminal is used as a USB main device and is connected with an external device through the active USB HUB, so that the mobile terminal can communicate with the external device connected on the active USB HUB; meanwhile, the voltage output of the mobile terminal is closed, and the mobile terminal is set to be in a charging mode, so that the mobile terminal can be charged through the active USB HUB; the mobile terminal can be charged and simultaneously can be connected with the external equipment for communication.
Based on the connection method provided by the embodiment corresponding to fig. 1, fig. 3 is a flowchart illustrating a USB interface connection method of a mobile terminal according to an exemplary embodiment, and referring to fig. 3, the connection method provided by this embodiment includes steps 301 and 305:
in step 301, when it is detected that the USB interface of the mobile terminal is plugged into the OTG line connected to the main port of the active USB HUB, a switching instruction input by a user is received.
The switching instruction is used for indicating that the mobile terminal is switched to a multi-port mode, wherein the multi-port mode refers to that the mobile terminal is used as a USB master device and works in a charging mode.
According to the switching instruction, the following steps are executed:
in step 302, when it is detected that the power line pin of the USB interface matches the main port power line pin of the active USB HUB, a voltage is output through the power line pin of the USB interface.
In step 303, a data line pin of the control unit connected to the mobile terminal on the USB interface is connected, and enumeration of the external device by the control unit is completed through the data line pin.
When the slave port of the active USB HUB is connected with the external equipment, USB detection and USB enumeration are carried out, the configuration between the mobile terminal and the external equipment is completed, and the mobile terminal can communicate with the external equipment. It should be noted that, step 302 and step 303 complete the normal OTG connection process, at this time, the mobile terminal serves as a main device to supply power to the external device through the power line pin, and simultaneously, performs data transmission with the external device through the data line pin.
In step 304, when it is determined that the connection with the external device is completed, the voltage output of the mobile terminal is turned off.
After the voltage output of the mobile terminal is closed, the mobile terminal only carries out data transmission with the external equipment through the data line pin.
In step 305, the mobile terminal is charged using the active USB HUB by connecting a charging circuit connected to the USB interface in the mobile terminal to a power line pin of the active USB HUB.
In conjunction with step 304, step 305, the charging integrated circuit can be set to the charging mode by controlling the charging integrated circuit, so as to charge the mobile terminal through the active USB HUB. At the moment, the mobile terminal is charged through the power line pin, and meanwhile, data transmission is carried out between the mobile terminal and the external equipment through the data line pin.
As shown in fig. 4, fig. 4 is a schematic diagram illustrating a mobile terminal connected to an active USB HUB according to an exemplary embodiment. The USB interface of mobile terminal passes through the OTG line and is connected with active USB HUB's main port, and active USB HUB's power charges to mobile terminal when supplying power to active USB HUB, and active USB HUB connects external device from the port, and active USB HUB's power also supplies power to external device. When connecting external device from the port of active USB HUB, carry out USB and detect and USB enumerate, accomplish the configuration between mobile terminal and the external device, mobile terminal just can communicate with external device, moreover, because external device communicates with mobile terminal through active USB HUB, external device and active USB HUB lug connection, the power supply of active USB HUB to external device for mobile terminal can communicate with external device when being charged.
According to the connection method provided by the embodiment of the disclosure, when the USB interface of the mobile terminal is detected to be inserted into the OTG line connected with the main port of the active USB HUB, the connection between the external equipment connected with the auxiliary port of the active USB HUB is established; when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed; the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal. After the mobile terminal is connected with the active USB HUB through the OTG line, the mobile terminal is used as a USB main device and is connected with an external device through the active USB HUB, so that the mobile terminal can communicate with the external device connected on the active USB HUB; meanwhile, the voltage output of the mobile terminal is closed, and the mobile terminal is set to be in a charging mode, so that the mobile terminal can be charged through the active USB HUB; the mobile terminal can be charged and simultaneously can be connected with the external equipment for communication.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 5 is a block diagram of a mobile terminal according to an exemplary embodiment, which may be implemented by software, hardware or a combination of the two as part or all of the mobile terminal, and is configured to perform the connection method described in the embodiments corresponding to fig. 1 and 3. As shown in fig. 5, the mobile terminal 50 includes: a connection module 501, a voltage output module 502 and a charging module 503;
the connection module 501 is configured to start establishing a connection with an external device connected to a slave port of an active USB HUB when detecting that a USB interface of a USB mobile terminal is inserted into an OTG line connected to a master port of the active USB HUB;
the voltage output module 502 is configured to close the voltage output of the mobile terminal when determining that the connection with the external device is completed;
and the charging module 503 is configured to charge the mobile terminal by connecting a charging circuit connected to the USB interface in the mobile terminal and a power line pin of the active USB HUB.
In one embodiment, as shown in fig. 6, the mobile terminal 50 further includes a receiving module 504;
the receiving module 504 is configured to receive a switching instruction input by a user, where the switching instruction is used to instruct to close output of a power line pin after connection is established with an external device, and charge the mobile terminal through an active USB HUB.
In one embodiment, as shown in FIG. 7, the connection module 501 includes a detection submodule 5011 and an enumeration submodule 5012;
the detection submodule 5011 is configured to output voltage to the outside through a power line pin of the USB interface when detecting that the power line pin of the USB interface matches with a power line pin of a main port of the active USB HUB;
the enumeration submodule 5012 is configured to connect a data line pin of a control unit connected to the mobile terminal on the USB interface, and complete enumeration of the external device by the control unit through the data line pin.
In one embodiment, as shown in fig. 8, the charging module 503 includes a voltage setting submodule 5031;
the setting sub-module 5031 is configured to set the charging voltage in the charging mode to a voltage lower than a preset threshold.
In one embodiment, as shown in FIG. 9, the voltage output module 502 includes a logic control sub-module 5021;
and the logic control submodule 5021 is used for controlling the voltage output of the mobile terminal to be closed through an internal logic circuit.
According to the mobile terminal provided by the embodiment of the disclosure, when the USB interface of the mobile terminal is detected to be inserted into the OTG line connected with the master port of the active USB HUB, the connection between the external equipment connected with the slave port of the active USB HUB is established; when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed; the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal. After the mobile terminal is connected with the active USB HUB through the OTG line, the mobile terminal is used as a USB main device and is connected with an external device through the active USB HUB, so that the mobile terminal can communicate with the external device connected on the active USB HUB; meanwhile, the voltage output of the mobile terminal is closed, and the mobile terminal is set to be in a charging mode, so that the mobile terminal can be charged through the active USB HUB; the mobile terminal can be charged and simultaneously can be connected with the external equipment for communication.
Fig. 10 is a block diagram of a mobile terminal according to an exemplary embodiment, which may be implemented by software, hardware or a combination of the two to be a part or all of the mobile terminal, and is configured to perform the connection method described in the embodiments corresponding to fig. 1 and 3. As shown in fig. 10, the mobile terminal 100 includes:
a processor 1001;
a memory 1002 for storing instructions executable by the processor 1001;
wherein the processor 1001 is configured to:
when detecting that a Universal Serial Bus (USB) interface of the mobile terminal is inserted into an OTG line connected with a main port of an active USB HUB (HUB), starting to establish connection with external equipment connected with a slave port of the active USB HUB;
when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed;
the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal.
In one embodiment, the processor 1001 may be further configured to:
and receiving a switching instruction input by a user, wherein the switching instruction is used for indicating to close the output of the power line pin after establishing connection with the external equipment, and charging the mobile terminal through the active USB HUB.
In one embodiment, the processor 1001 may be further configured to:
when the power line pin of the USB interface is detected to be matched with the power line pin of the main port of the active USB HUB, voltage is output outwards through the power line pin of the USB interface;
and connecting a data line pin of a control unit connected with the mobile terminal on the USB interface, and finishing enumeration of the control unit on the external equipment through the data line pin.
In one embodiment, the processor 1001 may be further configured to:
the charging voltage in the charging mode is set to a voltage lower than a preset threshold.
In one embodiment, the processor 1001 may be further configured to:
and controlling to close the voltage output of the mobile terminal through an internal logic circuit.
According to the mobile terminal provided by the embodiment of the disclosure, when the USB interface of the mobile terminal is detected to be inserted into the OTG line connected with the master port of the active USB HUB, the connection between the external equipment connected with the slave port of the active USB HUB is established; when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed; the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal. After the mobile terminal is connected with the active USB HUB through the OTG line, the mobile terminal is used as a USB main device and is connected with an external device through the active USB HUB, so that the mobile terminal can communicate with the external device connected on the active USB HUB; meanwhile, the voltage output of the mobile terminal is closed, and the mobile terminal is set to be in a charging mode, so that the mobile terminal can be charged through the active USB HUB; the mobile terminal can be charged and simultaneously can be connected with the external equipment for communication.
The mobile terminal provided by the embodiment of the present disclosure may be a terminal device as shown in fig. 11, fig. 11 is a block diagram of a terminal device shown according to an exemplary embodiment, the terminal device 110 may be a smart phone, a tablet computer, and the like, and the terminal device 110 is configured to execute the connection method described in the embodiments corresponding to fig. 1 and fig. 3.
Terminal device 110 may include one or more of the following components: processing component 1101, memory 1102, power component 1103, multimedia component 1104, audio component 1105, input/output (I/O) interface 1106, sensor component 1107, and communication component 1108.
The processing component 1101 generally controls the overall operation of the terminal device 110, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1101 may include one or more processors 11011 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 1101 can include one or more modules that facilitate interaction between the processing component 1101 and other components. For example, the processing component 1101 can include a multimedia module to facilitate interaction between the multimedia component 1104 and the processing component 1101.
Memory 1102 is configured to store various types of data to support operation at terminal device 110. Examples of such data include instructions for any application or method operating on terminal device 110, contact data, phonebook data, messages, pictures, videos, and so forth. The Memory 1102 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk.
Power supply component 1103 provides power to the various components of terminal device 110. Power components 1103 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for terminal device 110.
The multimedia component 1104 includes a screen that provides an output interface between the terminal device 110 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1104 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the terminal device 110 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
Audio component 1105 is configured to output and/or input audio signals. For example, audio component 1105 may include a Microphone (MIC) configured to receive external audio signals when terminal device 110 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in memory 1102 or transmitted via communications component 1108. In some embodiments, audio component 1105 further includes a speaker for outputting audio signals.
The I/O interface 1106 provides an interface between the processing component 1101 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
Sensor component 1107 includes one or more sensors to provide various aspects of state estimation for terminal device 110. For example, sensor component 1107 may detect the open/closed state of terminal device 110, the relative positioning of components, such as a display and keypad of terminal device 110, sensor component 1107 may also detect a change in the position of terminal device 110 or a component of terminal device 110, the presence or absence of user contact with terminal device 110, orientation or acceleration/deceleration of terminal device 110, and a change in the temperature of terminal device 110. Sensor assembly 1107 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. Sensor assembly 1107 may also include a photosensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1107 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
Communication component 1108 is configured to facilitate communications between terminal device 110 and other apparatuses in a wired or wireless manner. Terminal device 110 may access a Wireless network based on a communication standard, such as Wireless-Fidelity (WiFi), 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1108 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the Communication component 1108 also includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the terminal Device 110 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, for performing the connection method described in the embodiments corresponding to fig. 1 and 3.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as the memory 1102, comprising instructions executable by the processing component 1101 of the terminal device 110 to perform the above-described method. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The instructions in the storage medium, when executed by the processing component 1101 of the terminal device 110, enable the terminal device 110 to perform the connection method described in the embodiments corresponding to fig. 1 and 3 above, the method including:
when detecting that a Universal Serial Bus (USB) interface of the mobile terminal is inserted into an OTG line connected with a main port of an active USB HUB (HUB), starting to establish connection with external equipment connected with a slave port of the active USB HUB;
when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed;
the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal.
In one embodiment, before initiating the establishment of a connection with an external device connected to the slave port of the active USB HUB, the method further comprises:
and receiving a switching instruction input by a user, wherein the switching instruction is used for indicating to close the output of the power line pin after establishing connection with the external equipment, and charging the mobile terminal through the active USB HUB.
In one embodiment, establishing a connection with an external device connected to a slave port of an active USB HUB includes:
when the power line pin of the USB interface is detected to be matched with the power line pin of the main port of the active USB HUB, voltage is output outwards through the power line pin of the USB interface;
and connecting a data line pin of a control unit connected with the mobile terminal on the USB interface, and finishing enumeration of the control unit on the external equipment through the data line pin.
In one embodiment, the method further comprises:
the charging voltage in the charging mode is set to a voltage lower than a preset threshold.
In one embodiment, turning off the voltage output of the mobile terminal includes:
and controlling to close the voltage output of the mobile terminal through an internal logic circuit.
According to the mobile terminal provided by the embodiment of the disclosure, when the USB interface of the mobile terminal is detected to be inserted into the OTG line connected with the master port of the active USB HUB, the connection between the external equipment connected with the slave port of the active USB HUB is established; when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed; the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal. After the mobile terminal is connected with the active USB HUB through the OTG line, the mobile terminal is used as a USB main device and is connected with an external device through the active USB HUB, so that the mobile terminal can communicate with the external device connected on the active USB HUB; meanwhile, the voltage output of the mobile terminal is closed, and the mobile terminal is set to be in a charging mode, so that the mobile terminal can be charged through the active USB HUB; the mobile terminal can be charged and simultaneously can be connected with the external equipment for communication.
Based on the USB interface connection method of the mobile terminal described in the embodiments corresponding to fig. 1 and fig. 3, an embodiment of the present disclosure provides a USB connection system, as shown in fig. 12, fig. 12 is a structural diagram of a USB connection system according to an exemplary embodiment, the USB connection system 120 includes a mobile terminal 1201, an active USB HUB1202 and an external device 1203, the mobile terminal 1201 and the active USB HUB1202 are electrically connected through an OTG line of a USB interface, and the external device 1203 and the active USB HUB are electrically connected through a USB interface;
the mobile terminal 1201 is the mobile terminal described in any one of the embodiments corresponding to fig. 5-9;
alternatively, the mobile terminal 1201 is the mobile terminal described in the embodiment corresponding to fig. 10;
alternatively, the mobile terminal 1201 is the mobile terminal described in the embodiment corresponding to fig. 11.
According to the USB connection system provided by the embodiment of the disclosure, when the mobile terminal detects that the USB interface of the mobile terminal is inserted into the OTG line connected with the main port of the active USB HUB, the connection between the mobile terminal and the external equipment connected with the auxiliary port of the active USB HUB is established; when the connection with the external equipment is determined to be completed, the voltage output of the mobile terminal is closed; the charging circuit connected with the USB interface in the mobile terminal and the power line pin of the active USB HUB are connected, and the active USB HUB is used for charging the mobile terminal. After the mobile terminal is connected with the active USB HUB through the OTG line, the mobile terminal is used as a USB main device and is connected with an external device through the active USB HUB, so that the mobile terminal can communicate with the external device connected on the active USB HUB; meanwhile, the voltage output of the mobile terminal is closed, and the mobile terminal is set to be in a charging mode, so that the mobile terminal can be charged through the active USB HUB; the mobile terminal can be charged and simultaneously can be connected with the external equipment for communication.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A USB interface connection method of a mobile terminal, the method comprising:
when detecting that a Universal Serial Bus (USB) interface of the mobile terminal is inserted into an OTG line connected with a main port of an active USB HUB (HUB), starting to establish connection with external equipment connected with a slave port of the active USB HUB;
when the connection between the mobile terminal and the external equipment is determined to be finished, closing the voltage output of the mobile terminal;
charging the mobile terminal by using the active USB HUB by connecting a charging circuit connected with a USB interface in the mobile terminal with a power line pin of the active USB HUB;
establishing a connection with an external device connected to a slave port of the active USB HUB, comprising:
when the power line pin of the USB interface is detected to be matched with the power line pin of the main port of the active USB HUB, voltage is output outwards through the power line pin of the USB interface;
connecting a data line pin of a control unit connected with a mobile terminal on the USB interface, and finishing enumeration of external equipment by the control unit through the data line pin;
the method further comprises the following steps:
the charging voltage in the charging mode is set to a voltage lower than a preset threshold.
2. The method of claim 1, wherein prior to initiating the establishment of a connection with an external device of the active USB HUB to which the slave port is connected, the method further comprises:
receiving a switching instruction input by a user, wherein the switching instruction is used for indicating to close the voltage output of the mobile terminal after establishing connection with the external equipment, and the voltage output is charged to the mobile terminal through the active USB HUB.
3. The method of claim 1 or 2, wherein turning off the voltage output of the power line pin comprises:
and controlling to close the voltage output of the mobile terminal through an internal logic circuit.
4. A mobile terminal, comprising: the charging device comprises a connecting module, a voltage output module and a charging module;
the connection module is used for starting to establish connection with external equipment connected with a slave port of an active USB HUB when detecting that a Universal Serial Bus (USB) interface of the mobile terminal is inserted into an OTG (on-the-go) line connected with the master port of the active USB HUB;
the voltage output module is used for closing the voltage output of the mobile terminal when the connection between the mobile terminal and the external equipment is determined to be finished;
the charging module is used for charging the mobile terminal by using the active USB HUB by connecting a charging circuit connected with a USB interface in the mobile terminal with a power line pin of the active USB HUB;
the connection module comprises a detection submodule and an enumeration submodule;
the detection submodule is used for outputting voltage outwards through the power line pin of the USB interface when detecting that the power line pin of the USB interface is matched with the power line pin of the main port of the active USB HUB;
the enumeration submodule is used for connecting a data line pin of a control unit connected with a mobile terminal on the USB interface, and completing enumeration of external equipment by the control unit through the data line pin;
the charging module comprises a voltage setting submodule;
and the setting submodule is used for setting the charging voltage in the charging mode to be lower than the voltage of a preset threshold value.
5. The mobile terminal of claim 4, wherein the mobile terminal further comprises a receiving module;
the receiving module is used for receiving a switching instruction input by a user, the switching instruction is used for indicating that the voltage output of the mobile terminal is closed after the connection of the external equipment is established, and the mobile terminal is charged through the active USB HUB.
6. The mobile terminal of claim 4 or 5, wherein the voltage output module comprises a logic control sub-module;
and the logic control submodule is used for controlling and closing the voltage output of the mobile terminal through an internal logic circuit.
7. A mobile terminal, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when detecting that a Universal Serial Bus (USB) interface of the mobile terminal is inserted into an OTG line connected with a main port of an active USB HUB (HUB), starting to establish connection with external equipment connected with a slave port of the active USB HUB;
when the connection between the mobile terminal and the external equipment is determined to be finished, closing the voltage output of the mobile terminal;
charging the mobile terminal by using the active USB HUB by connecting a charging circuit connected with a USB interface in the mobile terminal with a power line pin of the active USB HUB;
establishing a connection with an external device connected to a slave port of the active USB HUB, comprising:
when the power line pin of the USB interface is detected to be matched with the power line pin of the main port of the active USB HUB, voltage is output outwards through the power line pin of the USB interface;
connecting a data line pin of a control unit connected with a mobile terminal on the USB interface, and finishing enumeration of external equipment by the control unit through the data line pin;
the charging voltage in the charging mode is set to a voltage lower than a preset threshold.
8. The USB connection system is characterized by comprising a mobile terminal, an active USB HUB and an external device, wherein the mobile terminal is electrically connected with the active USB HUB through an OTG line of a USB interface, and the external device is electrically connected with the active USB HUB through a USB interface;
the mobile terminal is a mobile terminal according to any of claims 4-6, or a mobile terminal according to claim 7.
CN201710440028.0A 2017-06-12 2017-06-12 USB interface connection method, device and system of mobile terminal Active CN107329520B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710440028.0A CN107329520B (en) 2017-06-12 2017-06-12 USB interface connection method, device and system of mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710440028.0A CN107329520B (en) 2017-06-12 2017-06-12 USB interface connection method, device and system of mobile terminal

Publications (2)

Publication Number Publication Date
CN107329520A CN107329520A (en) 2017-11-07
CN107329520B true CN107329520B (en) 2021-06-29

Family

ID=60195376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710440028.0A Active CN107329520B (en) 2017-06-12 2017-06-12 USB interface connection method, device and system of mobile terminal

Country Status (1)

Country Link
CN (1) CN107329520B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669909A (en) * 2018-12-14 2019-04-23 上海闻泰信息技术有限公司 External equipment implementation method, device, terminal and storage medium
CN110417083B (en) * 2019-07-17 2021-09-24 亮风台(上海)信息科技有限公司 External equipment power supply unit
CN110597375B (en) * 2019-11-13 2020-02-14 亮风台(上海)信息科技有限公司 External equipment power supply device
CN111930184B (en) * 2020-10-13 2021-01-01 飞天诚信科技股份有限公司 Method, device and system for realizing external equipment simulation keyboard

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3121917U (en) * 2006-03-08 2006-06-01 翼慶企業股▲ふん▼有限公司 USB-HUB
KR100932481B1 (en) * 2009-04-24 2009-12-17 손청하 USS power supply and its method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201966449U (en) * 2010-12-20 2011-09-07 赵振涛 Hub for portable electronic equipment
CN103365388B (en) * 2012-04-09 2017-02-22 华为终端有限公司 Power supply method of terminal device and terminal device
CN103208831A (en) * 2013-03-12 2013-07-17 于超凡 Multi-functional charge-discharge device for USB-OTG (Universal Serial Bus-On-The-Go) device
CN204315878U (en) * 2014-12-31 2015-05-06 海林电脑科技(深圳)有限公司 A kind of intelligent expansion seat
CN204680870U (en) * 2015-04-13 2015-09-30 李秀珍 Multifunctional concentrator
US10224727B2 (en) * 2015-06-30 2019-03-05 Dong-Sheng Li Multi-functional hub integrated with AC power supply
CN205666633U (en) * 2015-11-17 2016-10-26 上海卓易科技股份有限公司 Mobile terminal
CN205985628U (en) * 2016-08-23 2017-02-22 东莞市江涵电子有限公司 Multi -functional integrator of OTG
CN106712179B (en) * 2016-12-27 2020-02-04 陈涛 Method and device for realizing reverse charging

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3121917U (en) * 2006-03-08 2006-06-01 翼慶企業股▲ふん▼有限公司 USB-HUB
KR100932481B1 (en) * 2009-04-24 2009-12-17 손청하 USS power supply and its method

Also Published As

Publication number Publication date
CN107329520A (en) 2017-11-07

Similar Documents

Publication Publication Date Title
EP3121926B1 (en) Charging method and apparatus
US10210122B2 (en) Interface circuit, method and device for state switching
CN107329520B (en) USB interface connection method, device and system of mobile terminal
EP3780328B1 (en) Reverse charging device
CN108964187B (en) Terminal and charging method between terminals
CN108091808B (en) Battery, equipment, charging control method and device
EP3832841A1 (en) Charging circuit, electronic device, charging control method and device
CN105224494A (en) Method for handover control and device
CN105160320A (en) Fingerprint identification method and apparatus, and mobile terminal
EP3614523B1 (en) Charging processing method and terminal device
CN105630655A (en) Charging connection prompting method and apparatus
CN107124012B (en) Charging method, device, charger, terminal and system
CN106598892B (en) Switching control method and device
CN112019681B (en) Control method of mobile terminal, mobile terminal and storage medium
CN108897553B (en) Chip programming tool, system, chip programming method and device
CN111130222B (en) Wireless charging power supply circuit and method and electronic equipment
CN115687205A (en) Debugging module, terminal equipment, debugging method and device
CN106776424B (en) Connector, control method and control device thereof, and electronic equipment
CN111864858A (en) Charging control method, charging control device, power utilization equipment, charging system and medium
CN219643631U (en) Wireless charging device and electronic equipment
CN112928787B (en) Charging circuit, electronic device, charging control method and device
EP4037127B1 (en) Charging method and device, terminal, and storage medium
CN218040875U (en) Charging circuit, chip and terminal
CN112448054B (en) Charging method and device of mobile terminal, terminal and storage medium
US20230120651A1 (en) Charging method, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant