Method, system and device for waking up home-made platform by first-time power-on network
Technical Field
The invention relates to the technical field of domestic circuit design, in particular to a method, a system and a device for waking up a domestic platform by first feeding an electric network.
Background
Wake-on-LAN (WOL) is a technique for implementing remote power-on control over a LAN. By wake-on-network, the computer which has entered sleep (S3), sleep (S4) and power-off (S5) can be restored to the normal power-on state. Generally, network wake-up requires that a computer is powered on and then is subjected to network wake-up in the following sleep, dormancy and shutdown states, and during the period, the computer cannot have power-off action, i.e. the computer cannot wake up and power on immediately after being powered on.
Disclosure of Invention
The technical task of the invention is to provide a method, a system and a device for waking up a domestic platform by first powering on an electric network, which can realize that a computer is powered on and a startup function is remotely woken up through a network in a shutdown state.
The technical scheme adopted for solving the technical problems is as follows:
A domestic platform first-time power-on network awakening method comprises the following steps:
The MDIO (MANAGEMENT DATA Input/Output) of the Ethernet PHY chip is connected with the processor and the controller through an analog switch of access switching, and the GPIO port Output by the controller switches the channel of the analog switch;
After the computer is powered on, two GPIO ports of the controller are used for simulating MIDO interfaces, and WOL registers of the Ethernet PHY chip are configured;
the controller obtains the MAC address from the BIOS through the communication serial port and stores the MAC address in the internal storage space, the controller compares whether the MAC address is consistent with the address stored in the controller or not, and if not, the controller automatically updates the MAC address stored in the controller;
And in the non-startup state, according to the configuration of the WOL register of the PHY chip by the controller, the PHY chip sends a signal to the controller to realize the startup wakeup function after receiving the network wakeup packet.
By adopting the method, the WOL startup wakeup of the computer can be realized by powering on once in the production process.
Further, the controller is a singlechip.
Further, the controller is a CPLD or an FPGA.
Furthermore, the processor is connected with BIOS Flash through SPI interface, and connected with the network PHY chip through RGMII or SGIMII.
Furthermore, during the production and debugging of the computer, the controller acquires the MAC address from the BIOS through the communication serial port and stores the MAC address in an internal storage area of the controller;
the controller controls the analog switch to connect the MDIO interface of the controller to the PHY chip through the GPIO interface, and carries out MAC address configuration on the WOL register of the PHY chip, after the network cable is connected, the WOL WAKE-up tool sends a WAKE-up magic packet command, the PHY chip sends INT_WAKE signal change to the controller after receiving the WAKE-up command, and the controller controls the computer to start after detecting the INT_WAKE.
Further, the first power-on network wake-up process of the computer is as follows:
1) The computer is connected with a power supply;
2) The controller controls the analog switch to switch on the channel with the PHY chip, and configures a WOL register of the PHY chip;
3) The PHY chip sends WOL_INT signals to the controller after receiving the network wake-up packet;
4) The controller is started after receiving WOL_INT.
The invention also claims a system for waking up the first power-on network of the domestic platform, wherein the processor and the controller of the domestic platform computer are connected with the MDIO (MANAGEMENT DATA Input/Output) of the Ethernet PHY chip through the analog switch switched by the passage, and the GPIO port Output by the controller is used for switching the passage of the analog switch;
After the computer is powered on, two GPIO ports of the controller are used for simulating MIDO interfaces, and WOL registers of the Ethernet PHY chip are configured;
the controller obtains the MAC address from the BIOS through the communication serial port and stores the MAC address in the internal storage space, the controller compares whether the MAC address is consistent with the address stored in the controller or not, and if not, the controller automatically updates the MAC address stored in the controller;
And in the non-startup state, according to the configuration of the WOL register of the PHY chip by the controller, the PHY chip sends a signal to the controller to realize the startup wakeup function after receiving the network wakeup packet.
Further, during the production and debugging of the computer, the controller acquires the MAC address from the BIOS through the communication serial port and stores the MAC address in an internal storage area of the controller;
the controller controls the analog switch to connect the MDIO interface of the controller to the PHY chip through the GPIO interface, and carries out MAC address configuration on the WOL register of the PHY chip, after the network cable is connected, the WOL WAKE-up tool sends a WAKE-up magic packet command, the PHY chip sends INT_WAKE signal change to the controller after receiving the WAKE-up command, and the controller controls the computer to start after detecting the INT_WAKE.
Further, the first power-on network wake-up process of the computer is as follows:
1) The computer is connected with a power supply;
2) The controller controls the analog switch to switch on the channel with the PHY chip, and configures a WOL register of the PHY chip;
3) The PHY chip sends WOL_INT signals to the controller after receiving the network wake-up packet;
4) The controller is started after receiving WOL_INT.
The invention also discloses a device for realizing the first power-on network wake-up of the domestic platform, which comprises a processor and a controller, wherein the controller and the processor are connected with an MDIO (MANAGEMENT DATA Input/Output) of an Ethernet PHY chip through an analog switch for switching a passage, so as to realize the first power-on network wake-up method of the domestic platform.
Compared with the prior art, the method, the system and the device for waking up the first power-on network of the domestic platform have the following beneficial effects:
The method can realize the power-on of the computer, and in the power-off state, the function of starting up is woken up remotely through the network, and the WOL can be realized by only powering on once in the production process, and the network wake-up can be carried out through the local area network by only switching on the computer.
Drawings
Fig. 1 is a structural diagram of a wake-up method of a first power-on network of a domestic platform according to an embodiment of the present invention;
Fig. 2 is a flowchart of a first power-on network wake-up method provided by an embodiment of the present invention.
Detailed Description
The invention will be further described with reference to the drawings and the specific examples.
The embodiment of the invention provides a method for waking up a home-made platform by first powering up an electric network, which comprises the following steps:
The MDIO (MANAGEMENT DATA Input/Output) of the Ethernet PHY chip is connected with the processor and the controller through an analog switch of the access switching, and the GPIO port Output by the controller switches the channel of the analog switch. The controller can be a single chip microcomputer, a CPLD or an FPGA. The embodiment is described by taking a singlechip as an example.
After the computer is powered on, two GPIO ports of the singlechip are needed to simulate MIDO interfaces, and WOL registers of the Ethernet PHY chip are configured.
The singlechip acquires the MAC address from the BIOS through the communication serial port and stores the MAC address in the internal storage space, the singlechip compares whether the MAC address is consistent with the address stored in the singlechip or not, and if not, the singlechip automatically updates the MAC address stored by the singlechip;
and in the non-startup state, according to the configuration of the single chip microcomputer on the WOL register of the PHY chip, the PHY chip sends out WOL_INT signals to change to the single chip microcomputer to realize the startup wakeup function after receiving the network wakeup packet.
By adopting the method, the WOL startup wakeup of the computer can be realized by powering on once in the production process.
The architecture diagram of the implementation of the method is shown in FIG. 1, the processor is connected with the BIOS Flash through the SPI interface, and is connected with the network PHY chip through RGMII or SGIMII, and the singlechip starts to work to provide on-off control for the computer after the singlechip is powered on.
When the computer is produced and debugged, the singlechip acquires the MAC address from the BIOS through the communication serial port and stores the MAC address in an internal storage area of the singlechip.
The computer user is powered on, the singlechip starts to work, the singlechip controls the analog switch to communicate the MDIO interface of the singlechip to the PHY chip through the GPIO interface, and carries out MAC address configuration on the WOL register of the PHY chip, after the network cable is connected, the WOL WAKE-up tool is used for sending a WAKE-up magic packet command, the PHY chip sends an INT_WAKE signal to change to the singlechip after receiving the WAKE-up command, and the singlechip controls the computer to start after detecting the INT_WAKE.
As shown in fig. 2, the first power-on network wake-up flow of the computer is as follows:
1. the computer is connected with a power supply;
2. The singlechip controls the analog switch to switch, switches on a passage with the PHY chip, and configures a WOL register of the PHY chip;
3. the PHY chip sends WOL_INT signals to the singlechip after receiving the network wake-up packet;
4) And starting up the singlechip after receiving WOL_INT.
The embodiment of the invention also provides a system for waking up the home-made platform by the first power-on network, wherein the processor and the controller of the home-made platform computer are connected with the MDIO (MANAGEMENT DATA Input/Output) of the Ethernet PHY chip through the analog switch switched by the passage, and the GPIO port Output by the controller is used for switching the passage of the analog switch. The controller may be a single-chip microcomputer, a CPLD or an FPGA, and the single-chip microcomputer is selected for use in this embodiment.
After the computer is powered on, two GPIO ports of the singlechip are used for simulating MIDO interfaces, and WOL registers of the Ethernet PHY chip are configured.
The singlechip acquires the MAC address from the BIOS through the communication serial port and stores the MAC address in the internal storage space, the singlechip compares whether the MAC address is consistent with the address stored in the singlechip or not, and if not, the singlechip automatically updates the MAC address stored by the singlechip;
And in the non-startup state, according to the configuration of the WOL register of the PHY chip by the singlechip, the PHY chip sends a signal to the singlechip to realize the startup wakeup function after receiving the network wakeup packet.
The processor is connected with BIOS Flash through SPI interface, through RGMII or SGIMII and network PHY chip connection, and the singlechip just begins work after switching on the power and provides switch control for the computer.
When the computer is produced and debugged, the singlechip acquires the MAC address from the BIOS through the communication serial port and stores the MAC address in an internal storage area of the controller;
The computer user is connected with the power supply, the singlechip starts to work, the singlechip controls the analog switch to communicate the MDIO interface of the controller to the PHY chip through the GPIO interface, and carries out MAC address configuration on the WOL register of the PHY chip, after the network cable is connected, the WOL WAKE-up tool is used for sending a WAKE-up magic packet command, the PHY chip sends an INT_WAKE signal to the singlechip after receiving the WAKE-up command, and the singlechip controls the computer to start after detecting the INT_WAKE.
The first power-on network wake-up flow of the computer is as follows:
1. the computer is connected with a power supply;
2. The singlechip controls the analog switch to switch, switches on a passage with the PHY chip, and configures a WOL register of the PHY chip;
3. the PHY chip sends WOL_INT signals to the singlechip after receiving the network wake-up packet;
4. and starting up the singlechip after receiving WOL_INT.
The embodiment of the invention also provides a device for realizing the wake-up of the first-time power-on network of the domestic platform, which comprises a processor and a controller, wherein the controller and the processor are connected with the MDIO (MANAGEMENT DATA Input/Output) of the Ethernet PHY chip through an analog switch for switching the access, so that the wake-up method of the first-time power-on network of the domestic platform described in the embodiment is realized.
The present invention can be easily implemented by those skilled in the art through the above specific embodiments. It should be understood that the invention is not limited to the particular embodiments described above. Based on the disclosed embodiments, a person skilled in the art may combine different technical features at will, so as to implement different technical solutions.
Other than the technical features described in the specification, all are known to those skilled in the art.