Communication method, communication apparatus, and communication system
By negotiating the use of variable speed communication mode in Ethernet communication, the dependence on 4 pairs of twisted pairs is reduced, and the communication rate drop caused by twisted pair failure is solved, achieving high communication performance and user experience.
Patent Information
- Application Number
- PCT/CN2024/111786
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-25
- Filing Date
- 2024-08-13
- Publication Date
- 2025-04-03
AI Technical Summary
In Ethernet communication, when some twisted pair wires are disconnected or the cable crystal heads with twisted pair wires are poorly contacted, the communication rate will drop significantly, resulting in reduced communication performance and poor user experience.
By negotiating the use of variable speed communication mode between devices when twisted pairs is not faulty, reducing the dependence on 4 pairs of twisted pairs, using 2 pairs or less for communication, thereby maintaining high communication performance in twisted pair failure situations.
It realizes the maintenance of high communication performance in twisted pair failure situations, avoids a significant drop in communication rate and improves user experience.
Smart Images

Figure CN2024111786_03042025_PF_FP_ABST
Abstract
Description
Communication method, communication device and communication system
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on September 25, 2023, with application number 202311266585.7 and invention name "A communication method, communication device and communication system", the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of communication technology, and in particular to a communication method, a communication device, and a communication system. Background Art
[0004] With the continuous evolution and development of Ethernet technology, various types of Ethernet technologies have emerged, and the Institute of Electrical and Electronics Engineers (IEEE) has developed relevant standards. For example, the IEEE 802.3 series of standards stipulates that the data transmission rate for Ethernet technology 10BASE-T is 10 Mbps, the data transmission rate for Ethernet technology 100BASE-T is 100 Mbps, the data transmission rate for Ethernet technology 1000BASE-T is 1 Gbps, the data transmission rate for Ethernet technology 10GBASE-T is 10 Gbps, the data transmission rate for Ethernet technology 5GBASE-T is 5 Gbps, and the data transmission rate for Ethernet technology 2.5GBASE-T is 2.5 Gbps.
[0005] 10BASE-T and 100BASE-T use two twisted-pair cables as the communication transmission medium, while 1GBASE-T, 10GBASE-T, 2.5GBASE-T, and 5GBASE-T use four twisted-pair cables as the communication transmission medium. Therefore, two devices communicating using any of 1GBASE-T, 10GBASE-T, 2.5GBASE-T, and 5GBASE-T need to be connected via four twisted-pair cables. If some of the twisted-pair cables are disconnected (i.e., disconnected) or the cable connectors of the twisted-pair cables have poor contact, the two devices will negotiate to use a communication mode that only requires two twisted-pair cables (e.g., 10BASE-T or 100BASE-T). This will reduce the communication rate of the two devices from greater than or equal to 1Gbps to 10Mbps or 100Mbps. This will result in a significant drop in communication rate, a significant degradation in communication performance, and a poor user experience.
[0006] Therefore, how to improve the communication performance of Ethernet when some twisted-pair cables used by devices at both ends of Ethernet communication are disconnected or the cable connectors of some twisted-pair cables have poor contact is an urgent problem to be solved.
[0007] Summary of the Invention
[0008] The present application provides a communication method, a communication device, and a communication system for improving the communication performance of Ethernet.
[0009] In the first aspect, an embodiment of the present application provides a communication method, which can be performed by a first device or a module (such as a chip) applied to the first device, and the first device is connected to the second device through 2 pairs of twisted pairs or 4 pairs of twisted pairs; the method includes: when the 2 pairs of twisted pairs are not faulty, sending first information to the second device, the first information is used to indicate that the first device supports the variable speed communication mode; wherein the communication rate corresponding to the variable speed communication mode is less than the first communication rate corresponding to the first communication mode, and is greater than or equal to the second communication rate; the first communication mode is a communication mode using the 4 pairs of twisted pairs; receiving second information from the second device, the second information is used to indicate that the second device supports the variable speed communication mode.
[0010] In this method, a first device is connected to a second device via two twisted-pair cables or four twisted-pair cables. When the two twisted-pair cables are not faulty, the first and second devices can inform each other that they support the variable-speed communication mode, allowing them to negotiate the use of the variable-speed communication mode. Furthermore, the communication rate corresponding to this variable-speed communication mode is lower than the first communication rate corresponding to the communication mode using four twisted-pair cables, but higher than the second communication rate (i.e., the communication rate corresponding to the communication mode using two twisted-pair cables in the prior art, e.g., 100 Mbps or 10 Mbps). This ensures that communication performance between the first device and the second device using the variable-speed communication mode is not significantly reduced.
[0011] In one possible design, the method further includes communicating data with the second device in a variable-speed communication mode. In this design, the first device and the second device communicate data using the variable-speed communication mode such that a communication rate between the first device and the second device does not decrease significantly relative to a communication rate in the first communication mode.
[0012] In one possible design, performing data communication with the second device in the variable-speed communication mode includes: using N pairs of twisted pairs among the four twisted pairs to perform data communication with the second device in the variable-speed communication mode; where N is a positive integer less than 4. In this design, the number of twisted pairs required for data communication between the first device and the second device in the variable-speed communication mode is less than four, and may be, for example, one, two, or three twisted pairs. This makes the variable-speed communication mode applicable to various situations involving twisted pair failures, thereby improving Ethernet reliability.
[0013] In one possible design, the first information is further used to indicate that the first device supports the first communication mode, and the second information is further used to indicate that the second device supports the first communication mode. The method further includes: using four twisted-pair pairs to train the first communication mode; accordingly, using N twisted-pair pairs among the four twisted-pair pairs to perform data communication with the second device in a variable-speed communication mode, including: when the training of the first communication mode for the N twisted-pair pairs is successful, and the training of the first communication mode for the twisted-pair pairs other than the N twisted-pair pairs among the four twisted-pair pairs fails, using the N twisted-pair pairs to perform data communication with the second device in a variable-speed communication mode. In this design, the first communication mode is trained using four twisted-pair pairs. If only the training of the first communication mode for the N twisted-pair pairs is successful, then the N twisted-pair pairs are used to perform data communication in a variable-speed communication mode.
[0014] In one possible design, the method further includes: performing fault detection on the four twisted-pair pairs; and accordingly, using N of the four twisted-pair pairs to communicate data with the second device in a variable-speed communication mode, including: when the N twisted-pair pairs are not faulty and a twisted-pair other than the N twisted-pair pairs is faulty, using the N twisted-pair pairs to communicate data with the second device in the variable-speed communication mode. In this design, by performing fault detection on the four twisted-pair pairs, when only N of the four twisted-pair pairs are not faulty, data communication is performed using these N twisted-pair pairs in the variable-speed communication mode.
[0015] In a possible design, the N twisted-pair pairs not failing include the N twisted-pair pairs not being disconnected, or the N twisted-pair pairs being twisted-pair pairs with better channel quality among the four twisted-pair pairs.
[0016] In one possible design, the first information is further used to indicate that the first device supports the first communication mode, and the second information is further used to indicate that the second device supports the first communication mode. The method further includes: using four twisted-pair pairs to train the first communication mode; accordingly, using N twisted-pair pairs of the four twisted-pair pairs to communicate data with the second device in a variable-speed communication mode, including: when the number of training failures in the first communication mode reaches G, using the N twisted-pair pairs to communicate data with the second device in the variable-speed communication mode; where G is a positive integer greater than or equal to 1. In this design, when the number of training failures in the first communication mode reaches a preset value, the N twisted-pair pairs are used to communicate data in the variable-speed communication mode.
[0017] In one possible design, the four twisted pairs include a first group of twisted pairs and a second group of twisted pairs, the first group of twisted pairs including twisted pairs A and B, and the second group of twisted pairs including twisted pairs C and D. The method further includes: performing fault detection on the first group of twisted pairs within a first time window, and if the first group of twisted pairs is not faulty, determining the first group of twisted pairs as two twisted pairs; or performing fault detection on the second group of twisted pairs within a second time window, and if the second group of twisted pairs is not faulty, determining the second group of twisted pairs as two twisted pairs; wherein the first time window is different from the second time window. The first time window and the second time window are different time periods. In this design, by performing fault detection on the first and second groups of twisted pairs in different time periods, conflicts in fault detection on the first and second groups of twisted pairs can be avoided.
[0018] In one possible design, the method further includes: the chip where the physical layer of the first device resides and the chip where the data link layer resides communicating using a medium-independent interface, where the communication rate of the medium-independent interface is less than or equal to the communication rate corresponding to the variable-speed communication mode. In this design, when the physical layer of the first device and the data link layer of the first device are deployed on two different chips, the two chips can communicate via the medium-independent interface.
[0019] In one possible design, the first communication mode includes any one of the following: 10GBASE-T full-duplex communication, 5GBASE-T full-duplex communication, 2.5GBASE-T full-duplex communication, or 1GBASE-T full-duplex communication.
[0020] In a second aspect, embodiments of the present application provide a communications device having the functionality to implement the method described in the first aspect or a possible design of the first aspect. This functionality can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functionality.
[0021] In a third aspect, an embodiment of the present application provides a communication device, which includes a module or unit for implementing the method described in the first aspect or a possible design of the first aspect.
[0022] In a fourth aspect, an embodiment of the present application provides a communication device, comprising a processor and a communication interface, wherein the communication interface is used to receive and send data; the processor is coupled to a memory, and is used to execute a computer program stored in the memory, so that the device performs the method described in the first aspect or a possible design of the first aspect.
[0023] In a fifth aspect, an embodiment of the present application provides a communication device, comprising a unit or module for executing each step of the method described in the above-mentioned first aspect or a possible design of the first aspect.
[0024] In a sixth aspect, an embodiment of the present application also provides a computer-readable storage medium, which includes a computer program. When the computer program runs on a computer or a processor, it enables the computer or the processor to execute the method described in the above-mentioned first aspect or the possible design of the first aspect.
[0025] In the seventh aspect, an embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program runs on a computer or a processor, it enables the computer or the processor to execute the method described in the above-mentioned first aspect or the possible design of the first aspect.
[0026] In an eighth aspect, an embodiment of the present application also provides a communication system, comprising a first device and a second device for executing the method described in the first aspect or a possible design of the first aspect; wherein, the first device is connected to the second device via N pairs of twisted pair cables.
[0027] In the ninth aspect, an embodiment of the present application also provides a chip system, which includes: a processor and a memory, the processor is coupled to the memory, and the memory is used to store programs or instructions. When the program or instructions are executed by the processor, the method described in the first aspect or a possible design of the first aspect is implemented.
[0028] For the beneficial effects of the second to ninth aspects, please refer to the relevant description in the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is an example diagram of the OSI model;
[0030] FIG2 is another example diagram of the OSI model;
[0031] FIG3 is a schematic structural diagram of a communication system;
[0032] FIG4A is a schematic diagram of the structure of a communication system provided in an embodiment of the present application;
[0033] FIG4B is a flow chart of a communication method provided in an embodiment of the present application;
[0034] FIG5 is a schematic diagram of a fault detection diagram of a twisted pair provided in an embodiment of the present application;
[0035] FIG6 is a flow chart of another communication method provided in an embodiment of the present application;
[0036] FIG7 is a flow chart of another communication method provided in an embodiment of the present application;
[0037] FIG8 is a flow chart of another communication method provided in an embodiment of the present application;
[0038] FIG9A is a schematic diagram showing a physical layer of a first device using a variable speed communication mode according to an embodiment of the present application;
[0039] FIG9B is a second schematic diagram of the physical layer of the first device using a variable speed communication mode in an embodiment of the present application;
[0040] FIG9C is a third schematic diagram of the physical layer of the first device using a variable speed communication mode in an embodiment of the present application;
[0041] FIG10A is a fourth schematic diagram of a physical layer of a first device using a variable speed communication mode according to an embodiment of the present application;
[0042] FIG10B is a fifth schematic diagram of a physical layer of a first device using a variable speed communication mode according to an embodiment of the present application;
[0043] FIG10C is a sixth schematic diagram of the physical layer of the first device using a variable speed communication mode in an embodiment of the present application;
[0044] FIG11A is a seventh schematic diagram of a physical layer of a first device using a variable speed communication mode according to an embodiment of the present application;
[0045] FIG11B is an eighth schematic diagram of a physical layer of a first device using a variable speed communication mode according to an embodiment of the present application;
[0046] FIG11C is a ninth schematic diagram of a physical layer of a first device using a variable speed communication mode according to an embodiment of the present application;
[0047] FIG12A is a schematic diagram of a communication interface used between a physical layer of a first device and a data link layer of the first device according to an embodiment of the present application;
[0048] 12B is a second schematic diagram of a communication interface used between the physical layer of the first device and the data link layer of the first device in an embodiment of the present application;
[0049] FIG13 is a schematic diagram of a communication device provided in an embodiment of the present application;
[0050] FIG14 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0052] Below, some terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0053] 1) Twisted pair (TP) is the most commonly used transmission medium in a structured wiring project, comprising two copper wires with an insulating protective layer; the two insulated copper wires are twisted together at a certain density, and the radio waves radiated by each wire during transmission will be offset by the radio waves emitted by the other wire, effectively reducing the degree of signal interference. Twisted pair is usually used as the transmission medium of Ethernet, and in Ethernet, twisted pair is divided into twisted pair A, twisted pair B, twisted pair C, and twisted pair D according to the specifications and uses of the twisted pair. In an embodiment of the present application, twisted pair A and twisted pair B can be used to negotiate the communication mode supported by the devices at both ends of the connection between twisted pair A and twisted pair B. And, twisted pair C and twisted pair D can also be used to negotiate the communication mode supported by the devices at both ends of the connection between twisted pair C and twisted pair D.
[0054] 2) Ethernet is a local area network technology used to transmit data between different communication devices. Ethernet is a common wired network technology, widely used in homes, offices, and data centers, typically using twisted-pair cables or fiber optic cables. Ethernet supports a variety of communication protocols, making it a popular technology for data transmission between the Internet and local area networks. Ethernet also supports full-duplex communication, allowing simultaneous transmission and reception, improving data transmission efficiency and bandwidth utilization.
[0055] The IEEE has developed standards for Ethernet technology. As shown in Table 1, the IEEE 802.3 standard defines 10BASE-T as having a communication rate of 10 Mbps, also known as 10M mode; the IEEE 802.3u standard defines 100BASE-T as having a communication rate of 100 Mbps, also known as 100M mode; the IEEE 802.3ab standard defines 1GBASE-T as having a communication rate of 1 Gbps, also known as GE mode; the IEEE 802.3an standard defines 10GBASE-T as having a communication rate of 10 Gbps, also known as G10E mode; the IEEE 802.3bz standard defines 5GBASE-T as having a communication rate of 5 Gbps, also known as 5GE mode; and the IEEE 802.3bz standard defines 2.5GBASE-T as having a communication rate of 2.5 Gbps, also known as 2.5GE mode. Furthermore, currently 10BASE-T, 100BASE-T, 1GBASE-T, 2.5GBASE-T, 5GBASE-T, or 10GBASE-T all use four twisted-pair cables as a transmission medium.
[0056] Table 1
[0057] 3) The Open Systems Interconnection (OSI) reference model is a framework for understanding and describing computer network architecture. As shown in Figure 1 or Figure 2, the OSI reference model divides the process of computer network communication into seven different layers, each responsible for specific functions and tasks. From bottom to top, these layers are: physical layer (PHY), data link layer, network layer, transport layer, session layer, presentation layer, or application layer. The following is a detailed explanation of each layer:
[0058] Physical layer:
[0059] The physical layer, the lowest layer of the OSI model, is responsible for transmitting raw bit streams between network devices. It handles the transmission of electrical signals over physical media, such as wires and optical fibers, and voltage. Functions of the physical layer include data encoding, transmission rate, timing control, and establishing and maintaining physical connections. Furthermore, as shown in Figures 1 and 2, the physical layer may include the physical medium attachment (PMA) and the physical coding sublayer (PCS). The PMA, a sublayer within the physical layer, is responsible for converting digital signals from the data link layer into analog signals suitable for transmission over specific transmission media (such as twisted pair cables or optical fibers). The PMA also handles functions such as port rate matching and signal conditioning. The PCS is responsible for signal encoding and decoding between the physical layer and the data link layer. It converts analog signals from the PMA layer into a frame format and encodes them to improve transmission reliability. The PCS layer also performs operations such as frame synchronization and error detection and correction.
[0060] Data Link Layer:
[0061] The data link layer, located above the physical layer, provides point-to-point data transmission. The data link layer ensures data integrity and reliability by dividing it into frames and reliably transmitting it over the physical medium. The data link layer is also responsible for error detection and correction, flow control, and access control to ensure the efficient sharing of the same physical medium by multiple devices. The data link layer consists of the logical link control (LLC) sublayer and the media access control (MAC) sublayer. The LLC sublayer provides an interface with the network layer, handling tasks such as encapsulation and decapsulation, flow control, and error handling between different network layer protocols. The MAC sublayer controls access to the shared medium and determines the sending and receiving of data frames, responsible for physical addressing and error detection. These two sublayers work together to implement the various functions of the data link layer, ensuring reliable data transmission and proper media access. Optionally, the data link layer may also include a MAC controller, which can interact with the physical layer and is responsible for sending data frames provided by the data link layer (LLC) to the physical medium and receiving data frames received from the physical medium. In addition, the MAC controller can decide when to send data frames, how to detect conflicts, and how to resolve conflicts based on the rules of the media access control protocol used (such as CSMA / CD or CSMA / CA). The MAC controller is responsible for managing the physical address (MAC address) of the device, which is used to uniquely identify each device on the shared medium. It adds the destination address and source address to each data frame to ensure accurate data delivery and identification of the source device. The MAC controller is also responsible for executing the lowest-level error detection and correction mechanisms, such as the cyclic redundancy check (CRC) used in Ethernet. It can detect bit errors that may occur in the frame during transmission and request retransmission when necessary.
[0062] The physical layer and data link layer communicate over the media independent interface (MII) (also known as the medium-independent interface). However, different Ethernet protocols use different interfaces for communication between the physical layer and the data link layer. As shown in Figure 1, 1000BASE-T technology in the 802.3ab standard uses the gigabit media independent interface (GMII). As shown in Figure 2, 5GBASE-T technology defined in the IEEE 802.3bz standard uses the XGMII, and 2.5GBASE-T technology defined in the IEEE 802.3bz standard uses the XGMII.
[0063] Network layer:
[0064] The network layer is responsible for logical addressing and routing. The presentation layer handles the transmission of data packets across the network, selecting the optimal path to deliver data from the source node to the destination node. The network layer uses IP addresses for logical addressing and routing protocols (such as the IP routing protocol) to determine the forwarding path for data packets. It also handles packet fragmentation and reassembly, congestion control, and maintaining connectivity between different networks.
[0065] Transport layer:
[0066] The transport layer, located above the network layer, provides end-to-end data transmission services. It ensures data reliability, integrity, and sequential transmission. The most commonly used protocol in the transport layer is the Transmission Control Protocol (TCP), which provides connection-oriented, reliable data transmission. The User Datagram Protocol (UDP), also part of the transport layer, provides connectionless transmission services suitable for applications with high real-time requirements.
[0067] Session layer:
[0068] The session layer is responsible for establishing, managing, and terminating sessions. A session is a communication session between two applications in a communication system. The session layer provides mechanisms for establishing and synchronizing communication sessions between different nodes. It also supports checkpointing and recovery capabilities for data exchange, ensuring that the previous state can be restored after a failure or interruption in communication.
[0069] Presentation layer:
[0070] The presentation layer handles the format and representation of data. The presentation layer is responsible for converting data into a format suitable for transmission to ensure compatibility and interpretability between different systems. The functions of the presentation layer include data compression, data encryption, data format conversion (and data description.
[0071] Application layer:
[0072] The application layer, the highest layer in the OSI model, provides user-oriented services and applications. It includes various network applications such as email, file transfer, remote login (Telnet), web browsers (HTTP), and the Domain Name System (DNS). The application layer interacts with users and transmits user requests to the underlying protocol stack for processing and transmission.
[0073] The following describes technical solutions related to the embodiments of the present application.
[0074] Figure 3 shows a communication system provided by an embodiment of the present application, which includes device 1 and device 2. Device 1 and device 2 communicate using any one of 10GBAES-T, 2.5GBASE-T, 5GBASE-T, and 1GBASE-T communication modes. Therefore, device 1 and device 2 are connected via twisted pair A, twisted pair B, twisted pair C, and twisted pair D.
[0075] However, when one or more twisted pairs among twisted pair A, twisted pair B, twisted pair C, and twisted pair D fail, device 1 and device 2 cannot continue to communicate using any of 10GB AES-T, 2.5GBASE-T, 5GBASE-T, or 1GBASE-T, and can only communicate using 100BASE-T or 10BASE-T. This will cause the communication rate between device 1 and device 2 to drop to 100Mbps or 10Mbps, and the rate of data transmission services between device 1 and device 2 will be greatly reduced, resulting in a significant decline in communication performance, and thus a poor user experience.
[0076] Based on this, an embodiment of the present application provides a communication method for improving the communication performance of Ethernet. In this method, a first device is connected to a second device via two pairs of twisted pairs or four pairs of twisted pairs. When the two pairs of twisted pairs are not faulty, the first device and the second device can inform each other that they support the variable speed communication mode, and then the two parties can negotiate to use the variable speed communication mode. In addition, the communication rate corresponding to the variable speed communication mode is lower than the first communication rate corresponding to the communication mode using four pairs of twisted pairs, but is greater than the first communication rate (for example, 1 Gbps), so that the communication performance of the first device will not be significantly reduced when communicating with the second device using the variable speed communication mode.
[0077] The technical solutions of the embodiments of the present application are described below with reference to the specific drawings.
[0078] FIG4A shows a communication system provided by an embodiment of the present application, which includes a first device and a second device, which are connected via two twisted-pair cables or four twisted-pair cables. The first device or the second device can be any electronic device with Ethernet communication capabilities, such as a server, router, switch, network storage device, network camera, and video surveillance equipment.
[0079] Based on the communication system of FIG4A , the present application provides a communication method. FIG4B is a flow chart of the communication method, which includes:
[0080] S401: When two twisted-pair cables are not faulty, a first device sends first information to a second device, where the first information indicates that the first device supports a variable-speed communication mode.
[0081] S402: The first device receives second information from the second device, where the second information indicates that the second device supports the variable-speed communication mode. In response, the second device sends the second information.
[0082] In S401-S402, when the two twisted-pair cables are not faulty, the first device and the second device can notify each other that they support the variable-speed communication mode, thereby enabling both parties to subsequently communicate data using the variable-speed communication mode. In this way, the first device and the second device implement a capability negotiation process using the two twisted-pair cables. The two twisted-pair cables can be, for example, twisted-pair A and twisted-pair B, or twisted-pair C and twisted-pair D.
[0083] In an embodiment of the present application, the communication rate corresponding to the variable speed communication mode is less than the first communication rate corresponding to the first communication mode, and is greater than or equal to the second communication rate (that is, the communication rate corresponding to the communication mode using 2 pairs of twisted pairs in the prior art, such as 100Mbps, 10Mbps); the first communication mode is a communication mode using 4 pairs of twisted pairs, and these 4 pairs of twisted pairs can be, for example, twisted pair A, twisted pair B, twisted pair C and twisted pair D.
[0084] In a possible implementation, the first communication mode may include but is not limited to any one of the following: 10GBASE-T full-duplex communication, 5GBASE-T full-duplex communication, 2.5GBASE-T full-duplex communication, or 1GBASE-T full-duplex communication. The first communication rate may be, for example, 1 Gbps.
[0085] Before the first device executes S401, if the first device and the second device are connected via four twisted pairs, the first device may perform fault detection (i.e., signal integrity detection) on the four twisted pairs. In one possible implementation, during fault detection, the four twisted pairs may be divided into a first group of twisted pairs and a second group of twisted pairs. The four twisted pairs include twisted pair A, twisted pair B, twisted pair C, and twisted pair D. The first group of twisted pairs may include twisted pair A and twisted pair B, and the second group of twisted pairs may include twisted pair C and twisted pair D. The first device may perform fault detection on the first group of twisted pairs within a first time window. If the first group of twisted pairs is not faulty, the first group of twisted pairs may be determined to be the aforementioned two twisted pairs. The first device may also perform fault detection on the second group of twisted pairs within a second time window. If the second group of twisted pairs is not faulty, the second group of twisted pairs may be determined to be the aforementioned two twisted pairs. The first time window is different from the second time window. The first time window includes one or more time periods, and the second time window includes one or more time periods. However, the time periods included in the first time window do not overlap with the time periods included in the second time window. Thus, the first device or the second device can avoid detection conflicts between the two twisted pairs by performing fault detection on the first and second twisted pairs in different time windows, for example, first detecting twisted pairs A and B, and then detecting twisted pairs C and D.
[0086] For example, as shown in FIG5 , the first device is used as the master device and the second device is used as the slave device. The first time window is time period 1 and time period 3, and the second time window is time period 2 and time period 4. The first device or the second device performs fault detection on the first group of twisted pairs in time period 1 and time period 3, and performs fault detection on the second group of twisted pairs in time period 2 and time period 4. Specifically, the first device can determine whether the first group of twisted pairs or the second group of twisted pairs is faulty by testing whether the first group of twisted pairs or the second group of twisted pairs can receive pulse signals. The following two situations may occur when a twisted pair fails:
[0087] Case 1: The twisted pair is disconnected or open. This means the twisted pair cable is disconnected, and the corresponding communication link is also disconnected. In this case, if the twisted pair can receive a pulse signal, it is considered intact. If it cannot receive a pulse signal, it is considered disconnected or open.
[0088] For example, the first group of twisted pairs or the second group of twisted pairs are disconnected; for another example, one or more twisted pairs in the first group of twisted pairs are disconnected; for another example, one or more twisted pairs in the second group of twisted pairs are disconnected.
[0089] Case 2: The twisted pair cable has poor channel quality. This means the twisted pair cable is not disconnected or open-circuited, but has poor contact or the cable itself has deteriorated (due to aging, etc.), resulting in poor channel quality. Consequently, the twisted pair cable cannot support the communication rate corresponding to its current communication mode. In this case, if the twisted pair cable can only receive pulse signals with low signal strength, the channel quality of the twisted pair cable is considered poor; if the twisted pair cable can receive continuous pulse signals with high signal strength, the channel quality of the twisted pair cable is considered good.
[0090] For example, a first device and a second device are connected via four pairs of twisted pairs, and the first device and the second device communicate using 2.5GE mode. Two of the four pairs of twisted pairs can only receive pulse signals with low signal strength, indicating that the channel quality of the two pairs of twisted pairs is poor, and thus the first device and the second device cannot continue to communicate using 2.5GE mode.
[0091] In an embodiment of the present application, the first device and the second device can inform each other that they support the variable speed communication mode. When both the first device and the second device support the variable speed communication mode, the first device and the second device can use the variable speed communication mode for data communication.
[0092] In a possible implementation, the first device may use N twisted-pair pairs among the four twisted-pair pairs to perform data communication with the second device in a variable-speed communication mode, where N is a positive integer less than 4.
[0093] For example, when N=3, the four pairs of twisted pairs include twisted pair A, twisted pair B, twisted pair C and twisted pair D, then the N pairs of twisted pairs can include any three of twisted pair A, twisted pair B, twisted pair C or twisted pair D. Accordingly, the first device can use any three of twisted pair A, twisted pair B, twisted pair C or twisted pair D to communicate data with the second device in a variable speed communication mode.
[0094] For example, when N=2, the 4 pairs of twisted pairs include twisted pair A, twisted pair B, twisted pair C and twisted pair D, then the N pairs of twisted pairs can include any 2 of twisted pair A, twisted pair B, twisted pair C or twisted pair D. Accordingly, the first device can use any 2 of twisted pair A, twisted pair B, twisted pair C or twisted pair D to communicate data with the second device in a variable speed communication mode.
[0095] For example, when N=1, the 4 pairs of twisted pairs include twisted pair A, twisted pair B, twisted pair C and twisted pair D, then the N pairs of twisted pairs can include any one of twisted pair A, twisted pair B, twisted pair C or twisted pair D. Accordingly, the first device can use any one of twisted pair A, twisted pair B, twisted pair C or twisted pair D to communicate data with the second device in a variable speed communication mode.
[0096] In this way, the number of twisted pair pairs required for the first device to communicate data with the second device in variable speed communication mode is less than 4, so that the variable speed communication mode can be applied to various situations of twisted pair failure, thereby improving the reliability of Ethernet communication in various scenarios.
[0097] The first device determines the N pairs of twisted pairs that are not faulty among the four pairs of twisted pairs, which may include but is not limited to the following implementations:
[0098] In embodiment 1, the first information is further used to indicate that the first device supports the first communication mode, and the second information is further used to indicate that the second device supports the first communication mode. Consequently, the first device can use four twisted-pair pairs to train the first communication mode. If training the first communication mode successfully occurs on N twisted-pair pairs of the four twisted-pair pairs, but training the first communication mode fails on twisted-pair pairs other than the N twisted-pair pairs of the four twisted-pair pairs, the N twisted-pair pairs are used to perform data communication with the second device in a variable-speed communication mode. In this manner, by using four twisted-pair pairs to train the first communication mode, the N twisted-pair pairs that are not faulty can be determined based on the training results of the first communication mode.
[0099] In embodiment 2, the first device can perform fault detection (i.e., signal integrity testing) on the four twisted-pair pairs. If N twisted-pair pairs are not faulty and a twisted-pair other than the N twisted-pair pairs is faulty, the first device can use the N twisted-pair pairs to communicate data with the second device in a variable-speed communication mode. In this way, by performing fault detection (i.e., signal integrity testing) on the four twisted-pair pairs, the N twisted-pair pairs that are not faulty can be determined.
[0100] As described above, a twisted pair failure includes a disconnection or poor channel quality. Correspondingly, a situation in which N twisted pairs are not faulty includes a disconnection or good channel quality. Therefore, when N twisted pairs are not faulty, the first device uses the N twisted pairs in variable-speed communication mode to communicate data with the second device in the following two situations:
[0101] In case 1, when the N twisted-pair pairs are not disconnected and the other twisted-pair pairs among the four twisted-pair pairs except the N twisted-pair pairs are disconnected, data communication is performed with the second device using the N twisted-pair pairs in a variable-speed communication mode.
[0102] For example, N=3, and the four twisted-pair pairs include twisted pair A, twisted pair B, twisted pair C, and twisted pair D; N twisted-pair pairs include twisted pair A, twisted pair B, and twisted pair D, and twisted pair A, twisted pair B, and twisted pair D are not disconnected, but twisted pair C is disconnected, then the first device uses twisted pair A, twisted pair B, and twisted pair D to communicate data with the second device in a variable-speed communication mode; or, N twisted-pair pairs include twisted pair A, twisted pair B, and twisted pair C, and twisted pair A, twisted pair B, and twisted pair C are not disconnected, but twisted pair D is disconnected, then the first device uses twisted pair A, twisted pair B, and twisted pair C to communicate data with the second device in a variable-speed communication mode. communication mode to communicate data with the second device; or, N pairs of twisted pairs include twisted pair A, twisted pair C and twisted pair D, twisted pair A, twisted pair C and twisted pair D are not disconnected, but twisted pair B is disconnected, then the first device uses twisted pair A, twisted pair C and twisted pair D to communicate data with the second device in a variable speed communication mode; or, N pairs of twisted pairs include twisted pair B, twisted pair C and twisted pair D, twisted pair B, twisted pair C and twisted pair D are not disconnected, but twisted pair A is disconnected, then the first device uses twisted pair B, twisted pair C and twisted pair D to communicate data with the second device in a variable speed communication mode.
[0103] For another example, N=2, and the four twisted-pair pairs include twisted pair A, twisted pair B, twisted pair C, and twisted pair D; N twisted-pair pairs include twisted pair A and twisted pair B, twisted pair A and twisted pair B are not disconnected, and twisted pair C and twisted pair D are disconnected, then the first device uses twisted pair A and twisted pair B to communicate data with the second device in a variable-speed communication mode; or, N twisted-pair pairs include twisted pair C and twisted pair D, twisted pair C and twisted pair D are not disconnected, but twisted pair A and twisted pair B are disconnected, then the first device uses twisted pair C and twisted pair D to communicate data with the second device in a variable-speed communication mode; or, N twisted-pair pairs include twisted pair A and twisted pair C, twisted pair A and twisted pair C are not disconnected, but twisted pair B and twisted pair D are disconnected, then the first device uses twisted pair A and twisted pair C to communicate data with the second device in a variable-speed communication mode. The first device communicates data with the second device using the variable speed communication mode; or, N pairs of twisted pairs include twisted pair B and twisted pair D, twisted pair B and twisted pair D are not disconnected, but twisted pair A and twisted pair C are disconnected, then the first device uses twisted pair B and twisted pair D to communicate data with the second device using the variable speed communication mode; or, N pairs of twisted pairs include twisted pair A and twisted pair D, twisted pair A and twisted pair D are not disconnected, but twisted pair B and twisted pair C are disconnected, then the first device uses twisted pair A and twisted pair D to communicate data with the second device using the variable speed communication mode; or, N pairs of twisted pairs include twisted pair B and twisted pair C, twisted pair B and twisted pair C are not disconnected, but twisted pair A and twisted pair D are disconnected, then the first device uses twisted pair B and twisted pair C to communicate data with the second device using the variable speed communication mode.
[0104] For another example, N=1, and the four twisted-pair cables include twisted-pair A, twisted-pair B, twisted-pair C, and twisted-pair D; if the N twisted-pair cables include twisted-pair A, which is not disconnected, and twisted-pair B, twisted-pair C, and twisted-pair D are disconnected, then the first device uses twisted-pair A to communicate data with the second device in a variable-speed communication mode; or if the N twisted-pair cables include twisted-pair B, which is not disconnected, and twisted-pair A, twisted-pair C, and twisted-pair D are disconnected, then the first device uses twisted-pair B to communicate data with the second device in a variable-speed communication mode. Communication mode for data communication with the second device; or, N pairs of twisted pairs include twisted pair C, twisted pair C is not disconnected, twisted pair A, twisted pair B, and twisted pair D are disconnected, then the first device uses twisted pair C to communicate data with the second device in variable speed communication mode; or, N pairs of twisted pairs include twisted pair D, twisted pair D is not disconnected, twisted pair A, twisted pair B, and twisted pair C are disconnected, then the first device uses twisted pair D to communicate data with the second device in variable speed communication mode;
[0105] In case 2, when the four twisted-pair cables are not disconnected and the N twisted-pair cable has better channel quality among the four twisted-pair cables, the N twisted-pair cable is used to perform data communication with the second device in a variable speed communication mode.
[0106] For example, N=1, 4 twisted-pair pairs include twisted-pair A, twisted-pair B, twisted-pair C, and twisted-pair D; N twisted-pair pairs include twisted-pair D, the channel quality of twisted-pair A, twisted-pair B, and twisted-pair C is poor, and the channel quality of twisted-pair D is good, then the first device uses twisted-pair D to communicate data with the second device in a variable-speed communication mode; or N twisted-pair pairs include twisted-pair C, the channel quality of twisted-pair A, twisted-pair B, and twisted-pair D is poor, and the channel quality of twisted-pair C is good, then the first device uses twisted-pair C to communicate data with the second device in a variable-speed communication mode. The first device performs data communication with the second device in the variable speed communication mode in the N-pair twisted pair communication mode; or, the N-pair twisted pair communication modes include twisted pair A, twisted pair D, twisted pair B, and twisted pair C, and the channel quality of twisted pair A is poor, and the channel quality of twisted pair A is good, then the first device uses twisted pair B to communicate data with the second device in the variable speed communication mode.
[0107] For another example, N=2, and the four twisted-pair pairs include twisted pair A, twisted pair B, twisted pair C, and twisted pair D; N twisted-pair pairs include twisted pair A and twisted pair B, the channel quality of twisted pair A and twisted pair B is better, and the channel quality of twisted pair C and twisted pair D is worse, then the first device uses twisted pair A and twisted pair B to communicate data with the second device in a variable-speed communication mode; or, N twisted-pair pairs include twisted pair C and twisted pair D, the channel quality of twisted pair C and twisted pair D is better, but the channel quality of twisted pair A and twisted pair B is worse, then the first device uses twisted pair C and twisted pair D to communicate data with the second device in a variable-speed communication mode; or, N twisted-pair pairs include twisted pair A and twisted pair C, the channel quality of twisted pair A and twisted pair C is better, but the channel quality of twisted pair B and twisted pair D is worse, then the first device uses twisted pair A and twisted pair C to communicate data with the second device in a variable-speed communication mode. The first device communicates data with the second device in a variable speed communication mode using twisted pair B and twisted pair D; or, the N pairs of twisted pairs include twisted pair B and twisted pair D, and the channel quality of twisted pair B and twisted pair D is better, but the channel quality of twisted pair A and twisted pair C is worse, then the first device uses twisted pair B and twisted pair D to communicate data with the second device in a variable speed communication mode; or, the N pairs of twisted pairs include twisted pair A and twisted pair D, and the channel quality of twisted pair A and twisted pair D is better, but the channel quality of twisted pair B and twisted pair D is worse, then the first device uses twisted pair A and twisted pair D to communicate data with the second device in a variable speed communication mode; or, the N pairs of twisted pairs include twisted pair B and twisted pair C, and the channel quality of twisted pair B and twisted pair C is better, but the channel quality of twisted pair A and twisted pair D is worse, then the first device uses twisted pair B and twisted pair C to communicate data with the second device in a variable speed communication mode.
[0108] For another example, N=3, and the four twisted-pair pairs include twisted pair A, twisted pair B, twisted pair C, and twisted pair D; N twisted-pair pairs include twisted pair A, twisted pair B, and twisted pair D, and the channel quality of twisted pair A, twisted pair B, and twisted pair D is good, but the channel quality of twisted pair C is poor, then the first device uses twisted pair A, twisted pair B, and twisted pair D to communicate data with the second device in a variable speed communication mode; or, N twisted-pair pairs include twisted pair A, twisted pair B, and twisted pair C, and the channel quality of twisted pair A, twisted pair B, and twisted pair C is good, but the channel quality of twisted pair D is poor, then the first device uses twisted pair A, twisted pair B, and twisted pair C to communicate data with the second device in a variable speed communication mode. communication mode to communicate data with the second device; or, N pairs of twisted pairs include twisted pair A, twisted pair C and twisted pair D, and the channel quality of twisted pair A, twisted pair C and twisted pair D is good, but the channel quality of twisted pair B is poor, then the first device uses twisted pair A, twisted pair C and twisted pair D to communicate data with the second device in a variable speed communication mode; or, N pairs of twisted pairs include twisted pair B, twisted pair C and twisted pair D, and the channel quality of twisted pair B, twisted pair C and twisted pair D is good, but the channel quality of twisted pair A is poor, then the first device uses twisted pair B, twisted pair C and twisted pair D to communicate data with the second device in a variable speed communication mode.
[0109] For ease of understanding, the technical solutions provided by the embodiments of the present application are described in more detail below in conjunction with Examples 1 to 3. In Examples 1 to 3, N is 2, which is an example of a first device using two twisted pairs to communicate data with a second device in a variable speed communication mode.
[0110] Example 1:
[0111] As shown in FIG6 , another communication method provided in an embodiment of the present application includes the following process:
[0112] S601: A first device performs fault detection on four twisted-pair cables.
[0113] As described above, a twisted pair cable failure includes a twisted pair cable disconnection or poor channel quality of the twisted pair cable.
[0114] In one scenario, the four pairs of wires include twisted pair A, twisted pair B, twisted pair C, and twisted pair D. The first device can determine whether twisted pair A, twisted pair B, twisted pair C, and twisted pair D are disconnected by testing whether twisted pair A, twisted pair B, twisted pair C, and twisted pair D can receive pulse signals. If twisted pair A, twisted pair B, twisted pair C, and twisted pair D can receive pulse signals, it is considered that twisted pair A, twisted pair B, twisted pair C, and twisted pair D are not disconnected. If one or more twisted pairs among twisted pair A, twisted pair B, twisted pair C, and twisted pair D cannot receive pulse signals, it is considered that the one or more twisted pairs are disconnected.
[0115] In another scenario, the four pairs of wires include twisted pair A, twisted pair B, twisted pair C, and twisted pair D, and twisted pair A, twisted pair B, twisted pair C, and twisted pair D can all receive pulse signals. The first device can determine the channel quality of twisted pair A, twisted pair B, twisted pair C, and twisted pair D based on the signal quality of the pulse signals received by twisted pair A, twisted pair B, twisted pair C, and twisted pair D. If the signal quality of the pulse signals received by twisted pair A, twisted pair B, twisted pair C, and twisted pair D is good, the channel quality of twisted pair A, twisted pair B, twisted pair C, and twisted pair D is considered good; if one or more twisted pairs among twisted pair A, twisted pair B, twisted pair C, and twisted pair D cannot receive pulse signals, the channel quality of the one or more twisted pairs is considered poor.
[0116] S602: The first device determines whether twisted pair A and twisted pair B are faulty.
[0117] When twisted pair A and twisted pair B are not faulty, step S603a is executed, and the first device and the second device can use twisted pair A and twisted pair B to inform each other of the communication modes they support; when twisted pair A and twisted pair B are faulty, step S603b is executed.
[0118] S603a: The first device and the second device inform each other of the communication modes they support, where the communication modes include the variable speed communication mode and / or the first communication mode.
[0119] S603b: The first device determines whether twisted pair C and twisted pair D are faulty.
[0120] If twisted pair C and twisted pair D are not faulty, execute step S603a, and the first device and the second device can use twisted pair C and twisted pair D to inform each other of the communication modes they support; if twisted pair C and twisted pair D are faulty, execute step S601, and the first device re-detects faults on the four twisted pair cables.
[0121] S604: The first device determines whether both the first device and the second device support the first communication mode.
[0122] When both the first device and the second device support the first communication mode, execute S605; when neither the first device nor the second device supports the first communication mode, or when the first device or the second device does not support the first communication mode, the first device determines whether both the first device and the second device support the variable speed communication mode, and when both the first device and the second device support the variable speed communication mode, train the variable speed communication mode.
[0123] S605: The first device trains the first communication mode.
[0124] By training the first device in the first communication mode, the first device can determine an effective communication rate to maximize network performance and achieve reliable data transmission. For example, if the first communication mode is 1GBASE-T full-duplex communication, after training for 1GBASE-T full-duplex communication, the first device's communication rate is 1 Gbps. For another example, if the first communication mode is 2.5GBASE-T full-duplex communication, after training for 2.5GBASE-T full-duplex communication, the first device's communication rate is 2.5 Gbps. For another example, if the first communication mode is 5GBASE-T full-duplex communication, after training for 5GBASE-T full-duplex communication, the first device's communication rate is 5 Gbps. For another example, if the first communication mode is 10GBASE-T full-duplex communication, after training for 10GBASE-T full-duplex communication, the first device's communication rate is 10 Gbps.
[0125] S606: The first device determines whether the first communication mode is successfully trained.
[0126] If training in the first communication mode succeeds, S607a is executed. If training in the first communication mode fails, the number of training failures in the first communication mode is counted, and if the number of training failures in the first communication mode reaches G, S607b is executed. Here, G is an integer greater than or equal to 1. For example, if G = 1, then if the first device fails training in the first communication mode, then training in the variable-speed communication mode may be performed. For another example, if G = 2, then if the first device fails training in the first communication mode twice, then training in the variable-speed communication mode may be performed.
[0127] S607a: The first device and the second device perform data communication using the first communication mode.
[0128] S607b: When the number of training failures in the first communication mode is G times, perform training in the variable-speed communication mode.
[0129] S608: The first device determines whether the variable speed communication mode is successfully trained.
[0130] Specifically, when the variable-speed communication mode training is successful, S609 is executed; when the variable-speed communication mode training fails, the first device may communicate with the second device in a second communication mode, where the communication rate corresponding to the second communication mode is less than the communication rate corresponding to the variable-speed communication mode. For example, if the communication rate corresponding to the first communication mode is 2.5 Gbps, and two pairs of twisted pairs are sampled using the variable-speed communication mode, the communication rate corresponding to the variable-speed communication mode may be 1.25 Gbps. In this case, the second communication mode may be 10MBASE-T full-duplex communication or 100MBASE-T full-duplex communication using two twisted pairs. Alternatively, if the variable-speed communication mode training fails, the data communication process between the first device and the second device is terminated.
[0131] S609: The first device and the second device perform data communication in a variable speed communication mode.
[0132] Among them, when twisted pair A and twisted pair B are not faulty, the first device and the second device can use twisted pair A and twisted pair B to communicate data in a variable speed communication mode; or, when twisted pair C and twisted pair D are not faulty, the first device and the second device can use twisted pair C and twisted pair D to communicate data in a variable speed communication mode.
[0133] Example 2:
[0134] As shown in FIG7 , another communication method provided in an embodiment of the present application includes the following process:
[0135] S701: A first device performs fault detection on four twisted-pair cables.
[0136] For a detailed description of S701, please refer to the relevant description of 601 above, which will not be repeated here.
[0137] S702: The first device determines whether twisted pair A and twisted pair B are faulty.
[0138] When twisted pair A and twisted pair B are not faulty, step S703a is executed, and the first device and the second device can use twisted pair A and twisted pair B to inform each other of the communication modes they support; when twisted pair A and twisted pair B are faulty, step S703b is executed.
[0139] S703a: The first device and the second device inform each other of the communication modes they support, where the communication modes include the variable speed communication mode and / or the first communication mode.
[0140] S703b: The first device determines whether twisted pair C and twisted pair D are faulty.
[0141] If twisted pair C and twisted pair D are not faulty, execute step S703a, and the first device and the second device can use twisted pair C and twisted pair D to inform each other of the communication modes they support; if twisted pair C and twisted pair D are faulty, execute step S701 and re-detect faults on the four twisted pair cables.
[0142] S704: The first device determines whether both the first device and the second device support the variable speed communication mode.
[0143] For a detailed description of S704, please refer to the relevant description of 604 above, which will not be repeated here.
[0144] S705: The first device performs fault detection on twisted pair C and twisted pair D, or the first device performs fault detection on twisted pair A and twisted pair B.
[0145] In one case, when it is determined that twisted pair A and twisted pair B are not faulty, twisted pair C and twisted pair D are detected for faults; if twisted pair C and twisted pair D are not faulty, execute S706a-S707a; or, if twisted pair C and twisted pair D are faulty, execute S706b-S707b; or, if twisted pair C and twisted pair D are not faulty, but the signal quality of twisted pair C and twisted pair D is poorer than the signal quality of twisted pair A and twisted pair B, then the first device uses twisted pair A and twisted pair B to train the variable speed communication mode, and when the training is successful, performs data communication with the second device in the variable speed communication mode.
[0146] In another case, when it is determined that twisted pair C and twisted pair D are not faulty, twisted pair A and twisted pair B are detected for faults; if twisted pair A and twisted pair B are not faulty, execute S706a-S707a; or, if twisted pair A and twisted pair B are faulty, execute S706b-S707b; or, if twisted pair A and twisted pair B are not faulty, but the signal quality of twisted pair A and twisted pair B is poorer than the signal quality of twisted pair C and twisted pair D, then the first device uses twisted pair C and twisted pair D to train the variable speed communication mode, and when the training is successful, performs data communication with the second device in the variable speed communication mode.
[0147] S706a: When twisted pair A, twisted pair B, twisted pair C, and twisted pair D are not faulty, perform training on the first communication mode.
[0148] Specifically, the first device may use twisted pair A, twisted pair B, twisted pair C, and twisted pair D to train the first communication mode.
[0149] S707a: When the training in the first communication mode succeeds, the first device and the second device perform data communication in the first communication mode.
[0150] Specifically, the first device may use twisted pair A, twisted pair B, twisted pair C, and twisted pair D to perform data communication with the second device in a first communication mode.
[0151] S706b: When twisted pair A and twisted pair B are not faulty, or twisted pair C and twisted pair D are not faulty, perform training on the variable speed communication mode.
[0152] In one scenario, the first device may use twisted pair A and twisted pair B to train a variable speed communication mode.
[0153] In another case, the first device may use twisted pair C and twisted pair D to train the variable speed communication mode.
[0154] S707b: When the variable speed communication mode training is successful, the first device and the second device perform data communication in the variable speed communication mode.
[0155] In one case, the first device may use twisted pair A and twisted pair B to perform data communication with the second device in a variable speed communication mode.
[0156] In another case, the first device may use the twisted pair C and the twisted pair D to perform data communication with the second device in a variable speed communication mode.
[0157] Example 3:
[0158] As shown in FIG8 , another communication method provided in an embodiment of the present application includes the following process:
[0159] S801: A first device performs fault detection on four twisted-pair cables.
[0160] For a detailed description of S801, please refer to the relevant description of 601 above, which will not be repeated here.
[0161] S802: The first device determines whether twisted pair A and twisted pair B are faulty.
[0162] When twisted pair A and twisted pair B are not faulty, step S803a is executed, and the first device and the second device can use twisted pair A and twisted pair B to inform each other of the communication modes they support; when twisted pair A and twisted pair B are faulty, step S803b is executed.
[0163] S803a: The first device and the second device inform each other of the communication modes they support, where the communication modes include the variable speed communication mode and / or the first communication mode.
[0164] S803b: The first device determines whether twisted pair C and twisted pair D are faulty.
[0165] If twisted pair C and twisted pair D are not faulty, execute step S803a, and the first device and the second device can use twisted pair C and twisted pair D to inform each other of the communication modes they support; if twisted pair C and twisted pair D are faulty, execute step S801 and re-detect faults on the four twisted pair cables.
[0166] S804: The first device uses twisted pair A, twisted pair B, twisted pair C, and twisted pair D to train the first communication mode. Whether the training is successful.
[0167] When the first communication mode training is successful, execute S805a; when the first communication mode training fails, execute S805b;
[0168] S805a: The first device and the second device perform data communication using the first communication mode.
[0169] Specifically, the first device and the second device use twisted pair A, twisted pair B, twisted pair C, and twisted pair D to perform data communication in a first communication mode.
[0170] S805b: The first device performs training on the variable speed communication mode.
[0171] In one case, when twisted pair A and twisted pair B successfully train the first communication mode but twisted pair C and twisted pair D fail to train the first communication mode, the first device uses twisted pair A and twisted pair B to train the variable speed communication mode.
[0172] In another case, when twisted pair A and twisted pair B fail to train the first communication mode, but twisted pair C and twisted pair D succeed in training the first communication mode, the first device uses twisted pair C and twisted pair D to train the variable speed communication mode.
[0173] S806: When the variable speed communication mode training is successful, the first device and the second device perform data communication in the variable speed communication mode.
[0174] In one case, the first device uses twisted pair A and twisted pair B to train the variable speed communication mode, and the variable speed communication mode is successful. The first device and the second device use twisted pair A and twisted pair B to perform data communication in the variable speed communication mode.
[0175] In another case, the first device uses the C twisted pair and the D twisted pair to train the variable speed communication mode, and the variable speed communication mode is successful. The first device and the second device use the C twisted pair and the D twisted pair to perform data communication in the variable speed communication mode.
[0176] It should be understood that in the above examples 1 to 3, the second device may also execute the same process as that executed by the first device to implement training of the variable speed communication mode and / or the first communication mode.
[0177] In the embodiment of the present application, when the first device and the second device use the variable speed communication mode for data communication, the physical layers of the first device and the second device both operate in the variable speed communication mode. Specifically, the PCS and PMA in the physical layer both operate in the variable speed communication mode.
[0178] Example 1: As shown in Figures 9A and 9B, the first communication mode uses 2.5GBASE-T full-duplex communication as an example. The variable-speed communication mode can be 2.5GBASE-T variable-speed full-duplex communication. 2.5GBASE-T full-duplex communication uses four twisted-pair cables. Correspondingly, 2.5GBASE-T variable-speed full-duplex communication can use three twisted-pair cables, two twisted-pair cables, or one twisted-pair cable.
[0179] In Case 1, as shown in Figure 9A , if the first device and the second device communicate using twisted pair A, twisted pair B, and twisted pair C (i.e., using three twisted pairs) in 2.5GBASE-T variable-speed full-duplex communication mode, the corresponding communication rate of 2.5GBASE-T variable-speed full-duplex communication mode is 1875 Mbps. Accordingly, the PMA in the physical layer of the first device and the PMA in the physical layer of the second device communicate at a communication rate of 1875 Mbps using twisted pair A, twisted pair B, and twisted pair C.
[0180] In case 2, as shown in Figure 9A , if the first device and the second device communicate using twisted pair A and twisted pair B (i.e., two twisted pairs) in 2.5GBASE-T variable-speed full-duplex communication mode, the corresponding communication rate for 2.5GBASE-T variable-speed full-duplex communication mode is 1.25 Gbps. Accordingly, the PMA in the physical layer of the first device and the PMA in the physical layer of the second device communicate using twisted pair A and twisted pair B at a communication rate of 1.25 Gbps.
[0181] In case 3, as shown in FIG9C , if the first device and the second device communicate data using twisted pair A (i.e., a single twisted pair) in 2.5GBASE-T variable-speed full-duplex communication mode, the corresponding communication rate of 2.5GBASE-T variable-speed full-duplex communication mode is 625 Mbps. Accordingly, the PMA in the physical layer of the first device and the PMA in the physical layer of the second device communicate data at a communication rate of 625 Mbps using twisted pair A, and the first device and the second device also communicate at a communication rate of 625 Mbps using twisted pair A.
[0182] Example 2: As shown in Figures 10A and 10B, the first communication mode uses 5GBASE-T full-duplex communication as an example. The variable-speed communication mode can be 5GBASE-T variable-speed full-duplex communication. 5GBASE-T full-duplex communication uses four twisted-pair cables. Accordingly, 5GBASE-T variable-speed full-duplex communication can use three twisted-pair cables, two twisted-pair cables, or one twisted-pair cable.
[0183] In Case 1, as shown in Figure 10A , if the first device and the second device communicate data using twisted pair A, twisted pair B, and twisted pair C (i.e., using three twisted pairs) in 5GBASE-T variable-speed full-duplex communication mode, the corresponding communication rate of 5GBASE-T variable-speed full-duplex communication mode is 3.75 Gbps. Accordingly, the PMA in the physical layer of the first device and the PMA in the physical layer of the second device communicate at a communication rate of 3.75 Gbps using twisted pair A, twisted pair B, and twisted pair C.
[0184] In case 2, as shown in Figure 10A , if the first device and the second device communicate using twisted pair A and twisted pair B (i.e., two twisted pairs) in 5GBASE-T variable-speed full-duplex communication mode, the corresponding communication rate for 5GBASE-T variable-speed full-duplex communication mode is 2.5 Gbps. Accordingly, the PMA in the physical layer of the first device and the PMA in the physical layer of the second device also communicate using twisted pair A and twisted pair B at a communication rate of 2.5 Gbps.
[0185] In case 3, as shown in FIG10C , if the first device and the second device communicate using twisted pair A (i.e., a single twisted pair) in 5GBASE-T variable-speed full-duplex communication mode, the corresponding communication rate for 5GBASE-T variable-speed full-duplex communication mode is 1.25 Gbps. Accordingly, the PMA in the physical layer of the first device and the PMA in the physical layer of the second device communicate at a communication rate of 1.25 Gbps using twisted pair A.
[0186] Example 3: As shown in Figures 11A and 11B, the first communication mode uses 10GBASE-T full-duplex communication as an example. The variable-speed communication mode can be 10GBASE-T variable-speed full-duplex communication. 10GBASE-T full-duplex communication uses four twisted-pair cables. Correspondingly, 10GBASE-T variable-speed full-duplex communication can use three twisted-pair cables, two twisted-pair cables, or one twisted-pair cable.
[0187] In Case 1, as shown in Figure 11A , if the first device and the second device communicate data using twisted pair A, twisted pair B, and twisted pair C (i.e., using three twisted pairs) in 10GBASE-T variable-speed full-duplex communication mode, the corresponding communication rate for 10GBASE-T variable-speed full-duplex communication mode is 7.5 Gbps. Accordingly, the PMA in the physical layer of the first device and the PMA in the physical layer of the second device communicate at a communication rate of 7.5 Gbps using twisted pair A, twisted pair B, and twisted pair C.
[0188] In case 2, as shown in Figure 11A , if the first device and the second device communicate using twisted pair A and twisted pair B (i.e., two twisted pairs) in 10GBASE-T variable-speed full-duplex communication mode, the corresponding communication rate for 10GBASE-T variable-speed full-duplex communication mode is 5 Gbps. Accordingly, the PMA in the physical layer of the first device and the PMA in the physical layer of the second device communicate at a communication rate of 5 Gbps using twisted pair A and twisted pair B.
[0189] In case 3, as shown in Figure 11C , if the first device and the second device communicate using twisted pair A (i.e., a single twisted pair) in 10GBASE-T variable-speed full-duplex communication mode, the corresponding communication rate for 10GBASE-T variable-speed full-duplex communication mode is 2.5 Gbps. Accordingly, the PMA in the physical layer of the first device and the PMA in the physical layer of the second device communicate at a communication rate of 2.5 Gbps using twisted pair A.
[0190] The types and / or quantities of twisted pairs used in the variable speed communication mode in Examples 1 to 3 above are merely examples and are not limitations on the types and / or quantities of twisted pairs used in the variable speed communication mode in the embodiments of the present application. In other possible embodiments, the first device and the second device may use more twisted pairs to perform data communication in the variable speed communication mode.
[0191] In an embodiment of the present application, the chip containing the physical layer of the first device and the chip containing the data link layer of the first device communicate using a medium-independent interface (MII). The communication rate of the MII is less than or equal to the communication rate corresponding to the variable-speed communication mode. Thus, when the physical layer of the first device and the data link layer of the first device are deployed on two different chips, the two chips can communicate via the MII.
[0192] For example, as shown in FIG12A , in a variable-speed communication mode using 2.5GBASE-T, the physical layer of the first device is deployed on an Ethernet physical layer (PHY) chip, and the data link layer of the first device is deployed on a system on chip (SOC). The PHY chip and the SOC can communicate using a GMII interface. The communication rate corresponding to the GMII interface can be, for example, 1 Gbps.
[0193] When the physical layer of the first device is deployed on a PHY chip, the actual communication rate of the PHY chip is determined by the communication rate corresponding to the GMII interface and the communication rate corresponding to the variable-speed communication mode. In one possible scenario, the actual communication rate of the PHY chip is the smaller of the communication rate corresponding to the GMII interface and the communication rate corresponding to the variable-speed communication mode. For example, if the communication rate corresponding to the GMII interface is 1 Gbps and the communication rate corresponding to the variable-speed communication mode is 1.25 Gbps, since 1 Gbps < 1.25 Gbps, the actual communication rate of the PHY chip is 1 Gbps.
[0194] For another example, as shown in FIG12B , in the variable-speed communication mode of 5GBASE-T, when the physical layer of the first device is deployed in a PHY chip and the data link layer of the first device is deployed in a SOC, the PHY chip and the SOC can communicate using an XGMII interface. The communication rate corresponding to the XGMII interface can be, for example, 3 Gbps.
[0195] Based on the same technical concept as the above-mentioned communication method, an embodiment of the present application also provides a communication device. As shown in Figure 13, a communication device 1300 is deployed on a first device, and the first device is connected to a second device via N pairs of twisted pairs. The communication device 1300 includes a communication unit 1301, which is used to send first information to the second device when two pairs of twisted pairs are not faulty. The first information is used to indicate that the first device supports a variable-speed communication mode. The communication rate corresponding to the variable-speed communication mode is less than the first communication rate corresponding to the first communication mode and is greater than or equal to the second communication rate. The first communication mode is a communication mode using four pairs of twisted pairs. The communication unit 1301 is also used to receive second information from the second device. The second information is used to indicate that the second device supports the variable-speed communication mode.
[0196] In a possible implementation, the communication unit 1301 is further configured to perform data communication with the second device in a variable speed communication mode.
[0197] In one possible implementation, the communication unit 1301 is used to perform data communication with the second device in a variable speed communication mode, including: the communication unit 1301 uses N pairs of twisted pairs among the 4 pairs of twisted pairs to perform data communication with the second device in a variable speed communication mode; wherein N is a positive integer less than 4.
[0198] In one possible embodiment, the first information is also used to characterize that the first device supports the first communication mode, and the second information is also used to characterize that the second device supports the first communication mode; the communication device 1300 also includes a processing unit 1302, and the processing unit 1302 is used to use 4 pairs of twisted pairs to train the first communication mode; the communication unit 1301 uses N pairs of twisted pairs among the 4 pairs of twisted pairs to communicate data with the second device in a variable speed communication mode, including: when the training of the first communication mode of the N pairs of twisted pairs is successful, and the training of the first communication mode of the twisted pairs other than the N pairs of twisted pairs among the 4 pairs of twisted pairs fails, the communication unit 1301 uses N pairs of twisted pairs to communicate data with the second device in a variable speed communication mode.
[0199] In one possible embodiment, the communication device 1300 also includes a detection unit 1303, which is used to perform fault detection on the four pairs of twisted pairs; the communication unit 1301 uses N pairs of twisted pairs among the four pairs of twisted pairs to communicate data with the second device in a variable speed communication mode, including: when the N pairs of twisted pairs are not faulty and the twisted pairs other than the N pairs of twisted pairs among the four pairs of twisted pairs are faulty, the communication unit 1301 uses the N pairs of twisted pairs to communicate data with the second device in a variable speed communication mode.
[0200] In a possible implementation manner, the N twisted-pair pairs not failing include the N twisted-pair pairs not being disconnected, or the N twisted-pair pairs being twisted-pair pairs with better channel quality among the four twisted-pair pairs.
[0201] In one possible embodiment, the first information is also used to characterize that the first device supports the first communication mode, and the second information is also used to characterize that the second device supports the first communication mode; the communication device 1300 also includes a processing unit 1302, and the processing unit 1302 is used to use 4 pairs of twisted pairs to train the first communication mode; the communication unit 1301 uses N pairs of twisted pairs among the 4 pairs of twisted pairs to communicate data with the second device in a variable speed communication mode, including: when the number of failures in training the first communication mode of the 4 pairs of twisted pairs reaches G times, the communication unit 1301 uses N pairs of twisted pairs to communicate data with the second device in a variable speed communication mode; where G is a positive integer greater than or equal to 1.
[0202] In one possible embodiment, the four pairs of twisted pairs include a first group of twisted pairs and a second group of twisted pairs, the first group of twisted pairs includes twisted pair A and twisted pair B, and the second group of twisted pairs includes twisted pair C and twisted pair D; the communication device 1300 also includes a detection unit 1303, and the detection unit 1303 is further used to: perform fault detection on the first group of twisted pairs within a first time window, and if the first group of twisted pairs is not faulty, determine the first group of twisted pairs as two pairs of twisted pairs; or, perform fault detection on the second group of twisted pairs within a second time window, and if the second group of twisted pairs is not faulty, determine the second group of twisted pairs as two pairs of twisted pairs; wherein the first time window is different from the second time window.
[0203] In one possible implementation, the chip where the physical layer of the first device is located and the chip where the data link layer is located communicate using a medium-independent interface, and the communication rate of the medium-independent interface is less than or equal to the communication rate corresponding to the variable speed communication mode.
[0204] In a possible implementation, the first communication mode includes any one of the following: 10GBASE-T full-duplex communication, 5GBASE-T full-duplex communication, 2.5GBASE-T full-duplex communication, or 1GBASE-T full-duplex communication.
[0205] It should be noted that the division of modules in the embodiments of the present application is illustrative and is merely a logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0206] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the integrated unit can be stored in a storage medium as a computer software product, including a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the various embodiments of the present application.
[0207] Based on the same technical concept, the embodiment of the present application further provides an electronic device 1400 for use with the method in the above embodiment. The electronic device 1400 can be the above first device or the second device.
[0208] As shown in FIG14 , the electronic device 1400 may include a processor 1401 for executing programs or instructions stored in a memory 1402 . When the programs or instructions stored in the memory 1402 are executed, the processor is configured to execute the method in the above embodiment.
[0209] Optionally, the electronic device 1400 may further include a communication interface 1403. FIG14 uses dashed lines to indicate that the communication interface 1403 is optional for the electronic device 1400.
[0210] Among them, the number of processors 1401, memories 1402 and communication interfaces 1403 does not constitute a limitation on the embodiments of the present application. During specific implementation, they can be arbitrarily configured according to business requirements.
[0211] Optionally, the memory 1402 is located outside the electronic device 1400 .
[0212] Optionally, the electronic device 1400 includes the memory 1402, which is connected to the at least one processor 1401 and stores instructions executable by the at least one processor 1401. FIG14 uses dotted lines to indicate that the memory 1402 is optional for the electronic device 1400.
[0213] The processor 1401 and the memory 1402 may be coupled via an interface circuit or may be integrated together, which is not limited here.
[0214] The specific connection medium between the processor 1401, memory 1402, and communication interface 1403 is not limited in the embodiments of the present application. In Figure 14, the processor 1401, memory 1402, and communication interface 1403 are connected via a bus 1404. The bus is represented by a bold line in Figure 14. The connection between other components is only for schematic illustration and is not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one bold line is used in Figure 14, but this does not mean that there is only one bus or one type of bus.
[0215] It should be understood that the processors mentioned in the embodiments of the present application can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor that is implemented by reading software code stored in a memory.
[0216] Exemplarily, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0217] It should be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0218] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, the memory (storage module) can be integrated into the processor.
[0219] It should be noted that the memory described herein is intended to include, but not be limited to, these and any other suitable types of memory.
[0220] An embodiment of the present application further provides a communication system, including a first device and a second device, where the first device and the second device can implement the communication method of the above method embodiment.
[0221] An embodiment of the present application further provides a computer-readable medium having a computer program stored thereon, which implements the communication method of the above method embodiment when the computer program is executed by a computer.
[0222] An embodiment of the present application further provides a computer program product, including a computer program, which implements the communication method of the above method embodiment when executed by a computer.
[0223] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function according to the embodiments of the present application is generated in whole or in part. The computer can be the above-mentioned communication device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium. The computer-readable storage medium can be the above-mentioned storage medium or the above-mentioned memory.
[0224] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0225] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0226] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.
[0227] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0228] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0229] Through the description of the above embodiments, it will be clear to those skilled in the art that the present application can be implemented in hardware, firmware, or a combination thereof. When implemented using software, the above functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a computer.
[0230] In short, the above is only an embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made within the principles of this application should be included in the scope of protection of this application.
Claims
1. A communication method, characterized in that: Applied to a first device, the first device is connected to a second device via two twisted pair cables or four twisted pair cables; the method comprises: When the two pairs of twisted pairs are not faulty, first information is sent to the second device, wherein the first information is used to indicate that the first device supports a variable-speed communication mode; wherein a communication rate corresponding to the variable-speed communication mode is less than a first communication rate corresponding to the first communication mode, and is greater than or equal to a second communication rate; and the first communication mode is a communication mode using the four pairs of twisted pairs; Second information is received from the second device, where the second information is used to indicate that the second device supports the variable speed communication mode.
2. The method according to claim 1, characterized in that The method further comprises: Data communication is performed with the second device in the variable speed communication mode.
3. The method according to claim 2, characterized in that Performing data communication with the second device in the variable speed communication mode includes: Use N pairs of twisted pairs among the four pairs of twisted pairs to perform data communication with the second device in the variable speed communication mode; wherein N is a positive integer less than 4.
4. The method according to claim 3, characterized in that The first information is further used to indicate that the first device supports the first communication mode, and the second information is further used to indicate that the second device supports the first communication mode; The method further comprises: using the four pairs of twisted pairs to train the first communication mode; Using N pairs of twisted pairs among the four pairs of twisted pairs to perform data communication with the second device in the variable speed communication mode, including: when the training of the N pairs of twisted pairs to the first communication mode is successful, and the training of the twisted pairs among the four pairs of twisted pairs except the N pairs of twisted pairs to the first communication mode fails, using the N pairs of twisted pairs to perform data communication with the second device in the variable speed communication mode.
5. The method according to claim 3, characterized in that The method further comprises: performing fault detection on the four pairs of twisted pairs; Using N pairs of twisted pairs among the four pairs of twisted pairs to communicate data with the second device in the variable speed communication mode, including: when the N pairs of twisted pairs are not faulty and twisted pairs other than the N pairs of twisted pairs among the four pairs of twisted pairs are faulty, using the N pairs of twisted pairs to communicate data with the second device in the variable speed communication mode.
6. The method according to claim 5, characterized in that The N pairs of twisted pairs not failing include the N pairs of twisted pairs not being disconnected, or the N pairs of twisted pairs being twisted pairs with better channel quality among the four pairs of twisted pairs.
7. The method according to claim 3, characterized in that The first information is further used to indicate that the first device supports the first communication mode, and the second information is further used to indicate that the second device supports the first communication mode; The method further comprises: using the four pairs of twisted pairs to train the first communication mode; Using N pairs of twisted pair cables among the four pairs of twisted pair cables to perform data communication with the second device in the variable speed communication mode, including: when the number of training failures in the first communication mode reaches G times, using the N pairs of twisted pair cables to perform data communication with the second device in the variable speed communication mode; wherein G is a positive integer greater than or equal to 1.
8. The method according to any one of claims 1 to 7, characterized in that: The four pairs of twisted pairs include a first group of twisted pairs and a second group of twisted pairs, the first group of twisted pairs includes twisted pair A and twisted pair B, and the second group of twisted pairs includes twisted pair C and twisted pair D; The method further comprises: Performing fault detection on the first group of twisted pairs within a first time window, and if the first group of twisted pairs is not faulty, determining the first group of twisted pairs as the two pairs of twisted pairs; or, Performing fault detection on the second group of twisted pair cables within a second time window, and if the second group of twisted pair cables is not faulty, determining the second group of twisted pair cables as the two pairs of twisted pair cables; The first time window is different from the second time window.
9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: The chip where the physical layer of the first device is located and the chip where the data link layer is located communicate using a medium-independent interface, and the communication rate of the medium-independent interface is less than or equal to the communication rate corresponding to the variable speed communication mode.
10. The method according to any one of claims 1 to 9, characterized in that: The first communication mode includes any one of the following: 10GBASE-T full-duplex communication, 5GBASE-T full-duplex communication, 2.5GBASE-T full-duplex communication, or 1GBASE-T full-duplex communication Industrial communications.
11. A communication device, characterized in that: The communication device is deployed on a first device, and the first device is connected to a second device via two twisted pair cables or four twisted pair cables; the device includes a communication unit; The communication unit is used to send first information to the second device when the two pairs of twisted pairs are not faulty, and the first information is used to indicate that the first device supports a variable speed communication mode; wherein the communication rate corresponding to the variable speed communication mode is less than the first communication rate corresponding to the first communication mode, and is greater than or equal to the second communication rate; and the first communication mode is a communication mode using the four pairs of twisted pairs; The communication unit is further used to receive second information from the second device, where the second information is used to indicate that the second device supports the variable speed communication mode.
12. The device according to claim 11, characterized in that The communication unit is further used for: Data communication is performed with the second device in the variable speed communication mode.
13. The device according to claim 12, characterized in that The communication unit is used to perform data communication with the second device in the variable speed communication mode, including: The communication unit uses N pairs of twisted pairs among the four pairs of twisted pairs to perform data communication with the second device in the variable speed communication mode; wherein N is a positive integer less than 4.
14. The device according to claim 13, characterized in that The first information is further used to indicate that the first device supports the first communication mode, and the second information is further used to indicate that the second device supports the first communication mode; The device further includes a processing unit, the processing unit being configured to train the first communication mode using the four pairs of twisted pairs; The communication unit uses N pairs of twisted pairs among the four pairs of twisted pairs to perform data communication with the second device in the variable speed communication mode, including: when the training of the N pairs of twisted pairs to the first communication mode is successful, and the training of the twisted pairs among the four pairs of twisted pairs except the N pairs of twisted pairs to the first communication mode fails, the communication unit uses the N pairs of twisted pairs to perform data communication with the second device in the variable speed communication mode.
15. The device according to claim 13, characterized in that The device further comprises a detection unit, wherein the detection unit is used to perform fault detection on the four pairs of twisted pairs; The communication unit uses N pairs of twisted pairs among the four pairs of twisted pairs to perform data communication with the second device in the variable speed communication mode, including: when the N pairs of twisted pairs are not faulty and twisted pairs other than the N pairs of twisted pairs among the four pairs of twisted pairs are faulty, the communication unit uses the N pairs of twisted pairs to perform data communication with the second device in the variable speed communication mode.
16. The device according to claim 15, characterized in that The N pairs of twisted pairs not failing include the N pairs of twisted pairs not being disconnected, or the N pairs of twisted pairs being twisted pairs with better channel quality among the four pairs of twisted pairs.
17. The device according to claim 13, characterized in that The first information is further used to indicate that the first device supports the first communication mode, and the second information is further used to indicate that the second device supports the first communication mode; The device further includes a processing unit, the processing unit being configured to train the first communication mode using the four pairs of twisted pairs; The communication unit uses N pairs of twisted pairs among the four pairs of twisted pairs to perform data communication with the second device in the variable speed communication mode, including: when the number of failures of the four pairs of twisted pairs to train the first communication mode reaches G times, the communication unit uses the N pairs of twisted pairs to perform data communication with the second device in the variable speed communication mode; Wherein G is a positive integer greater than or equal to 1.
18. The device according to any one of claims 11 to 17, characterized in that The four pairs of twisted pairs include a first group of twisted pairs and a second group of twisted pairs, the first group of twisted pairs includes twisted pair A and twisted pair B, and the second group of twisted pairs includes twisted pair C and twisted pair D; The device further comprises a detection unit, wherein the detection unit is configured to: Performing fault detection on the first group of twisted pair cables within a first time window, and if the first group of twisted pair cables is not faulty, determining the first group of twisted pair cables as the two pairs of twisted pair cables; or, Performing fault detection on the second group of twisted pair cables within a second time window, and if the second group of twisted pair cables is not faulty, determining the second group of twisted pair cables as the two pairs of twisted pair cables; The first time window is different from the second time window.
19. The device according to any one of claims 11 to 18, characterized in that The chip where the physical layer of the first device is located and the chip where the data link layer is located communicate using a medium-independent interface, and the communication rate of the medium-independent interface is less than or equal to the communication rate corresponding to the variable speed communication mode.
20. The device according to any one of claims 11 to 19, characterized in that The first communication mode includes any one of the following: 10GBASE-T full-duplex communication, 5GBASE-T full-duplex communication, 2.5GBASE-T full-duplex communication, or 1GBASE-T full-duplex communication Industrial communications.
21. A communication device, characterized in that: It includes a processor and a communication interface, wherein: The communication interface is used to receive and send data; The processor is coupled to the memory, and is configured to execute a computer program stored in the memory, so that the apparatus performs the method according to any one of claims 1 to 10.
22. A computer-readable storage medium, characterized in that: The invention comprises a computer program, which, when being run on a computer, enables the method according to any one of claims 1 to 10 to be performed.
23. A computer program product, characterized in that The invention comprises a computer program which, when being run on a computer, causes the method according to any one of claims 1 to 10 to be performed.
24. A communication system, characterized in that: The method comprises a first device and a second device for executing the method as claimed in any one of claims 1 to 10; wherein the first device is connected to the second device via two twisted pair cables or four twisted pair cables.
25. A chip system, characterized in that: The chip system comprises: A processor and a memory, wherein the processor is coupled to the memory, and the memory is used to store programs or instructions. When the programs or instructions are executed by the processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Multi-mode Ethernet transceiver
CN101610191A
Ethernet cable connection method and Ethernet device
CN109428690A
Ethernet link rate switching method and device and computer readable storage medium
CN112564851A
Method and system for ethernet active-pair detection
US10742262B1
Cited By
Communication methods and related apparatuses
WO2026086159A1