CN108012311B - Method for automatically switching and configuring router of intelligent equipment - Google Patents
Method for automatically switching and configuring router of intelligent equipment Download PDFInfo
- Publication number
- CN108012311B CN108012311B CN201711419070.0A CN201711419070A CN108012311B CN 108012311 B CN108012311 B CN 108012311B CN 201711419070 A CN201711419070 A CN 201711419070A CN 108012311 B CN108012311 B CN 108012311B
- Authority
- CN
- China
- Prior art keywords
- router
- ssid
- routers
- intelligent equipment
- scanned
- 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
Images
Classifications
-
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/0005—Control or signalling for completing the hand-off
- H04W36/0011—Control or signalling for completing the hand-off for data sessions of end-to-end connection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/18—Selecting a network or a communication service
Abstract
The invention discloses a method for automatically switching and configuring a router by intelligent equipment, which comprises the following steps: the intelligent equipment scans the network and acquires the router information of all the scanned wireless routers, wherein the router information comprises SSID and signal intensity; the intelligent equipment reads the SSID and the password of the configured router; and the intelligent equipment screens all the scanned routers for routers with the same SSID as the configured router, and sequentially attempts to connect the scanned routers in the sequence from strong signals to weak signals by using the configured router passwords until the connection is successful. Aiming at a specific application scene with more SSID and passwords, the method and the system realize that the intelligent equipment automatically connects and configures the router with the same SSID and passwords and better signals under a more complex network environment, do not need to restart a distribution network program, simplify the distribution network program, ensure the stability of communication and improve the reliability of the distribution network of the intelligent equipment.
Description
Technical Field
The invention relates to a network distribution technology of intelligent equipment, in particular to a method for automatically switching and configuring a router of the intelligent equipment.
Background
In recent years, the use of smart devices is becoming more common, and when a smart device is used for a network distribution, a network distribution process is generally started to be connected to a certain router, and the router is connected later unless the network distribution process is started again.
Currently, in order to meet the requirements and to be convenient to use, in some specific situations, for example: hotels, factories, hospitals, schools, etc. are configured with a plurality of routers, and the SSID (Service Set Identifier) and password of the routers are the same. In the above complex network environment, because the intelligent device only tries to connect the configured router, when the intelligent device moves the location or the configured router is not suitable, the configured router signal will weaken, resulting in unstable connection and frequent disconnection, and at this moment, there may be a router with better signal and the same SSID and password around the intelligent device, but the intelligent device cannot select the router with better signal by itself except that the distribution network flow is restarted.
Disclosure of Invention
The invention aims to solve the technical problem that when the signal of a connected router is weakened due to the fact that the router is improper when an intelligent device moves the position or the distribution network of the intelligent device, the intelligent device cannot automatically select the router with better signal and the SSID and password to be connected except for restarting the distribution network flow.
In order to solve the above technical problem, the technical solution adopted by the present invention is to provide a method for automatically switching and configuring a router by an intelligent device, comprising the following steps:
step 10, the intelligent equipment scans the network and acquires all the scanned router information of the wireless routers, wherein the router information comprises SSID and signal strength;
step S20, the intelligent device reads the SSID and the password of the configured router;
and step S30, the intelligent device screens all the scanned routers for routers with the same SSID as the configured router, and sequentially tries to connect the scanned routers in the sequence from strong to weak signals by using the configured router passwords until the connection is successful.
In the above method, the smart device only performs a "scan network" operation each time it is powered on.
In the method, before the intelligent device scans the network, whether the intelligent device has a network distribution is detected, and if the intelligent device has the network distribution, the network scanning is started; otherwise, starting the distribution network process.
In the method, the network distribution process includes the following steps:
s101, the intelligent equipment enters a distribution network state;
step S102, connecting a smart phone or other smart terminals with display screens to a router to acquire SSID, password, encryption mode and channel number information of the router;
step S103, broadcasting the acquired SSID, password, encryption mode and channel number information by the smart phone or other smart terminals with display screens;
and step S104, the intelligent equipment entering the distribution network state receives the broadcast information, connects the router according to the received information, and records the SSID and the password.
In the above method, the router information further includes a MAC address, a data encryption method, and channel number information.
In the above method, step S30 specifically includes the following steps:
s301, setting intelligent equipment to sequentially call the SSIDs of the scanned routers;
step S302, judging whether the SSID of the router scanned by the intelligent device is the same as the SSID of the configured router, and if so, executing step S303; otherwise, executing step S301;
step S303, adding the router information of the same router scanned with the configured router SSID into a scanning list;
step S304, judging whether the router SSID is the router SSID which is obtained after all scanning is called, if so, executing step S305; otherwise, executing step S301;
step S305, the intelligent device uses the configured router password and the MAC address of each router in the scanning list as parameters, and tries to connect each router in the scanning list in sequence according to the sequence from strong signal strength to weak signal strength;
step S306, judging whether the router is successfully connected, and if so, ending the network switching; otherwise, step S305 is executed.
In the method, if the router in the connection scanning list fails, the router is tried to be connected three times continuously, if all the routers fail, the router is abandoned to be connected, and the next router in the connection scanning list is continued to be connected.
Aiming at a specific application scene with more SSID and passwords, the method and the system realize that the intelligent equipment automatically connects and configures the router with the same SSID and passwords and better signals under a more complex network environment, do not need to restart a distribution network program, simplify the distribution network program, ensure the stability of communication and improve the reliability of the distribution network of the intelligent equipment.
Drawings
Fig. 1 is a flowchart of a method for automatically switching and configuring a router by an intelligent device according to the present invention;
FIG. 2 is a detailed flow chart of a distribution network process according to the present invention;
fig. 3 is a flowchart illustrating step S30 in the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and specific examples.
As shown in fig. 1, the present invention provides a method for automatically switching and configuring a router by an intelligent device, including the following steps:
step 10, the intelligent equipment scans the network and acquires all the scanned router information of the wireless routers, wherein the router information comprises SSID and signal strength; the router information also comprises information such as MAC addresses, data encryption modes, channel numbers and the like;
step S20, the intelligent device reads the SSID and the password of the configured router;
step S30, the intelligent device selects routers from all the scanned routers, which are the same as the SSID of the configured router, and sequentially tries to connect the scanned routers in the order from strong to weak signals by using the password of the configured router until the connection is successful, so that not only the connected router must be the best signal among the routers having the same SSID and password as the configured router, but also the worst result is to connect the configured router, and a situation that the router cannot be connected does not occur.
In the invention, in order to ensure the working stability of the intelligent equipment and avoid frequently switching networks, the intelligent equipment only carries out network scanning operation after being electrified; before the intelligent device scans the network, whether the intelligent device is already distributed with the network is detected, and if the intelligent device is already distributed with the network, the network is scanned; otherwise, the network distribution process is started without the network distribution.
As shown in fig. 2, in the present invention, the distribution network process includes the following steps:
s101, the intelligent equipment enters a distribution network state;
step S102, connecting a smart phone or other smart terminals with display screens to a router to acquire information such as SSID (service set identifier), passwords, data encryption modes, channel numbers and the like of the router;
step S103, the smart phone or other smart terminals with display screens broadcasts the acquired information such as SSID, password, data encryption mode, channel number and the like;
and step S104, the intelligent equipment entering the distribution network state receives the broadcast information, connects the router according to the received information, and records the SSID and the password.
As shown in fig. 3, step S30 specifically includes the following steps:
s301, setting intelligent equipment to sequentially call the SSIDs of the scanned routers;
step S302, judging whether the SSID of the router scanned by the intelligent device is the same as the SSID of the configured router, and if so, executing step S303; otherwise, executing step S301;
step S303, adding the router information of the same router scanned with the configured router SSID into a scanning list;
step S304, judging whether the router SSID is the router SSID which is obtained after all scanning is called, if so, executing step S305; otherwise, executing step S301;
step S305, the intelligent device uses the configured router password and the MAC address of each router in the scanning list as parameters, and tries to connect each router in the scanning list in sequence according to the sequence from strong signal strength to weak signal strength;
step S306, judging whether the router is successfully connected, if so, indicating that the connected router is the router which has the same SSID and password with the configured router and has the best signal, and ending the network switching; otherwise, step S305 is executed to attempt to connect to the next router.
In the invention, if the router in the connection scanning list fails (because the connection cannot be performed due to the fact that the router has the same SSID but different passwords or the same password but different data encryption modes and the like), the router is continuously tried for three times, if all the routers fail, the router is abandoned to be connected, and the next router in the connection scanning list is continuously connected.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (5)
1. A method for automatically switching and configuring a router by intelligent equipment is characterized by comprising the following steps:
step 10, the intelligent equipment scans the network and acquires all scanned wireless routers, including the router information of SSID and signal strength; the router information also comprises an MAC address, a data encryption mode and channel number information;
step S20, the intelligent device reads the SSID and the password of the configured router;
step S30, the intelligent device screens the routers with the same SSID as the configured routers from all the scanned routers, and adds the routers to a scanning list; and using the configured router password to sequentially try to connect the scanned routers according to the sequence from strong signals to weak signals until the connection is successful;
the smart device only "scans for networks" each time it is powered up.
2. The method of claim 1, wherein before the intelligent device scans the network, it is detected whether the intelligent device has already distributed the network, and if so, the network scanning is started; otherwise, starting the distribution network process.
3. The method of claim 2, wherein the distribution network process comprises the steps of:
s101, the intelligent equipment enters a distribution network state;
step S102, connecting a smart phone or other smart terminals with display screens to a router to acquire SSID, passwords, data encryption modes and channel number information of the router;
step S103, broadcasting the acquired SSID, password, data encryption mode and channel number information by the smart phone or other smart terminals with display screens;
and step S104, the intelligent equipment entering the distribution network state receives the broadcast information, connects the router according to the received information, and records the SSID and the password.
4. The method according to claim 1, wherein step S30 specifically comprises the steps of:
s301, setting intelligent equipment to sequentially call the SSIDs of the scanned routers;
step S302, judging whether the SSID of the router scanned by the intelligent device is the same as the SSID of the configured router, and if so, executing step S303; otherwise, executing step S301;
step S303, adding the router information of the same router scanned with the configured router SSID into a scanning list;
step S304, judging whether the router SSID is the router SSID which is obtained after all scanning is called, if so, executing step S305; otherwise, executing step S301;
step S305, the intelligent device uses the configured router password and the MAC address of each router in the scanning list as parameters, and tries to connect each router in the scanning list in sequence according to the sequence from strong signal strength to weak signal strength;
step S306, judging whether the router is successfully connected, and if so, ending the network switching; otherwise, step S305 is executed.
5. The method of claim 4, wherein if a router in the connection scan list fails, three consecutive attempts are made to connect to the router, and if all the attempts fail, the connection is aborted and the connection continues to the next router in the connection scan list.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711419070.0A CN108012311B (en) | 2017-12-25 | 2017-12-25 | Method for automatically switching and configuring router of intelligent equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711419070.0A CN108012311B (en) | 2017-12-25 | 2017-12-25 | Method for automatically switching and configuring router of intelligent equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108012311A CN108012311A (en) | 2018-05-08 |
CN108012311B true CN108012311B (en) | 2021-03-23 |
Family
ID=62060958
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711419070.0A Active CN108012311B (en) | 2017-12-25 | 2017-12-25 | Method for automatically switching and configuring router of intelligent equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108012311B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108965391A (en) * | 2018-06-15 | 2018-12-07 | 四川斐讯信息技术有限公司 | A kind of distribution method and system of intelligent socket |
CN109089265B (en) * | 2018-08-14 | 2021-04-20 | 四川虹美智能科技有限公司 | Equipment networking management system and method and intelligent equipment |
CN111343055B (en) * | 2018-12-18 | 2021-08-20 | 美的集团股份有限公司 | Network connection method, Internet of things system and Internet of things equipment |
JP7234379B2 (en) * | 2018-12-29 | 2023-03-07 | 華為技術有限公司 | Methods and associated devices for accessing networks by smart home devices |
CN109756839B (en) * | 2018-12-30 | 2021-03-19 | 联想(北京)有限公司 | Information processing method and first electronic device |
CN109714742A (en) * | 2019-02-19 | 2019-05-03 | 深圳市和盈互联科技有限公司 | A kind of Internet of Things Wi-Fi module network self-adapting switching method |
CN110278592B (en) * | 2019-05-15 | 2021-12-10 | 深圳市优博讯科技股份有限公司 | Data communication method, terminal and system |
CN112087745A (en) * | 2019-06-12 | 2020-12-15 | 广东美的制冷设备有限公司 | Network distribution method and device of household appliance, electronic device and storage medium |
CN111818454A (en) * | 2020-07-24 | 2020-10-23 | 四川长虹电器股份有限公司 | Household WIFI intelligent distribution network sharing system and method |
CN114726903A (en) * | 2020-12-21 | 2022-07-08 | 厦门立达信照明有限公司 | Configuration method and device of intelligent equipment and configuration machine |
CN114765776A (en) * | 2021-01-14 | 2022-07-19 | 青岛海信宽带多媒体技术有限公司 | Method for automatically connecting set top box with WIFI, set top box and storage medium |
CN112929941B (en) * | 2021-01-19 | 2022-05-17 | 珠海格力电器股份有限公司 | Network distribution method and network distribution system |
CN114051274A (en) * | 2021-11-09 | 2022-02-15 | 青岛海信宽带多媒体技术有限公司 | Router and router relay connection method |
CN114928873A (en) * | 2022-03-28 | 2022-08-19 | 惠州高盛达科技有限公司 | Method for automatically switching and configuring router for intelligent equipment |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101977382A (en) * | 2010-10-27 | 2011-02-16 | 福州星网视易信息系统有限公司 | Audio and video integrated control circuit and method for accessing access point |
CN103024929A (en) * | 2012-12-20 | 2013-04-03 | 惠州Tcl移动通信有限公司 | Mobile terminal and method for connecting wireless network based on mobile terminal |
CN103686945A (en) * | 2013-12-05 | 2014-03-26 | 昆山申光电子机械厂 | Method and device for automatically selecting wireless local area networks |
WO2014154101A1 (en) * | 2013-03-29 | 2014-10-02 | 华为终端有限公司 | Method and device for implementing fast network connection |
CN104254070A (en) * | 2013-06-25 | 2014-12-31 | 中兴通讯股份有限公司 | WiFi access method, intelligent terminal and router equipment |
CN105263154A (en) * | 2015-09-17 | 2016-01-20 | 广东欧珀移动通信有限公司 | Method and system of Wi-Fi equipment for switching wireless access point |
CN105262652A (en) * | 2015-09-09 | 2016-01-20 | 九阳股份有限公司 | Network configuration method for network household appliance |
CN105682009A (en) * | 2016-03-07 | 2016-06-15 | 上海斐讯数据通信技术有限公司 | Mobile terminal and method for managing wireless signals |
CN106028423A (en) * | 2016-05-06 | 2016-10-12 | 武汉诚迈科技有限公司 | Wireless network distribution method applicable to smart furniture device |
CN106209537A (en) * | 2016-07-25 | 2016-12-07 | 深圳市双驰科技有限公司 | A kind of home appliance and WIFI module, distribution method |
-
2017
- 2017-12-25 CN CN201711419070.0A patent/CN108012311B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101977382A (en) * | 2010-10-27 | 2011-02-16 | 福州星网视易信息系统有限公司 | Audio and video integrated control circuit and method for accessing access point |
CN103024929A (en) * | 2012-12-20 | 2013-04-03 | 惠州Tcl移动通信有限公司 | Mobile terminal and method for connecting wireless network based on mobile terminal |
WO2014154101A1 (en) * | 2013-03-29 | 2014-10-02 | 华为终端有限公司 | Method and device for implementing fast network connection |
CN104254070A (en) * | 2013-06-25 | 2014-12-31 | 中兴通讯股份有限公司 | WiFi access method, intelligent terminal and router equipment |
CN103686945A (en) * | 2013-12-05 | 2014-03-26 | 昆山申光电子机械厂 | Method and device for automatically selecting wireless local area networks |
CN105262652A (en) * | 2015-09-09 | 2016-01-20 | 九阳股份有限公司 | Network configuration method for network household appliance |
CN105263154A (en) * | 2015-09-17 | 2016-01-20 | 广东欧珀移动通信有限公司 | Method and system of Wi-Fi equipment for switching wireless access point |
CN105682009A (en) * | 2016-03-07 | 2016-06-15 | 上海斐讯数据通信技术有限公司 | Mobile terminal and method for managing wireless signals |
CN106028423A (en) * | 2016-05-06 | 2016-10-12 | 武汉诚迈科技有限公司 | Wireless network distribution method applicable to smart furniture device |
CN106209537A (en) * | 2016-07-25 | 2016-12-07 | 深圳市双驰科技有限公司 | A kind of home appliance and WIFI module, distribution method |
Also Published As
Publication number | Publication date |
---|---|
CN108012311A (en) | 2018-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108012311B (en) | Method for automatically switching and configuring router of intelligent equipment | |
CN113841339B (en) | Service connection establishing method, bluetooth main device, chip and Bluetooth system | |
US7826845B2 (en) | Wireless network connection method and mobile phone using the same | |
CN105208583B (en) | Method and device for configuring intelligent household electrical appliance to access network and intelligent equipment | |
JP5305453B2 (en) | Wireless LAN high-speed roaming system, high-speed roaming method, and high-speed roaming program | |
US9749844B1 (en) | Systems and methods for provisioning devices for connection to a wireless network | |
CN109005532B (en) | Bluetooth connection method, Bluetooth master device and Bluetooth slave device | |
CN109089327B (en) | Wireless network connection method, device, terminal and storage medium | |
CN111866998A (en) | Bluetooth network distribution method, equipment and storage medium | |
CN111698688B (en) | Terminal residing method based on 5G co-construction sharing, network equipment and communication network | |
CA3053427C (en) | Network connection method and apparatus | |
CN111698687B (en) | Terminal residing method based on 5G co-construction sharing, network equipment and communication network | |
CN103582053A (en) | Method, device and system for switching channels | |
CN105916189A (en) | Terminal network distribution method and terminal network distribution apparatus | |
CN105813221A (en) | WIFI disconnected network reconnection method of intelligent device in WIFI wireless local network environment | |
CN114080044A (en) | Method for transmitting system message, terminal equipment and network equipment | |
CN107124744B (en) | Network switching method and wireless access point | |
CN111107605A (en) | Network distribution method of household electrical appliance and household electrical appliance | |
CN101466130B (en) | Control method and device for network connection | |
CN112566104B (en) | Roaming coordination method based on Mesh network, wireless access point and storage medium | |
US10390278B2 (en) | Method for automatic switching between access points, and wireless routing device | |
CN114339789A (en) | AP distribution network processing method and device | |
WO2019061410A1 (en) | Abnormal frequency point detection method and device, and computer storage medium | |
CN112055341B (en) | Networking method, device and equipment of low-power-consumption Bluetooth Mesh network | |
CN105813224A (en) | Communication device and wireless communication method with effciency |
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 |