CN117729612A - Method and device for connecting Wi-Fi module to cloud and intelligent device - Google Patents
Method and device for connecting Wi-Fi module to cloud and intelligent device Download PDFInfo
- Publication number
- CN117729612A CN117729612A CN202410062783.XA CN202410062783A CN117729612A CN 117729612 A CN117729612 A CN 117729612A CN 202410062783 A CN202410062783 A CN 202410062783A CN 117729612 A CN117729612 A CN 117729612A
- Authority
- CN
- China
- Prior art keywords
- module
- cloud
- target router
- password
- ssid
- 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
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000000060 site-specific infrared dichroism spectroscopy Methods 0.000 claims abstract description 29
- 238000005516 engineering process Methods 0.000 description 7
- 230000006855 networking Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/02—Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
- H04W84/10—Small scale networks; Flat hierarchical networks
- H04W84/12—WLAN [Wireless Local Area Networks]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明公开了一种Wi‑Fi模组连接云端的方法、装置及智能设备。该方法包括如下步骤:Wi‑Fi模组上电自启动后,进入AP+站点状态;手机作为站点与Wi‑Fi模组以AP模式连接,把目标路由器的SSID和密码传给Wi‑Fi模组;Wi‑Fi模组获取目标路由器的SSID和密码后,以站点模式与目标路由器连接;Wi‑Fi模组与目标路由器连接成功后,通过目标路由器连接云端,然后Wi‑Fi模组以AP模式通知手机已连接成功;Wi‑Fi模组断电。本发明提供的Wi‑Fi模组连接云端的方法,连接速度快,兼容性好,正常条件下基本不存在与目标路由器连接失败情况。
The invention discloses a method, device and intelligent device for connecting a Wi-Fi module to the cloud. This method includes the following steps: after the Wi-Fi module is powered on and starts up, it enters the AP+site state; the mobile phone serves as a site and is connected to the Wi-Fi module in AP mode, and the SSID and password of the target router are passed to the Wi-Fi module ; After the Wi‑Fi module obtains the SSID and password of the target router, it connects to the target router in site mode; after the Wi‑Fi module successfully connects to the target router, it connects to the cloud through the target router, and then the Wi‑Fi module uses AP mode Notify the mobile phone that the connection is successful; the Wi‑Fi module is powered off. The method for connecting the Wi-Fi module to the cloud provided by the present invention has fast connection speed and good compatibility, and there is basically no connection failure with the target router under normal conditions.
Description
技术领域Technical field
本发明涉及一种Wi-Fi模组连接云端的方法,同时也涉及相应的装置,还涉及包括该装置的智能设备,属于物联网技术领域。The invention relates to a method for connecting a Wi-Fi module to the cloud, a corresponding device, and an intelligent device including the device, and belongs to the technical field of the Internet of Things.
背景技术Background technique
目前,包括智能家电和智能家居产品在内的物联网设备已经越来越多地进入我们的日常生活中。作为物联网系统应用层的载体,智能家电和智能家居产品连接到云端是一项基础的功能需求。目前,常用的物联网联网方式有通过输入接口实现和不通过输入接口实现两类,主要有以下几种:Currently, IoT devices including smart appliances and smart home products have increasingly entered our daily lives. As the carrier of the application layer of the Internet of Things system, connecting smart home appliances and smart home products to the cloud is a basic functional requirement. At present, the commonly used Internet of Things networking methods are implemented through input interfaces and implemented without input interfaces. The main ones are as follows:
AirKiss配网技术:Wi-Fi模组处于监听状态,利用手机发送UDP广播包给AP(接入点),AP再次转发广播包。Wi-Fi模组根据UDP广播包大小等信息解析SSID和密码。该联网方式存在的问题包括:兼容性较差,监听信号多,耗时较长,失败率高。AirKiss distribution network technology: The Wi-Fi module is in the listening state and uses the mobile phone to send UDP broadcast packets to the AP (access point), and the AP forwards the broadcast packets again. The Wi-Fi module parses the SSID and password based on information such as UDP broadcast packet size. Problems with this networking method include: poor compatibility, many monitoring signals, long time consumption, and high failure rate.
NFC配网技术:通过NFC芯片与手机NFC配对,进行进场通信,交换SSID和密码。该联网方式存在的问题包括:需要内置NFC芯片,成本较高。NFC distribution network technology: Pair the NFC chip with the mobile phone NFC for in-site communication and exchange SSID and password. Problems with this networking method include: it requires a built-in NFC chip, which is expensive.
BLE配网技术:Wi-Fi模组里的BLE模块与手机连接,然后通过手机APP(应用程序)发送SSID与密码给Wi-Fi模组,然后Wi-Fi模组与目标路由器连接。该联网方式存在的问题包括:需要内置BLE模块,成本较高。BLE distribution technology: The BLE module in the Wi-Fi module is connected to the mobile phone, and then the SSID and password are sent to the Wi-Fi module through the mobile phone APP (application), and then the Wi-Fi module is connected to the target router. Problems with this networking method include: it requires a built-in BLE module and is expensive.
EasyConnect配网技术:Wi-Fi模组处于监听状态,利用手机APP发送的组播包地址编码。Wi-Fi模组根据监听的信息解析SSID和密码。该联网方式存在的问题包括:兼容性较差,监听信号多,耗时较长,失败率高。EasyConnect distribution technology: The Wi-Fi module is in the listening state and uses the multicast packet address encoding sent by the mobile APP. The Wi-Fi module parses the SSID and password based on the monitored information. Problems with this networking method include: poor compatibility, many monitoring signals, long time consumption, and high failure rate.
AP功能配网技术:Wi-Fi模组上电后,处于AP模式,然后手机作为站点(STA)与其通信,通过APP发送SSID和密码给Wi-Fi模组。Wi-Fi模组获取相关信息后切换到站点模式,与目标路由器连接,并连接到云端。手机也需要目标路由器连接,通过云端确认,Wi-Fi模组已经目标路由器连接。该联网方式存在的问题包括:连接后需要通过云端确认已经连接,耗时较长。AP function distribution technology: After the Wi-Fi module is powered on, it is in AP mode, and then the mobile phone communicates with it as a station (STA), sending the SSID and password to the Wi-Fi module through the APP. After obtaining relevant information, the Wi-Fi module switches to site mode, connects to the target router, and connects to the cloud. The mobile phone also needs to be connected to the target router. Confirm through the cloud that the Wi-Fi module is connected to the target router. Problems with this networking method include: after connecting, you need to confirm the connection through the cloud, which takes a long time.
发明内容Contents of the invention
本发明所要解决的首要技术问题在于提供一种Wi-Fi模组连接云端的方法。The primary technical problem to be solved by the present invention is to provide a method for connecting a Wi-Fi module to the cloud.
本发明所要解决的另一技术问题在于提供一种Wi-Fi模组连接云端的装置。Another technical problem to be solved by the present invention is to provide a device for connecting a Wi-Fi module to the cloud.
本发明所要解决的又一技术问题在于提供一种包括上述装置的智能设备。Another technical problem to be solved by the present invention is to provide an intelligent device including the above device.
为实现上述技术目的,本发明采用以下的技术方案:In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
根据本发明实施例的第一方面,提供一种Wi-Fi模组连接云端的方法,包括如下步骤:According to a first aspect of an embodiment of the present invention, a method for connecting a Wi-Fi module to the cloud is provided, including the following steps:
步骤S1:Wi-Fi模组上电自启动后,进入AP+站点状态;Step S1: After the Wi-Fi module is powered on and starts up, it enters the AP+site state;
步骤S2:手机作为站点与Wi-Fi模组以AP模式连接,把目标路由器的SSID和密码传给Wi-Fi模组;Step S2: The mobile phone serves as a site and connects to the Wi-Fi module in AP mode, and transmits the SSID and password of the target router to the Wi-Fi module;
步骤S3:Wi-Fi模组获取目标路由器的SSID和密码后,以站点模式与目标路由器连接;Step S3: After the Wi-Fi module obtains the SSID and password of the target router, it connects to the target router in site mode;
步骤S4:Wi-Fi模组与目标路由器连接成功后,通过目标路由器连接云端,然后Wi-Fi模组以AP模式通知手机已连接成功;Step S4: After the Wi-Fi module is successfully connected to the target router, connect to the cloud through the target router, and then the Wi-Fi module notifies the mobile phone in AP mode that the connection is successful;
步骤S5:Wi-Fi模组断电。Step S5: Power off the Wi-Fi module.
其中较优地,步骤S1和步骤S2之间还包括:Preferably, between step S1 and step S2, it also includes:
步骤S11:Wi-Fi模组读取配置表,判断是否连接过目标路由器,如判断为是,Wi-Fi模组读取配置表内目标路由器的SSID和密码,然后进入步骤S3,如判断为否,进入步骤S2。Step S11: The Wi-Fi module reads the configuration table and determines whether it has been connected to the target router. If it is determined to be yes, the Wi-Fi module reads the SSID and password of the target router in the configuration table, and then enters step S3. If it is determined to be yes, No, go to step S2.
其中较优地,步骤S2中,手机把目标路由器的SSID和密码传给Wi-Fi模组的步骤具体为:打开手机APP,手动输入目标路由器的SSID和密码。Preferably, in step S2, the mobile phone transmits the SSID and password of the target router to the Wi-Fi module as follows: open the mobile APP and manually enter the SSID and password of the target router.
其中较优地,步骤S2具体包括:手机作为站点与Wi-Fi模组以AP模式连接,判断是否在规定时间内连接成功,如判断为是,手机把目标路由器的SSID和密码传给Wi-Fi模组,如判断为否,进入步骤S5。Preferably, step S2 specifically includes: the mobile phone serves as a site and connects to the Wi-Fi module in AP mode, and determines whether the connection is successful within a specified time. If it is determined to be yes, the mobile phone transmits the SSID and password of the target router to the Wi-Fi module. Fi module, if the judgment is no, enter step S5.
其中较优地,步骤S3具体包括:Wi-Fi模组获取目标路由器的SSID和密码后,以站点模式与目标路由器连接,判断是否连接成功,如判断为是,进入步骤S4,如判断为否,进入步骤S5。Preferably, step S3 specifically includes: after the Wi-Fi module obtains the SSID and password of the target router, it connects to the target router in site mode and determines whether the connection is successful. If the determination is yes, proceed to step S4. If the determination is no , enter step S5.
其中较优地,步骤S4具体包括:Wi-Fi模组与目标路由器连接成功后,目标路由器与云端服务器连接,连接成功后,目标路由器以站点模式通知Wi-Fi模组已成功连接云端,Wi-Fi模组以AP模式通知手机已成功连接目标路由器和云端。Preferably, step S4 specifically includes: after the Wi-Fi module is successfully connected to the target router, the target router is connected to the cloud server. After the connection is successful, the target router notifies the Wi-Fi module in site mode that it has successfully connected to the cloud. -The Fi module notifies the phone in AP mode that it has successfully connected to the target router and the cloud.
其中较优地,步骤S5具体包括:如步骤S3中判断为是,保存配置参数后Wi-Fi模组断电,如步骤S3中判断为否,清除连接配置表后Wi-Fi模组断电。Preferably, step S5 specifically includes: if the determination in step S3 is yes, the Wi-Fi module is powered off after saving the configuration parameters; if the determination in step S3 is no, the Wi-Fi module is powered off after the connection configuration table is cleared. .
其中较优地,步骤S1中进入AP+站点状态的实现方法,具体包括:Preferably, the implementation method of entering the AP+site state in step S1 specifically includes:
步骤S101:设置本地IP、网关、子网掩码、下位远程IP;Step S101: Set the local IP, gateway, subnet mask, and lower remote IP;
步骤S102:设置AP端IP、网关、子网掩码、上位远程IP;Step S102: Set the AP IP, gateway, subnet mask, and upper remote IP;
步骤S103:设置本地端口和远程端口;Step S103: Set local port and remote port;
步骤S104:设置连接到远程AP的名字和密码;Step S104: Set the name and password to connect to the remote AP;
步骤S105:设置建立AP的名字和密码;Step S105: Set the name and password to establish the AP;
步骤S106:设置收发缓冲区;Step S106: Set the sending and receiving buffer;
步骤S107:初始化波特率;Step S107: Initialize the baud rate;
步骤S108:断开连接;Step S108: Disconnect;
步骤S109:设置为AP+STA模式;Step S109: Set to AP+STA mode;
步骤S110:设置AP网络参数;Step S110: Set AP network parameters;
步骤S111:设置AP账号密码;Step S111: Set AP account password;
步骤S112:连接指定路由;Step S112: Connect to the designated route;
步骤S113:设置本地网络参数;Step S113: Set local network parameters;
步骤S114:等待路由连接;Step S114: Wait for routing connection;
步骤S115:建立UDP Server,监听指定端口;Step S115: Establish a UDP Server and listen on the designated port;
步骤S116:显示IP地址;Step S116: Display the IP address;
步骤S117:读取数据;Step S117: Read data;
步骤S118:清除缓冲器数据。Step S118: Clear buffer data.
根据本发明实施例的第二方面,提供一种Wi-Fi模组连接云端的装置,包括Wi-Fi模组,所述Wi-Fi模组用于实现前述方法。According to a second aspect of the embodiment of the present invention, a device for connecting a Wi-Fi module to a cloud is provided, including a Wi-Fi module, and the Wi-Fi module is used to implement the foregoing method.
根据本发明实施例的第三方面,提供一种智能设备,其中包括前述的装置。According to a third aspect of the embodiment of the present invention, an intelligent device is provided, which includes the aforementioned device.
与现有技术相比较,本发明提供的Wi-Fi模组连接云端的方法,在Wi-Fi模组没有任何外部输入接口条件下,上电启动AP+站点共存功能。读取配置表,并判断是否连接过路由。如果连接过路由器,读取配置表内连接参数与路由连接。否则,在规定时间内Wi-Fi模组AP等待手机与之相连接,被连接成功后,Wi-Fi模组获取目标路由器的SSDI和密码。然后,Wi-Fi模组通过站点模式与目标路由器连接,连接成功后,再连接云端并发送消息通知手机,保存配置信息,最后断电。实现了Wi-Fi模组能够在没有输入接口的条件下,快速、稳定、高效与目标路由器相连接。本发明提供的Wi-Fi模组连接云端的方法,连接速度快,兼容性好,正常条件下基本不存在与目标路由器连接失败情况。Compared with the existing technology, the method for connecting the Wi-Fi module to the cloud provided by the present invention enables the AP+site coexistence function to be activated when the Wi-Fi module does not have any external input interface. Read the configuration table and determine whether the route has been connected. If connected to a router, read the connection parameters and routing connections in the configuration table. Otherwise, the Wi-Fi module AP waits for the mobile phone to connect to it within the specified time. After the connection is successful, the Wi-Fi module obtains the SSDI and password of the target router. Then, the Wi-Fi module connects to the target router through site mode. After the connection is successful, it connects to the cloud and sends a message to notify the mobile phone, saves the configuration information, and finally cuts off the power. This enables the Wi-Fi module to quickly, stably and efficiently connect to the target router without an input interface. The method for connecting the Wi-Fi module to the cloud provided by the present invention has fast connection speed and good compatibility, and there is basically no connection failure with the target router under normal conditions.
附图说明Description of the drawings
图1为本发明实施例提供的Wi-Fi模组连接云端的方法流程图;Figure 1 is a flow chart of a method for connecting a Wi-Fi module to the cloud provided by an embodiment of the present invention;
图2为本发明实施例提供的Wi-Fi模组连接云端的装置的工作状态图。Figure 2 is a working state diagram of a device for connecting a cloud via a Wi-Fi module provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和具体实施例对本发明的技术内容进行详细具体的说明。The technical content of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
如图1所示,本发明的第一实施例提供一种Wi-Fi模组连接云端的方法,以解决现有的智能家电和智能家居产品在连接云端过程中的连接速度慢、成本高、连接成功率低等问题。该方法利用Wi-Fi模组AP+站点功能,实现与云端稳定快速连接。As shown in Figure 1, the first embodiment of the present invention provides a method for connecting a Wi-Fi module to the cloud to solve the problems of slow connection speed, high cost, and high cost of existing smart home appliances and smart home products when connecting to the cloud. Problems such as low connection success rate. This method uses the Wi-Fi module AP+site function to achieve stable and fast connection with the cloud.
通常情况下,Wi-Fi模组连接云端的过程如下:Normally, the process of connecting the Wi-Fi module to the cloud is as follows:
Wi-Fi模组上电后,处于AP模式,然后手机作为站点与其通信,通过APP发送SSID和密码给模组。Wi-Fi模组获取相关信息后切换到站点模式,与目标路由器连接,并连接到云端。手机也需要目标路由器连接,通过云端确认,Wi-Fi模组已经目标路由器连接。After the Wi-Fi module is powered on, it is in AP mode, and then the mobile phone communicates with it as a station, sending the SSID and password to the module through the APP. After obtaining relevant information, the Wi-Fi module switches to site mode, connects to the target router, and connects to the cloud. The mobile phone also needs to be connected to the target router. Confirm through the cloud that the Wi-Fi module is connected to the target router.
本发明的第一实施例所提供的方法,至少包括以下步骤:The method provided by the first embodiment of the present invention at least includes the following steps:
步骤S1:Wi-Fi模组上电自启动后,进入AP+站点共存状态;Step S1: After the Wi-Fi module is powered on and starts up, it enters the AP+site coexistence state;
其中,AP+站点的工作原理为:当模块作为AP时,它同时又可以作为一个STA模式存在,例如:WiFi模块作为AP,可以让客户的手机或者计算机接入,同时该模块又可以作为一个STA接入到路由器或者上位服务器进行数据上传。需要注意的是,模块在AP和模块做STA时的MAC地址是不同的,所以在模块内部看到模块做AP时的MAC地址与在路由器里面去看到的模块作为STA时的MAC地址不同。Among them, the working principle of the AP+ site is: when the module acts as an AP, it can also exist as an STA mode. For example, the WiFi module acts as an AP, allowing customers’ mobile phones or computers to access it, and at the same time, the module can also act as an STA. Connect to the router or upper server to upload data. It should be noted that the MAC address of the module when it is used as an AP and when it is used as a STA are different, so the MAC address of the module when it is used as an AP is different from the MAC address of the module when it is used as an STA when viewed inside the router.
在本发明的一个实施例中,通过以下步骤实现AP+站点共存模式:In one embodiment of the present invention, the AP+site coexistence mode is implemented through the following steps:
步骤S101:设置本地IP,网关,子网掩码,下位远程IP;Step S101: Set the local IP, gateway, subnet mask, and lower remote IP;
步骤S102:设置AP端IP,网关,子网掩码,上位远程IP;Step S102: Set the AP IP, gateway, subnet mask, and upper remote IP;
步骤S103:设置本地端口和远程端口;Step S103: Set local port and remote port;
步骤S104:设置连接到远程AP的名字和密码;Step S104: Set the name and password to connect to the remote AP;
步骤S105:设置建立AP的名字和密码;Step S105: Set the name and password to establish the AP;
步骤S106:设置收发缓冲区;Step S106: Set the sending and receiving buffer;
步骤S107:初始化波特率;Step S107: Initialize the baud rate;
步骤S108:断开连接(防止已连接)WiFi.disconnect();Step S108: Disconnect (prevent already connected) WiFi.disconnect();
步骤S109:设置为AP+STA模式WiFi.mode(WiFi_AP_STA);Step S109: Set to AP+STA mode WiFi.mode (WiFi_AP_STA);
步骤S110:设置AP网络参数WiFi.softAPConfig();Step S110: Set AP network parameters WiFi.softAPConfig();
步骤S111:设置AP账号密码WiFi.softAP();Step S111: Set AP account password WiFi.softAP();
步骤S112:连接指定路由WiFi.begin();Step S112: Connect to the designated route WiFi.begin();
步骤S113:设置本地网络参数WiFi.config();Step S113: Set local network parameters WiFi.config();
步骤S114:等待路由连接Step S114: Waiting for routing connection
Serial.println(“pleasewait”)WiFi.status()!=WL_CONNECTED;Serial.println("pleasewait")WiFi.status()! =WL_CONNECTED;
步骤S115:Step S115:
建立UDP Server,监听指定端口udp.begin(localPort);Establish a UDP Server and listen to the specified port udp.begin(localPort);
步骤S116:显示IP地址WiFi.localIP()WiFi.softAPIP();Step S116: Display the IP address WiFi.localIP()WiFi.softAPIP();
步骤S117:读取数据Step S117: Read data
udp.read(buff,255)udp.beginPacket(serverip,remoteport)udp.write(buff,255)udp.endPacket();udp.read(buff, 255) udp.beginPacket(serverip, remoteport) udp.write(buff, 255) udp.endPacket();
步骤S118:清除缓冲器数据memset(buff,0,255)。Step S118: Clear the buffer data memset(buff, 0, 255).
步骤S2:Wi-Fi模组通过AP+站点共存状态获取目标路由器的SSID和密码;Step S2: The Wi-Fi module obtains the SSID and password of the target router through the AP+site coexistence status;
其中,上述获取目标路由器的SSID和密码的方法,至少包括以下步骤:Among them, the above method of obtaining the SSID and password of the target router includes at least the following steps:
S21:Wi-Fi模组读取配置表,判断是否连接过目标路由器。S21: The Wi-Fi module reads the configuration table and determines whether it has been connected to the target router.
其中,配置表为Wi-Fi模组中存储已连接过的目标路由器的SSID和密码的功能模块,通常使用Flash存储器实现。Among them, the configuration table is a functional module in the Wi-Fi module that stores the SSID and password of the connected target router. It is usually implemented using Flash memory.
若连接过目标路由器,则进入步骤S3;若没有连接过目标路由器,则进入步骤S22。If the target router has been connected, proceed to step S3; if the target router has not been connected, proceed to step S22.
S22:手机作为站点与Wi-Fi模组以AP模式进行连接,判断是否在规定时间内连接成功。S22: The mobile phone serves as a site and connects to the Wi-Fi module in AP mode to determine whether the connection is successful within the specified time.
若在规定时间内连接失败,则进入步骤S5;若在规定时间内连接成功,则手机端在APP上手动输入目标路由器的SSID和密码并发送给Wi-Fi模组,进入步骤S3。If the connection fails within the specified time, go to step S5; if the connection is successful within the specified time, the mobile phone manually inputs the SSID and password of the target router on the APP and sends it to the Wi-Fi module, and goes to step S3.
其中,因为Wi-Fi模组没有任何外部输入接口,所以上述方法成功解决了在此情景下,实现Wi-Fi模组与目标路由器连接的问题。另外,上述方法并没有加入NFC、蓝牙或其他技术模块,实现了在Wi-Fi模组成本没有增加的情况下,解决Wi-Fi模组与目标路由器连接的问题。Among them, because the Wi-Fi module does not have any external input interface, the above method successfully solves the problem of connecting the Wi-Fi module to the target router in this scenario. In addition, the above method does not add NFC, Bluetooth or other technology modules, thus solving the problem of connecting the Wi-Fi module to the target router without increasing the cost of the Wi-Fi module.
步骤S3:Wi-Fi模组获取目标路由器的SSID和密码后,以站点模式与目标路由器连接,判断是否连接成功。Step S3: After the Wi-Fi module obtains the SSID and password of the target router, it connects to the target router in site mode to determine whether the connection is successful.
其中,因为Wi-Fi模组此时为AP+站点共存状态,所以直接以站点模式与目标路由器连接即可,无需从AP状态切换到站点状态。Among them, because the Wi-Fi module is in the AP+site coexistence state at this time, it can be directly connected to the target router in site mode without switching from AP state to site state.
若连接失败,则清除步骤S2中获取的目标路由器的SSID和密码,进入步骤S5;若连接成功,则进入步骤S4。If the connection fails, clear the SSID and password of the target router obtained in step S2, and proceed to step S5; if the connection is successful, proceed to step S4.
步骤S4:Wi-Fi模组与目标路由器连接成功后,通过目标路由器连接云端,然后Wi-Fi模组以AP模式通知手机已连接成功,并将目标路由器的SSID和密码保存至配置表;Step S4: After the Wi-Fi module is successfully connected to the target router, connect to the cloud through the target router. Then the Wi-Fi module notifies the mobile phone in AP mode that the connection is successful, and saves the SSID and password of the target router to the configuration table;
其中,Wi-Fi模组以AP模式通知手机连接成功,省去了手机与云端的连接,从而解决了因手机连接云端导致状态确认耗时较长的问题。Among them, the Wi-Fi module notifies the mobile phone of a successful connection in AP mode, eliminating the need to connect the mobile phone to the cloud, thereby solving the problem of long status confirmation due to the mobile phone connecting to the cloud.
步骤S5:Wi-Fi模组断电。Step S5: Power off the Wi-Fi module.
如图2所示,本发明第二实施例提供一种Wi-Fi模组连接云端的装置,包括Wi-Fi模组。所述装置实现Wi-Fi模组连接云端的方法与本发明第一实施例所述方法相同,在此不予赘述。As shown in Figure 2, a second embodiment of the present invention provides a device for connecting a Wi-Fi module to the cloud, including a Wi-Fi module. The method by which the device implements the Wi-Fi module to connect to the cloud is the same as the method described in the first embodiment of the present invention, and will not be described again here.
另外,本发明第三实施例提供一种智能设备,其中包括本发明第二实施例提供的装置。所述智能设备实现Wi-Fi模组连接云端的方法与本发明第一实施例所述方法相同,在此不予赘述。In addition, a third embodiment of the present invention provides an intelligent device, which includes the device provided by the second embodiment of the present invention. The method for the smart device to connect the Wi-Fi module to the cloud is the same as the method described in the first embodiment of the present invention, and will not be described again here.
需要说明的是,上述多个实施例只是举例,各个实施例的技术方案之间可以进行组合,均在本发明的保护范围内。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。It should be noted that the above-mentioned embodiments are only examples, and the technical solutions of various embodiments can be combined, which are all within the protection scope of the present invention. In addition, the terms “first” and “second” are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Therefore, features defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the present invention, "plurality" means two or more than two, unless otherwise explicitly and specifically limited.
上面对本发明提供的Wi-Fi模组连接云端的方法、装置及智能设备进行了详细的说明。对本领域的一般技术人员而言,在不背离本发明实质内容的前提下对它所做的任何显而易见的改动,都将构成对本发明专利权的侵犯,将承担相应的法律责任。The method, device and intelligent device for connecting the Wi-Fi module to the cloud provided by the present invention have been described in detail above. For those of ordinary skill in the art, any obvious changes made to the invention without departing from the essence of the invention will constitute an infringement of the patent rights of the invention and will bear corresponding legal liability.
Claims (10)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410062783.XA CN117729612A (en) | 2024-01-16 | 2024-01-16 | Method and device for connecting Wi-Fi module to cloud and intelligent device |
CN202410772090.XA CN119012415A (en) | 2024-01-16 | 2024-06-16 | Method and device for connecting Wi-Fi module to cloud server and intelligent device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410062783.XA CN117729612A (en) | 2024-01-16 | 2024-01-16 | Method and device for connecting Wi-Fi module to cloud and intelligent device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117729612A true CN117729612A (en) | 2024-03-19 |
Family
ID=90201726
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410062783.XA Pending CN117729612A (en) | 2024-01-16 | 2024-01-16 | Method and device for connecting Wi-Fi module to cloud and intelligent device |
CN202410772090.XA Pending CN119012415A (en) | 2024-01-16 | 2024-06-16 | Method and device for connecting Wi-Fi module to cloud server and intelligent device |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410772090.XA Pending CN119012415A (en) | 2024-01-16 | 2024-06-16 | Method and device for connecting Wi-Fi module to cloud server and intelligent device |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN117729612A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119012415A (en) * | 2024-01-16 | 2024-11-22 | 北京维普无限智能技术有限公司 | Method and device for connecting Wi-Fi module to cloud server and intelligent device |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117440533A (en) * | 2022-12-31 | 2024-01-23 | 北京维普无限智能技术有限公司 | Method and device for connecting Wi-Fi module to cloud and intelligent device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117729612A (en) * | 2024-01-16 | 2024-03-19 | 北京维普无限智能技术有限公司 | Method and device for connecting Wi-Fi module to cloud and intelligent device |
-
2024
- 2024-01-16 CN CN202410062783.XA patent/CN117729612A/en active Pending
- 2024-06-16 CN CN202410772090.XA patent/CN119012415A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117440533A (en) * | 2022-12-31 | 2024-01-23 | 北京维普无限智能技术有限公司 | Method and device for connecting Wi-Fi module to cloud and intelligent device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119012415A (en) * | 2024-01-16 | 2024-11-22 | 北京维普无限智能技术有限公司 | Method and device for connecting Wi-Fi module to cloud server and intelligent device |
Also Published As
Publication number | Publication date |
---|---|
CN119012415A (en) | 2024-11-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102045783B (en) | Apparatus and method for connecting peer to peer using wlan | |
CN101997575B (en) | Short-range communication is used to carry out system, the method and apparatus of wireless network connection | |
US9137641B2 (en) | Wireless communication system, base station, and terminal | |
RU2265965C2 (en) | Method and device for requesting realizations of two-point communication protocol from packet data transfer service network | |
US8745137B2 (en) | Hybrid networking simple-connect setup using proxy device | |
CN103209318B (en) | A kind of web camera | |
CN102882938A (en) | A data sharing method and mobile terminal | |
US11166137B2 (en) | Method, device, and system for adjusting packet length in near field communication | |
CN110545318B (en) | Data communication method and system for carrying out adaptation depending on GATT and indication | |
WO2007034954A1 (en) | Mobile wireless communication apparatus and method for managing connection status thereof | |
CN111405492A (en) | Method, device, storage medium, and electronic device for connecting to target network | |
CN107277190A (en) | A kind of method of SDN equipment automatic wire charging, SDN equipment and controller | |
CN102612033B (en) | Mobile phone with thin wireless access point and communication method for mobile phone | |
CN104683994A (en) | Wireless network configuration method and wireless network devices | |
CN202285423U (en) | Intelligent set top box | |
WO2022007749A1 (en) | Data transmission method and apparatus | |
CN117729612A (en) | Method and device for connecting Wi-Fi module to cloud and intelligent device | |
CN108012305A (en) | Smart machine matches somebody with somebody network method, system and smart machine | |
JP6802530B2 (en) | Communication method | |
WO2015074537A1 (en) | Method and apparatus for controlling communication protocol in smart tv device | |
CN104427592A (en) | Terminal device, and frame sending and receiving methods | |
CN117440533A (en) | Method and device for connecting Wi-Fi module to cloud and intelligent device | |
EP3220584A1 (en) | Wifi sharing method and system, home gateway and wireless local area network gateway | |
CN116234063A (en) | Data transmission method and device | |
CN108737277A (en) | A kind of message forwarding method and device |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20240319 |
|
WD01 | Invention patent application deemed withdrawn after publication |