Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The main solutions of the embodiments of the present invention are: a WIFI throughput test method comprises the following steps:
confirming a current test mode;
when the current test mode is a first mode, the WIFI throughput test device is controlled to be switched to an STA mode;
controlling the WIFI throughput testing device to scan and detect SSID signals and automatically connecting the AP equipment to be tested with the strongest SSID signals;
and controlling the WIFI throughput testing device and the AP equipment to be tested to carry out WIFI throughput testing.
Due to the endless new standard layer of new protocols in the computer field and the communication field, the average throughput of the modem devices of the network terminals is also increased from 16Kbps twenty years ago to 1000Mbps today. Also with the upgrading and updating of manufacturing industry, automatic test production lines have been popularized to factories of all countries in the world.
Throughput is the maximum data traffic that can be forwarded by the tested device without packet loss, and is one of the most important indexes for measuring network performance. The current general WIFI throughput test environment configuration needs 2 computers, one tested device, one corresponding STA (Station) or AP (Access Point) device, and 2 shielding boxes shield environment interference. The testing method can only detect one product in one testing period, and has low efficiency, so that the bottleneck of the production speed of the production line is caused. On the common test site of the factory, a skilled trained staff operates two sets of equipment, namely 4 computers and other matched equipment, and the production products are tested in turn left and right in a staggered way, so that the cost expenditure is huge and the speed is low. The need to add multiple test stations to a single production line often creates significant production test equipment cost expense.
The invention provides a WIFI throughput test method, which ensures that a WIFI throughput test device can correctly detect equipment which needs to be detected currently by confirming a current test mode, and when the current test mode is a first mode, the WIFI throughput test device is controlled to switch to an STA mode, the WIFI throughput test device is controlled to scan and detect SSID signals and automatically connect with an AP equipment to be tested with the strongest SSID signals, so that the WIFI throughput test device can carry out WIFI throughput test with the AP equipment to be tested, the problem of excessive hardware facilities configured in a WIFI throughput test environment in the prior art is solved, the test cost is effectively saved by reducing hardware configuration, and the test efficiency is remarkably improved by simplifying a test flow.
As shown in fig. 1, fig. 1 is a schematic diagram of a terminal structure of a hardware running environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, or terminal equipment with network connection function such as a server, a smart phone, a tablet personal computer, a portable computer and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Optionally, the terminal may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and so on. Among other sensors, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and the direction when the mobile terminal is stationary, and the mobile terminal can be used for recognizing the gesture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, which are not described herein.
It will be appreciated by those skilled in the art that the terminal structure shown in fig. 1 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a WIFI throughput test program may be included in a memory 1005, which is a type of computer storage medium.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and processor 1001 may be configured to invoke the WIFI throughput test program stored in memory 1005 and perform the following operations:
selecting a test mode of the WIFI throughput test device according to the type of the equipment to be tested;
selecting a connection mode between the WIFI throughput testing device and the equipment to be tested according to the testing mode of the WIFI throughput testing device;
and controlling the WIFI throughput testing device and the equipment to be tested to carry out WIFI throughput testing.
Further, the processor 1001 may call the WIFI throughput test program stored in the memory 1005, and further perform the following operations:
the step of selecting the test mode of the WIFI throughput test device according to the type of the equipment to be tested comprises the following steps:
when the equipment to be tested is AP equipment, controlling the test mode of the WIFI throughput test device to be switched to an STA mode;
and when the equipment to be tested is STA equipment, controlling the test mode of the WIFI throughput test device to be switched to an AP mode.
Further, the processor 1001 may call the WIFI throughput test program stored in the memory 1005, and further perform the following operations:
the step of selecting the connection mode between the WIFI throughput testing device and the equipment to be tested according to the testing mode of the WIFI throughput testing device comprises the following steps:
when the test mode is the STA mode, the WIFI throughput test device is controlled to scan and detect SSID signals within a preset distance range according to preset scanning frequency, and the device to be tested with the strongest SSID signals is automatically connected;
when the test mode is an AP mode, controlling the WIFI throughput test device to set an SSID and/or a channel, and controlling the equipment to be tested to be connected to the WIFI throughput test device.
Further, the processor 1001 may call the WIFI throughput test program stored in the memory 1005, and further perform the following operations:
and after the WIFI throughput test is finished, controlling the WIFI throughput test device to feed back throughput test data.
Further, the processor 1001 may call the WIFI throughput test program stored in the memory 1005, and further perform the following operations:
and integrating the preset tool into a WIFI throughput testing device.
Further, the processor 1001 may call the WIFI throughput test program stored in the memory 1005, and further perform the following operations:
and judging whether the throughput test data meets a preset standard or not.
Further, the processor 1001 may call the WIFI throughput test program stored in the memory 1005, and further perform the following operations:
and if the throughput test data meets the preset standard, the control prompt module displays a first preset state.
Further, the processor 1001 may call the WIFI throughput test program stored in the memory 1005, and further perform the following operations:
and if the throughput test data does not meet the preset standard, controlling the prompt module to display a second preset state.
Referring to fig. 2, a first embodiment of the present invention provides a WIFI throughput test method, where the WIFI throughput test method includes:
step S10, selecting a test mode of the WIFI throughput test device according to the type of the equipment to be tested;
it should be noted that, in this embodiment, the execution body is an industrial control computer or a server, the WIFI throughput test method provided in this embodiment may be used in an experiment development scenario or a production line production scenario, the device to be tested may be an AP device or an STA device, the WIFI throughput test device is a tool device for detecting the device to be tested in this embodiment, and the WIFI throughput test device is developed based on a radio frequency scheme, and can support STA/AP mode switching, that is, the test mode may be an STA mode or an AP mode.
It can be understood that, whether in an experiment research and development scenario or in a production line production scenario, before detection, an industrial control computer or a server is required to confirm the type of the currently tested device to be tested, so as to select a test mode corresponding to the WI and the device to be tested, and then, according to the test mode, the tool device, namely the WIFI throughput test device, is correspondingly set, namely, the test mode of the WIFI throughput test device is selected.
In this embodiment, before the step S10 of embedding the preset tool in the device to be tested includes:
step s01, integrating the preset tool into a WIFI throughput testing device.
It should be noted that the preset tool is an open source throughput test tool Iperf, which is a network performance test tool. The Ipref can test the maximum TCP and UDP bandwidth performance, has various parameters and UDP characteristics, can be adjusted according to the needs, and can report bandwidth, delay jitter and data packet loss. In this embodiment, the Iperf tool needs to be supported or integrated in the AP device under test, the STA device under test, and the tool device.
Step S20, selecting a connection mode between the WIFI throughput testing device and the equipment to be tested according to the testing mode of the WIFI throughput testing device;
it can be understood that when the tool device is in different test modes, the connection mode between the tool device and the device to be tested is different, for example, when the device to be tested is an AP device, the tool device is in an STA mode, and at this time, the connection mode between the tool device and the device to be tested is that the tool device is connected to the device to be tested; similarly, when the device to be tested is the STA device, the tool device is in the AP mode, and at this time, the tool device needs to set an access mode so that the device to be tested can access the tool device to perform WIFI throughput test.
And step S30, controlling the WIFI throughput testing device and the equipment to be tested to carry out WIFI throughput testing.
The WIFI throughput test is actually a test of throughput, that is, the amount of data successfully transferred between the tool device and the device to be tested in a unit time. In this embodiment, the test method for WIFI throughput is: transmitting a preset number of frames at a preset rate in the test, calculating the frames transmitted by the device to be tested, and if the transmitted frames are equal to the received frames in number, increasing the transmission rate and retesting; if the received frame is less than the transmitted frame, the transmission rate is reduced to retest until a final result is obtained. Throughput test results are expressed in bits/second or bytes/second.
It may be appreciated that the preset rate may be a rate set by the user in the tool device, or may be a default rate included in a factory setting of the tool device that is not modified, which is not limited in this embodiment; similarly, the preset number of frames may be the number of frames set by the user in the tool device, or may be a default number of frames included in the factory setting of the tool device that has not been modified, which is not limited in this embodiment.
In the method, a test mode of a WIFI throughput test device is selected according to the type of equipment to be tested, so that the WIFI throughput test device can accurately switch the test mode; according to the test mode of the WIFI throughput test device, a connection mode between the WIFI throughput test device and the equipment to be tested is selected, so that the WIFI throughput test device can accurately establish connection with the equipment to be tested; after connection establishment is completed, the WIFI throughput testing device and the device to be tested are controlled to carry out WIFI throughput testing, so that the problem that the WIFI throughput testing environment is configured with too many hardware facilities in the prior art is solved, testing cost is effectively saved by reducing hardware configuration, and testing efficiency is remarkably improved by simplifying testing flow.
Further, referring to fig. 3, a second embodiment of the WIFI throughput testing method of the present invention is proposed, based on the embodiment shown in fig. 2, in this embodiment, step S10 includes:
step A10, when the equipment to be tested is AP equipment, controlling the test mode of the WIFI throughput test device to be switched to an STA mode;
in this embodiment, the device to be tested is in an AP mode, where AP is an Access Point, which is called a "wireless Access node", and the wireless AP is a bridge for communication between a wireless network and a wired network, and is a core device for building a wireless local area network (WLAN, wireless Local Area Network). It mainly provides mutual access between the wireless station and the wired LAN, so that the wireless stations in the coverage area of the AP signal can communicate with each other through the wireless station, and the WLAN which can access the Internet in the true sense can not be built without the AP. The AP in the WLAN corresponds to the role of the transmitting base station in the mobile communication network. When the device to be tested is an AP device, it is necessary to control a tool device, that is, the WIFI throughput test device to switch to an STA mode, where the STA is generally a client in the WLAN, and may be a computer equipped with a wireless network card, or may be a smart phone with a WIFI module. The STA may be mobile or fixed, and is the most basic component of a wireless local area network. In this embodiment, the tool device has the function of the STA client as described above.
In this embodiment, step S20 includes:
step A20, when the test mode is the STA mode, controlling the WIFI throughput test device to scan and detect SSID signals within a preset distance range according to a preset scanning frequency, and automatically connecting the equipment to be tested with the strongest SSID signals;
it should be noted that, in this embodiment, the SSID (Service Set Identifier, abbreviated as service set identifier) signal is a broadcast signal sent by the AP device to be tested, where SSID is a general concept, and includes ESSID and BSSID, which are used to distinguish different networks, and may have 32 characters at most, and the wireless network card may enter different networks when different SSID is set, where SSID is usually broadcast by the AP, and the SSID in the current area may be checked by the scanning function of each STA. In short, SSID is the name of a local area network, and only devices set to the same SSID value can communicate with each other. The AP device to be tested may be a wireless switch or a wireless router, which is not limited in this embodiment.
It can be understood that the industrial control computer or the server can control the tool equipment to scan and detect the SSID signal, and automatically connect the AP equipment to be tested with the strongest SSID signal to perform WIFI throughput test.
It should be noted that, the preset scanning frequency may be a frequency set by the user in the tool device, or may be a default frequency included in the factory setting of the tool device that is not modified, which is not limited in this embodiment; similarly, the preset distance range may be a default scanning distance range included in factory setting, or a scanning distance range set by a user in the tool device.
In specific implementation, the tool equipment is placed in a shielding box, the tested AP equipment sequentially enters the shielding box, when the first tested AP equipment enters the shielding box, the scanning function of the tool equipment is started, the SSID signal broadcasted by the tested AP equipment scanned into the current shielding box is the strongest signal, and the tested AP equipment in the current shielding box is automatically connected.
In this embodiment, step a20 includes: step S30 is performed.
In the method, when the device to be tested is an AP device, the test mode of the WIFI throughput test device is controlled to be switched to the STA mode, so that the WIFI throughput test device is ensured to be able to switch the test mode accurately; when the test mode is the STA mode, the WIFI throughput test device is controlled to scan and detect SSID signals within a preset distance range according to preset scanning frequency, and the device to be tested with the strongest SSID signals is automatically connected, so that the WIFI throughput test device can accurately establish connection with the device to be tested; after connection establishment is completed, the WIFI throughput testing device and the device to be tested are controlled to carry out WIFI throughput testing, so that the problem that the WIFI throughput testing environment is configured with too many hardware facilities in the prior art is solved, testing cost is effectively saved by reducing hardware configuration, and testing efficiency is remarkably improved by simplifying testing flow.
Further, referring to fig. 4, a third embodiment of the WIFI throughput testing method according to the present invention is provided, and based on the embodiment shown in fig. 2, in this embodiment, step S10 includes:
step B10, when the equipment to be tested is STA equipment, controlling the test mode of the WIFI throughput test device to be switched to an AP mode;
it should be noted that, in this embodiment, the device to be tested is in STA mode, so that it is required to control the tool device, that is, the WIFI throughput test device, to switch to AP mode, at this time, the tool device may be accessed by a terminal having a network connection function, for example, a smart phone, a tablet computer, etc., after the user successfully accesses the tool device through the terminal, the user may modify parameters of the tool device, including parameter modification in two modes, including AP mode and STA mode, where the process of parameter modification is not necessary, and if the user does not modify parameters of the tool device, factory parameter setting of the tool device is used by default.
In this embodiment, step S20 includes:
step B20, when the test mode is an AP mode, controlling the WIFI throughput test device to set SSID and/or channel, and controlling the equipment to be tested to be connected to the WIFI throughput test device;
in this embodiment, the Channel is a wireless Channel, that is, a wireless "Channel", which is a data signal transmission Channel using a wireless signal as a transmission medium; the STA device to be tested can be a monitoring device or other devices including a network card to be tested.
It can be appreciated that in this embodiment, since the tool device is operated in the AP mode, in order to detect the STA device to be detected, a connection with the STA device to be detected needs to be established first, so after the tool device is switched to the AP mode, it is necessary to control the tool device to set an SSID and/or a wireless channel.
In this embodiment, the step B20 includes: step S30 is performed.
In the method, when the device to be tested is the STA device, the test mode of the WIFI throughput test device is controlled to be switched to the AP mode, so that the WIFI throughput test device can accurately switch the test mode; when the test mode is an AP mode, controlling the WIFI throughput test device to set an SSID and/or a channel, and controlling the equipment to be tested to be connected to the WIFI throughput test device, so that the WIFI throughput test device can accurately establish connection with the equipment to be tested; after connection establishment is completed, the WIFI throughput testing device and the device to be tested are controlled to carry out WIFI throughput testing, so that the problem that the WIFI throughput testing environment is configured with too many hardware facilities in the prior art is solved, testing cost is effectively saved by reducing hardware configuration, and testing efficiency is remarkably improved by simplifying testing flow.
Further, referring to fig. 5, a third embodiment of the WIFI throughput test method according to the present invention is provided, based on the embodiments shown in fig. 2, 3 or 4, step S30 includes:
step S40, after the WIFI throughput test is completed, controlling the WIFI throughput test device to feed back throughput test data;
step S50, judging whether the throughput test data meets a preset standard or not;
step S60, if the throughput test data meets the preset standard, the control prompt module displays a first preset state.
It should be noted that, in this embodiment, the tool device may provide a data interface, and if the user needs to obtain the throughput test data, the user may access the data interface to obtain the data, where the access manner may be wired or wireless; the preset standard is a standard for judging whether the throughput is qualified, and can be a comparison standard value set by a user in the tool equipment or a default standard value contained in the factory setting of the tool equipment which is not changed; the display module may be an LED indicator light on the tool device, and the first preset state may be represented as an LED green light.
It can be understood that when the LED is bright green, the current AP device to be tested or STA device to be tested is qualified in WIFI throughput test, and the test result is OK or PASS.
In this embodiment, step S50 further includes:
and if the throughput test data does not meet the preset standard, controlling the prompt module to display a second preset state.
It should be noted that, the second preset state may be represented as a bright red LED.
It can be understood that the condition of unqualified test also exists in the test process, and when the LED is bright red, the current test of the WIFI throughput of the AP equipment to be tested or the STA equipment to be tested is unqualified, and the test result is NG or FAIL.
In this embodiment, an experimenter or a production line operator may obtain feedback and make corresponding processing measures according to the test results displayed on the LED lamp or the terminal device of the tool device.
It will be appreciated that this embodiment may be combined with the first embodiment or with the second embodiment.
In the method, throughput test data is fed back by controlling the WIFI throughput test device, whether the throughput test data meets preset standards is judged, if the throughput test data meets the preset standards, a prompt module is controlled to display a first preset state, a user is prompted to detect whether the current equipment to be tested is qualified, and if the throughput test data does not meet the preset standards, the prompt module is controlled to display a second preset state, and the user is prompted to detect whether the current equipment to be tested is unqualified.
In addition, the embodiment of the invention also provides a computer readable storage medium, wherein a WIFI throughput test program is stored on the computer readable storage medium, and the following operations are realized when the WIFI throughput test program is executed by a processor:
selecting a test mode of the WIFI throughput test device according to the type of the equipment to be tested;
selecting a connection mode between the WIFI throughput testing device and the equipment to be tested according to the testing mode of the WIFI throughput testing device;
and controlling the WIFI throughput testing device and the equipment to be tested to carry out WIFI throughput testing.
Further, the WIFI throughput test program when executed by the processor further performs the following operations:
the step of selecting the test mode of the WIFI throughput test device according to the type of the equipment to be tested comprises the following steps:
when the equipment to be tested is AP equipment, controlling the test mode of the WIFI throughput test device to be switched to an STA mode;
and when the equipment to be tested is STA equipment, controlling the test mode of the WIFI throughput test device to be switched to an AP mode.
Further, the WIFI throughput test program when executed by the processor further performs the following operations:
the step of selecting the connection mode between the WIFI throughput testing device and the equipment to be tested according to the testing mode of the WIFI throughput testing device comprises the following steps:
when the test mode is the STA mode, the WIFI throughput test device is controlled to scan and detect SSID signals within a preset distance range according to preset scanning frequency, and the device to be tested with the strongest SSID signals is automatically connected;
when the test mode is an AP mode, controlling the WIFI throughput test device to set an SSID and/or a channel, and controlling the equipment to be tested to be connected to the WIFI throughput test device.
Further, the WIFI throughput test program when executed by the processor further performs the following operations:
and after the WIFI throughput test is finished, controlling the WIFI throughput test device to feed back throughput test data.
Further, the WIFI throughput test program when executed by the processor further performs the following operations:
and integrating the preset tool into a WIFI throughput testing device.
Further, the WIFI throughput test program when executed by the processor further performs the following operations:
and judging whether the throughput test data meets a preset standard or not.
Further, the WIFI throughput test program when executed by the processor further performs the following operations:
and if the throughput test data meets the preset standard, the control prompt module displays a first preset state.
Further, the WIFI throughput test program when executed by the processor further performs the following operations:
and if the throughput test data does not meet the preset standard, controlling the prompt module to display a second preset state.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.