WIFI Network Configuration Device and Method Based on Serial Port Communication
By using serial port communication on the mobile terminal, sending the router's SSID and PASSWORD to the WIFI module, the failure of the existing WIFI configuration mode in the case of unsmooth wireless network is solved, and a higher success rate and stability of WIFI distribution network is achieved.
Patent Information
- Application Number
- CN202210773606.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-01
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-07-01
AI Technical Summary
The existing WIFI configuration mode mainly relies on wireless networks, resulting in the fact that when the wireless network is not smooth, the WIFI configuration is prone to failure and has a low success rate.
The WIFI distribution device and method based on serial port communication is used to connect to the distribution device through the USB module of the mobile terminal, and high and low pulses are formed using diodes and USB adapters. The SSID and PASSWORD of the router are sent to the WIFI module according to the serial port protocol to complete the distribution.
WIFI network distribution through serial port communication avoids the instability of the wireless network and significantly improves the success rate and stability of WIFI configuration.
Smart Images

Figure CN115150825B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rapid network configuration for smart homes, and particularly to a WIFI network configuration device and method based on serial communication. Background Art
[0002] Smart homes / home appliances are currently in the popularization stage. Due to the popularization of home WIFI networks, currently, WIFI is generally used to complete the connection with the router and conduct data interaction with mobile phones / clouds.
[0003] Smart hardware, such as smart sockets, smart air conditioners, and smart air purifiers, do not have a human-computer interaction interface and cannot search / select a specified router and input the connection password interface like a computer. Therefore, the problem of correctly connecting to the router must be solved first.
[0004] Currently, the popular WIFI configuration modes generally include the following two types:
[0005] 1. The smart hardware is in the AP mode, and the mobile phone is in the station mode. After the mobile phone connects to the AP of the smart socket, a local area network is formed. The mobile phone sends the SSID and password of the router to be connected to the smart socket. After the smart hardware actively connects to the specified router, the connection is completed.
[0006] 2. One-key configuration (smartconfig) mode: The smart hardware is in the promiscuous mode (can capture all 802.11 frames in the air), listens to all packets in the network, the mobile phone APP encodes the SSID and password into UDP packets, and sends them through broadcast packets or group broadcasts. After the smart hardware receives the UDP packet, it decodes to obtain the correct SSID and password, and then actively connects to the router with the specified SSID to complete the connection.
[0007] However, the above WIFI configuration modes are all configured in a wireless manner, and it is very easy to fail to configure in the case of unsmooth wireless networks. Summary of the Invention
[0008] The purpose of the present invention is to provide a WIFI network configuration device and method based on serial communication, which greatly improves the success rate of WIFI configuration.
[0009] The present invention adopts the following technical solutions to achieve the above object. A WIFI network configuration device based on serial communication is used to perform WIFI network configuration on intelligent hardware through a mobile terminal. The mobile terminal includes a USB module. The network configuration device includes a USB conversion cable and a diode. One end of the USB conversion cable is respectively connected to the power supply pin and the ground pin of the USB module of the mobile terminal. The other end of the USB conversion cable connected to the power supply pin of the USB module is connected to the anode of the diode. The cathode of the diode is connected to the first pin. The other end of the USB conversion cable connected to the ground pin of the USB module is connected to the second pin. During network configuration, the first pin is connected to the data receiving pin of the WIFI module, and the second pin is connected to the ground pin of the WIFI module and grounded. When the mobile terminal turns on the USB power supply, the diode conducts. When the USB power supply is turned off, the diode is cut off. By continuously turning on and off the USB power supply on the mobile terminal, the SSID and PASSWORD of the router are formed into serial data with a specific baud rate according to the serial protocol and sent to the WIFI module. The WIFI module receives the SSID and PASSWORD of the router through the data receiving pin to complete network configuration.
[0010] Further, the network configuration device further includes a first resistor. One end of the first resistor is connected to the cathode of the diode, and the other end is grounded.
[0011] Further, jacks are provided at both the data receiving pin and the ground pin of the WIFI module. The size of the jacks corresponds to the size of the first pin and the second pin.
[0012] Further, the model of the diode is 1N5819.
[0013] A WIFI network configuration method based on serial communication includes:
[0014] Step 1: Connect the first pin to the data receiving pin of the WIFI module, and connect the second pin to the ground pin of the WIFI module and ground it.
[0015] Step 2: Continuously turn on and off the USB power supply on the mobile terminal to form serial data with a specific baud rate according to the serial protocol for the SSID and PASSWORD of the router and send it to the WIFI module.
[0016] Step 3: The WIFI module receives the SSID and PASSWORD of the router through the data receiving pin to complete network configuration.
[0017] The present invention uses a hardware plus software approach for WIFI network configuration. During network configuration, the first pin is connected to the data receiving pin of the WIFI module, and the second pin is connected to the ground pin of the WIFI module and grounded. When the mobile terminal turns on the USB power, the diode conducts; when the USB power is turned off, the diode cuts off. By continuously turning on and off the USB power on the mobile terminal, the SSID and PASSWORD of the router are formed into serial data at a specific baud rate according to the serial port protocol and sent to the WIFI module. The WIFI module receives the SSID and PASSWORD of the router through the data receiving pin to complete the network configuration. This avoids the instability of network configuration through the wireless network and greatly improves the success rate of WIFI network configuration. Description of the Drawings
[0018] Figure 1 It is a schematic circuit structure diagram of the WIFI network configuration device based on serial port communication provided by an embodiment of the present invention.
[0019] In the drawings, D1 is a diode, R1 is the first resistor, GND is the ground pin, Vbus is the power pin, and RX is the data receiving pin. Detailed Embodiments
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0021] The following will describe in detail the specific embodiments of the present invention with reference to the accompanying drawings.
[0022] The WIFI network configuration device of the present invention based on serial port communication, as Figure 1As shown in the figure, it is used for WIFI network configuration of intelligent hardware through a mobile terminal. The mobile terminal includes a USB module. The network configuration device includes a USB extension cable and a diode D1. One end of the USB extension cable is respectively connected to the power supply pin Vbus and the ground pin GND of the USB module of the mobile terminal. The other end of the USB extension cable connected to the power supply pin Vbus of the USB module is connected to the anode of the diode D1. The cathode of the diode D1 is connected to the first pin. The other end of the USB extension cable connected to the ground pin GND of the USB module is connected to the second pin. During network configuration, the first pin is connected to the data receiving pin RX of the WIFI module of the intelligent hardware, and the second pin is connected to the ground pin GND of the WIFI module of the intelligent hardware and grounded. When the mobile terminal turns on the USB power supply, the diode D1 conducts, and the negative pole of the diode is at a high level. When the USB power supply is turned off, the diode D1 is cut off, and the negative pole of the diode is at a low level. In this way, high and low pulses will be formed. By continuously turning on and off the USB power supply in the mobile terminal, such as a mobile phone APP, the SSID (Service Set Identifier) and PASSWORD (i.e., password) of the router are formed into serial data with a specific baud rate according to the serial port protocol and sent to the WIFI module of the intelligent hardware. The WIFI module receives the SSID and PASSWORD of the router through the data receiving pin RX to complete the network configuration.
[0023] Wherein, the network configuration device further includes a first resistor R1. One end of the first resistor R1 is connected to the cathode of the diode D1, and the other end is grounded. The first resistor R1 can adopt a 1-kilohm resistor.
[0024] Jacks are provided at both the data receiving pin and the ground pin of the WIFI module. The size of the jacks corresponds to the size of the first pin and the second pin. To facilitate network configuration operations.
[0025] The diode can adopt 1N5819.
[0026] The WIFI network configuration method based on serial port communication of the present invention includes:
[0027] Step 1: Connect the first pin to the data receiving pin of the WIFI module, and connect the second pin to the ground pin of the WIFI module and ground it;
[0028] Step 2: Continuously turn on and off the USB power supply in the mobile terminal to send the SSID and PASSWORD of the router to the WIFI module as serial data with a specific baud rate according to the serial port protocol;
[0029] Step 3: The WIFI module receives the SSID and PASSWORD of the router through the data receiving pin to complete the network configuration.
[0030] In summary, the present invention greatly improves the success rate of WIFI network configuration and the stability during WIFI network configuration.
Claims
1. A WIFI networking device based on serial communication is used to perform WIFI networking for intelligent hardware through a mobile terminal. The mobile terminal includes a USB module. Characterized in that, The networking device includes a USB extension cable and a diode. One end of the USB extension cable is respectively connected to the power pin and the ground pin of the USB module of the mobile terminal. The other end of the USB extension cable connected to the power pin of the USB module is connected to the anode of the diode. The cathode of the diode is connected to the first pin. The other end of the USB extension cable connected to the ground pin of the USB module is connected to the second pin. During networking, the first pin is connected to the data receiving pin of the WIFI module, and the second pin is connected to the ground pin of the WIFI module and grounded. When the mobile terminal turns on the USB power, the diode conducts. When the USB power is turned off, the diode cuts off. By continuously turning on and off the USB power on the mobile terminal, the SSID and PASSWORD of the router are formed into serial data with a specific baud rate according to the serial protocol and sent to the WIFI module. The WIFI module receives the SSID and PASSWORD of the router through the data receiving pin to complete the networking.
2. The WIFI networking device based on serial communication according to claim 1, Characterized in that, The networking device further includes a first resistor. One end of the first resistor is connected to the cathode of the diode, and the other end is grounded.
3. The WIFI networking device based on serial communication according to claim 1, Characterized in that, Jacks are provided at both the data receiving pin and the ground pin of the WIFI module. The sizes of the jacks correspond to the sizes of the first pin and the second pin.
4. The WIFI networking device based on serial communication according to claim 1, Characterized in that, The model of the diode is 1N5819.
5. A WIFI networking method based on serial communication uses a mobile terminal and the WIFI networking device based on serial communication according to claim 1 to perform WIFI networking for intelligent hardware. Characterized in that, Including: Step 1: Connect the first pin to the data receiving pin of the WIFI module, and connect the second pin to the ground pin of the WIFI module and ground it. Step 2: Continuously turn on and off the USB power on the mobile terminal to send the SSID and PASSWORD of the router as serial data with a specific baud rate according to the serial protocol to the WIFI module. Step 3: The WIFI module receives the SSID and PASSWORD of the router through the data receiving pin to complete the networking.
Citation Information
Patent Citations
Terminal connecting circuit for wearable equipment and terminal connecting method of terminal connecting circuit
CN106877078A
Rapid network distribution method, smart socket and smart hardware
WO2019056608A1