摘要 |
The present invention discloses a method and an apparatus for detecting an interface connection between devices, where the method includes: setting a recommended working parameter of a first interface as a first working parameter; obtaining, by using an auto negotiation operation, a second working parameter of a second interface; determining whether the second working parameter is equal to the first working parameter, and if the second working parameter is not equal to the first working parameter, sending an alarm to indicate that a connection is unmatched; if the second working parameter is equal to the first working parameter, setting the recommended working parameter of the first interface as a third working parameter, sending, by using the auto negotiation operation, the third working parameter to the second interface, and receiving the third working parameter sent by a second device through the second interface, so that the first interface communicates with the second interface by using the third working parameter. In the present invention, whether the second working parameter obtained by the first interface is equal to a set first working parameter is determined, and a matching relationship between interfaces is further determined, thereby solving a problem in the prior art that mixed insertion easily occurs on interfaces, reducing an error probability of a manual operation, and improving maintainability and reliability of a communications device. |