WO2011137843A2 - 设备标识信息的获取方法及装置 - Google Patents

设备标识信息的获取方法及装置 Download PDF

Info

Publication number
WO2011137843A2
WO2011137843A2 PCT/CN2011/074895 CN2011074895W WO2011137843A2 WO 2011137843 A2 WO2011137843 A2 WO 2011137843A2 CN 2011074895 W CN2011074895 W CN 2011074895W WO 2011137843 A2 WO2011137843 A2 WO 2011137843A2
Authority
WO
WIPO (PCT)
Prior art keywords
resistance
gpio port
capacitor
tested
discharge time
Prior art date
Application number
PCT/CN2011/074895
Other languages
English (en)
French (fr)
Other versions
WO2011137843A3 (zh
Inventor
姜建辉
Original Assignee
华为终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为终端有限公司 filed Critical 华为终端有限公司
Priority to CN201180000788.0A priority Critical patent/CN102216918B/zh
Priority to EP11777262.4A priority patent/EP2700959B8/en
Priority to PCT/CN2011/074895 priority patent/WO2011137843A2/zh
Publication of WO2011137843A2 publication Critical patent/WO2011137843A2/zh
Publication of WO2011137843A3 publication Critical patent/WO2011137843A3/zh
Priority to US14/085,176 priority patent/US9043495B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • 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/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4081Live connection to bus, e.g. hot-plugging
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • G01R31/3644Constructional arrangements
    • G01R31/3646Constructional arrangements for indicating electrical conditions or variables, e.g. visual or audible indicators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices

Definitions

  • the embodiments of the present invention relate to communication technologies, and in particular, to a method and an apparatus for acquiring device identification information. Background technique
  • the same kind of hardware devices (such as: LCD screen, camera, charger, etc.) can be produced by different manufacturers, or there may be different functional characteristics, each of which is not exactly the same hardware device in the application. There will be some differences in use. Therefore, when setting an application for each hardware device, it is necessary to set a corresponding application for the hardware device according to the device identification information of the hardware device, such as: manufacturer information, characteristic parameter information, and the like.
  • a general purpose input output (GPIO) port can be used to identify the output level of the hardware device. Since the GPI0 port has only two states of high level and low level, one GPIO port can only recognize two device identification information, that is, two GPIO ports can only recognize four device identification information. By analogy, a fixed number of GPIO ports in the prior art can only identify a limited number of device identification information, which limits the number of device identification information that can be identified by the GPIO port, thereby reducing the recognition efficiency of the GPIO port. Summary of the invention
  • the embodiment of the invention provides a method and a device for acquiring device identification information, so as to prevent the fixed number of GPIO ports in the prior art from identifying only a limited number of device identification information, thereby limiting the GPIO port to identify the device identifier.
  • An embodiment of the present invention provides a method for acquiring device identification information, including:
  • a first general-purpose input/output GPIO port detecting a first discharge time at which the capacitor discharges through the resistance to be tested, wherein the first GPIO port is connected to the capacitor through a constant value resistor;
  • a second GPIO port detecting a second discharge time at which the capacitor discharges through the constant value resistor, wherein the second GPIO port is connected to the capacitor through a resistance to be tested;
  • the embodiment of the invention further provides a device for acquiring device identification information, including:
  • a first detecting unit configured to detect, by using a first general-purpose input/output GPIO port, a first discharging time at which a capacitor discharges through the resistance to be tested, wherein the first GPIO port is connected to the capacitor through a constant value resistor;
  • a second detecting unit configured to detect, by using the second GPIO port, a second discharging time in which the capacitor discharges through the constant value resistor, wherein the second GPIO port is connected to the capacitor through a resistor to be tested;
  • a resistance obtaining unit configured to obtain a resistance value of the resistance to be tested according to the first discharge time, the second discharge time, and a resistance value of the fixed value resistor
  • the information acquiring unit is configured to obtain device identification information corresponding to the resistance value of the resistance to be tested according to the correspondence between the resistance value of the resistance to be tested and the device identification information.
  • the embodiment of the present invention obtains the resistance value of the resistance to be tested by the discharge time of discharging according to the capacitance through the resistance to be tested, the discharge time of the capacitor through the constant value resistor, and the resistance value of the fixed value resistor, so that the resistance value of the resistance to be tested is obtained.
  • device identification information corresponding to the resistance value of the resistance to be tested can be obtained, which can avoid that a fixed number of GPIO ports in the prior art can only recognize a limited number of The device identification information limits the problem that the GPIO port can recognize the number of device identification information, thereby improving the recognition efficiency of the GPIO port.
  • FIG. 1 is a schematic flowchart of a method for acquiring device identification information according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of port connection in a method for acquiring device identification information according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an apparatus for acquiring device identification information according to another embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an apparatus for acquiring device identification information according to another embodiment of the present invention. detailed description
  • FIG. 1 is a schematic flowchart of a method for acquiring device identification information according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of port connection in a method for acquiring device identification information according to an embodiment of the present invention.
  • the first GPIO port is connected to the capacitor through a fixed value resistor; the second GPIO port is connected to the capacitor through a resistor to be tested.
  • the method for obtaining device identification information in this embodiment may include:
  • the first GPIO port can be set to an input state to enter the level of the capacitor.
  • Line detection, and setting the second GPIO port to an output low state so that the capacitor discharges through the resistance to be tested, and the level of the capacitance detected by the first GPIO port is from a high level to a low level.
  • the first discharge time For example: Set the first GPIO port to the input state to detect the level of point A.
  • the interrupt function of the first GPIO port can be started, and the counter is started by software to start detecting the level of point A; setting the second GPIO port to output low level a state such that the capacitor can be discharged through the resistance to be tested; a time from a high level to a low level of the level A detected by the first GPIO port as the first discharge time.
  • the second GPIO port can be set to an input state for detecting the level of the capacitor, and setting the first GPIO port to an output low state, so that the capacitor is discharged through the fixed value resistor, and The time at which the level of the capacitance detected by the second GPIO port is from a high level to a low level is used as the second discharge time. For example: Set the second GPIO port to the input state to detect the level of point A.
  • the interrupt function of the second GPIO port can be started, and the counter is started by software to start detecting the level of point A; setting the first GPIO port to output low level The state, so that the capacitor can be discharged through the fixed value resistor; the time at which the level of the A point detected by the second GPIO port is from the high level to the low level is taken as the second discharge time.
  • the capacitor can be charged through the second GPIO port via the resistor to be tested, for example, the second GPIO port is set to output a high level state, thereby charging the capacitor through the resistor to be tested.
  • the capacitor may be charged through the first GPIO port via a fixed value resistor, for example: setting the first GPIO port to output a high state, Thereby charging the capacitor through the fixed value resistor.
  • the corresponding relationship between the resistance value of the resistance to be tested and the device identification information may be further established before the 104.
  • the corresponding relationship between the resistance value of the resistance to be tested and the device identification information may be as shown in Table 1.
  • the device identification information may include, but is not limited to, a manufacturer of the hardware device (for example, a digital camera manufactured by a different manufacturer) and functional characteristic parameters (for example, a charger of a different charging current).
  • a manufacturer of the hardware device for example, a digital camera manufactured by a different manufacturer
  • functional characteristic parameters for example, a charger of a different charging current
  • the resistance value of the resistor to be tested is obtained by discharging time according to the discharge of the capacitor through the resistance to be tested, the discharge time of the capacitor through the constant value resistor, and the resistance value of the constant value resistor, so that the resistance value of the resistor to be tested is obtained according to the resistance to be tested.
  • the corresponding relationship between the resistance value and the device identification information can obtain the device identification information corresponding to the resistance value of the resistance to be tested, which can prevent the fixed number of GPIO ports in the prior art from identifying only a limited number of device identification information. It limits the problem that the GPIO port can recognize the number of device identification information, thereby improving the recognition efficiency of the GPIO port.
  • FIG. 3 is a schematic structural diagram of an apparatus for acquiring device identification information according to another embodiment of the present invention.
  • the apparatus for acquiring device identification information in this embodiment may include a first detecting unit 32 and a second detecting unit 33.
  • the first detecting unit 32 is configured to detect, by using the first GPIO port, a first discharging time in which the capacitor discharges through the resistance to be tested, where the first GPIO port is connected to the capacitor through a constant value resistor; And detecting, by using the second GPIO port, a second discharge time of discharging the capacitor through the constant value resistor, wherein the second GPIO port is connected to the capacitor through a resistor to be tested; and the resistance obtaining unit 34 is configured to use the first discharge time according to the first discharge time.
  • the second discharge time and the resistance value of the fixed value resistor are used to obtain the resistance value of the resistance to be tested;
  • the information acquisition unit 35 is configured to acquire and compare the resistance value of the resistance to be tested and the device identification information.
  • the device identification information corresponding to the resistance value of the resistor.
  • the method in the corresponding embodiment of FIG. 1 can be implemented by the device for acquiring device identification information provided in this embodiment.
  • the device for acquiring device identification information in this embodiment may further include a capacitor charging unit 31 for charging the capacitor through the first GPIO port or the second GPIO port.
  • the capacitor charging unit 31 in this embodiment may specifically set the first GPIO port or the second GPIO port to output a high level state, to provide the foregoing by using the first GPIO port or the second GPIO port. Capacitor charging.
  • the first detecting unit 32 in this embodiment may specifically set the first GPIO port as an input state, to detect the level of the capacitor, and to use the second GPIO.
  • the port is set to output a low state, so that the capacitor is discharged through the resistance to be tested, and the level of the capacitor detected by the first GPIO port is from a high level to a low level, as the above A discharge time.
  • the second detecting unit 33 in this embodiment may specifically set the second GPIO port as an input state, to detect the level of the capacitor, and set the first GPIO port to output a low level.
  • a state in which the capacitor is discharged through the constant value resistor, and a time when the level of the capacitor detected by the second GPIO port is from a high level to a low level is used as the second discharge time.
  • the discharge time of the discharge by the resistance obtaining unit according to the capacitance detected by the first detecting unit through the resistance to be tested, the discharge time of the capacitor detected by the second detecting unit through the fixed value resistor, and the resistance of the fixed value resistor The value of the resistance of the resistance to be tested is obtained, so that the information acquisition unit can obtain the device identification information corresponding to the resistance value of the resistance to be tested according to the correspondence between the resistance value of the resistance to be tested and the device identification information, thereby avoiding the prior art.
  • the fixed number of GPIO ports can only identify a limited number of device identification information, which limits the problem that the GPIO port can identify the number of device identification information, thereby improving the recognition efficiency of the GPIO port.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • Another point that is shown or discussed between each other The coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software function unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Telephone Function (AREA)
  • Measurement Of Resistance Or Impedance (AREA)
  • Testing Electric Properties And Detecting Electric Faults (AREA)
  • Tests Of Electronic Circuits (AREA)

Description

设备标识信息的获取方法及装置 技术领域
本发明实施例涉及通信技术, 尤其涉及一种设备标识信息的获取方法及 装置。 背景技术
通常, 同一种类硬件设备(例如: 液晶显示屏、 照相机、 充电器等), 可 以由不同厂家进行生产, 或者还可能会有不同的功能特征参数, 每个不完全 相同的硬件设备在应用程序的使用上会存在一些差别。 因此, 在给每个硬件 设备设置应用程序时, 需要根据硬件设备的设备标识信息, 例如: 厂家信息、 特征参数信息等, 给硬件设备设置相应的应用程序。
现有技术中, 可以采用通用输入输出 ( General Purpose Input Output, 简称 GPIO )端口识别硬件设备的输出电平。 由于 GPI0端口只有高电平和 低电平两种状态, 所以, 一个 GPIO端口只能识别两个设备标识信息, 也就 是说, 两个 GPIO端口只能识别四个设备标识信息。 以此类推, 现有技术中 固定个数的 GPIO端口只能识别出有限数量的设备标识信息, 限制了 GPIO 端口能够识别设备标识信息的数量, 从而降低了 GPIO端口的识别效率。 发明内容
本发明实施例提供一种设备标识信息的获取方法及装置, 用以避免现有 技术中固定个数的 GPIO端口只能识别出有限数量的设备标识信息而导致的 限制了 GPIO端口能够识别设备标识信息的数量的问题。
本发明实施例提供了一种设备标识信息的获取方法, 包括:
利用第一通用输入输出 GPIO端口, 检测电容通过所述待测电阻进行放 电的第一放电时间, 所述第一 GPIO端口通过定值电阻与所述电容连接; 利用第二 GPIO端口, 检测所述电容通过所述定值电阻进行放电的第二 放电时间, 所述第二 GPIO端口通过待测电阻与所述电容连接;
根据所述第一放电时间、 所述第二放电时间和所述定值电阻的电阻值, 获得所述待测电阻的电阻值;
根据待测电阻的电阻值与设备标识信息的对应关系, 获取与所述待测电 阻的电阻值对应的设备标识信息。
本发明实施例还提供了一种设备标识信息的获取装置, 包括:
第一检测单元, 用于利用第一通用输入输出 GPIO端口, 检测电容通过 所述待测电阻进行放电的第一放电时间, 所述第一 GPIO端口通过定值电阻 与所述电容连接;
第二检测单元, 用于利用第二 GPIO端口, 检测所述电容通过所述定值 电阻进行放电的第二放电时间, 所述第二 GPIO端口通过待测电阻与所述电 容连接;
阻值获得单元, 用于根据所述第一放电时间、 所述第二放电时间和所述 定值电阻的电阻值, 获得所述待测电阻的电阻值;
信息获取单元,用于根据待测电阻的电阻值与设备标识信息的对应关系, 获取与所述待测电阻的电阻值对应的设备标识信息。
由上述技术方案可知, 本发明实施例通过根据电容通过待测电阻进行放 电的放电时间、电容通过定值电阻进行放电的放电时间和定值电阻的电阻值, 获得待测电阻的电阻值, 使得根据待测电阻的电阻值与设备标识信息的对应 关系, 能够获取与上述待测电阻的电阻值对应的设备标识信息, 能够避免现 有技术中固定个数的 GPIO端口只能识别出有限数量的设备标识信息而导致 的限制了 GPIO端口能够识别设备标识信息的数量的问题,从而提高了 GPIO 端口的识别效率。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明一实施例提供的设备标识信息的获取方法的流程示意图; 图 2为本发明一实施例提供的设备标识信息的获取方法中的端口连接示 意图;
图 3 为本发明另一实施例提供的设备标识信息的获取装置的结构示意 图;
图 4 为本发明另一实施例提供的设备标识信息的获取装置的结构示意 图。 具体实施方式
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。
图 1 为本发明一实施例提供的设备标识信息的获取方法的流程示意图, 以及图 2为本发明一实施例提供的设备标识信息的获取方法中的端口连接示 意图。如图 2所示,第一 GPIO端口通过定值电阻与上述电容连接;第二 GPIO 端口通过待测电阻与上述电容连接。 如图 1 所示, 本实施例的设备标识信息 的获取方法可以包括:
101、利用第一 GPIO端口,检测电容通过上述待测电阻进行放电的第一 放电时间;
具体地, 可以将第一 GPIO端口设置为输入状态, 用以对电容的电平进 行检测, 以及将第二 GPIO端口设置为输出低电平状态, 以使电容通过待测 电阻进行放电, 并将第一 GPIO端口检测到的电容的电平从高电平到低电平 的时间, 作为第一放电时间。 例如: 将第一 GPIO端口设置为输入状态, 用 以对 A点的电平进行检测。 当 A点的电平稳定在高电平之后, 可以启动第一 GPIO端口的中断功能, 并通过软件开启计数器, 开始对 A点的电平进行检 测; 将第二 GPIO端口设置为输出低电平状态, 从而使得电容可以通过待测 电阻进行放电; 将第一 GPIO端口检测到的 A点的电平从高电平到低电平的 时间, 作为第一放电时间。
102、利用第二 GPIO端口,检测上述电容通过上述定值电阻进行放电的 第二放电时间;
具体地, 可以将第二 GPIO端口设置为输入状态, 用以对电容的电平进 行检测, 以及将第一 GPIO端口设置为输出低电平状态, 以使电容通过定值 电阻进行放电, 并将第二 GPIO端口检测到的电容的电平从高电平到低电平 的时间, 作为第二放电时间。 例如: 将第二 GPIO端口设置为输入状态, 用 以对 A点的电平进行检测。 当 A点的电平稳定在高电平之后, 可以启动第二 GPIO端口的中断功能, 并通过软件开启计数器, 开始对 A点的电平进行检 测; 将第一 GPIO端口设置为输出低电平状态, 从而使得电容可以通过定值 电阻进行放电; 将第二 GPIO端口检测到的 A点的电平从高电平到低电平的 时间, 作为第二放电时间。
需要说明的是: 上述 101与 102没有固定的执行顺序。
可以理解的是: 101与 102均是对电容的放电时间的检测, 所以 101与 103之前均需要执行对电容进行充电的充电过程, 才能实现对电容的放电时 间的检测。 如图 2所示, 可选地, 具体可以通过第二 GPIO端口, 经由待测 电阻给电容充电, 例如: 将第二 GPIO端口设置为输出高电平状态, 从而实 现通过待测电阻给电容充电。 可选地, 具体还可以通过第一 GPIO端口, 经 由定值电阻给电容充电, 例如: 将第一 GPIO端口设置为输出高电平状态, 从而实现通过定值电阻给电容充电。
103、根据上述第一放电时间、上述第二放电时间和上述定值电阻的电阻 值, 获得上述待测电阻的电阻值;
具体地, 可以根据 R1 =R2T1/T2, 计算 R1的阻值; 其中, 上述 R1为待 测电阻; R2为定值电阻; T1为第一放电时间; T2为第二放电时间。
104、根据待测电阻的电阻值与设备标识信息的对应关系,获取与上述待 测电阻的电阻值对应的设备标识( ID )信息。
进一步地, 本实施例在 104之前还可以进一步建立上述待测电阻的电阻 值与设备标识信息的对应关系。 其中, 待测电阻的电阻值与设备标识信息的 对应关系可以如表 1所示。
表 1 待测电阻的电阻值与设备标识信息的对应关系
Figure imgf000007_0001
其中, 设备标识信息可以包括但不限于硬件设备的生产厂家(例如: 不 同厂家生产的数码相机)、功能特征参数(例如:不同充电电流大小的充电器)。
本实施例中, 通过根据电容通过待测电阻进行放电的放电时间、 电容通 过定值电阻进行放电的放电时间和定值电阻的电阻值, 获得待测电阻的电阻 值, 使得根据待测电阻的电阻值与设备标识信息的对应关系, 能够获取与上 述待测电阻的电阻值对应的设备标识信息, 能够避免现有技术中固定个数的 GPIO端口只能识别出有限数量的设备标识信息而导致的限制了 GPIO端口 能够识别设备标识信息的数量的问题, 从而提高了 GPIO端口的识别效率。
需要说明的是: 对于前述的各方法实施例, 为了简单描述, 故将其都表 述为一系列的动作组合, 但是本领域技术人员应该知悉, 本发明并不受所描 述的动作顺序的限制, 因为依据本发明, 某些步骤可以采用其他顺序或者同 时进行。 其次, 本领域技术人员也应该知悉, 说明书中所描述的实施例均属 于优选实施例, 所涉及的动作和模块并不一定是本发明所必须的。
在上述实施例中, 对各个实施例的描述都各有侧重, 某个实施例中没有 详述的部分, 可以参见其他实施例的相关描述。
图 3 为本发明另一实施例提供的设备标识信息的获取装置的结构示意 图, 如图 3所示, 本实施例的设备标识信息的获取装置可以包括第一检测单 元 32、 第二检测单元 33、 阻值获得单元 34和信息获取单元 35。 其中, 第一 检测单元 32用于利用第一 GPIO端口,检测电容通过上述待测电阻进行放电 的第一放电时间, 该第一 GPIO端口通过定值电阻与上述电容连接; 第二检 测单元 33用于利用第二 GPIO端口,检测上述电容通过上述定值电阻进行放 电的第二放电时间, 该第二 GPIO端口通过待测电阻与上述电容连接; 阻值 获得单元 34用于根据上述第一放电时间、上述第二放电时间和上述定值电阻 的电阻值, 获得上述待测电阻的电阻值; 信息获取单元 35用于根据待测电阻 的电阻值与设备标识信息的对应关系, 获取与上述待测电阻的电阻值对应的 设备标识信息。
图 1对应的实施例中方法可以由本实施例提供的设备标识信息的获取装 置实现。
进一步地, 如图 4所示, 本实施例的设备标识信息的获取装置还可以进 一步包括电容充电单元 31 , 用于通过第一 GPIO端口或第二 GPIO端口给电 容充电。 具体地, 本实施例中的电容充电单元 31具体可以将上述第一 GPIO 端口或上述第二 GPIO端口设置为输出高电平状态,用以通过上述第一 GPIO 端口或上述第二 GPIO端口给上述电容充电。
具体地,本实施例中的第一检测单元 32具体可以将上述第一 GPIO端口 设置为输入状态, 用以对上述电容的电平进行检测, 以及将上述第二 GPIO 端口设置为输出低电平状态, 以使上述电容通过上述待测电阻进行放电, 并 将上述第一 GPIO端口检测到的上述电容的电平从高电平到低电平的时间, 作为上述第一放电时间。
具体地,本实施例中的第二检测单元 33具体可以将上述第二 GPIO端口 设置为输入状态, 用以对上述电容的电平进行检测, 以及将上述第一 GPIO 端口设置为输出低电平状态, 以使上述电容通过上述定值电阻进行放电, 并 将上述第二 GPIO端口检测到的上述电容的电平从高电平到低电平的时间, 作为上述第二放电时间。
具体地, 本实施例中的阻值获得单元 34具体可以根据 R1 =R2T1/T2,计 算 R1的阻值; 其中, 上述 R1为上述待测电阻; 上述 R2为上述定值电阻; 上述 T1为上述第一放电时间; 上述 T2为上述第二放电时间。
本实施例中, 通过阻值获得单元根据第一检测单元检测的电容通过待测 电阻进行放电的放电时间、 第二检测单元检测的电容通过定值电阻进行放电 的放电时间和定值电阻的电阻值, 获得待测电阻的电阻值, 使得信息获取单 元根据待测电阻的电阻值与设备标识信息的对应关系, 能够获取与上述待测 电阻的电阻值对应的设备标识信息, 能够避免现有技术中固定个数的 GPIO 端口只能识别出有限数量的设备标识信息而导致的限制了 GPIO端口能够识 别设备标识信息的数量的问题, 从而提高了 GPIO端口的识别效率。
所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述描 述的系统, 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应 过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统, 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间 的耦合或直接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合 或通信连接, 可以是电性, 机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的, 作 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。
另外 ,在本发明各个实施例中的各功能单元可以集成在一个处理单元中 , 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一个单 元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用软件功能单 元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售 或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本 发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的 全部或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在一个 存储介质中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部分步 骤。而前述的存储介质包括: U盘、移动硬盘、只读存储器( ROM, Read-Only Memory ), 随机存取存储器(RAM, Random Access Memory )、 磁碟或者 光盘等各种可以存储程序代码的介质。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或 者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技 术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims

权 利 要求
1、 一种设备标识信息的获取方法, 其特征在于, 包括:
利用第一通用输入输出 GPIO端口, 检测电容通过所述待测电阻进行放 电的第一放电时间, 所述第一 GPIO端口通过定值电阻与所述电容连接; 利用第二 GPIO端口, 检测所述电容通过所述定值电阻进行放电的第二 放电时间, 所述第二 GPIO端口通过待测电阻与所述电容连接;
根据所述第一放电时间、 所述第二放电时间和所述定值电阻的电阻值, 获得所述待测电阻的电阻值;
根据待测电阻的电阻值与设备标识信息的对应关系, 获取与所述待测电 阻的电阻值对应的设备标识信息。
2、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 在检测放电时间前通过所述第一 GPIO端口或所述第二 GPIO端口给电 容充电。
3、 根据权利要求 2所述的方法, 其特征在于, 所述通过所述第一 GPIO 端口或所述第二 GPIO端口给电容充电, 包括:
将所述第一 GPIO端口或所述第二 GPIO端口设置为输出高电平状态, 用以通过所述第一 GPIO端口或所述第二 GPIO端口给所述电容充电。
4、根据权利要求 1至 3任一权利要求所述的方法, 其特征在于, 所述利 用第一 GPIO端口, 检测电容通过所述待测电阻进行放电的第一放电时间, 包括:
将所述第一 GPIO端口设置为输入状态, 用以对所述电容的电平进行检 测;
将所述第二 GPIO端口设置为输出低电平状态, 以使所述电容通过所述 待测电阻进行放电;
将所述第一 GPIO端口检测到的所述电容的电平从高电平到低电平的时 间, 作为所述第一放电时间。
5、根据权利要求 1至 3任一权利要求所述的方法, 其特征在于, 所述利 用第二 GPIO端口, 检测所述电容通过所述定值电阻进行放电的第二放电时 间, 包括:
将所述第二 GPIO端口设置为输入状态, 用以对所述电容的电平进行检 测;
将所述第一 GPIO端口设置为输出低电平状态, 以使所述电容通过所述 定值电阻进行放电;
将所述第二 GPIO端口检测到的所述电容的电平从高电平到低电平的时 间, 作为所述第二放电时间。
6、根据权利要求 1至 3任一权利要求所述的方法, 其特征在于, 所述根 据所述第一放电时间、 所述第二放电时间和所述定值电阻的电阻值, 获得所 述待测电阻的电阻值, 包括:
根据 R1 =R2T1/T2, 计算 R1的阻值;
其中, 所述 R1为所述待测电阻; 所述 R2为所述定值电阻; 所述 T1为 所述第一放电时间; 所述 T2为所述第二放电时间。
7、 一种设备标识信息的获取装置, 其特征在于, 包括:
第一检测单元, 用于利用第一通用输入输出 GPIO端口, 检测电容通过 所述待测电阻进行放电的第一放电时间, 所述第一 GPIO端口通过定值电阻 与所述电容连接;
第二检测单元, 用于利用第二 GPIO端口, 检测所述电容通过所述定值 电阻进行放电的第二放电时间, 所述第二 GPIO端口通过待测电阻与所述电 容连接;
阻值获得单元, 用于根据所述第一放电时间、 所述第二放电时间和所述 定值电阻的电阻值, 获得所述待测电阻的电阻值;
信息获取单元,用于根据待测电阻的电阻值与设备标识信息的对应关系, 获取与所述待测电阻的电阻值对应的设备标识信息。
8、 根据权利要求 7所述的装置, 其特征在于, 所述装置还包括电容充电 单元, 用于通过所述第一 GPIO端口或所述第二 GPIO端口给电容充电。
9、 根据权利要求 8所述的装置, 其特征在于, 所述电容充电单元具体用 于
将所述第一 GPIO端口或所述第二 GPIO端口设置为输出高电平状态, 用以通过所述第一 GPIO端口或所述第二 GPIO端口给所述电容充电。
10、 根据权利要求 7至 9任一权利要求所述的装置, 其特征在于, 所述 第一检测单元具体用于
将所述第一 GPIO端口设置为输入状态, 用以对所述电容的电平进行检 测, 将所述第二 GPIO端口设置为输出低电平状态, 以使所述电容通过所述 待测电阻进行放电, 将所述第一 GPIO端口检测到的所述电容的电平从高电 平到低电平的时间, 作为所述第一放电时间。
11、 根据权利要求 7至 9任一权利要求所述的装置, 其特征在于, 所述 第二检测单元具体用于
将所述第二 GPIO端口设置为输入状态, 用以对所述电容的电平进行检 测, 将所述第一 GPIO端口设置为输出低电平状态, 以使所述电容通过所述 定值电阻进行放电, 将所述第二 GPIO端口检测到的所述电容的电平从高电 平到低电平的时间, 作为所述第二放电时间。
12、 根据权利要求 7至 9任一权利要求所述的装置, 其特征在于, 所述 阻值获得单元具体用于
根据 R1 =R2T1/T2, 计算 R1的阻值;
其中, 所述 R1为所述待测电阻; 所述 R2为所述定值电阻; 所述 T1为 所述第一放电时间; 所述 T2为所述第二放电时间。
PCT/CN2011/074895 2011-05-30 2011-05-30 设备标识信息的获取方法及装置 WO2011137843A2 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201180000788.0A CN102216918B (zh) 2011-05-30 2011-05-30 设备标识信息的获取方法及装置
EP11777262.4A EP2700959B8 (en) 2011-05-30 2011-05-30 Method and device for obtaining equipment identification information
PCT/CN2011/074895 WO2011137843A2 (zh) 2011-05-30 2011-05-30 设备标识信息的获取方法及装置
US14/085,176 US9043495B2 (en) 2011-05-30 2013-11-20 Method and apparatus for obtaining equipment identification information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/074895 WO2011137843A2 (zh) 2011-05-30 2011-05-30 设备标识信息的获取方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/085,176 Continuation US9043495B2 (en) 2011-05-30 2013-11-20 Method and apparatus for obtaining equipment identification information

Publications (2)

Publication Number Publication Date
WO2011137843A2 true WO2011137843A2 (zh) 2011-11-10
WO2011137843A3 WO2011137843A3 (zh) 2012-05-03

Family

ID=44746732

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/074895 WO2011137843A2 (zh) 2011-05-30 2011-05-30 设备标识信息的获取方法及装置

Country Status (4)

Country Link
US (1) US9043495B2 (zh)
EP (1) EP2700959B8 (zh)
CN (1) CN102216918B (zh)
WO (1) WO2011137843A2 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662880B (zh) * 2012-03-19 2016-09-14 华为终端有限公司 一种电子设备本体、装配组件及其识别方法和电子设备
CN102708077B (zh) * 2012-05-25 2015-04-29 华为终端有限公司 状态识别方法及设备
CN203981781U (zh) 2012-11-21 2014-12-03 快捷半导体(苏州)有限公司 标识检测模块和系统
WO2016050708A1 (en) * 2014-09-29 2016-04-07 Koninklijke Philips N.V. Remote control device, user device and system thereof, and method, computer program product and identification signal
CN104573594B (zh) * 2015-01-23 2018-06-19 成都实唯物联网科技有限公司 一种设备标识方法
US10644692B2 (en) 2016-09-07 2020-05-05 Motorola Solutions, Inc. System and method to determine a power-up parameter for a circuit board
CN106375528B (zh) * 2016-10-27 2019-08-16 上海斐讯数据通信技术有限公司 一种手机id确定方法及其异常检测处理方法
CN108768379B (zh) * 2018-05-31 2022-04-05 华勤技术股份有限公司 多态识别方法、系统及终端
CN111324498A (zh) * 2020-02-26 2020-06-23 维沃移动通信有限公司 硬件信息检测装置、标识装置及方法

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3637943A (en) * 1970-06-24 1972-01-25 Digital Telephone Systems Inc Telephone-signaling unit
US6270415B1 (en) * 1997-08-15 2001-08-07 Guillemot Corporation Method for bi-directional data communication in a digital game port
US6508012B2 (en) * 2000-12-30 2003-01-21 Earnest G. Wells, Jr. Digital fastener size indicator
JP4636163B2 (ja) * 2008-10-15 2011-02-23 ソニー株式会社 スイッチ回路
CN101398459B (zh) * 2008-10-28 2011-02-09 华为终端有限公司 识别充电器类型的方法及装置
KR101329014B1 (ko) * 2008-10-30 2013-11-12 삼성전자주식회사 휴대단말에서 스위칭 회로의 모드 제어 방법 및 장치
CN101667166B (zh) * 2009-09-25 2012-01-25 华为终端有限公司 设备识别方法及装置
CN101788609B (zh) * 2010-02-09 2012-12-12 华为终端有限公司 电阻值测量方法及装置、电容值测量方法及装置
CN101757188B (zh) * 2010-03-07 2012-02-01 杜贵胜 一种治疗湿热型湿疹的速愈膏及制备方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
None

Also Published As

Publication number Publication date
CN102216918A (zh) 2011-10-12
US20140082223A1 (en) 2014-03-20
CN102216918B (zh) 2014-04-16
EP2700959B1 (en) 2017-10-11
EP2700959A2 (en) 2014-02-26
EP2700959A4 (en) 2015-07-01
WO2011137843A3 (zh) 2012-05-03
EP2700959B8 (en) 2017-12-13
US9043495B2 (en) 2015-05-26

Similar Documents

Publication Publication Date Title
WO2011137843A2 (zh) 设备标识信息的获取方法及装置
US9128691B2 (en) Method and terminal for selecting internal circuit according to USB interface status
US8769317B2 (en) USB hub for supplying power upon determination whether a USB device is chargeable according to data transfer rate of the USB device
US20160239540A1 (en) Data Query Method and Apparatus, Server, and System
CN104978300B (zh) 移动终端及其与外部设备连接的检测方法和装置
US10345382B2 (en) Method and terminal for displaying battery power
CN110851387A (zh) 一种接口功能配置方法和电子设备
US10863562B2 (en) Peripheral device pairing
WO2014198228A1 (en) Method, apparatus and system for verifying code integrity on clients
EP2602696A2 (en) Method and apparatus for configuring touch sensing parameters
WO2018120769A1 (zh) 电池间容量差值的获取方法和装置
WO2016000543A1 (zh) 检测app的cpu占用率异常的方法、装置及移动终端
WO2019072133A1 (zh) 人脸识别方法及相关产品
CN107918076B (zh) 一种电源适配器检测方法和电源适配器检测装置
WO2016029448A1 (zh) 提高扬声器性能的方法和终端设备
WO2019061538A1 (zh) 一种Type C USB接口的电子设备、控制方法、以及存储介质
WO2016101607A1 (zh) 一种cpu及cpu的启动方法
US9398631B2 (en) Method for establishing communications between peer devices, wireless communication device using the same and computer-readable medium
WO2018099093A1 (zh) 一种电池短路的检测方法和装置
CN110324673A (zh) 一种网络连接异常的处理方法及装置
CN115407116A (zh) 充电电流的确定方法及装置
WO2023103802A1 (zh) 协议信息测试方法、测试仪、存储介质及程序产品
CN113991804A (zh) 一种充电协议握手电路及电子设备
CN112187481A (zh) 用户在线记录管理方法、装置和系统
CN116881001B (zh) 多dpu宿主机的云平台的管控方法、装置、设备及介质

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180000788.0

Country of ref document: CN

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

Ref document number: 11777262

Country of ref document: EP

Kind code of ref document: A2

REEP Request for entry into the european phase

Ref document number: 2011777262

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2011777262

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 11777262

Country of ref document: EP

Kind code of ref document: A2