摘要 |
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. The embodiments of the present invention are capable of avoiding a problem in the prior art that the number of pieces of equipment identification information that the GPIO port may identify is limited, which is caused by the fact that, a fixed number of GPIO ports may identify only a limited number of pieces of equipment identification information, thereby increasing the identification efficiency of the GPIO port. |