# Patent

## Title
Link state detection system for network cable

## Abstract

A link detection system for a network cable is applicable for detecting a connection state of the network cable. If the network cable is connected to the link detection system, the network state detection unit sends a voltage level of a first signal, so as to turn on the power supply of the LAN controller. If the network cable is unplugged, the LAN controller sends a second signal, so as to turn off the power supply of the LAN controller. Alternatively, if the network cable is linked to the network interface in an idle contact state, the network state detection unit sends another voltage level of the first signal, so as to not turn on the power supply of the LAN controller, thereby reducing the power consumption of the personal computer.

## Background
FIELD OF THE INVENTION
The present invention relates to a network state detection system. More particularly, the present invention relates to a system for detecting a connection state between a network cable and a personal computer, so as to control a power supply for a LAN controller.
RELATED ART
As the environmental protection awareness and energy saving awareness are gradually enhanced, it has become an important topic about how to make each device in a personal computer be operated in a high efficiency. In the conventional power-saving design of the personal computer, the host software must be interacted with a device controller, so as to achieve a suitable power-saving set through mutual coordination. Recently, a mechanism named active state power management (ASPM) is most commonly used. The ASPM defines five power modes from a normal operation mode to a complete power off mode, including: L0 power mode, L0s power mode, L1 power mode, L2 power mode, and L3 power mode.
The L0 power mode is used to perform the power source control of each device during the normal operation. Under the L1 power mode, each connected device is in the full-line operation state, at this time, the clock of each device is activated, so any transmission operation is performed at a normal delay speed, and thus, it is necessary for all the devices in the personal computer to support this mode. The L0s power mode is used to process the power source control of each device during the stand-by. It is necessary for the personal computer to support the L1 power mode. In the L0s power mode, the clock maintains to be operated, and the power source also maintains the ON state. At this time, the connected device does not actively transfer data. The delay time for the restoring process of the L0s power mode is quite short, so the switching speed is quite high.
The L1 power mode is a power source management mode that functions when all the devices are in an idle state. The power-saving efficiency of the L1 power mode is much better than that of the L0s power mode, but the disadvantage of the L1 power mode is that the delay time is relatively long. During the L2 power mode, only an auxiliary power source is activated. Except for turning off all the power sources on the device, the L1 power mode is the state with the lowest power consumption. In the L2 power mode, the clock signals of all the devices are in the idle state, except for low-frequency clocks used for detecting the network wake function and beacon event. Finally, the L3 power mode is that the power source is turned off, and the power source of each connected device is turned off.
For example, the detection of the network connection state also affects the total power consumption efficiency of the computer. If the network link state always maintains the ON state, and other devices are necessarily maintained in the operation state, the personal computer cannot enter the L1 power source management mode, and the total power consumption is increased. Particularly, if this circumstance happens to a notebook computer, the electric power of the cell is quickly consumed, such that the total using performance of the notebook computer is seriously reduced.
In the conventional art, there are two processes for detecting whether the network operates or not. The first one is that a changeover switch is disposed in the network interface, in which the network interface is a RJ-45 pin. When the network cable is plugged into the network interface, a network connector triggers the changeover switch. If the south bridge controller detects that the changeover switch has been triggered, the power source of the LAN controller is turned on, so as to perform the data transmission.
For example, in Taiwan Patent Publication No. 200619917, entitled “Power-saving Device of Network Controller for Computer”, it is disclosed that a ninth pin is further disposed on a network socket. The ninth pin is called the power-saving pin in Taiwan Patent Publication No. 200619917, which is used for detecting the linking state for the network. When the network cable is connected, a low voltage level is formed between the power-saving pin and the LAN controller, and upon detecting the low voltage level, the south bridge controller turns on the power supply of the LAN controller. On the contrary, if the network cable is unplugged, a high voltage level is formed between the power-saving pin and the LAN controller, and the south bridge controller turns off the power supply of the LAN controller. The disadvantage of the above process lies in that, it is impossible for the power-saving pin to determine whether the network cable is in an idle contact sate or not. The so-called “idle contact” is that, although the physical link is established between the network cable and the personal computer, no signals are transferred in the network cable at all, which is similar to the following circumstance that if one end of the network cable is linked to a personal computer, and the other end is not linked to any device, the end with the personal computer does not have any electrical signals being transmitted. If the network cable is in the idle contact state, the LAN controller actually cannot perform any transmission action, and the personal computer incorrectly determines that the LAN controller is still in the operation state, such that the personal computer cannot enter the L1 power mode.
The other process is that a specific south bridge controller or a specific network chip is used to detect whether any network cable is linked or not. Although the process can solve the idle contact state mentioned in the above process, the specific elements such as the south bridge controller and the LAN controller are required to be cooperated with each other so as to achieve the above functions. In this manner, the developing cost of the manufacturer is increased, and during the developing process, the manufacturer cannot adopt south bridge controllers or network chips in other models.
SUMMARY OF THE INVENTION
In view of the above problems, the present invention is mainly directed to a link state detection system for a network cable in a personal computer. The detection system is used to detect whether the personal computer is connected with the network cable or not, thereby determining whether to turn on or off a power source of a LAN controller.
In order to achieve the above objective, the present invention provides a network state detection system, which is used to detect whether it is connected with the network cable or not. The detection system includes a network interface, a network state detection unit, a LAN controller, a main control unit, and a south bridge controller. The network interface is used to link the network cable. The network state detection unit is electrically connected to the network interface. After the network state detection unit has been connected with the network cable, the network state detection unit converts the received potential variation into a pulse signal. Then, it is detected whether the network cable is connected or not, depending upon the fact whether the pulse signal has a variation. If the network cable is linked to the network state detection unit, a first signal is output. The LAN controller is electrically connected to the network interface, and if the network cable is unplugged, the LAN controller outputs a second signal. The main control unit is electrically connected to the network state detection unit and the LAN controller respectively, and receives the first signal and the second signal and outputs a third signal according to voltage levels of the first and second signals. The south bridge controller is electrically connected to the main control unit and the LAN controller respectively, and receives the third signal, and determines whether to turn on or off the power supply of the LAN controller according to the third signal.
The present invention can be further combined with the south bridge controller, such that the personal computer can switch various peripherals to other power source management modes through the south bridge controller. The present invention is also directed to determining whether the network cable is in an idle contact state or not depending upon the fact whether the network state detection unit generates a pulse signal or not when the network is detected to be linked. In the present invention, the network state detection unit and the main control unit are used together to detect the plugging and unplugging state of the network cable, and to determine whether the network cable is in the idle contact state or not when the network cable is linked. According to the above situation, the personal computer determines whether to turn off the power supply of the LAN controller or not, and accordingly, other peripherals of the personal computer enter a power-saving mode.
Further scope of applicability of the present invention will become apparent from the detailed description given hereinafter. However, it should be understood that the detailed description and specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only, since various changes and modifications within the spirit and scope of the invention will become apparent to those skilled in the art from this detailed description.



BRIEF DESCRIPTION OF THE DRAWINGS
The present invention will become more fully understood from the detailed description given herein below for illustration only, which thus is not limitative of the present invention, and wherein:
FIG. 1A is a schematic view of an architecture of the present invention;
FIG. 1B is a circuit diagram of a network state detection unit according to the present invention;
FIG. 2 is a schematic view of an operation flow of the present invention;
FIG. 3A is a timing chart when the network cable is unplugged; and
FIG. 3B is a timing chart when the network cable is linked.



DETAILED DESCRIPTION
Referring to FIG. 1A, it is a circuit architecture of the present invention. A link detection system 100 for a network cable includes a network interface 110, a network state detection unit 120, a LAN controller 130, a main control unit 140, and a south bridge controller 150.
The network interface 110 is used to link the network cable 160 and the detection system 100. The network interface 110 can be, but is not limited to, 100BaseT or 100BaseX. In the illustration of this embodiment, RJ-45 is taken as an example of the network interface 110.
The network state detection unit 120 is electrically connected to the network interface 110. The network state detection unit 120 detects whether the network cable 160 is connected to the link detection system 100 or not, i.e. whether the network cable 160 interfaces with the network interface 110 or not, according to a pulse signal. The pulse signal is generated by the network state detection unit according to the voltage variation of an electrical signal, such as packets, transmitted by the network cable 160. Referring to FIG. 1B, it is a partial circuit diagram of the network state detection unit. In the left part of FIG. 1B, TX and RX pins in the network cable are shown respectively. In FIG. 1B, a digital comparator 121 can select, but not limited to, LMV331 comparator. It should be particular noted that, after the network cable 160 is linked to the link detection system 100, TX and RX pins transmits/receives different electrical signals respectively, the digital comparator 121 transforms the electrical signal into a regular oscillating pulse signal. If the network cable 160 is unplugged from the detection system 100, the pulse signal becomes a constant voltage level, and in this embodiment, it is, for example, a high voltage level.
When the network cable 160 is linked to the link detection system 100, the network state detection unit 120 outputs a first signal according to the pulse signal. In one connection state, the network state detection unit 120 changes the voltage level of the first signal to set it at a low voltage level, so as to turn on the power supply of the LAN controller 130. In another connection state, referred to as “idle contact state”, although the network cable 160 is physically linked to the network interface 110, no electrical signals are transferred between the network cable 160 and the detection system 100. When the network cable 160 is in the idle contact state, the network state detection unit 120 does not generate the pulse signal, and thus, the power supply of the LAN controller 130 does not turned on.
The LAN controller 130 is electrically connected to the network interface 110. When the network cable 160 is unplugged to not interface with the network interface 110, the LAN controller 130 outputs a second signal. When the network cable 160 is unplugged from the detection system 100, the second signal is set at a low voltage level, and the LAN controller 130 sends the low voltage level of the second signal to inform each relevant element to turn off the power supply of the LAN controller 130. The main control unit 140 is electrically connected to the network state detection unit 120 and the LAN controller 130. The main control unit 140 receives the first signal and the second signal and outputs a third signal according to voltage levels of the first and second signals. The third signal is used to control the ON or OFF of the power supply of the LAN controller 130. The south bridge controller 150 is electrically connected to the main control unit 140 and the LAN controller 130. The south bridge controller 150 switches the power source of the LAN controller according to control of the main control unit 130. Herein, the south bridge controller 150 receives the third signal sent by the main control unit 140 and switches the power source of the LAN controller according to the third signal.
Referring to FIG. 2, it is a schematic view of an operation flow of the present invention. Firstly, the personal computer is powered on, and meanwhile, the south bridge controller turns on the power source of the LAN controller (Step S210). Next, the main control unit detects the voltage level of the second signal sent by the LAN controller (Step S220). If the voltage level of the second signal is a low voltage level, the main control unit 140 sends the third signal to the south bridge controller, such that the south bridge controller sends an instruction of turning off the power supply of the LAN controller, such as a power switching signal (Step S230).
The south bridge controller 150 turns off the power supply of the LAN controller (Step S240). Then, the main control unit detects the voltage level of a first signal (Step S250). If the voltage level of the first signal is a high voltage level, the main control unit sends the third signal to the south bridge controller, such that the south bridge controller sends an instruction of turning off the power supply of the LAN controller, such as a power switching signal (Step S230).
If the voltage level of the second signal is a high voltage level or the voltage level of the first signal is a low voltage level, the main control unit sends the third signal to the south bridge controller, such that the south bridge controller send an instruction of turning on the power supply of the LAN controller (Step S260). Then, the south bridge controller begins the monitoring operation flow from Step S210 until the personal computer is powered off.
Referring to FIG. 3A, it is a timing chart when the network cable is unplugged. The left part in FIG. 3A represents that the network cable 160 is linked to the detection system 100, and the right part represents that the network cable 160 is unplugged from the detection system 100. The time axis is shown from left to right, and the timing from top to bottom is sequentially the second signal, the power switching signal, the network plugging and unplugging signal, and the first signal. When the network cable 160 is unplugged from the network interface 110, the main control unit 140 detects that the second signal changes from the high voltage level to the low voltage level. Then, the main control unit 140 informs the south bridge controller 150 to output the power switching signal at the high voltage level, so as to turn off the power source of the LAN controller 130. Meanwhile, the pulse signal in the network state detection unit 130 stops the changing of the voltage level, such that the voltage level of the first signal maintain the high voltage level state. The main control unit 140 begins to monitor the variation of the voltage level of the first signal.
Referring to FIG. 3B, it is a timing chart when the network cable is linked. The left part in FIG. 3B represents that the network cable 160 is unplugged from the detection system 100, and the right part represents that the network cable 160 is linked to the detection system 100. The time axis is shown from left to right, and the timing from top to bottom is sequentially the network plugging and unplugging signal, the first signal, the power switching signal, and the second signal. When the network cable 160 is plugged into the network interface 110, the pulse signal in the network state detection unit 130 begins to oscillate, such that the first signal is changed to the low voltage level. Then, the main control unit 140 informs the south bridge controller 150 to turn on the power supply of the LAN controller 130. Therefore, the second signal is changed from the low voltage level to the high voltage level, the main control unit 140 is changed to monitor whether the voltage level of the second signal is changed to the low voltage level or not.
In the present invention, the network state detection unit 120 and the main control unit 140 are adopted together to detect the plugging and unplugging state of the network cable 160, and to further determine whether the network cable 160 is linked in an idle contact state. Another objective of the present invention is to further detect whether the network connecting is an idle contact state or not. According to the above situation, the personal computer determines whether to turn off the power supply of the LAN controller 130 or not, and accordingly, other peripherals of the personal computer enter the power-saving mode.
The invention being thus described, it will be obvious that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are intended to be included within the scope of the following claims.

## Claims

1. A link detection system for a network cable, for detecting a connection state of the network cable, comprising:
a network state detection unit generating a first signal, configured such that the first signal changes from a first value to a second value when a network cable is linked to a network interface and electrical signals are received from the network cable via the network interface;
a LAN controller generating a second signal, configured such that the second signal changes from a first value to a second value when the network cable is unplugged from the network interface;
a control unit generating a power switching signal to control an ON and OFF status of a power supply of the LAN controller, the power switching signal being generated according to the first and second signals, configured such that the power supply is switched ON when the first signal changes from the first value to the second value thereof, and the power supply is switched OFF when the second signal changes from the first value to the second value thereof, configured such that the LAN controller is turned OFF when the network cable is unplugged from the network interface, and turned ON when the network cable is both plugged back in and electrical signals are received from the network cable via the network interface, and further configured such that the first signal is generated by the network state detection unit according to a pulse signal also generated by the network state detection unit, the pulse signal having an oscillating value when electrical signals are received from the network cable via the network interface, and a constant value when electrical signals are not received from the network cable via the network interface, the first signal changing from a first value to a second value when the pulse signal changes from a constant value to an oscillating value, wherein the pulse signal is generated both when the network cable is plugged into the network interface and when it is unplugged from the network interface.

2. The link detection system for the network cable as claimed in claim 1, configured such that when a network cable is linked to the network interface but no electrical signals are received from the network cable via the network interface, the first signal will remain the first value thereof if already the first value, and will change to the first value thereof if not already the first value.

3. The link detection system for the network cable as claimed in claim 2, configured such that when a network cable is linked to the network interface but no electrical signals are received from the network cable via the network interface, the power supply will remain switched OFF if already switched OFF, and become switched OFF if not already switched OFF.

4. The link detection system for the network cable as claimed in claim 1, wherein the network interface is RJ-45.

5. The link detection system for the network cable as claimed in claim 1, configured such that after the power supply of the LAN controller is switched ON by the control unit, the control unit begins to monitor the second signal for a change in value.

6. The link detection system for the network cable as claimed in claim 1, configured such that the network state detection unit continues to detect for electrical signals when the power supply of the LAN controller is switched off.