摘要 |
<p>A method and device for detecting an interface access mode of a smart key device, capable of enabling a smart key device to obtain an access mode and enter an operational state corresponding to the mode. The method comprises: a detection module is connected to a D+ pin of a USB interface via a first detection pin, and is connected to a D- pin via a second detection pin (101); the first detection pin outputs a high level to the D+ pin (102), it is detected whether the first detection pin and the second detection pin receive a terminal handshake signal, and a first level of the second detection pin is detected (103); if the terminal handshake signal is received, it is determined that an access mode is a USB information transmission mode, and the smart key device enters a corresponding operational state (104); if the terminal handshake signal is not received and the first level of the second detection pin is the high level, the first detection pin outputs a low level to the D+ pin (105), a second level of the second detection pin is detected, and if the second level of the second detection pin is the low level, it is determined that the access mode is a charger mode, and the smart key device enters a corresponding operational state (106).</p> |