Disclosure of Invention
The technical problem to be solved by the invention is how to obtain the accurate maximum power of the router through testing. The invention solves the technical problem and provides a method and a system for testing the maximum power of a router.
The method for testing the maximum power of the router comprises the following steps:
running a first test to determine a corresponding first configuration when a first frequency band wireless module of the router has a maximum power;
running a second test to determine a corresponding second configuration when a second frequency band wireless module of the router has a maximum power;
running a third test to determine a corresponding third configuration when the WAN-LAN module power of the Ethernet PHY chip of the router is at a maximum;
running a fourth test to determine a corresponding fourth configuration when the LAN-LAN module power of the Ethernet PHY chip of the router is at a maximum;
and simultaneously running a first test in a first configuration, a second test in a second configuration, a third test in a third configuration and a fourth test in a fourth configuration on the router to obtain the maximum power of the router.
Further, the running the first test to determine the corresponding first configuration when the power of the first band radio module of the router is maximum includes:
providing a first terminal and establishing a first frequency band wireless connection with the router, and connecting a first programmable attenuator between the first terminal and the router in series;
providing a second terminal to establish wired connection with a LAN port of the router;
and performing network transmission test between the first terminal and the second terminal to determine the attenuation value of the first programmable attenuator corresponding to the maximum power of the router and a first configuration parameter of the router.
Further, the running a second test to determine a corresponding second configuration when the power of the second band radio module of the router is maximum includes:
providing a third terminal and establishing a second frequency band wireless connection with the router, and connecting a second programmable attenuator between the third terminal and the router in series;
providing a fourth terminal to establish wired connection with the LAN port of the router;
and performing network transmission test between the third terminal and the fourth terminal to determine an attenuation value of the second programmable attenuator corresponding to the maximum power of the router and a second configuration parameter of the router.
Further, the running a third test to determine a corresponding third configuration when the WAN-LAN module power of the ethernet PHY chip of the router is at a maximum comprises:
providing an Ethernet tester to establish test connection with a LAN port and a WAN port of the router;
and carrying out network transmission test between the WAN port and the LAN port of the router by using the Ethernet tester to determine a first test parameter of the corresponding Ethernet tester when the power of the router is maximum.
Further, the running a fourth test to determine a corresponding fourth configuration when the LAN-LAN module power of the ethernet PHY chip of the router is at a maximum comprises:
providing an Ethernet tester and establishing test connection with two LAN ports of the router;
and carrying out network transmission test between the LAN port and the LAN port of the router by using the Ethernet tester to determine a second test parameter of the Ethernet tester corresponding to the maximum power of the router.
The system for testing the maximum power of the router comprises:
the first configuration determining module is used for running a first test to determine a corresponding first configuration when the power of a first frequency band wireless module of the router is maximum;
a second configuration determining module, configured to run a second test to determine a second configuration corresponding to a second frequency band radio module of the router when power of the second frequency band radio module is maximum;
a third configuration determining module, configured to run a third test to determine a corresponding third configuration when the WAN-LAN module power of the ethernet PHY chip of the router is maximum;
a fourth configuration determining module, configured to run a fourth test to determine a corresponding fourth configuration when the power of the LAN-LAN module of the ethernet PHY chip of the router is maximum;
and the power testing module is used for simultaneously operating a first test in a first configuration, a second test in a second configuration, a third test in a third configuration and a fourth test in a fourth configuration on the router so as to obtain the maximum power of the router.
Further, the first configuration determining module comprises:
the first connection establishing submodule is used for establishing first frequency band wireless connection between a first terminal and the router, and a first programmable attenuator is connected between the first terminal and the router in series;
the second connection establishing submodule is used for providing a second terminal to establish wired connection with the LAN port of the router;
and the first configuration determining submodule is used for carrying out network transmission test between the first terminal and the second terminal so as to determine the attenuation value of the first programmable attenuator corresponding to the maximum power of the router and a first configuration parameter of the router.
Further, the second configuration determining module comprises:
a third connection establishing submodule, configured to provide a third terminal and the router to establish a second frequency band wireless connection, and connect a second programmable attenuator in series between the third terminal and the router;
the fourth connection establishing submodule is used for providing wired connection between a fourth terminal and the LAN port of the router;
and the second configuration determining submodule is used for performing network transmission test between the third terminal and the fourth terminal so as to determine the attenuation value of the second programmable attenuator corresponding to the maximum power of the router and a second configuration parameter of the router.
Further, the third configuration determining module comprises:
a fifth connection establishing submodule, configured to provide an ethernet tester to establish test connection with the LAN port and the WAN port of the router;
and the third configuration determining submodule is used for performing network transmission test between the WAN port and the LAN port of the router by using the Ethernet tester so as to determine the first test parameter of the Ethernet tester corresponding to the maximum power of the router.
Further, the fourth configuration determining module comprises:
a sixth connection establishing submodule, configured to provide an ethernet tester to establish test connection with two LAN ports of the router;
and the fourth configuration determining submodule is used for performing network transmission test between the LAN port and the LAN port of the router by using the Ethernet tester so as to determine a second test parameter of the Ethernet tester corresponding to the maximum power of the router.
In the invention, the router comprises a first frequency band wireless module and a second frequency band wireless module.
The invention divides the power consumption test of the whole router into the test of a plurality of modules, tests and verifies each functional module step by step, finds the limit value of the power of each functional module, and finally tests the maximum power of the whole router by integrating the test method and the test configuration of the maximum power of each functional module.
The invention can analyze the energy consumption of each functional module in detail and obtain the accurate maximum power value closer to reality.
Detailed Description
The following are specific embodiments of the present invention and are further described with reference to the drawings, but the present invention is not limited to these embodiments.
It should also be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention.
In the invention, the router comprises a first frequency band wireless module and a second frequency band wireless module; the first frequency band wireless module is used for providing a first frequency band wireless network, and the second frequency band wireless module is used for providing a second frequency band wireless network.
The first frequency band wireless module may be a 2.4G wireless module, and the second frequency band wireless module may be a 5G wireless module.
Example one
The present embodiment provides a method for testing the maximum power of a router, and a flowchart thereof is shown in fig. 1 and described in detail as follows.
Step S101, a first test is run to determine a first configuration corresponding to the maximum power of the first frequency band wireless module of the router.
The first test is to obtain a configuration parameter when the power of the first frequency band wireless module of the router is maximum.
Further, the running the first test to determine the corresponding first configuration when the power of the first band radio module of the router is maximum includes:
providing a first terminal and establishing a first frequency band wireless connection with the router, and connecting a first programmable attenuator between the first terminal and the router in series;
providing a second terminal to establish wired connection with a LAN port of the router;
and performing network transmission test between the first terminal and the second terminal to determine the attenuation value of the first programmable attenuator corresponding to the maximum power of the router and a first configuration parameter of the router.
And the first terminal establishes a first frequency band wireless connection with the router, and a programmable attenuator is connected between the first terminal and the router in series.
Further, the power meter is used for obtaining the power of the router.
Under the test condition, when the maximum power of the router reaches the maximum, the power of the first frequency band wireless module also reaches the maximum; therefore, in the above connection test condition, the power of the router may be used instead of the power of the first band radio module for testing.
The programmable attenuator can adjust the attenuation value of the first frequency band wireless connection signal of the router.
Further, the second terminal establishes a wired connection with a LAN port of the router.
And adjusting the configuration parameters of the router and the attenuation value of the first programmable attenuator when carrying out transmission test between the first terminal and the router.
Optionally, the attenuation value is increased by 2dbm each time when adjusting until the traffic to the router is disconnected. The power of the router is recorded when adjusting the attenuation value. And acquiring the maximum value of the power of the router in the adjusting process.
Further, the mode and the bandwidth in the router configuration are changed.
The modes refer to the standards of wireless network connection of the router, and the modes comprise 802.11b, 802.11g and the like. The broadband includes HT20 and HT 40.
In each configuration of the router, the attenuation value of the first programmable attenuator may be adjusted such that the power of the router is maximized. Under different configurations of the router, the attenuation values of the obtained maximum power values are respectively marked as A1, A2 and A3 … …. And further comparing the power corresponding to A1, A2 and A3 … … to obtain the maximum value of the router power. And further obtaining an attenuation value corresponding to the maximum router power value and the configuration of the router.
The above is only one adjustment method, and the specific adjustment process may be different.
Recording an attenuation value of the first programmable attenuator and a first configuration parameter of the router when the power of the router is maximum, namely the power of the wireless module in the first frequency band is maximum, wherein the first configuration comprises the attenuation value and the first configuration parameter.
Step S102, a second test is run to determine a second configuration corresponding to the maximum power of the second frequency band wireless module of the router.
The second test is to obtain a configuration parameter when the power of the second frequency band wireless module of the router is maximum.
Further, the running a second test to determine a corresponding second configuration when the power of the second band radio module of the router is maximum includes:
providing a third terminal and establishing a second frequency band wireless connection with the router, and connecting a second programmable attenuator between the third terminal and the router in series;
providing a fourth terminal to establish wired connection with the LAN port of the router;
and performing network transmission test between the third terminal and the fourth terminal to determine an attenuation value of the second programmable attenuator corresponding to the maximum power of the router and a second configuration parameter of the router.
And the third terminal establishes a second frequency band wireless connection with the router, and a second programmable attenuator is connected between the third terminal and the router in series.
And the fourth terminal establishes wired connection with the LAN port of the router.
And when the network transmission test is carried out between the fourth terminal and the router, the attenuation value of the second programmable attenuator and the configuration of the router are adjusted, so that the power of the router is maximum.
The power of the router may be obtained by a power meter, and the power of the second frequency band wireless module is maximized when the power of the router is maximized under the test connection condition. The power of the second band radio module may be replaced with the power of the router.
And recording the attenuation value of the programmable attenuator when the power of the router is maximum and a second configuration parameter corresponding to the router, wherein the second configuration comprises the attenuation value and the second configuration parameter.
Since the testing method in this step is the same as that in step S101, it is not described here again.
Step S103, running a third test to determine a corresponding third configuration when the WAN-LAN module power of the Ethernet PHY chip of the router is maximum.
The Ethernet PHY chip comprises a part for transmission between the LAN port and a part for transmission between the WAN port and the LAN port; respectively denoted as LAN-LAN module for ethernet PHY chip and WAN-LAN module for ethernet PHY chip.
The change of the power consumption of the network data transmission between the LAN port and the LAN port is mainly embodied in the LAN-LAN module of the Ethernet PHY chip; the change of the power consumption of the network data transmission between the WAN port and the LAN port is mainly reflected on the WAN-LAN module of the Ethernet PHY chip.
The power consumption of data transmission between the LAN port and the LAN port can be represented by the LAN-LAN module of the ethernet PHY chip. The power consumption of data transmission between the WAN port and the LAN port can be represented by a WAN-LAN module of the Ethernet PHY chip.
Further, a third test may be set to obtain a third configuration corresponding to when the WAN-LAN module of the ethernet PHY chip of the router is at maximum power.
Further, the running a third test to determine a corresponding third configuration when the WAN-LAN module power of the ethernet PHY chip of the router is at a maximum comprises:
providing an Ethernet tester to establish test connection with a LAN port and a WAN port of the router;
and carrying out network transmission test between the WAN port and the LAN port of the router by using the Ethernet tester to determine a first test parameter of the corresponding Ethernet tester when the power of the router is maximum.
Since under this test condition, when the power of the router is maximum, the WAN-LAN module power of the ethernet PHY chip of the router also reaches maximum. Therefore, a power meter may be provided to obtain the power of the router. And when the power of the router is maximum, namely the power of the WAN-LAN module of the Ethernet PHY chip is also maximum, determining the first test parameter of the Ethernet tester. The third configuration includes the first test parameter.
The first test parameter includes: data traffic size, data byte size, data frame type, ethernet port duplex mode (10M, 100M, 1000M, full duplex, half duplex), etc.
Step S104, a fourth test is executed to determine a corresponding fourth configuration when the power of the LAN-LAN module of the Ethernet PHY chip of the router is maximum.
Specifically, the running a fourth test to determine a corresponding fourth configuration when the LAN-LAN module power of the ethernet PHY chip of the router is maximum includes:
providing an Ethernet tester and establishing test connection with two LAN ports of the router;
and carrying out network transmission test between the LAN port and the LAN port of the router by using the Ethernet tester to determine a second test parameter of the Ethernet tester corresponding to the maximum power of the router.
In the above test connection condition, the power consumption of the network data transmission between the LAN port and the LAN port is determined by the LAN-LAN module of the ethernet PHY chip.
The second test parameter specifically includes: data traffic size, data byte size, data frame type, ethernet port duplex mode (10M, 100M, 1000M, full duplex, half duplex), etc.
The fourth configuration comprises the second test parameter corresponding to the maximum router power.
Since the testing method in this step is the same as the testing method in step S103, it is not described here again.
And step S105, simultaneously operating a first test in a first configuration, a second test in a second configuration, a third test in a third configuration and a fourth test in a fourth configuration on the router to obtain the maximum power of the router.
The steps S101 to S104 are for acquiring each functional module, and include: the first frequency band wireless module, the second frequency band wireless module, the WAN-LAN module of the Ethernet PHY chip and the LAN-LAN module of the Ethernet PHY chip reach the testing parameter with the maximum power when being tested independently.
And simultaneously performing test connection according to the schemes from the step S101 to the step S104, and simultaneously operating a first test in a first configuration, a second test in a second configuration, a third test in a third configuration and a fourth test in a fourth configuration on the router so as to ensure that the power consumption of each functional module of the router reaches the maximum.
The router power obtained by the test at this time can be regarded as the maximum power of the router.
In the invention, the first test, the second test, the third test and the fourth test are independent tests, and the test process of each test is not influenced or interfered by other tests. For example, when performing the fourth test, the test connections of the first test, the second test, and the third test should be removed, and the router should be kept free of redundant connections other than the test connections.
It should be understood that the steps described above are not in the exact order of execution and that all changes that can be envisioned and do not affect the implementation of the functions are intended to be within the scope of the invention.
Example two
The present embodiment provides a system for testing the maximum power of a router, and a block diagram of the structure of the system is shown in fig. 2 and described in detail below.
The router comprises a first frequency band wireless module and a second frequency band wireless module.
The system for testing the maximum power of the router comprises:
a first configuration determining module 210, configured to run a first test to determine a corresponding first configuration when a first frequency band wireless module of the router has a maximum power;
a second configuration determining module 220, configured to run a second test to determine a second configuration corresponding to a second frequency band radio module of the router when the power of the second frequency band radio module is maximum;
a third configuration determining module 230, configured to run a third test to determine a corresponding third configuration when the WAN-LAN module power of the ethernet PHY chip of the router is maximum;
a fourth configuration determining module 240, configured to run a fourth test to determine a corresponding fourth configuration when the LAN-LAN module power of the ethernet PHY chip of the router is maximum;
a power test module 250, configured to run a first test in a first configuration, a second test in a second configuration, a third test in a third configuration, and a fourth test in a fourth configuration for the router at the same time to obtain a maximum power of the router.
Further, the first configuration determining module 210 includes:
the first connection establishing submodule is used for establishing first frequency band wireless connection between a first terminal and the router, and a first programmable attenuator is connected between the first terminal and the router in series;
the second connection establishing submodule is used for providing a second terminal to establish wired connection with the LAN port of the router;
and the first configuration determining submodule is used for carrying out network transmission test between the first terminal and the second terminal so as to determine the attenuation value of the first programmable attenuator corresponding to the maximum power of the router and a first configuration parameter of the router.
Further, the second configuration determining module 220 includes:
a third connection establishing submodule, configured to provide a third terminal and the router to establish a second frequency band wireless connection, and connect a second programmable attenuator in series between the third terminal and the router;
the fourth connection establishing submodule is used for providing wired connection between a fourth terminal and the LAN port of the router;
and the second configuration determining submodule is used for performing network transmission test between the third terminal and the fourth terminal so as to determine the attenuation value of the second programmable attenuator corresponding to the maximum power of the router and a second configuration parameter of the router.
Further, the third configuration determining module 230 includes:
a fifth connection establishing submodule, configured to provide an ethernet tester to establish test connection with the LAN port and the WAN port of the router;
and the third configuration determining submodule is used for performing network transmission test between the WAN port and the LAN port of the router by using the Ethernet tester so as to determine the first test parameter of the Ethernet tester corresponding to the maximum power of the router.
Further, the fourth configuration determining module 240 includes:
a sixth connection establishing submodule, configured to provide an ethernet tester to establish test connection with two LAN ports of the router;
and the fourth configuration determining submodule is used for performing network transmission test between the LAN port and the LAN port of the router by using the Ethernet tester so as to determine a second test parameter of the Ethernet tester corresponding to the maximum power of the router.
Since the system for testing the maximum power of the router provided in this embodiment is applied to the method for testing the maximum power of the router provided in the first embodiment, the related contents have been described in detail in the first embodiment, and are not described herein again.
In the embodiments provided in this application, it should be understood that the methods and systems described are illustrative and that variations may be made in the actual implementation by adaptation.
In addition, specific names of the functional units or modules are only used for distinguishing one functional unit from another, and are not used for the protection scope of the present invention.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.