IP Library Granted Patent US 9,043,495
Granted Patent B2
US 9,043,495 · App. 14/085,176 · Granted May 26, 2015

Method and apparatus for obtaining equipment identification information

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 9,043,495
App. No.
14/085,176
Granted
May 26, 2015
Kind
B2
Abstract

Embodiments of the present invention relate to a method and an apparatus for obtaining equipment identification information, where the method includes: detecting, by using a first GPIO port, a first discharging duration for a capacitor to discharge through a resistor to be tested; detecting, by using a second GPIO port, a second discharging duration for the capacitor to discharge through a fixed value resistor; and obtaining a resistance of the resistor to be tested according to the first discharging duration, the second discharging duration, and a resistance of the fixed value resistor. The embodiments of the present invention are capable of increasing identification efficiency of the GPIO port.

Claims (60)

1. A method for obtaining equipment identification information, comprising:

detecting, by using a first general purpose input output (GPIO) port, a first discharging duration for a capacitor to discharge through a resistor to be tested, wherein the first GPIO port is connected to the capacitor through a fixed value resistor;

detecting, by using a second GPIO port, a second discharging duration for the capacitor to discharge through the fixed value resistor, wherein the second GPIO port is connected to the capacitor through the resistor to be tested;

obtaining, according to the first discharging duration, the second discharging duration, and a resistance of the fixed value resistor, a resistance of the resistor to be tested; and

obtaining equipment identification information corresponding to the resistance of the resistor to be tested according to mapping between a resistance of a resistor to be tested and equipment identification information;

wherein the detecting, by using a first GPIO port, a first discharging duration for a capacitor to discharge through the resistor to be tested comprises:

setting the first GPIO port to an input state to detect a level of the capacitor;

setting the second GPIO port to an output low level state, so that the capacitor discharges through the resistor to be tested; and

using a duration from a high level to a low level of the capacitor detected by the first GPIO port as the first discharging duration.

2. The method according to claim 1 , further comprising:

charging the capacitor through the first GPIO port or the second GPIO port before a discharging duration is detected.

3. The method according to claim 2 , wherein the charging the capacitor through the first GPIO port or the second GPIO port comprises:

setting the first GPIO port or the second GPIO port to an output high level state, so as to charge the capacitor through the first GPIO port or the second GPIO port.

4. The method according to claim 1 , wherein the detecting, by using a second GPIO port, a second discharging duration for the capacitor to discharge through the fixed value resistor comprises:

setting the second GPIO port to an input state to detect a level of the capacitor;

setting the first GPIO port to an output low level state, so that the capacitor discharges through the fixed value resistor; and

using a duration from a high level to a low level of the capacitor detected by the second GPIO port as the second discharging duration.

5. The method according to claim 1 , wherein the obtaining a resistance of the resistor to be tested according to the first discharging duration, the second discharging duration, and the resistance of the fixed value resistor comprises:

calculating the resistance of R 1 according to R 1 =R 2 T 1 /T 2 ,

wherein the R 1 is the resistor to be tested; the R 2 is the fixed value resistor; the T 1 is the first discharging duration; and the T 2 is the second discharging duration.

6. The method according to claim 2 , wherein the detecting, by using a first GPIO port, a first discharging duration for a capacitor to discharge through the resistor to be tested comprises:

setting the first GPIO port to an input state to detect a level of the capacitor;

setting the second GPIO port to an output low level state, so that the capacitor discharges through the resistor to be tested; and

using a duration from a high level to a low level of the capacitor detected by the first GPIO port as the first discharging duration.

7. The method according to claim 2 , wherein the detecting, by using a second GPIO port, a second discharging duration for the capacitor to discharge through the fixed value resistor comprises:

setting the second GPIO port to an input state to detect a level of the capacitor;

setting the first GPIO port to an output low level state, so that the capacitor discharges through the fixed value resistor; and

using a duration from a high level to a low level of the capacitor detected by the second GPIO port as the second discharging duration.

8. The method according to claim 2 , wherein the obtaining a resistance of the resistor to be tested according to the first discharging duration, the second discharging duration, and the resistance of the fixed value resistor comprises:

calculating the resistance of R 1 according to R 1 =R 2 T 1 /T 2 ,

wherein the R 1 is the resistor to be tested; the R 2 is the fixed value resistor; the T 1 is the first discharging duration; and the T 2 is the second discharging duration.

9. The method according to claim 3 , wherein the detecting, by using a first GPIO port, a first discharging duration for a capacitor to discharge through the resistor to be tested comprises:

setting the first GPIO port to an input state to detect a level of the capacitor;

setting the second GPIO port to an output low level state, so that the capacitor discharges through the resistor to be tested; and

using a duration from a high level to a low level of the capacitor detected by the first GPIO port as the first discharging duration.

10. The method according to claim 3 , wherein the detecting, by using a second GPIO port, a second discharging duration for the capacitor to discharge through the fixed value resistor comprises:

setting the second GPIO port to an input state to detect a level of the capacitor;

setting the first GPIO port to an output low level state, so that the capacitor discharges through the fixed value resistor; and

using a duration from a high level to a low level of the capacitor detected by the second GPIO port as the second discharging duration.

11. The method according to claim 3 , wherein the obtaining a resistance of the resistor to be tested according to the first discharging duration, the second discharging duration, and the resistance of the fixed value resistor comprises:

calculating the resistance of R 1 according to R 1 =R 2 T 1 /T 2 ,

wherein the R 1 is the resistor to be tested; the R 2 is the fixed value resistor; the T 1 is the first discharging duration; and the T 2 is the second discharging duration.

12. An apparatus for obtaining equipment identification information, comprising:

a first detecting unit, configured to detect, by using a first general purpose input output GPIO port, a first discharging duration for a capacitor to discharge through a resistor to be tested, wherein the first GPIO port is connected to the capacitor through a fixed value resistor;

a second detecting unit, configured to detect, by using a second GPIO port, a second discharging duration for the capacitor to discharge through the fixed value resistor, wherein the second GPIO port is connected to the capacitor through the resistor to be tested;

a resistance obtaining unit, configured to obtain, according to the first discharging duration, the second discharging duration, and a resistance of the fixed value resistor, a resistance of the resistor to be tested; and

an information obtaining unit, configured to obtain equipment identification information corresponding to the resistance of the resistor to be tested according to mapping between a resistance of a resistor to be tested and equipment identification information:,

wherein the first detecting unit is configured to:

set the first GPIO port to an input state to detect a level of the capacitor, set the second GPIO port to an output low level state so that the capacitor discharges through the resistor to be tested, and use a duration from a high level to a low level of the capacitor detected by the first GPIO port as the first discharging duration.

13. The apparatus according to claim 12 , further comprising a capacitor charging unit, configured to charge the capacitor through the first GPIO port or the second GPIO port.

14. The apparatus according to claim 13 , wherein the capacitor charging unit is configured to set the first GPIO port or the second GPIO port to an output high level state, so as to charge the capacitor through the first GPIO port or the second GPIO port.

15. The apparatus according to claim 12 , wherein the second detecting unit is configured to

set the second GPIO port to an input state to detect a level of the capacitor, set the first GPIO port to an output low level state, so that the capacitor discharges through the fixed value resistor, and use a duration from a high level to a low level of the capacitor detected by the second GPIO port as the second discharging duration.

16. The apparatus according to claim 12 , wherein the resistance obtaining unit is configured to

calculate the resistance of R 1 according to R 1 =R 2 T 1 /T 2 ,

wherein the R 1 is the resistor to be tested; the R 2 is the fixed value resistor; the T 1 is the first discharging duration; and the T 2 is the second discharging duration.

17. The apparatus according to claim 14 , wherein the first detecting unit is configured to

set the first GPIO port to an input state to detect a level of the capacitor, set the second GPIO port to an output low level state so that the capacitor discharges through the resistor to be tested, and use a duration from a high level to a low level of the capacitor detected by the first GPIO port as the first discharging duration.

18. The apparatus according to claim 14 , wherein the second detecting unit is configured to

set the second GPIO port to an input state to detect a level of the capacitor, set the first GPIO port to an output low level state, so that the capacitor discharges through the fixed value resistor, and use a duration from a high level to a low level of the capacitor detected by the second GPIO port as the second discharging duration.

Assignments (3)
CHANGE OF NAME Recorded Mar 11, 2019
From: HUAWEI DEVICE (DONGGUAN) CO.,LTD.
To: HUAWEI DEVICE CO.,LTD.
Reel/Frame 048555/0951 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 5, 2017
From: HUAWEI DEVICE CO., LTD.
To: HUAWEI DEVICE (DONGGUAN) CO., LTD.
Reel/Frame 043750/0393 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 20, 2013
From: JIANG, JIANHUI
To: HUAWEI DEVICE CO., LTD.
Reel/Frame 031719/0569 →