Summary of the invention
Technical problem to be solved by this invention is: when wireless network connects unstable, replace manual restarter, to realize restarting by program.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is: provide a kind of method optimizing wireless network stability, comprising:
S1: preset test station, and the user name of recording user input and corresponding password thereof;
S2: according to described user name and corresponding password thereof, repeats to disconnect, obtain wireless network connection, the IP address of record active wireless network;
S3: testing equipment judges whether can access test station by the IP address of wireless network;
S4: if not, then use described user name and corresponding password thereof, logs in the router administration page, restarter.
For solving the problem, the present invention also provides a kind of system optimizing wireless network stability, comprises testing equipment and router, and performs following step:
S1: preset test station, and the user name of recording user input and corresponding password thereof;
S2: according to described user name and corresponding password thereof, repeats to disconnect, obtain wireless network connection, the IP address of record active wireless network;
S3: testing equipment judges whether can access test station by the IP address of wireless network;
S4: if not, then use described user name and corresponding password thereof, logs in the router administration page, restarter.
Beneficial effect of the present invention is: be different from prior art, and the present invention passes through the user name of wireless network and corresponding password thereof, when there is unstable networks, repeatedly disconnect network, and log in router management interface, restart, connect to obtain stable network.By the way, the present invention can realize procedure operation and connect, and without the need to artificially manually restarting, can be user-friendly to, and simple operation.
Embodiment
By describing technology contents of the present invention in detail, realized object and effect, accompanying drawing is coordinated to be explained below in conjunction with execution mode.
The design of most critical of the present invention is: by the restarting of program control router, connect, avoid people to be manual operation, facilitate user.
Please refer to Fig. 1, the embodiment of the present invention one provides a kind of method optimizing wireless network stability, comprising:
S1: preset test station, and the user name of recording user input and corresponding password thereof;
S2: according to described user name and corresponding password thereof, repeats to disconnect, obtain wireless network connection, the IP address of record active wireless network;
S3: testing equipment judges whether can access test station by the IP address of wireless network;
S4: if not, then use described user name and corresponding password thereof, logs in the router administration page, restarter.
Be different from prior art, the present invention passes through the user name of wireless network and corresponding password thereof, when there is unstable networks, repeatedly disconnects network, and logs in router management interface, restart, and connects to obtain stable network.By the way, the present invention can realize procedure operation and connect, and without the need to artificially manually restarting, can be user-friendly to, and simple operation.
As shown in Figure 2, on the basis of embodiment one, the step S2 of the embodiment of the present invention two is specially:
S21: use the testing equipment simultaneously with wireless network card and wired network adapter;
S22: according to described user name and corresponding password thereof, testing equipment repeats to disconnect, obtain wireless network connection by wireless network card;
S23: the IP address of record active wireless network, and store.
Wherein, step S3 is specially:
S31: judge whether the duration cannot being accessed test station by the IP address of wireless network exceedes predetermined threshold value; Or
S32: judge whether to there is no response to the IP address transmission data bag of active wireless network.
Wherein, step S4 is specially:
S41: initiate the first http request containing described user name and corresponding password thereof, to obtain authenticate password;
S42: initiate the second http request containing described authenticate password, logs in the router administration page;
S43: obtain the operational order that routers is restarted, restarter.
Wherein after step S3, also comprise:
If so, then return and perform step S2.
Particularly, in practical operation, user can select to possess the electronic equipment that can be connected with spider lines and wireless network, as notebook computer or other.Installation and measuring program on equipment, detects situation about using as wireless networks such as WiFi for timing.If there is unstable network, then again by the mode access router of cable network.
Be exemplified below: the predeterminable available test station for detecting the wireless networks such as WiFi, as: http://www.baidu.com/.
Then, program on notebook uses wireless network card again to log in WiFi (the i.e. password of recording user input according to the WiFi of user's typing and the timing of login user name password thereof, timing disconnects-connects same WiFi), and whether Sampling network can have access to test station.And the network interface card IP address of current WiFi is saved in hard disk or file.
Predetermined threshold value cannot be exceeded by access preset website if there is WiFi circuit, as 1 minute, 2 minutes etc., or cannot respond the packet that current WiFi network interface card IP address sends, then to the user name using user to pre-enter and the cryptographic acess router administration page thereof.After automatically logging in router management interface, call router and restart interface routers and carry out autoboot.
As when calling, by initiating the first http request, in the first http request, comprise the username and password of router management interface, to obtain authenticate password.
Subsequently, then pass through initiation second http request, comprise authenticate password in the second http request, in access router administration interface, remove restarter.The button of such as Fig. 3, after acquisition click commands, namely achieves the object of restarter.Therefore to a certain extent, embodiments of the invention are these http request of similar simulation, and the interface calling router restarts route, as long as so pass through, just can realize by program autoboot router.
As shown in Figure 3, the embodiment of the present invention three provides a kind of system 100 optimizing wireless network stability, comprises testing equipment 110 and router one 20, and performs following step:
S1: preset test station, and the user name of recording user input and corresponding password thereof;
S2: according to described user name and corresponding password thereof, repeats to disconnect, obtain wireless network connection, the IP address of record active wireless network;
S3: testing equipment 110 judges whether can access test station by the IP address of wireless network;
S4: if not, then use described user name and corresponding password thereof, logs in the router administration page, restarter 120.
Wherein, step S2 is specially:
S21: use the testing equipment 110 simultaneously with wireless network card and wired network adapter;
S22: according to described user name and corresponding password thereof, testing equipment 110 repeats to disconnect, obtain wireless network connection by wireless network card;
S23: the IP address of record active wireless network, and be stored in hard disk.
Wherein, step S3 is specially:
S31: judge whether the duration cannot being accessed test station by the IP address of wireless network exceedes predetermined threshold value; Or
S32: judge whether to there is no response to the IP address transmission data bag of active wireless network.
Wherein, step S4 is specially:
S41: initiate the first http request containing described user name and corresponding password thereof, to obtain authenticate password;
S42: initiate the second http request containing described authenticate password, logs in the router administration page;
S43: obtain the operational order that routers 120 is restarted, restarter 120.
Wherein after step S3, also comprise:
If so, then return and perform step S2.
The foregoing is only embodiments of the invention; not thereby the scope of the claims of the present invention is limited; every equivalents utilizing specification of the present invention and accompanying drawing content to do, or be directly or indirectly used in relevant technical field, be all in like manner included in scope of patent protection of the present invention.