Device and method for testing automatic switching stability of wireless AP (access point) channel
Technical Field
The present invention relates to a testing method for communication devices, and in particular, to a device and a method for testing channel switching stability of a wireless AP.
Background
With the continuous decrease of the price of wireless products, the popularization of WLAN (wireless local area network) is on a day-to-day basis, and more offices and families begin to use the wireless local area network. Consequently, the channel congestion problem of the WLAN begins to occur, which causes the conditions of network speed reduction, disconnection, abnormal network operation, etc. The common IEEE 802.11b/g/n protocol works in the 2.4-2.4835 GHz band, which is divided into 11 or 13 channels in China. When there are more than two APs (Access points) in the wireless AP signal coverage, the wireless AP devices "meet" each other to avoid collision.
At present, the test of wireless channel switching is mainly manual test, which generally scans channels after a period of time, and manually operates to check the channel where the wireless AP is currently located, and at the same time, manually operates to check whether the terminal device connected to the wireless AP is disconnected when switching the channel. However, manual testing results in inaccurate test results. Moreover, whether the wireless AP channel is automatically switched is influenced by the number of other co-channel wireless APs in the local area network and the channel saturation condition, and the aperiodic change of the surrounding environment and the channel switching rule are not clear, so that a tester needs to check the channel state and check whether the wireless AP is disconnected at any time, and the tester spends a long time and energy and has low testing efficiency.
Disclosure of Invention
In order to overcome the defects of the test, the invention designs a corresponding test tool through the device and the method for testing the automatic switching stability of the wireless AP channel, so that the automatic switching time point of the tested wireless AP channel and whether the long-time stability test is off-line or not are accurately captured, the input of testing personnel is reduced, and the testing efficiency is improved.
In order to achieve the above object, an aspect of the present invention provides a device for testing stability of automatic switching of wireless AP channels, comprising the following components disposed in a shielded room:
the system comprises a tested AP, an environment control device used for simulating the actual local area network wireless environment of the tested AP, and a PC (personal computer) connected with the tested AP through Wi-Fi and running a wireless AP channel automatic switching test tool;
wherein the environment control device comprises: the system comprises a first auxiliary AP connected with a PC running the test tool through a twisted pair, and a first auxiliary PC and a second auxiliary PC connected with the first auxiliary AP through Wi-Fi.
Preferably, the test tool further comprises:
the human-computer interface is used for configuring initialization parameters and outputting log information in the test process;
the channel flow simulation script is used for controlling the sending flow of the first auxiliary PC and the second auxiliary PC to simulate the actual channel saturation environment;
the measured AP channel analysis module is used for completing channel real-time analysis and outputting channel switching information and a switching time interval to the human-computer interface;
the auxiliary test wireless AP channel configuration script is used for configuring the channel of the first auxiliary AP to be the same as the actual channel of the channel automatic function of the AP to be tested;
the wireless state connection monitoring module is used for finishing the real-time monitoring of the wireless connection state of the local wireless network card and outputting log information to the human-computer interface;
and the Ping test module is used for controlling the plurality of sub-processes to execute Ping test at the same time so as to judge the channel link state at the time.
Another technical solution of the present invention is to provide a method for testing stability of automatic switching of wireless AP channels, which includes the following steps:
s1, manually setting up a wireless AP channel automatic switching stability testing device in a shielded room environment, configuring the IP of a PC in the testing device, the management IP of a tested AP and the management IP of a first auxiliary AP, starting the channel automatic function of the tested AP, and checking whether the configuration is wrong;
s2, operating a wireless AP channel automatic switching test tool in the PC, inputting wireless channel initialization parameters through a human-computer interface, and starting a test;
s3, the testing tool simultaneously executes the channel flow simulation script, the tested AP channel analysis module, the auxiliary testing wireless AP channel configuration script, the wireless state connection monitoring module and the Ping testing module through multithreading;
s4, checking the log information of the human-computer interface, analyzing the tested AP channel in real time, and judging whether the channel is automatically switched, thereby verifying the effectiveness of the automatic switching function of the tested wireless AP channel; monitoring the wireless connection state and the test link state, and judging whether the phenomena of disconnection and internet access failure occur; and evaluating the stability of the automatic switching function of the wireless channel of the AP to be tested.
Preferably, the initialization parameters configured through the human-machine interface include: the management IP addresses of the first auxiliary AP and the tested AP, and the IP addresses of the wireless network cards of the first auxiliary PC and the second auxiliary PC;
the test process log information output through the human-computer interface comprises: and switching information and time of the AP channel to be tested, and packet loss quantity information of Ping test.
Preferably, when the test tool executes the channel flow simulation script, the IxChariot performance test tool and the Ixia Endpoint performance test tool are called by using the Tcl script, so that the Ixia Endpoint terminals on the first auxiliary PC and the second auxiliary PC are controlled, the first auxiliary PC and the second auxiliary PC transmit flow in a mutual-transmitting manner, and an actual channel saturation environment is simulated.
Preferably, when the test tool executes the tested AP channel analysis module, the WLAN API provided by microsoft is used to complete real-time channel analysis, which further includes the following procedures;
step 1, judging a current operating system of a tested AP;
step 2, if the operating system is windows Vista/7/8, creating a WLAN handle, and executing the step 3; otherwise, returning to the step 1;
step 3, traversing the local wireless network card;
step 4, inquiring a channel of the AP to be tested, and recording first time and a first channel;
step 5, separating for a certain time;
step 6, inquiring the tested AP channel again, and recording a second time and a second channel;
step 7, comparing with the channel recorded at the previous time, and judging whether the tested AP channel is switched;
step 8, if channel switching occurs, outputting channel switching information to the human-computer interface, calculating a switching time interval according to the first time and the second time, outputting the switching time interval to the human-computer interface, and returning to the step 1; if no channel switching occurs, go back to step 4.
Preferably, when the test tool executes the auxiliary test wireless AP channel configuration script, the CURL tool is used as a WEB interface management interface, and the first auxiliary AP channel is configured to be the same as an actual channel of the AP to be tested.
Preferably, when the test tool executes the wireless state connection monitoring module, the WLAN API is used to complete real-time monitoring of the wireless connection state of the local wireless network card, and if the wireless connection is disconnected, a piece of log information is output to the human-computer interface.
Preferably, when the testing tool executes the Ping testing module, multiple Ping tests are executed at the same time through multiple subprocesses, the channel link state at the moment is judged, and if any one of the multiple Ping tests fails and the time is in a channel switching interval, Ping testing information is output to the human-computer interface.
The invention discloses a device and a method for testing automatic switching stability of a wireless AP channel, which are used for detecting the automatic switching capacity of the wireless AP channel in a multi-co-channel interference environment. The device simulates a plurality of APs (access points) in the same channel or different channels through a plurality of auxiliary wireless APs and a plurality of PCs (personal computers), and tests the switching state of the channel of the wireless AP to be tested and whether the channel is disconnected during switching. The test tool for the automatic switching stability of the wireless AP channel comprises a human-computer interface (configuration and test log), a tested AP channel analysis module, an auxiliary test wireless AP channel configuration script, a wireless connection state monitoring module and a Ping judgment module. The testing tool analyzes the tested wireless AP channel in real time and judges whether the channel is automatically switched or not, so that the validity of the automatic switching function of the tested wireless AP channel is verified; monitoring the wireless connection state and the test link state, and judging whether the phenomena of disconnection and internet access failure occur; the method supports long-time automatic testing, and evaluates the stability of the automatic switching function of the wireless AP wireless channel to be tested; the problem that manual testing cannot be conducted in real time for a long time is solved, and testing efficiency is improved.
Therefore, compared with the prior art, the invention has the advantages that:
(1) the configuration of a manual testing device is simplified, and the configuration of part of configuration testing tools is automatically completed;
(2) the test tool automatically controls the configuration and operation of the test device without human input in the test process, and test logs are output in real time;
(3) the defect that the manual test cannot accurately capture the automatic switching time point of the wireless AP channel is overcome;
(4) the method solves the problem that the manual test cannot carry out the stability test of the automatic switching function of the wireless AP channel.
Drawings
FIG. 1 is a schematic diagram of an automatic switching testing apparatus for wireless AP channels according to the present invention;
FIG. 2 is a schematic diagram of a wireless AP channel auto-switching test tool according to the present invention;
fig. 3 is a flowchart of a measured AP channel resolution method according to the present invention.
Detailed Description
The invention discloses a device and a method for testing automatic switching stability of a wireless AP channel, which are used for detecting the automatic switching capacity of the wireless AP channel in a multi-co-channel interference environment.
As shown in fig. 1, the automatic switching testing apparatus for wireless AP channels of the present invention includes: a PC 1 for operating a wireless AP channel automatic switching test tool (hereinafter referred to as a test tool), an environment control device 2 and an AP 3 to be tested. The environment control device 2 comprises a first auxiliary AP 21, a first auxiliary PC 22 and a second auxiliary PC 23 which are connected with the first auxiliary AP 21 through Wi-Fi. PC.1 running the test tool is connected with the first auxiliary AP.21 through a twisted pair; the PC 1 running the test tool is also connected with the AP 3 to be tested through Wi-Fi. The environment control device 2 may further add other auxiliary test APs such as a second auxiliary AP and a third auxiliary AP according to the product condition to simulate the wireless environment of the actual lan for auxiliary test. The testing device is used for testing in a shielding chamber, and the shielding chamber is used for eliminating abnormal interference factors.
As shown in fig. 2, the testing tool includes a human-machine interface 11 (configuration and test log), a channel flow simulation script 12, a tested AP channel analysis module 13, an auxiliary test wireless AP channel configuration script 14, a wireless connection status monitoring module 15, and a Ping judgment module 16.
By using the testing device and the testing tool thereof, the testing method realized by the invention mainly comprises the following steps:
s1, manually setting up a testing device as shown in fig. 1, configuring the IP of the PC, the management IP of the tested AP and the management IP of the first auxiliary AP in a shielded room environment, starting the channel automatic function of the tested AP and checking whether the configuration is wrong;
s2, operating the automatic switching test tool of the wireless AP channel, inputting the initialization parameter of the wireless channel through a human-computer interface, and starting the test;
s3, the testing tool simultaneously executes the channel flow simulation script, the tested AP channel analysis module, the auxiliary testing wireless AP channel configuration script, the wireless state connection monitoring module and the Ping testing module through multithreading;
s4, checking the log information of the human-computer interface, and verifying the automatic switching process of the AP channel to be tested, whether the AP channel is disconnected or not, whether the AP channel cannot be connected to the Internet or not, and the stability.
The execution process of each part of the test tool in S3 is as follows:
the human-computer interface is used for configuring initialization parameters and outputting log information of a test process. The initialization parameters comprise management IP addresses of the first auxiliary AP and the tested AP, and wireless network card IP addresses of the first auxiliary PC and the second auxiliary PC. The test log information comprises the channel switching information and time of the AP to be tested and the packet loss amount information of the Ping test.
The channel flow simulation script calls an IxChariot and IXIA Endpoint performance test Tool of IXIA company by using a Tcl script (Tool Command Language), so as to control IXIA Endpoint terminals on the first auxiliary PC and the second auxiliary PC, enable the first auxiliary PC and the second auxiliary PC to transmit flow in an opposite manner, and simulate an actual channel saturation environment.
The measured AP channel analysis module adopts a WLAN API (Wireless local area network application programming interface) provided by Microsoft to complete real-time channel analysis and output channel switching information and a switching time interval to a human-computer interface.
The measured AP channel analysis method is shown in fig. 3:
step 1, judging a current operating system;
step 2, if the operating system is windows Vista/7/8, creating a WLAN handle, and executing the step 3; otherwise, returning to the step 1;
step 3, traversing the local wireless network card;
step 4, inquiring a channel of the AP to be tested, and recording first time and a first channel;
step 5, separating for a certain time, for example, 10 s;
step 6, inquiring the tested AP channel again, and recording a second time and a second channel;
step 7, comparing with the channel recorded at the previous time, and judging whether the tested AP channel is switched;
step 8, if the channel switching happens, outputting channel switching information, calculating and outputting a switching time interval according to the first time and the second time, and then returning to the step 1; if no channel switching occurs, go back to step 4.
The auxiliary test wireless AP channel configuration script is used for configuring a channel of a first auxiliary AP to enable the channel to be the same as an actual channel of the channel automatic function of the tested wireless AP. According to the wireless AP product form, a WEB interface management interface is generally available. For example, a CURL free tool developed by CURL organization in sweden is used as the WEB interface management interface to complete the configuration of the channel.
And when the channel of the tested AP is automatically switched and the first auxiliary AP channel for auxiliary test is inconsistent with the channel of the tested AP, executing the script to configure the first auxiliary AP channel for auxiliary test again, so that the first auxiliary AP channel is the same as the actual channel of the AP, and continuing the test.
The wireless state connection monitoring module adopts a WLAN API (Wireless local area network application programming interface) provided by Microsoft to complete the real-time monitoring of the wireless connection state of the local wireless network card, and if the wireless connection is disconnected, a piece of log information is output to a human-computer interface.
And the Ping test module defaults to execute 10 Ping tests at the same time through a plurality of subprocesses, judges the channel link state at the time point, and outputs Ping test information to the human-computer interface if any one of the 10 Ping tests fails and the time is in a channel switching interval.
In summary, the device and method for testing the automatic switching stability of the wireless AP channel in the present invention designs a testing tool to integrate a plurality of tools, i.e., an Ixia end point tool, a CURL tool, and a microsoft WLAN API, so as to implement a complete automatic testing scheme. One of the most important factors for switching the channel is whether the surrounding co-channel interference is serious, so that the invention adopts a channel simulation script, two PCs are used for streaming, the saturation throughput simulates the actual channel saturation environment, and the measured AP is interfered. The invention realizes the analysis of the AP channel to be detected, which is to inquire the switching from one wireless channel to another channel and the switching time during the connection period, collect the real-time channel response, compare and judge the detected data and output the channel switching information. The invention also realizes wireless connection monitoring, monitors the wireless connection state during channel switching, and outputs the log information of disconnection and internet access incapability.
While the present invention has been described in detail with reference to the preferred embodiments, it should be understood that the above description should not be taken as limiting the invention. Various modifications and alterations to this invention will become apparent to those skilled in the art upon reading the foregoing description. Accordingly, the scope of the invention should be determined from the following claims.