IP Library › Granted Patent US 11,556,158
Granted Patent B2
US 11,556,158 · App. 16/955,189 · Granted Jan 17, 2023

On-the-go (OTG) control and configuration method, mobile terminal, and storage medium

Inventors: Bin Yu (Shenzhen, CN); Weiqin Yang (Shenzhen, CN)
Assignee: JRD Communication (Shenzhen) LTD.
G06F1/266G06F13/102
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,556,158
App. No.
16/955,189
Granted
Jan 17, 2023
Kind
B2
Abstract

A mobile terminal, an on-the-go (OTG) control and configuration method, and a storage medium, wherein the method includes: obtaining an accumulated number of changes of differences in voltages of at least one of a positive data line and a negative data line in an OTG data cable at intervals; according to the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable, querying a lookup table pre-stored in the mobile terminal for a current value corresponding to the number of changes; and according to the queried current value, controlling the mobile terminal to set the current value as a current limit for an OTG peripheral device.

Claims (71)

1. An on-the-go (OTG) control and configuration method for a mobile terminal, comprising:

obtaining an accumulated number of changes of differences in voltages of at least one of a positive data line and a negative data line in an OTG data cable at intervals by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for a threshold value;

according to the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable, querying a lookup table pre-stored in the mobile terminal for a current value corresponding to the number of changes; and

according to the queried current value, controlling the mobile terminal to set the current value as a current limit for an OTG peripheral device.

2. The method as claimed in claim 1 , wherein before obtaining the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG data cable at intervals by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for the threshold value, the method further comprises:

pre-setting a relation between the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable and a current transmitted through the OTG cable, and generating the lookup table corresponding to the number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable.

3. The method as claimed in claim 1 , wherein obtaining the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable at intervals by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for the threshold value comprises:

setting a timer to obtain a voltage of the positive data line and a voltage of the negative data line in the OTG cable at intervals;

calculating a difference between the voltage of the positive data line and the voltage of the negative data line; and

counting the voltage difference between the positive data line and the negative data line as varied once in the OTG cable if the difference between the voltage of the positive data line and the voltage of the negative data line calculated this time is greater than the difference between the voltage of the positive data line and the voltage of the negative data line previously calculated for the threshold value.

4. The method as claimed in claim 1 , wherein obtaining the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable at intervals by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for the threshold value comprises:

setting a timer to obtain a voltage of the positive data line in the OTG cable at intervals;

calculating a difference in the voltage of the positive data line; and

counting the difference in the voltage of the positive data line as varied once in the OTG cable if the difference between the voltage of the positive data line calculated this time and the voltage of the positive data line previously calculated is greater than the threshold value.

5. The method as claimed in claim 1 , wherein obtaining the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable at intervals by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for the threshold value comprises:

setting a timer to obtain a voltage of the negative data line in the OTG cable at intervals;

calculating a difference in the voltage of the negative data line; and

counting the difference in the voltage of the negative data line as varied once in the OTG cable if the difference between the voltage of the negative data line calculated this time and the voltage of the negative data line previously calculated is greater than the threshold value.

6. The method as claimed in claim 1 , wherein according to the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable, querying the lookup table pre-stored in the mobile terminal for the current value corresponding to the number of changes comprises:

obtaining the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for the threshold value; and

according to the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable, querying the lookup table pre-stored in the mobile terminal for the current value corresponding to the number of changes.

7. The method as claimed in claim 1 , wherein according to the queried current value, controlling the mobile terminal to set the current value as the current limit for the OTG peripheral device comprises:

obtaining the queried current value; and

according to the queried current value, controlling the mobile terminal to set the current value as the current limit for the OTG peripheral device.

8. A mobile terminal, comprising a processor and a memory connected to the processor, wherein an on-the-go (OTG) control configuration program is stored in the memory, the processor is configured to call the OTG control configuration program, and when executed by the processor, the OTG control configuration program implements steps of:

obtaining an accumulated number of changes of differences in voltages of at least one of a positive data line and a negative data line in an OTG data cable at intervals by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for a threshold value;

according to the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable, querying a lookup table pre-stored in the mobile terminal for a current value corresponding to the number of changes; and

according to the queried current value, controlling the mobile terminal to set the current value as a current limit for an OTG peripheral device.

9. The mobile terminal as claimed in claim 8 , wherein when executed by the processor, the OTG control configuration program further implements steps of:

pre-setting a relation between the accumulated number of changes of the voltage differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable and a current transmitted through the OTG cable, and generating the lookup table corresponding to the number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable.

10. The mobile terminal as claimed in claim 8 , wherein when executed by the processor, the OTG control configuration program further implements steps of:

setting a timer to obtain a voltage of the positive data line and a voltage of the negative data line in the OTG cable at intervals;

calculating a difference between the voltage of the positive data line and the voltage of the negative data line; and

counting the voltage difference between the positive data line and the negative data line as varied once in the OTG cable if the difference between the voltage of the positive data line and the voltage of the negative data line calculated this time is greater than the difference between the voltage of the positive data line and the voltage of the negative data line previously calculated for the threshold value.

11. The mobile terminal as claimed in claim 8 , wherein when executed by the processor, the OTG control configuration program further implements steps of:

setting a timer to obtain a voltage of the positive data line in the OTG cable at intervals;

calculating a difference in the voltage of the positive data line; and

counting the difference in the voltage of the positive data line as varied once in the OTG cable if the difference between the voltage of the positive data line calculated this time and the voltage of the positive data line previously calculated is greater than the threshold value.

12. The mobile terminal as claimed in claim 8 , wherein when executed by the processor, the OTG control configuration program further implements steps of:

setting a timer to obtain a voltage of the negative data line in the OTG cable at intervals;

calculating a difference in the voltage of the negative data line; and

counting the difference in the voltage of the negative data line as varied once in the OTG cable if the difference between the voltage of the negative data line calculated this time and the voltage of the negative data line previously calculated is greater than the threshold value.

13. The mobile terminal as claimed in claim 8 , wherein when executed by the processor, the OTG control configuration program further implements steps of:

obtaining the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for the threshold value;

according to the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable, querying the lookup table pre-stored in the mobile terminal for the current value corresponding to the number of changes;

obtaining the queried current value; and

according to the queried current value, controlling the mobile terminal to set the current value as the current limit for the OTG peripheral device.

14. A storage medium, wherein an OTG control configuration program is stored in the storage medium, and when executed by a processor, the OTG control configuration program implements steps of:

obtaining an accumulated number of changes of differences in voltages of at least one of a positive data line and a negative data line in an OTG data cable at intervals by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for a threshold value;

according to the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable, querying a lookup table pre-stored in the mobile terminal for a current value corresponding to the number of changes; and

according to the queried current value, controlling the mobile terminal to set the current value as a current limit for an OTG peripheral device.

15. The storage medium as claimed in claim 14 , wherein before the step of obtaining the accumulated number of changes of the voltage differences in the voltages of at least one of the positive data line and the negative data line in the OTG data cable at intervals by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for the threshold value, steps implemented by the OTG control configuration program further comprise:

pre-setting a relation between the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable and a current transmitted through the OTG cable, and generating the lookup table corresponding to the number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable.

16. The storage medium as claimed in claim 14 , wherein obtaining the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable at intervals by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for the threshold value comprises:

setting a timer to obtain a voltage of the positive data line and a voltage of the negative data line in the OTG cable at intervals;

calculating a difference between the voltage of the positive data line and the voltage of the negative data line; and

counting the voltage difference between the positive data line and the negative data line as varied once in the OTG cable if the difference between the voltage of the positive data line and the voltage of the negative data line calculated this time is greater than the difference between the voltage of the positive data line and the voltage of the negative data line previously calculated for the threshold value.

17. The storage medium as claimed in claim 14 , wherein obtaining the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable at intervals by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for the threshold value comprises:

setting a timer to obtain a voltage of the positive data line in the OTG cable at intervals;

calculating a difference in the voltage of the positive data line; and

counting the difference in the voltage of the positive data line as varied once in the OTG cable if the difference between the voltage of the positive data line calculated this time and the voltage of the positive data line previously calculated is greater than the threshold value.

18. The storage medium as claimed in claim 14 , wherein obtaining the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable at intervals by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for the threshold value comprises:

setting a timer to obtain a voltage of the negative data line in the OTG cable at intervals;

calculating a difference in the voltage of the negative data line; and

counting the difference in the voltage of the negative data line as varied once in the OTG cable if the difference between the voltage of the negative data line calculated this time and the voltage of the negative data line previously calculated is greater than the threshold value.

19. The storage medium as claimed in claim 14 , wherein according to the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable, querying the lookup table pre-stored in the mobile terminal for the current value corresponding to the number of changes comprises:

obtaining the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable by counting the differences in the voltages of at least one of the positive data line and the negative data line as varied once in the OTG cable if the differences in the voltages of at least one of the positive data line and the negative data line calculated this time are greater than the differences in the voltages of at least one of the positive data line and the negative data line previously calculated for the threshold value; and

according to the accumulated number of changes of the differences in the voltages of at least one of the positive data line and the negative data line in the OTG cable, querying the lookup table pre-stored in the mobile terminal for the current value corresponding to the number of changes.

20. The storage medium as claimed in claim 14 , wherein according to the queried current value, controlling the mobile terminal to set the current value as the current limit for the OTG peripheral device comprises:

obtaining the queried current value; and

according to the queried current value, controlling the mobile terminal to set the current value as the current limit for the OTG peripheral device.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 24, 2020
From: YU, BIN; YANG, WEIQIN
To: JRD COMMUNICATION (SHENZHEN) LTD.
Reel/Frame 053299/0450 →
Priority Claims (1)
CN 201711484304.X · Dec 29, 2017 · national
Continuity (1)
Related Publication 20200333863A1 · Oct 22, 2020