CN107135529B - Method for realizing automatic connection of AP and STA and synchronizing AP configuration modification - Google Patents
Method for realizing automatic connection of AP and STA and synchronizing AP configuration modification Download PDFInfo
- Publication number
- CN107135529B CN107135529B CN201710289085.3A CN201710289085A CN107135529B CN 107135529 B CN107135529 B CN 107135529B CN 201710289085 A CN201710289085 A CN 201710289085A CN 107135529 B CN107135529 B CN 107135529B
- Authority
- CN
- China
- Prior art keywords
- sta
- configuration
- server
- connection
- client
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000012986 modification Methods 0.000 title claims abstract description 9
- 230000004048 modification Effects 0.000 title claims abstract description 9
- 230000001360 synchronised effect Effects 0.000 claims abstract description 8
- 238000012790 confirmation Methods 0.000 claims description 8
- 238000004891 communication Methods 0.000 claims description 5
- 230000008569 process Effects 0.000 claims description 4
- 230000006855 networking Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 3
- 230000006872 improvement Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/08—Access restriction or access information delivery, e.g. discovery data delivery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/16—Discovering, processing access restriction or access information
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a method for realizing automatic connection between an AP server and an STA client and synchronizing configuration modification of the AP server, which comprises the following steps: the AP configures a hidden Service Set Identifier (SSID) and a key; the STA leaves factory and is set as a hidden service set identifier SSID which is default and is automatically connected with the AP; after the STA is connected with the AP, link connection is established, and then the wireless configuration of the AP is requested to be synchronously displayed; and the STA disconnects the hidden service set identification SSID after receiving the service set identification SSID configuration displayed by the AP, and reconnects the displayed service set identification SSID configuration according to the self setting. The invention can realize that the STA automatically connects with the AP, and when a user changes the wireless configuration of the AP, the STA of the terminal equipment can realize automatic synchronous connection after the AP changes the configuration. The invention simplifies the complicated steps of setting connection of the wireless network, and can realize plug-and-play and automatic configuration in a foolproof manner.
Description
Technical Field
The invention relates to the field of communication terminals, in particular to a method for realizing automatic connection of an AP (access point) and an STA (station) and synchronizing AP configuration modification.
Background
With the development of ieee e802.11 wireless technology, wireless terminal products are becoming more and more diverse in the current life. Wireless terminal equipment that needs the networking such as wireless router, wireless intelligent home gateway, wireless network camera, wireless television box is more and more, and here, the user realizes that the operation process of wireless terminal networking is also more and more complicated.
The traditional manual configuration connection and networking have the following problems:
(1) the wireless network terminal devices are more and more diversified, and each device needs to be accessed to the AP, so that the operation is complex and complicated, and some devices need professional knowledge;
(2) different terminal devices and various connection modes, and the steps are complicated, so that the user needs to add the terminal devices by repeated operation according to the introduction of the specification;
(3) if the user changes some wireless configurations (such as SSID and password, encryption mode) of the AP, all devices will be disconnected and reconnected, the steps are complicated, and if the connection is not successful, the connection is set repeatedly.
How to realize automatic networking of wireless terminals on a client-side level, and let users experience full-range fool connection, which is plug-and-play networking and then automatic networking of devices? These problems all present challenges to the prior art. Accordingly, the prior art is deficient and needs improvement.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for realizing automatic connection of an AP and an STA and synchronizing AP configuration modification.
The technical scheme of the invention is as follows: a method for realizing automatic connection between AP and STA and synchronizing AP configuration modification comprises the following steps:
s1, configuring a hidden Service Set Identifier (SSID) and a hidden key by the AP, wherein the SSID and the hidden key cannot be searched and modified by a user;
s2, the STA is factory set to default a hidden service set identifier SSID for automatically connecting the AP;
s3, after the STA is connected with the AP, link connection is established, and then the wireless configuration of the AP is requested to be synchronously displayed;
and S4, disconnecting the hidden service set identifier SSID after the STA receives the service set identifier SSID configuration displayed by the AP, and reconnecting the displayed service set identifier SSID configuration according to the self setting, thereby completing the automatic synchronization configuration.
Further, when the user modifies the service set identifier SSID or Key configuration of the AP halfway, the connection of the STA is disconnected, and steps S1 to S4 are automatically repeated.
Further, the AP comprises a gateway or a routing AP; and the AP configures the hidden service set identifier SSID and the key by running a self server program.
Further, the STA realizes connection with the AP by running its own client program.
Further, the method for the STA to connect to the AP, establish a link connection, and request to synchronously display the wireless configuration of the AP in step S3 includes the following steps:
s301, the STA client creates an eth0:1 network interface according to the connection state, starts a dhcpc service program to acquire the IP provided by the AP, and meanwhile, the AP server creates socket connection, monitors a port defined by a private and waits for receiving the connection of the STA client;
s302, the STA client acquires the IP address of the AP and performs TCP communication;
s303, if the STA client successfully establishes a smooth link with the AP server, the STA client establishes socket connection, connects a private port defined by the AP server, and enters the next step, and if the connection is overtime, the STA client is reconnected;
and S304, after the connection is successful, the STA client requests wireless configuration from the AP server according to the protocol.
Further, the method for implementing that the STA reconnects the AP server according to its own settings in step S4 and completes the automatic synchronization configuration includes the following steps:
s401, the AP server reads and stores the wireless configuration of the AP server;
s402, the AP server side sends wireless configuration to an STA client side connected in, and waits for the confirmation of the STA client side;
s403, after the STA client receives the wireless configuration of the AP server, the STA client sends ACK to the AP server, the hidden connection is disconnected, and the connection link is closed;
s404, the STA client compares the AP server wireless configuration with the local wireless configuration, if the AP server wireless configuration is the same as the local wireless configuration, the AP server wireless configuration is not processed, and if the AP server wireless configuration is different from the local wireless configuration, the configuration is synchronized, and the setting is effective;
s405, the AP server receives the ACK confirmation of the STA client, and supports the connection request of the STA client and processes the connection request.
By adopting the scheme, the invention has the following beneficial effects:
1. the invention realizes that when the wireless network terminal equipment STA is accessed to the AP, the SSID and PASSWORD of the AP do not need to be manually set under the condition of a wireless hotspot, and the wireless network terminal equipment STA is connected one by one. The STA can automatically connect with the AP only by running a self server program on the AP and running a client program on the terminal equipment STA.
2. When the user changes the wireless configuration of the AP, the terminal equipment STA can realize automatic synchronous connection after the AP changes the configuration. The invention simplifies the complicated steps of setting connection of the wireless network, and can realize plug-and-play and automatic configuration in a foolproof manner.
Drawings
FIG. 1 is a data interaction diagram of the present invention;
FIG. 2 is a flowchart of the AP server;
fig. 3 is a flow chart of the STA client.
Detailed Description
The invention is described in detail below with reference to the figures and the specific embodiments.
Referring to fig. 1 and fig. 2, the present invention provides a method for implementing automatic connection between an AP and a STA and synchronizing AP configuration modification, including the following steps:
s1, configuring a hidden Service Set Identifier (SSID) and a hidden key by the AP, wherein the SSID and the hidden key cannot be searched and modified by a user;
s2, the STA is factory set to default a hidden service set identifier SSID for automatically connecting the AP;
s3, after the STA is connected with the AP, link connection is established, and then the wireless configuration of the AP is requested to be synchronously displayed;
and S4, disconnecting the hidden service set identifier SSID after the STA receives the service set identifier SSID configuration displayed by the AP, reconnecting the displayed service set identifier SSID configuration according to the self setting, and completing the automatic synchronous configuration, wherein the configuration comprises 2.4G and 5G related configurations, such as configuration SSID, PASSWORD, AUTHMODE and other parameters.
When the user modifies the service set identifier SSID or Key Key configuration of the AP midway, the connection of the STA is disconnected, and the steps 1 to 4 are automatically repeated.
Notably, the AP comprises a gateway or a routing AP; the AP configures the hidden service set identifier SSID and the key by running a self server program, and the program is a portable program written by C language and can send the wireless configuration of the AP to the STA.
The STA equipment can be wireless access equipment such as a wireless router, a wireless repeater, a wireless network camera and a wireless intelligent home gateway in a relay mode. The STA realizes the connection with the AP by running a client program of the STA, the program is a portable program written by C language, and the STA can be supported to be connected with the AP and respond to the request of AP wireless network configuration.
The method for the STA to connect to the AP, establish a link connection, and request synchronous display of the wireless configuration of the AP in step S3 includes the following steps:
s301, the STA client creates an eth0:1 network interface according to the connection state, starts a dhcpc service program to acquire the IP provided by the AP, and meanwhile, the AP server creates socket connection, monitors a port defined by a private and waits for receiving the connection of the STA client;
s302, the STA client acquires the IP address of the AP and performs TCP communication;
s303, if the STA client successfully establishes a smooth link with the AP server, the STA client establishes socket connection, connects a private port defined by the AP server, and enters the next step, and if the connection is overtime, the STA client is reconnected;
and S304, after the connection is successful, the STA client requests wireless configuration from the AP server according to the protocol.
In step S4, the method for the STA to reconnect to the AP server according to its own settings and complete the automatic synchronization configuration includes the following steps:
s401, the AP server reads and stores the wireless configuration of the AP server;
s402, the AP server side sends wireless configuration to an STA client side connected in, and waits for the confirmation of the STA client side;
s403, after the STA client receives the wireless configuration of the AP server, the STA client sends ACK to the AP server, the hidden connection is disconnected, and the connection link is closed;
s404, the STA client compares the AP server wireless configuration with the local wireless configuration, if the AP server wireless configuration is the same as the local wireless configuration, no processing is performed, if the AP server wireless configuration is different from the local wireless configuration, configuration synchronization is performed, and setting is effective.
S405, the AP server receives the ACK confirmation of the STA client, and supports the connection request of the STA client and processes the connection request.
As an embodiment, the working flows of the AP server and the STA client are described herein respectively:
firstly, the AP server configures a hidden SSID and runs a server program.
The method comprises the following steps:
s1, setting default hidden SSID and password, encryption mode and the like by the AP server;
s301, the AP server side creates socket connection, monitors a port defined by a private, and waits for receiving STA client connection;
s401, the AP server reads and stores own wireless 2.4G and 5G configurations;
s402, the AP server side sends wireless configuration to an STA client side connected in, and waits for the confirmation of the STA client side;
s405, the AP server side receives the ACK confirmation of the STA client side, and supports concurrent processing of the connection request of the STA client side.
It should be noted that after the AP server establishes the hidden configuration, resources for establishing socket connection are initialized, and after the AP server completes the connection, the connection of the client is closed, and connection of other clients is waited.
II, secondly: and connecting the STA client with the server program.
The method comprises the following steps:
s2, the STA client sets the SSID and password hidden in connection with the default client, the encryption mode and the like;
s301, the STA client establishes eth0:1 according to the connection state, starts a dhcpc service program to obtain IP provided by the AP, and establishes a clear link with the AP server;
s302, the STA client acquires the IP address of the AP so as to carry out TCP communication;
s303, after the link is successfully established, the STA client establishes socket connection and is connected with a private port defined by the AP server, if the connection is successful, the next step is carried out, and if the connection is overtime, the STA client is reconnected;
s304, after the connection is successful, the STA client requests wireless configuration from the AP server according to a protocol;
s403, after the STA client receives the wireless configuration of the AP server, the STA client sends ACK to the AP server, the hidden connection is disconnected, and the connection link is closed;
s404, the STA client compares the AP server wireless configuration with the local wireless configuration, if the AP server wireless configuration is the same as the local wireless configuration, no processing is performed, if the AP server wireless configuration is different from the local wireless configuration, configuration synchronization is performed, and setting is effective.
It should be noted that if the user modifies the AP configuration (SSID, password, etc.) halfway, the STA client and the AP server terminal are disconnected, and then the operations from step 2 to step 6 are performed. When the STA client is updated synchronously, relay settings are selected according to signal strength and configuration 2.4 Gonly/xx.
In summary, the present invention realizes that when the STA accesses the AP, the SSID and the PASSWORD of the AP do not need to be manually set to perform individual connection in the case of a wireless hotspot. The STA can automatically connect with the AP only by running a self server program on the AP and running a client program on the terminal equipment STA. When the user changes the wireless configuration of the AP, the terminal equipment STA can realize automatic synchronous connection after the AP changes the configuration. The invention simplifies the complicated steps of setting connection of the wireless network, and can realize plug-and-play and automatic configuration in a foolproof manner.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (4)
1. A method for realizing automatic connection between AP and STA and synchronizing AP configuration modification is characterized by comprising the following steps:
s1, configuring a hidden Service Set Identifier (SSID) and a hidden key by the AP, wherein the SSID and the hidden key cannot be searched and modified by a user;
s2, the STA is factory set to default a hidden service set identifier SSID for automatically connecting the AP;
s3, after the STA is connected with the AP, link connection is established, and then the wireless configuration of the AP is requested to be synchronously displayed;
s4, the STA disconnects the hidden service set identifier SSID after receiving the service set identifier SSID configuration displayed by the AP, reconnects the displayed service set identifier SSID configuration according to the self setting, and completes the automatic synchronization configuration;
in step S3, the method for the STA to connect to the AP, establish a link connection, and request synchronous display of the wireless configuration of the AP includes the following steps:
s301, the STA client creates an eth0:1 network interface according to the connection state, starts a dhcpc service program to acquire the IP provided by the AP, and meanwhile, the AP server creates socket connection, monitors a port defined by a private and waits for receiving the connection of the STA client;
s302, the STA client acquires the IP address of the AP and performs TCP communication;
s303, if the STA client successfully establishes a smooth link with the AP server, the STA client establishes socket connection, connects a private port defined by the AP server, and enters the next step, and if the connection is overtime, the STA client is reconnected;
s304, after the connection is successful, the STA client requests wireless configuration from the AP server according to a protocol;
in step S4, the method for the STA to reconnect to the AP server according to its own settings and complete the automatic synchronization configuration includes the following steps:
s401, the AP server reads and stores the wireless configuration of the AP server;
s402, the AP server side sends wireless configuration to an STA client side connected in, and waits for the confirmation of the STA client side;
s403, after the STA client receives the wireless configuration of the AP server, the STA client sends ACK to the AP server, the hidden connection is disconnected, and the connection link is closed;
s404, the STA client compares the AP server wireless configuration with the local wireless configuration, if the AP server wireless configuration is the same as the local wireless configuration, the AP server wireless configuration is not processed, and if the AP server wireless configuration is different from the local wireless configuration, the configuration is synchronized, and the setting is effective;
s405, the AP server receives the ACK confirmation of the STA client, and supports the connection request of the STA client and processes the connection request.
2. The method of claim 1, wherein when the service set identifier SSID or Key configuration of the AP is modified halfway by the user, the connection of the STA is disconnected, and steps S1-S4 are automatically repeated.
3. The method of claim 1 wherein the AP comprises a gateway or a routing AP; and the AP configures the hidden service set identifier SSID and the key by running a self server program.
4. The method of claim 3, wherein the STA performs connection with the AP by running its own client program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710289085.3A CN107135529B (en) | 2017-04-27 | 2017-04-27 | Method for realizing automatic connection of AP and STA and synchronizing AP configuration modification |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710289085.3A CN107135529B (en) | 2017-04-27 | 2017-04-27 | Method for realizing automatic connection of AP and STA and synchronizing AP configuration modification |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107135529A CN107135529A (en) | 2017-09-05 |
CN107135529B true CN107135529B (en) | 2020-11-03 |
Family
ID=59715726
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710289085.3A Active CN107135529B (en) | 2017-04-27 | 2017-04-27 | Method for realizing automatic connection of AP and STA and synchronizing AP configuration modification |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107135529B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107682881B (en) * | 2017-09-14 | 2020-10-27 | 深圳市共进电子股份有限公司 | Parameter configuration method and device of wireless repeater, repeater and storage medium |
CN108966219A (en) * | 2018-07-13 | 2018-12-07 | 深圳市昊源科技有限公司 | A kind of WIFI connection method, device and electronic equipment |
CN109041173A (en) * | 2018-09-29 | 2018-12-18 | Oppo广东移动通信有限公司 | A kind of connection method, device and terminal |
CN111356149A (en) * | 2018-12-24 | 2020-06-30 | 中兴通讯股份有限公司 | Wireless network configuration method and device |
CN110461024B (en) * | 2019-07-23 | 2021-01-29 | 深圳合强电子有限公司 | Method for automatically connecting intelligent equipment and router, router and intelligent equipment |
JP7072902B2 (en) | 2019-07-23 | 2022-05-23 | 深▲セン▼合強電子有限公司 | Automatic connection method between smart devices and routers, routers and smart devices |
CN110876145A (en) * | 2019-11-20 | 2020-03-10 | 广州市宏视电子技术有限公司 | Wireless camera system and gateway equipment |
CN111314132B (en) * | 2020-02-14 | 2022-09-30 | 上海市共进通信技术有限公司 | Method for setting intelligent networking configuration between wireless gateway router and wireless amplifier |
CN111866996B (en) * | 2020-07-24 | 2022-04-08 | 深圳创维数字技术有限公司 | Intelligent device network distribution method, device and storage medium |
CN114189859B (en) * | 2021-12-16 | 2024-08-06 | 中国电信股份有限公司 | Processing method and device of configuration information, storage medium and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104302015A (en) * | 2014-09-15 | 2015-01-21 | 浙江生辉照明有限公司 | Adaptive WI-FI network connection method and system with hidden SSID |
CN104301891A (en) * | 2014-09-18 | 2015-01-21 | 深圳市螺光科技有限公司 | Method and system for interconnecting intelligent device and WiFi router |
CN104981000A (en) * | 2015-07-20 | 2015-10-14 | 陕西师范大学 | Invisible WiFi hotspot automatic connection device and method thereof |
CN106028325A (en) * | 2016-05-09 | 2016-10-12 | 广东乐心医疗电子股份有限公司 | Method and device for intelligent equipment to rapidly access WiFi |
CN106304409A (en) * | 2016-08-31 | 2017-01-04 | 江苏福云星信息技术有限公司 | The method of attachment of a kind of fast automatic access WIFI wireless network and application system |
-
2017
- 2017-04-27 CN CN201710289085.3A patent/CN107135529B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104302015A (en) * | 2014-09-15 | 2015-01-21 | 浙江生辉照明有限公司 | Adaptive WI-FI network connection method and system with hidden SSID |
CN104301891A (en) * | 2014-09-18 | 2015-01-21 | 深圳市螺光科技有限公司 | Method and system for interconnecting intelligent device and WiFi router |
CN104981000A (en) * | 2015-07-20 | 2015-10-14 | 陕西师范大学 | Invisible WiFi hotspot automatic connection device and method thereof |
CN106028325A (en) * | 2016-05-09 | 2016-10-12 | 广东乐心医疗电子股份有限公司 | Method and device for intelligent equipment to rapidly access WiFi |
CN106304409A (en) * | 2016-08-31 | 2017-01-04 | 江苏福云星信息技术有限公司 | The method of attachment of a kind of fast automatic access WIFI wireless network and application system |
Also Published As
Publication number | Publication date |
---|---|
CN107135529A (en) | 2017-09-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107135529B (en) | Method for realizing automatic connection of AP and STA and synchronizing AP configuration modification | |
US11133985B2 (en) | Systems and methods for intuitive home networking | |
CN107231606B (en) | WiFi network access method, intelligent hardware equipment and electronic terminal | |
EP3145161A1 (en) | Automatic wireless access network configuration synchronization method and apparatus | |
CN103209412B (en) | Apparatus for establishing is to the method, apparatus and system of equipment connection | |
EP2600679A1 (en) | Apparatus and method for connecting to device in wireless terminal | |
CN107969026B (en) | Method for realizing wireless screen projection in wireless local area network and wireless controller AC | |
US20130104116A1 (en) | Method and apparatus for upgrading wireless repeater | |
US20120099574A1 (en) | Communication device, computer readable medium and relay method using same | |
CN109548053B (en) | Method for synchronous wireless configuration of networking equipment | |
US11343225B2 (en) | Sharing media among remote access clients in a universal plug and play environment | |
CN103634657A (en) | Television and mobile terminal synchronous WIFI connection setup method and device | |
JP2003152731A (en) | Communication device, ip address acquisition method, and roaming method | |
CN106375453B (en) | Bidirectional communication equipment, system and method based on HTTP connection | |
CN104640122A (en) | Wireless networking method of router and trunk equipment | |
WO2016149911A1 (en) | Access point automatic switching method and wireless routing device | |
CN112261766A (en) | Lamp control device, system and method based on WiFi and Bluetooth dual protocols | |
US20170346891A1 (en) | Communication method | |
CN113794996B (en) | Device communication, device control method, device, electronic device, and storage medium | |
CN103517374B (en) | Set up the method and wireless repeater of wireless connection | |
CN113472763A (en) | Control instruction sending method and device, storage medium and electronic device | |
CN103441873A (en) | Mixing network wireless cloning method | |
JP5980733B2 (en) | Mobile traffic offload system | |
US9226223B2 (en) | Network connection system of network electronic device and method allowing a terminal device to access an electronic device connected behind a router without a NAT loopback function | |
CN113132966A (en) | Intelligent terminal fast network access method |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: A method to automatically connect and synchronize AP configuration modifications between AP and STA Effective date of registration: 20231218 Granted publication date: 20201103 Pledgee: Guangzhou Bank Co.,Ltd. Shenzhen Nanshan Branch Pledgor: SHENZHEN YOUHUA TECHNOLOGY Co.,Ltd. Registration number: Y2023980072370 |