CN109951308A - A kind of method for configuring routers, device and storage medium - Google Patents
A kind of method for configuring routers, device and storage medium Download PDFInfo
- Publication number
- CN109951308A CN109951308A CN201711391479.6A CN201711391479A CN109951308A CN 109951308 A CN109951308 A CN 109951308A CN 201711391479 A CN201711391479 A CN 201711391479A CN 109951308 A CN109951308 A CN 109951308A
- Authority
- CN
- China
- Prior art keywords
- client
- configuration
- configuring
- routers
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a kind of method for configuring routers, device and storage medium, method includes: to create a tcp socket in the preset port tcp for rapid configuration WIFI router;The connection request from client is monitored in real time in the preset port tcp;And the connection with the client is established by the socket when listening to the connection request from client;If receiving the configuring request sent by the client within a preset time, the configuration-direct for including in the configuring request is parsed;And configurator is called to configure referring to the configuration-direct to the WIFI router.The present invention also provides a kind of configuration of routers device and storage mediums.
Description
Technical field
The invention belongs to wireless communication field more particularly to a kind of method for configuring routers, device and storage medium.
Background technique
With the fast development of WiFi technology and universal, the WIFI router and WIFI client currently on the market of WIFI
End product emerges one after another.For every a WIFI router, either ordinary user or professional technician, require to it
It is configured to be suitble to itself use needs.Such as: modification WIFI network title ssid, WIFI cipher mode, WIFI password,
WIFI sends the essential informations such as power.
There is following two to the configuration mode of WIFI router at present: 1, the web directly built in access WIFI router
Server, i.e. user open any browser, in address field input router IP address, to access the road WIFI by web page
By being configured after the configuration interface of device;2, it develops and matches the APP used with the WIFI router, bound by APP
Realize that the configuration to WIFI router operates afterwards.However, either above-mentioned any mode, all there is a problem of it is inconvenient,
Such as it will not be configured by browser, or be unwilling to operate after the binding of APP login account is installed.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
Place in view of above-mentioned deficiencies of the prior art, the present invention are to solve prior art defect and deficiency, propose one kind
Method for configuring routers is established by tcp socket and is communicated to connect, and the communication link by establishing fetches realization and routes to WIFI
The easy configurations such as SSID, the password modification of device, meet general user for the demand of SSID, password etc. quickly modified.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of method for configuring routers is used for rapid configuration WIFI router, includes the following steps:
A, a tcp socket is created in the preset port tcp;
B, the connection request from client is monitored in real time in the preset port tcp;
C, when listening to the connection request from client, the connection with the client is established by the socket;
D, whether judgement receives the configuring request sent by the client within a preset time;
If E, receiving the configuring request within a preset time, the configuration-direct for including in the configuring request is parsed;
F, configurator is called, and the WIFI router is configured referring to the configuration-direct.
Wherein, it when not hearing the connection request from client in the step C, then returns and executes the step B
The connection request from client is monitored in real time in the preset port tcp.
Wherein, step D judgement whether receive within a preset time the configuring request that is sent by the client it
Afterwards, further comprising the steps of: if not receiving the configuring request within a preset time, to disconnect the company between the client
It connects, and backs within step B and monitor the connection request from client in real time in the preset port tcp.
Wherein, configurator is called in step F, and the WIFI router is configured referring to the configuration-direct
Later, further comprising the steps of: Xiang Suoshu client sends the feedback information that a configuration is completed.
Wherein, it is further comprising the steps of: disconnected after Xiang Suoshu client sends the step of feedback information that a configuration is completed
Open the connection with the client.
Wherein, further comprising the steps of after Xiang Suoshu client sends the step of feedback information that a configuration is completed: to
The WIFI router sends an instruction of restarting.
The present invention also provides a kind of configuration of routers devices, for realizing the rapid configuration to WIFI router, including
Memory, processor and storage in the memory and the computer program that can run on the processor, and institute
State the step of realizing above-mentioned method for configuring routers when processor executes the computer program.
The present invention also provides a kind of storage medium, the storage medium is stored with configuration of routers program, which matches
Set the step of realizing above-mentioned method for configuring routers when program is executed by processor.
Compared with prior art, the invention proposes a kind of method for configuring routers, are established and are communicated by tcp socket
Connection, and the communication link by establishing fetches and realizes the easy configurations such as the SSID to WIFI router, password modification, meets general
The demand quickly modified of the user for SSID, password etc..
Detailed description of the invention
Fig. 1 is a kind of method for configuring routers preferred embodiment flow chart of the present invention.
Fig. 2 is a kind of configuration of routers device preferred embodiment theory structure block diagram of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer and more explicit, right as follows in conjunction with drawings and embodiments
The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and do not have to
It is of the invention in limiting.
The invention proposes a kind of method for configuring routers, are established and are communicated to connect by tcp socket, and pass through foundation
Communication link, which fetches, realizes the easy configurations such as the SSID to WIFI router, password modification, meets general user for SSID, password
Deng the demand quickly modified.
Fig. 1 is please referred to, Fig. 1 is the method for configuring routers preferred embodiment flow chart of an embodiment of the present invention.This hair
A kind of bright method for configuring routers, configures WIFI router to fast implement, comprising the following steps:
S100, a tcp socket is created in the preset port tcp;
In an embodiment of the present invention, a tcp socket is created on a preset port tcp in advance, to cover by the tcp
Word is connect to establish and be connected to the connection between the client of the WIFI router.
S200, the connection request from client is monitored in real time in the preset port tcp;
Specifically, monitoring the connection from client in real time in embodiment of the present invention method in the preset port tcp and asking
It asks.The client is to be connected to the client of the WIFI router, and including but not limited to: smart phone, Intelligent flat are set
Standby, PC etc..Also, in the embodiment of the present invention, this kind of real-time mode for monitoring connection request, it can be ensured that in client
End can receive the request when initiating the connection request at the first time, to quickly establish the connection with the client.
S300, when listening to the connection request from client, pass through the socket and establish with the client
Connection;
Specifically, realizing the communication connection with client by tcp socket in embodiment of the present invention.When listening to
When the connection request that the client issues, the connection with the client is established by the socket;When need disconnect with
When the communication connection of the client, then the socket line is closed.
Whether S400, judgement receive the configuring request sent by the client within a preset time;
Specifically, needing to be confirmed whether to receive client after establishing the communication connection with the client by socket
The configuring request of transmission, if not receiving the configuring request of client transmission, or receiving the request of client transmission is not pair
The configuring request of WIIF server will not continue to execute subsequent step.Also, in order to save system resource, the present invention is also
A preset time is set, after connecting with the client, if receiving the configuring request within a preset time, continues to hold
Row subsequent step;And if do not receive the configuring request yet within a preset time, will be regarded as client do not have configuration needs or
Configuration operation is abandoned, no longer will be performed subsequent step.
If S500, receiving the configuring request within a preset time, parses the configuration for including in the configuring request and refer to
It enables;
In an embodiment of the present invention, the configuring request is issued by way of tcp message, corresponding, is received described
When configuring request, will acquire includes configuration-direct in the tcp message, including but not limited to the WIFI router
The modification of SSID, the modification of password etc..If receiving the configuring request to the WIFI router within a preset time, parse
Configuration-direct in the configuring request out is configured so as to subsequent according to the configuration-direct.
S600, configurator is called, and the WIFI router is configured referring to the configuration-direct.
In embodiments of the present invention, after getting the configuration-directs such as the SSID modification, password modification, calling is matched
Program hostapad is set to modify to SSID, the password etc. of the WIFI router.
Method for configuring routers of the invention is established by tcp socket and is communicated to connect, and the communication connection by establishing
Come realize the SSID to WIFI router, password modification etc. easy configurations, meet general user for the quick of SSID, password etc.
The demand of modification.
In an embodiment of the present invention, when not hearing the connection request from the client in the step S300
When, the step S200 is executed by returning, the preset port tcp is continually maintained in and monitors the company from client in real time
Connect request.
In an embodiment of the present invention, whether received within a preset time in step S400 judgement by the visitor
It is further comprising the steps of after the configuring request that family end is sent:
If not receiving the configuring request within a preset time, the connection between the client is disconnected, and return again
It returns to step S200 and monitors the connection request from client in real time in the preset port tcp.
In the present embodiment, even if having been set up the connection with the client, if but within a preset time not
The configuring request for receiving client transmission is received, or receives the request of client transmission not to WIIF server
Configuring request, will be regarded as client does not have configuration needs or abandons configuration operation, and in order to timely discharge resource, it will be switched off
It is connect with the socket of the client, and backs within step S200, that is, be continually maintained in the preset port tcp
The connection request from client is monitored in real time.
In an embodiment of the present invention, configurator is called in step S600, and referring to the configuration-direct to described
It is further comprising the steps of after WIFI router is configured:
The feedback information that a configuration is completed is sent to the client.
In embodiments, it completes to return to the anti-of a configuration successful with postponing in the configuration-direct issued according to client
Feedforward information is to the client, so that user can hold configuration status, the even timely automated update in the client in time
The configuration status of the WIFI router.
In an embodiment of the present invention, to the client send one configuration complete feedback information the step for it
Afterwards, further comprising the steps of: to disconnect the connection with the client.
In the present embodiment, it in order to discharge resource in time, completes to the configuration of the WIFI router and instead
After presenting configuration successful information, the connection with the client can be disconnected, configuring request is initiated for next client and prepares.
In embodiments of the present invention, it is disconnected by closing the socket line with the client.
In an embodiment of the present invention, to the client send one configuration complete feedback information the step for it
Afterwards, further comprising the steps of: Xiang Suoshu WIFI router sends an instruction of restarting.
In another embodiment of the present invention, the feedback information that a configuration is completed is being sent to the client, and disconnect
Further comprising the steps of after the step of the connection of the client: Xiang Suoshu WIFI router sends an instruction of restarting.
In the present embodiment, the configuration-direct issued according to the client is completed to match and be postponed, it is also necessary to be restarted described
WIFI router could update the configuration, therefore, in embodiment of the present invention, after configuration is complete, it is also necessary to Xiang Suoshu
WIFI router sends an instruction of restarting, controls the WIFI router and restarts and update the configuration.
Referring to Fig. 2, Fig. 2 is a kind of configuration of routers device preferred embodiment theory structure block diagram of the present invention.The present invention
Also mention a kind of configuration of routers device, for WIFI router carry out rapid configuration, including processor 20, memory 21 and
It is stored in the computer program 22 that can be run in the memory 21 and on the processor 20, such as the method for communication control
Program.The processor 20 realizes the step in the embodiment of the method for above-mentioned each communication control when executing the computer program 22
Such as step S100 to S600 shown in FIG. 1 suddenly,.
Illustratively, the computer program 22 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 21, and are executed by the processor 20 to complete the present invention.It is one
Or multiple module/units can be the series of computation machine program instruction section that can complete specific function, the instruction segment is for retouching
State implementation procedure of the computer program 22 in the configuration of routers device.
The configuration of routers device can be used as a functional module and be built in WIFI router, be also possible to the road WIFI
It by device itself, may include, but are not limited to, processor 20, memory 21.It will be understood by those skilled in the art that Fig. 2 is only
It is the example of configuration of routers device, does not constitute the restriction to router configuration device, may include more or more than illustrating
Few component perhaps combines certain components or different components, such as the configuration of routers device can also include input
Output equipment, network access equipment, bus etc..
The processor 20 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic device
Part, discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processing
Device etc..
The memory 21 can be the internal storage unit of the configuration of routers device, such as configuration of routers device
Hard disk or memory.The memory 21 is also possible to the External memory equipment of the configuration of routers device, such as the road
By the plug-in type hard disk being equipped in device configuration device, intelligent memory card (Smart Media Card, SMC), secure digital
(Secure Digital, SD) card, flash card (Flash Card) etc..Further, the memory 21 can also both include
The internal storage unit of the configuration of routers device also includes External memory equipment.The memory 21 by store it is described based on
Other programs and data needed for calculation machine program and the configuration of routers device.The memory 21 can be also used for temporarily
Ground stores the data that has exported or will export.
The invention proposes a kind of method for configuring routers, are established and are communicated to connect by tcp socket, and pass through foundation
Communication link, which fetches, realizes the easy configurations such as the SSID to WIFI router, password modification, meets general user for SSID, password
Deng the demand quickly modified.
It should be understood that the foregoing is merely illustrative of the preferred embodiments of the present invention, it is not sufficient to limit of the invention
Technical solution within the spirit and principles in the present invention, can add according to the above description for those of ordinary skills
With increase and decrease, replacement, transformation or improvement, and all these increases and decreases, replacement, transformation or improved technical solution, it all should belong to this
The protection scope of invention appended claims.
Claims (8)
1. a kind of method for configuring routers, for carrying out rapid configuration to WIFI router, which is characterized in that including walking as follows
It is rapid:
A, a tcp socket is created in the preset port tcp;
B, the connection request from client is monitored in real time in the preset port tcp;
C, when listening to the connection request from client, the connection with the client is established by the socket;
D, whether judgement receives the configuring request sent by the client within a preset time;
If E, receiving the configuring request within a preset time, the configuration-direct for including in the configuring request is parsed;
F, configurator is called, and the WIFI router is configured referring to the configuration-direct.
2. method for configuring routers according to claim 1, which is characterized in that come from when not heard in the step C
When the connection request of client, then returns to the execution step B and monitored in real time in the preset port tcp from client
Connection request.
3. method for configuring routers according to claim 1, it is characterised in that: the step D judgement is within a preset time
It is further comprising the steps of after whether receiving the configuring request sent by the client:
If not receiving the configuring request within a preset time, the connection between the client is disconnected, and return to
The connection request from client is monitored in real time in the preset port tcp to step B.
4. method for configuring routers according to claim 1, which is characterized in that call configurator in step F, and join
It is further comprising the steps of after being configured according to the configuration-direct to the WIFI router:
The feedback information that a configuration is completed is sent to the client.
5. method for configuring routers according to claim 4, which is characterized in that Xiang Suoshu client sends a configuration and completes
Feedback information the step of after, it is further comprising the steps of:
Disconnect the connection with the client.
6. method for configuring routers according to claim 4, which is characterized in that Xiang Suoshu client sends a configuration and completes
Feedback information the step of after, it is further comprising the steps of:
An instruction of restarting is sent to the WIFI router.
7. a kind of configuration of routers device, for realizing the rapid configuration to WIFI router, which is characterized in that including storage
Device, processor and storage are in the memory and the computer program that can run on the processor, which is characterized in that
The processor realizes the step of the method for configuring routers as described in any one of claim 1 to 6 when executing the computer program
Suddenly.
8. a kind of storage medium, which is characterized in that the storage medium is stored with configuration of routers program, the configuration of routers
It is realized when program is executed by processor as described in any one of claim 1 to 6 the step of method for configuring routers.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711391479.6A CN109951308A (en) | 2017-12-21 | 2017-12-21 | A kind of method for configuring routers, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711391479.6A CN109951308A (en) | 2017-12-21 | 2017-12-21 | A kind of method for configuring routers, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109951308A true CN109951308A (en) | 2019-06-28 |
Family
ID=67004578
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711391479.6A Pending CN109951308A (en) | 2017-12-21 | 2017-12-21 | A kind of method for configuring routers, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109951308A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111884938A (en) * | 2020-06-30 | 2020-11-03 | 海尔优家智能科技(北京)有限公司 | Router information acquisition method and device |
CN112671556A (en) * | 2020-12-04 | 2021-04-16 | 珠海格力电器股份有限公司 | Router configuration method and device, storage medium and electronic device |
CN114024823A (en) * | 2022-01-05 | 2022-02-08 | 广州朗国电子科技股份有限公司 | Method and system for realizing convenient management of router |
CN116055581A (en) * | 2022-11-23 | 2023-05-02 | 广东博力威科技股份有限公司 | Data transmission control method, device, equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7870267B2 (en) * | 2007-05-16 | 2011-01-11 | International Business Machines Corporation | Creating global sessions across converged protocol applications |
CN103716811A (en) * | 2014-01-10 | 2014-04-09 | 余华生 | Method and device for controlling wireless router through intelligent terminal |
CN104243210A (en) * | 2014-09-17 | 2014-12-24 | 湖北盛天网络技术股份有限公司 | Method and system for remotely having access to administrative web pages of routers |
CN104683994A (en) * | 2015-03-18 | 2015-06-03 | 北京联盛德微电子有限责任公司 | Wireless network configuration method and wireless network devices |
CN105245359A (en) * | 2015-09-07 | 2016-01-13 | 上海斐讯数据通信技术有限公司 | Remote router management method, system and device |
CN105791005A (en) * | 2016-02-25 | 2016-07-20 | 深圳市共进电子股份有限公司 | Transmission control protocol (TCP) connection based method and apparatus for implementing remote operation and maintenance management |
-
2017
- 2017-12-21 CN CN201711391479.6A patent/CN109951308A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7870267B2 (en) * | 2007-05-16 | 2011-01-11 | International Business Machines Corporation | Creating global sessions across converged protocol applications |
CN103716811A (en) * | 2014-01-10 | 2014-04-09 | 余华生 | Method and device for controlling wireless router through intelligent terminal |
CN104243210A (en) * | 2014-09-17 | 2014-12-24 | 湖北盛天网络技术股份有限公司 | Method and system for remotely having access to administrative web pages of routers |
CN104683994A (en) * | 2015-03-18 | 2015-06-03 | 北京联盛德微电子有限责任公司 | Wireless network configuration method and wireless network devices |
CN105245359A (en) * | 2015-09-07 | 2016-01-13 | 上海斐讯数据通信技术有限公司 | Remote router management method, system and device |
CN105791005A (en) * | 2016-02-25 | 2016-07-20 | 深圳市共进电子股份有限公司 | Transmission control protocol (TCP) connection based method and apparatus for implementing remote operation and maintenance management |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111884938A (en) * | 2020-06-30 | 2020-11-03 | 海尔优家智能科技(北京)有限公司 | Router information acquisition method and device |
CN112671556A (en) * | 2020-12-04 | 2021-04-16 | 珠海格力电器股份有限公司 | Router configuration method and device, storage medium and electronic device |
CN114024823A (en) * | 2022-01-05 | 2022-02-08 | 广州朗国电子科技股份有限公司 | Method and system for realizing convenient management of router |
CN116055581A (en) * | 2022-11-23 | 2023-05-02 | 广东博力威科技股份有限公司 | Data transmission control method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10802906B2 (en) | Monitoring method and apparatus of server, and storage medium | |
CN109951308A (en) | A kind of method for configuring routers, device and storage medium | |
CN103117906B (en) | A kind of mobile terminal shares flux monitoring method during Wi-Fi hotspot | |
US20200326989A1 (en) | Building pool-based m2m service layer through nfv | |
CN102904959B (en) | Network accelerating method and gateway | |
CN102957623B (en) | A kind of maintaining method of neighborhood of border gate protocol and equipment | |
WO2020094035A1 (en) | Wireless network connection method for terminal | |
EP4066441B1 (en) | Management of iot devices in wireless communication networks | |
CN104243266A (en) | Method and device for network access | |
CN110381489A (en) | Bluetooth connecting method, display terminal and television set | |
CN105007602A (en) | Method for flow control of mobile terminal and flow control mobile terminal | |
CN113110864A (en) | Application program updating method and device and storage medium | |
CN110430280A (en) | Account automatic logging method and system, storage medium and cloud desktop server | |
CN104469970A (en) | Method and device for reconnecting data network | |
CN111245831A (en) | FTP data transmission method and device, and information interaction system of server and client | |
CN105530673A (en) | Network connection method and user equipment | |
CN106657076B (en) | TCP service implementation method and device for network name space | |
CN111901395A (en) | Multi-cluster switching method and device | |
CN113709142B (en) | Hot spot distribution network method and device, intelligent terminal and storage medium | |
CN112511621A (en) | Data transmission method and device, storage medium, and electronic device | |
CN114286431B (en) | Method and device for starting low-power mode, storage medium and electronic device | |
CN105446803A (en) | Application management method and apparatus | |
CN111385167B (en) | Network connection recovery method, device, computer device and storage medium | |
CN109133225A (en) | Water purifier control method, device, equipment and storage medium | |
CN110762774B (en) | Upgrading method of air conditioner and air conditioner |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190628 |