Automatic networking method and device for I / O-free intelligent equipment and intelligent equipment
By merging the automatic distribution module and the Wi-Fi module in the I/O smart device, and using the lightweight 2.4G transceiver to achieve the communication of the Bluetooth BLE package, solve the I/O smart device automatic networking problem, realize the realization The fast and automated networking process reduced the cost and improved the success rate of connection.
Patent Information
- Application Number
- CN202411268584.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-01-18
- Filing Date
- 2024-09-11
- Publication Date
- 2025-01-21
AI Technical Summary
The networking methods of existing IoT devices have problems such as poor compatibility, time-consuming, high failure rate and high cost. Especially in I/O-free smart devices, the lack of input/output modules and Bluetooth modules makes it difficult to realize the automated networking process. .
By merging the automatic distribution module as the Wi-Fi module in the I/O smart device, the same baseband and radio frequency are used, and the lightweight 2.4G transceiver is packaged into the Bluetooth BLE bag. SSID and passwords to achieve connection with routing devices.
With the realization of I/O smart devices without external input interfaces, it automatically connects to the router, reducing production costs, increasing the speed and success rate of connection, and fully automated the distribution process process, suitable for people such as elderly people.
Smart Images

Figure CN119342624A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an automatic networking method for a non-I / O intelligent device, and also relates to a corresponding device and a non-I / O intelligent device, belonging to the technical field of Internet of Things. Background Art
[0002] At present, more and more IoT devices, including smart home appliances and smart home products, have entered our daily lives. As the carrier of the application layer of the IoT system, it is a basic functional requirement for smart home appliances and smart home products to connect to the cloud. At present, the commonly used IoT networking methods are realized through input interfaces and not through input interfaces. There are mainly the following types:
[0003] AirKiss network configuration technology: The Wi-Fi module is in monitoring 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 the size of the UDP broadcast packet and other information. The problems of this networking method include: poor compatibility, multiple monitoring signals, long time consumption, and high failure rate.
[0004] NFC network matching technology: Pairing with the mobile phone NFC through the NFC chip to conduct near-field communication and exchange SSID and password. The problems of this networking method include: the need for a built-in NFC chip and high cost.
[0005] BLE network configuration 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. The problems with this networking method include: the need for a built-in BLE module, which is relatively expensive.
[0006] EasyConnect network configuration technology: The Wi-Fi module is in monitoring state and uses the multicast packet address encoding sent by the mobile phone APP. The Wi-Fi module resolves the SSID and password based on the monitored information. The problems of this networking method include: poor compatibility, multiple monitoring signals, long time consumption, and high failure rate.
[0007] AP function network configuration technology: After the Wi-Fi module is powered on, it is in AP mode and communicates with the mobile phone. Through the application (APP) pre-downloaded on the mobile phone, choose to add a new device in the application, and then follow the instructions of the APP to send the SSID and password to the Wi-Fi module. After obtaining the 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 connect to the target router and confirm through the cloud that the Wi-Fi module has been connected to the target router. The problems with this networking method include: after connecting, it is necessary to confirm that the connection has been made through the cloud, which takes a long time, is cumbersome to operate, and is not friendly to the elderly. Summary of the invention
[0008] The primary technical problem to be solved by the present invention is to provide an automatic networking method for non-I / O intelligent devices.
[0009] Another technical problem to be solved by the present invention is to provide an automatic networking device without I / O intelligent devices.
[0010] Another technical problem to be solved by the present invention is to provide an I / O-free intelligent device including the above device.
[0011] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0012] According to a first aspect of an embodiment of the present invention, there is provided a method for automatically networking a non-I / O intelligent device, comprising the following steps:
[0013] S10: After power-on, the automatic network configuration module in the non-I / O intelligent device starts the 2.4G transceiver and sends a broadcast packet to the Bluetooth device based on the Host protocol to establish a Bluetooth connection with the Bluetooth device;
[0014] S20: If a Bluetooth connection is not successfully established with the Bluetooth device within a predetermined time, the I / O smart device increases the transmission power or reduces the distance, and tries to establish a Bluetooth connection again until a Bluetooth connection is successfully established;
[0015] S30: After successfully connecting with the Bluetooth device via Bluetooth within a predetermined time, the Bluetooth device uses the APP to send the SSID and password of the router to the automatic network configuration module via Bluetooth connection;
[0016] S40: The microcontroller sends the router's SSID and password to the Wi-Fi module;
[0017] S50: The Wi-Fi module switches to STA mode and uses the router SSID and password to establish a Wi-Fi connection with the router;
[0018] S60: If the device fails to connect to the router within the preset time, the device without I / O increases the transmission power and tries to establish a Wi-Fi connection again. If the Wi-Fi connection is still not successfully established after the transmission power is increased to the preset power, the Wi-Fi module of the device without I / O calculates the distance according to the power of the received signal from the Bluetooth device, and prompts the user to reduce the distance between the device without I / O and the router or to close other Bluetooth connections through the Bluetooth device, until the Wi-Fi connection is successfully established or the number of attempts reaches the upper limit without successful connection;
[0019] S70: If the connection is successfully established, the microcontroller saves the SSID and password into the parameter configuration table and ends the process; if the connection is unsuccessful, the SSID and password are cleared, a failure prompt is issued or the process returns to step S10.
[0020] Preferably, in step S20, the I / O-free smart device increases the transmission power or shortens the distance, including: if the Bluetooth connection is still not successfully established after the transmission power is increased to a predetermined power, the microcontroller of the I / O-free smart device calculates the distance according to the received signal strength from the Bluetooth device, and prompts the user through the Bluetooth device to shorten the distance between the I / O-free smart device and the Bluetooth device.
[0021] Preferably, when the distance calculated by the microcontroller according to the received signal strength from the mobile phone is less than or equal to the preset distance, the microcontroller will no longer prompt to reduce the distance.
[0022] The preset distance is set according to the effective distance of Bluetooth communication.
[0023] An automatic networking method for non-I / O intelligent devices, comprising the following steps:
[0024] S1: After the non-I / O smart device is powered on, the Wi-Fi module is powered on and the parameter configuration table is retrieved to determine whether it has been connected to the router;
[0025] S2: The automatic network configuration module in the non-I / O smart device starts the 2.4G transceiver and sends a broadcast packet to the mobile phone based on the Host protocol to establish a Bluetooth connection with the Bluetooth device;
[0026] S3: Determine whether the automatic network configuration module is successfully connected to the Bluetooth device via Bluetooth within a predetermined time. If the Bluetooth connection is successfully established, proceed to step S4; if not, proceed to step S5;
[0027] S4: After the Bluetooth connection is successfully established, the Bluetooth device uses the APP to send the router's SSID and password to the I / O-free smart device via the Bluetooth connection;
[0028] S5: The microcontroller sends the router’s SSID and password to the Wi-Fi module;
[0029] S6: The Wi-Fi module starts the STA mode and connects to the router using the router's SSID and password;
[0030] S7: If the router is not successfully connected within the preset time, the non-I / O intelligent device increases the transmission power or reduces the distance and tries to establish a Wi-Fi connection again. When the number of attempts reaches the upper limit, it is determined that the Wi-Fi connection is not successfully established, otherwise it is determined that the Wi-Fi connection is successfully established;
[0031] S8: If the Wi-Fi connection is successfully established, the microcontroller updates the SSID and password to the parameter configuration table and ends the process; if the Wi-Fi connection is not successfully established, the SSID and password are cleared, a failure prompt is issued and the process ends.
[0032] Preferably, S41: the automatic network configuration module and the Bluetooth device interact with the characteristic value interaction package and the encryption interaction package to generate a key;
[0033] S42: The Bluetooth device makes the routing SSID and password into an ATT bearer packet, and sends the ATT bearer packet to the automatic network configuration module;
[0034] S43: After receiving the ATT bearer packet, the automatic network configuration module decrypts the ATT bearer packet according to the key generated in step S31 to obtain the routing SSID and password;
[0035] S44: After obtaining the routing SSID and password, the automatic network configuration module constructs an encrypted confirmation packet and sends the encrypted confirmation packet to the Bluetooth device;
[0036] S45: The Bluetooth device receives the encrypted confirmation packet, confirming that the automatic network configuration module has received the routing SSID and password.
[0037] Preferably, step S7 includes:
[0038] If the Wi-Fi connection is still not successfully established after the transmission power is increased to the predetermined power, the Wi-Fi module of the non-I / O smart device calculates the distance according to the received signal strength from the Bluetooth device, and prompts the user through the mobile phone to reduce the distance between the non-I / O smart device and the router or to close other Bluetooth connections, and returns to step S6; or
[0039] If the distance is less than the preset distance and the transmission power is less than the preset power, the transmission power is increased, and the process returns to step S6, and when the transmission power reaches the preset power, the process jumps to step S7; if the distance is greater than the preset distance, a prompt to reduce the distance is issued when establishing the connection and the process returns to step S6, where the distance is the distance from the non-I / O smart device to the router.
[0040] According to a second aspect of an embodiment of the present invention, there is provided an apparatus for automatic networking of a non-I / O intelligent device, comprising a microprocessor, a Wi-Fi module and an automatic network configuration module, wherein the microprocessor controls the Wi-Fi module and the automatic network configuration module respectively to implement the aforementioned method.
[0041] According to a third aspect of an embodiment of the present invention, there is provided an automatically networked I / O-free intelligent device, which includes the aforementioned apparatus.
[0042] Compared with the prior art, for smart devices without I / O (input / output) modules and Bluetooth modules, the present invention incorporates the automatic network configuration module into the Wi-Fi module, shares the same baseband and radio frequency, and then uses a lightweight 2.4g transceiver to encapsulate it into a Bluetooth BLE package, and obtains the SSID and password of the target route through encrypted communication with the mobile phone, thereby connecting to the routing device, so that the Wi-Fi module can successfully establish a connection with the route without any external input interface. The use of pseudo-Bluetooth technology does not require the use of complex Bluetooth chips, and a simpler 2.4G chip can be used to achieve basic communication functions, effectively reducing production costs; and, using the distance detection function, in the case of excessive interference, it can also increase the power or prompt close distance to improve the connection speed and success rate. In addition, the network configuration process is all automatically implemented without manual operation, so it is more user-friendly for the elderly and other groups. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of the structure of an automatic networking device for non-I / O intelligent devices provided by an embodiment of the present invention;
[0044] Figure 2 An overall flow chart of an automatic networking method for a non-I / O intelligent device provided by an embodiment of the present invention;
[0045] Figure 3 A schematic diagram of the signaling interaction process in the automatic networking method for a non-I / O intelligent device provided in an embodiment of the present invention;
[0046] Figure 4 A schematic diagram of the software structure and hardware structure of the automatic networking device without I / O intelligent equipment provided by the present invention. DETAILED DESCRIPTION
[0047] The technical content of the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0048] A non-I / O smart device refers to a smart device that has no input or output modules, so the user cannot input information / instructions, nor can the user obtain information output by the smart device. Non-I / O smart devices also include devices that can input or output some information, but cannot input or output information related to the smart device distribution network. For example, the display screen of a smart water heater can display water temperature information, and the user can also operate the switch or select a specific function; for another example, the display screen of a smart rice cooker can display temperature and time, and can also select functions such as cooking rice or making soup, but these smart devices cannot input or output information, instructions or operations related to the distribution network.
[0049] The Wi-Fi module included in the automatic networking device for I / O-free smart devices of the present invention can automatically and quickly configure the network without the need for manual configuration by the user of the smart device (because there is no input / output module, manual network configuration is impossible), thereby improving the user experience, especially for the elderly. Figure 1 As shown, an embodiment of the present invention provides an automatic networking device for a non-I / O intelligent device, including a microprocessor (MCU), a Wi-Fi module and an automatic network configuration module. The microprocessor controls the Wi-Fi module and the automatic network configuration module respectively.
[0050] First embodiment
[0051] like Figure 1 As shown, the first embodiment of the present invention discloses an automatic networking method for a non-I / O smart device, which uses the Wi-Fi module of the non-I / O smart device to automatically connect to a router and configure the network, so that the non-I / O smart device can be connected to the Internet with a home router or a wireless router in an office environment, and then remote control is achieved using the Internet. The automatic networking method for a non-I / O smart device of the present invention includes the following steps:
[0052] S10: After power-on, the automatic network configuration module in the non-I / O intelligent device starts the 2.4G transceiver and sends a broadcast packet to the Bluetooth device based on the Host protocol to establish a Bluetooth connection with the Bluetooth device.
[0053] The I / O-free smart devices such as smart home appliances or IoT devices in this embodiment include a simplified Host protocol stack. The Host protocol stack works in conjunction with the Bluetooth module or Bluetooth protocol stack to process higher-level data exchange and application logic, including functions such as application programming interfaces (APIs) for interacting with Bluetooth devices, device management, service discovery, and data transmission management. Therefore, based on the Host protocol stack, I / O-free smart devices (even without Bluetooth modules) can directly interact with mobile phones, etc., such as service discovery, data transmission, and device management. Only mobile phones are used as an example for illustration, but this does not constitute a limitation of the present invention, and it can also be a Bluetooth device equipped with a Bluetooth module such as a PAD or a computer.
[0054] In this embodiment, the automatic network configuration module includes a 2.4G transceiver and a Host protocol stack, and does not include a Bluetooth module or a Bluetooth protocol stack. The automatic network configuration module is started by the MCU (microprocessor) and configured to work on the 2.4GHz frequency band. Then the automatic network configuration module sends a broadcast packet through the Host protocol stack to establish a Bluetooth connection with the mobile phone, so that the mobile phone can exchange information with the automatic network configuration module through the Bluetooth protocol.
[0055] The automatic network configuration module in the I / O-free smart device, based on the Host protocol stack, establishes a Bluetooth connection with the Bluetooth module in the mobile phone by actively sending broadcast packets of small blocks of data. The broadcast frequency is 2.4GHz, the channel spacing is 1MHz, the modulation is GFSK, the data rate is 1MBps, the preamble is 10101010 or 01010101 (based on the first data byte), and the 32-bit address is used for addressing.
[0056] Then, the Bluetooth module of the mobile phone receives the broadcast packet, and based on the discovery, connection, pairing and other functions of the Bluetooth protocol, sends an instruction to establish a Bluetooth connection to the automatic network configuration module to establish a connection with the automatic network configuration module. First, by sending a specific Bluetooth broadcast packet, other Bluetooth devices (mobile phones) can detect the I / O-free smart device and establish a virtual connection; then, when communicating with the mobile phone, the automatic network configuration module acts as an agent and forwards the data of the mobile phone to the corresponding application of the I / O-free smart device, thereby realizing Bluetooth communication with the mobile phone. Therefore, in this embodiment, the I / O-free smart device does not need a Bluetooth template, and can use the Host protocol stack to establish a Bluetooth connection with the Bluetooth module in the mobile phone.
[0057] If the automatic network configuration module in the I / O smart device fails to successfully establish a Bluetooth connection with the mobile phone within the predetermined time, the process proceeds to step S20; if the automatic network configuration module successfully establishes a Bluetooth connection with the mobile phone, the process proceeds to step S30.
[0058] S20: If a Bluetooth connection is not successfully established with the Bluetooth device within a predetermined time, the I / O-less smart device increases the transmission power and tries to establish the Bluetooth connection again; if the Bluetooth connection is still not successfully established after the transmission power is increased to the predetermined power, the MCU of the I / O-less smart device calculates the distance according to the power of the received signal from the mobile phone, and prompts the user through the mobile phone to shorten the distance between the I / O-less smart device and the mobile phone until a Bluetooth connection is successfully established.
[0059] Bluetooth technology uses the 2.4GHz frequency band, which is divided into 79 channels, each with a bandwidth of 1MHz. Therefore, Bluetooth devices can use multiple channels to communicate at the same time, reducing the possibility of interference. However, more and more people are using Bluetooth headsets in home or office environments, which causes more and more interference to Bluetooth connections indoors. Moreover, in indoor environments, physical obstacles such as walls, furniture or other electronic devices can block or interfere with Bluetooth signals, resulting in connection failure or reduced communication quality. Moreover, as mentioned above, in this embodiment, the I / O-free smart device does not use a real Bluetooth module, but only uses an automatic network configuration module to establish a Bluetooth connection with the Bluetooth module in the mobile phone, so the connection may not be as stable as a real Bluetooth connection. These factors may cause frequent disconnections or difficulty in establishing stable communication.
[0060] Therefore, in order to ensure a stable Bluetooth connection, the reliability of the Bluetooth connection can be improved by increasing the transmission power or reducing the distance (bringing the mobile phone closer to the I / O-free smart device). Even better, the MCU of the I / O-free smart device calculates the distance based on the strength of the received signal from the mobile phone, and prompts the user through the mobile phone to reduce the distance (when establishing a Bluetooth connection occasionally) until a stable Bluetooth connection is successfully established.
[0061] It should be noted here that the use of the WS 9100 model chip provided by the applicant can provide a function of calculating the distance based on the received signal strength. Bluetooth devices are usually effective within a distance range of 10 meters. In this embodiment, the Bluetooth device using the WS9100 model chip is usually effective within a range of 7-8 meters, and the preset distance is set accordingly. Therefore, a more optimized solution is that when the distance calculated by the MCU based on the received signal strength from the mobile phone is less than or equal to the preset distance (for example, 7 meters), it will no longer prompt to reduce the distance, but return to step S10; when the calculated distance is greater than the preset distance, the mobile phone will prompt to reduce the distance.
[0062] Those skilled in the art will appreciate that this step may be omitted depending on the actual application scenario.
[0063] S30: After successfully connecting to the mobile phone via Bluetooth within the predetermined time, the mobile phone uses the APP to send the SSID and password of the router to the automatic network configuration module via Bluetooth connection.
[0064] S40: The microcontroller sends the router's SSID and password to the Wi-Fi module.
[0065] S50: The Wi-Fi module switches to STA (Station) mode and uses the router SSID and password to establish a Wi-Fi connection with the router.
[0066] The router also uses the 2.4GHz frequency band (the same frequency band as Bluetooth) in the 2.4GHz wireless LAN (Wi-Fi), but only uses 11 or 13 channels, and the bandwidth of each channel is 20MHz or 40MHz. In an indoor environment, someone uses Bluetooth headphones to listen to music or make calls, or uses a microwave oven, etc., which makes the 2.4G device (router) susceptible to interference. Moreover, the device compatibility of Wi-Fi devices is relatively poor, especially older versions of devices may not support the latest Wi-Fi standards, which may cause some I / O-free smart devices to be unable to connect directly to the router through the Wi-Fi module, or to be interfered with during the connection. Therefore, sometimes it happens that the Wi-Fi module fails to connect to the router within the scheduled time.
[0067] S60: If the router is not successfully connected within the predetermined time, the I / O smart device increases the transmission power and tries to establish a Wi-Fi connection again.
[0068] If the device fails to connect to the router successfully within the preset time, the device without I / O will increase the transmission power and try to establish a Wi-Fi connection again. If the Wi-Fi connection is still not successfully established after the transmission power is increased to the preset power, the Wi-Fi module of the device without I / O will calculate the distance according to the received signal strength from the mobile phone, and prompt the user through the mobile phone to shorten the distance between the device without I / O and the router or to close other Bluetooth connections until the Wi-Fi connection is successfully established or the number of attempts reaches the upper limit without successful connection.
[0069] Those skilled in the art will appreciate that this step may be omitted depending on the actual application scenario.
[0070] S70: If the connection is successfully established, the microcontroller saves the SSID and password into the parameter configuration table and ends the process; if the connection is unsuccessful, the SSID and password are cleared, a failure prompt is issued or the process returns to step S10.
[0071] In this embodiment, when the non-I / O smart device fails to successfully connect to the router within a predetermined time, the non-I / O smart device can improve the receiving sensitivity, or increase the transmission power, or increase the time for automatic channel selection. If the Wi-Fi connection is not successfully established after a predetermined number of operations (for example, 3 times), the power and signal quality of the received signal are used to determine whether the distance between the non-I / O smart device (Wi-Fi module) and the router is small enough. If the distance is greater than the predetermined distance, a prompt is issued after the connection is established. The aforementioned "failure to successfully establish a Wi-Fi connection" includes situations where the Wi-Fi module can occasionally connect to the router, but cannot maintain a stable connection.
[0072] Second embodiment
[0073] The first embodiment is suitable for the first power-on network connection of a non-I / O intelligent device. As another alternative, the second embodiment of the present invention discloses an automatic networking method for a non-I / O intelligent device, which is suitable for the second and subsequent power-on network connection, and includes the following steps (refer to Figure 2 ).
[0074] S1: After the non-I / O smart device is powered on, the Wi-Fi module is powered on and the parameter configuration table is retrieved to determine whether it has been connected to a router.
[0075] If the parameter configuration table contains the router's SSID and password, it is determined that the router has been connected; if not, it is determined that the router has not been connected.
[0076] If the router has not been connected, the process proceeds to step S10; if the router has been connected, the Wi-Fi module calls the SSID and password of the router in the parameter configuration table and proceeds to step S40.
[0077] S2: The automatic network configuration module in the non-I / O smart device starts the 2.4G transceiver and sends a broadcast packet to the mobile phone based on the Host protocol to establish a Bluetooth connection with the Bluetooth device.
[0078] S3: Determine whether the automatic network configuration module is successfully connected to the Bluetooth device via Bluetooth within a predetermined time. If the Bluetooth connection is successfully established, proceed to step S4; if not, proceed to step S5.
[0079] This step is similar to step S20 in which the automatic network configuration module uses the Host protocol stack to establish a Bluetooth connection with the mobile phone in the first embodiment, and is not described in detail here.
[0080] If the Bluetooth connection with the mobile phone is not successfully established within the preset time, the I / O-free smart device increases the transmission power and tries to establish the Bluetooth connection again; if the Bluetooth connection is still not successfully established after the transmission power is increased to the preset power, the MCU of the I / O-free smart device calculates the distance according to the received signal strength from the mobile phone, and prompts the user through the mobile phone to reduce the distance between the I / O-free smart device and the mobile phone until the Bluetooth connection is successfully established, and the process goes to step S3. If the transmission power is increased to the preset power and the calculated distance is less than or equal to the preset distance, it is determined that the Bluetooth connection is not successfully established, and the process goes to step S4.
[0081] S4: After the Bluetooth connection is successfully established, the Bluetooth device uses the APP to send the router's SSID and password to the I / O-free smart device via the Bluetooth connection.
[0082] The mobile phone is used as a Bluetooth device, and the mobile phone APP includes various Bluetooth-related APPs and / or applets such as nRF Connect, which are not limited in the present invention. For example, nRF Connect is an Android APP for Bluetooth debugging developed by Nordic Semiconductor.
[0083] like Figures 2 to 4 As shown in the figure, the mobile phone sends the SSID and password of the router to the I / O-free smart device. The data interaction between the two specifically includes the following steps:
[0084] S41: The automatic network configuration module and the mobile phone interact with the characteristic value interaction package and the encryption interaction package to generate a key;
[0085] S42: The mobile phone makes the router SSID and password into an ATT (Attribute Protocol) bearer packet, and sends the ATT bearer packet to the automatic network configuration module;
[0086] S43: After receiving the ATT bearer packet, the automatic network configuration module decrypts the ATT bearer packet according to the key generated in step S31 to obtain the routing SSID and password;
[0087] S44: After obtaining the router SSID and password, the automatic network configuration module constructs an encrypted confirmation packet and sends the encrypted confirmation packet to the mobile phone;
[0088] S45: The mobile phone receives the encrypted confirmation packet, confirming that the automatic network configuration module has received the routing SSID and password.
[0089] S5: The microcontroller sends the router's SSID and password to the Wi-Fi module.
[0090] S6: The Wi-Fi module starts the STA mode and connects to the router using the router's SSID and password.
[0091] S7: If the router is not successfully connected within the preset time, the non-I / O smart device increases the transmission power or shortens the distance and tries to establish a Wi-Fi connection again. When the number of attempts reaches the upper limit, it is determined that the Wi-Fi connection is not successfully established. Otherwise, it is determined that the Wi-Fi connection is successfully established.
[0092] In this embodiment, the chip used by the microprocessor in the I / O-free smart device can calculate the distance from the Wi-Fi module to the router based on the signal strength from the router.
[0093] If the Wi-Fi connection is still not established after the transmission power is increased to the predetermined power, the Wi-Fi module of the non-I / O smart device calculates the distance according to the received signal strength from the Bluetooth device, and prompts the user through the mobile phone to reduce the distance between the non-I / O smart device and the router or to close other Bluetooth connections. Then, the process returns to step S6.
[0094] As another alternative, if the distance is less than the preset distance (e.g., 7 meters or 8 meters mentioned above), and when the transmission power is less than the preset power, the transmission power is increased, and the process returns to step S6, and when the transmission power reaches the preset power, the process jumps to step S7; if the distance is greater than the preset distance, a prompt to reduce the distance is issued when establishing a connection (unstable connection) and the process returns to step S6. The prompt is to inform the user to reduce the distance between the non-I / O smart device and the router.
[0095] If the number of attempts has not reached the upper limit, step S6 is repeated until a Wi-Fi connection is established and the process proceeds to step S8; if the number of attempts has reached the upper limit, the process proceeds to step S8.
[0096] S8: If the Wi-Fi connection is successfully established, the microcontroller updates the SSID and password to the parameter configuration table and ends the process; if the Wi-Fi connection is not successfully established, the SSID and password are cleared, a failure prompt is issued and the process ends.
[0097] Based on the above technical solution, the automatic networking method of the non-I / O smart device of the embodiment of the present invention has the following advantages: 1) It avoids the problem that the number of Bluetooth devices in homes or offices is increasing, and because the smart device does not have a Bluetooth module, the anti-interference mechanism is not as good as that of the conventional Bluetooth module, which leads to the inability to establish a stable connection due to excessive interference when establishing a Bluetooth connection; 2) Under the condition of no Bluetooth module and no input / output module, the method of automatically receiving / sending Bluetooth broadcast packets based on the Host protocol stack and the 2.4G transceiver realizes the Bluetooth connection between the Bluetooth device and the non-I / O smart device, which significantly reduces the cost; 3) First use the H The ost protocol stack and 2.4G transceiver establish a Bluetooth connection with a Bluetooth device (such as a mobile phone) to obtain the SSID and password, and then use the Wi-Fi module to establish a Wi-Fi connection with a wireless router. The smart device does not require manual input (and therefore does not require an input / output module) or a Bluetooth module, and can still automatically configure the network and connect to the Internet to accept remote control, thereby improving the ease of use of smart devices (even the elderly can use them) and intelligent control (such as remote upgrades); 4) Using the Wi-Fi module to establish a Wi-Fi connection with a wireless router solves the compatibility problem caused by the use of STBC (Space-Time Block Code) modulation in the prior art, and greatly improves the compatibility of the Wi-Fi module.
[0098] Compared with the prior art, the present invention reduces the manufacturing cost of the Wi-Fi module by using a 2.4g transceiver which is cheaper than NCF and BLE Bluetooth modules.
[0099] On the other hand, the present invention eliminates the step of the mobile phone needing to confirm the connection with the cloud in the prior art by sending a notification of successful connection establishment with the router by the Wi-Fi module to the mobile phone, thereby greatly reducing the waiting time for confirming the connection.
[0100] Third embodiment
[0101] In addition, the third embodiment of the present invention provides an I / O-free intelligent device, which includes the aforementioned automatic networking device. The automatic networking method used by the I / O-free intelligent device is the same as the method described in the first embodiment of the present invention, which will not be described in detail here.
[0102] In this embodiment, the I / O-free smart device is a smart water heater, a smart rice cooker, a smart socket or a smart lamp, etc. The automatic networking method used by the I / O-free smart device in the first embodiment is used to perform initial Wi-Fi network configuration in order to connect to the indoor Wi-Fi network.
[0103] It should be noted that the above-mentioned multiple embodiments are only examples, and the technical solutions of various embodiments can be combined, and the step sequence of each technical solution can also be adjusted, all within the protection scope of the present invention.
[0104] The above is a detailed description of the automatic networking method, device and intelligent device for non-I / O intelligent devices provided by the present invention. For those skilled in the art, any obvious changes made to it without departing from the essence of the present invention will constitute an infringement of the patent right of the present invention and will bear corresponding legal responsibilities.
Claims
1. An automatic networking method for non-I / O intelligent devices, characterized in that The steps include: S10: After power-on, the automatic network configuration module in the non-I / O intelligent device starts the 2.4G transceiver and sends a broadcast packet to the Bluetooth device based on the Host protocol to establish a Bluetooth connection with the Bluetooth device; S20: If a Bluetooth connection is not successfully established with the Bluetooth device within a predetermined time, the I / O smart device increases the transmission power or reduces the distance, and tries to establish a Bluetooth connection again until a Bluetooth connection is successfully established; S30: After successfully connecting with the Bluetooth device via Bluetooth within a predetermined time, the Bluetooth device uses the APP to send the SSID and password of the router to the automatic network configuration module via Bluetooth connection; S40: The microcontroller sends the router's SSID and password to the Wi-Fi module; S50: The Wi-Fi module switches to STA mode and uses the router SSID and password to establish a Wi-Fi connection with the router; S60: If the device fails to connect to the router within the preset time, the device without I / O increases the transmission power and tries to establish a Wi-Fi connection again. If the Wi-Fi connection is still not successfully established after the transmission power is increased to the preset power, the Wi-Fi module of the device without I / O calculates the distance according to the power of the received signal from the Bluetooth device, and prompts the user to reduce the distance between the device without I / O and the router or to close other Bluetooth connections through the Bluetooth device, until the Wi-Fi connection is successfully established or the number of attempts reaches the upper limit without successful connection; S70: If the connection is successfully established, the microcontroller saves the SSID and password into the parameter configuration table and ends the process; If the connection is unsuccessful, the SSID and password are cleared, a failure prompt is issued, or the process returns to step S10.
2. The method according to claim 1, characterized in that: In step S20, the I / O-free smart device increases the transmission power or shortens the distance, including: if the Bluetooth connection is still not successfully established after the transmission power is increased to a predetermined power, the microcontroller of the I / O-free smart device calculates the distance according to the received signal strength from the Bluetooth device, and prompts the user through the Bluetooth device to shorten the distance between the I / O-free smart device and the Bluetooth device.
3. The method according to claim 2, characterized in that: When the distance calculated by the microcontroller based on the received signal strength from the mobile phone is less than or equal to the preset distance, the user is no longer prompted to reduce the distance. The preset distance is set according to the effective distance of Bluetooth communication.
4. An automatic networking method for non-I / O intelligent devices, characterized in that The steps include: S1: After the non-I / O smart device is powered on, the Wi-Fi module is powered on and the parameter configuration table is retrieved to determine whether it has been connected to the router; S2: The automatic network configuration module in the non-I / O smart device starts the 2.4G transceiver and sends a broadcast packet to the mobile phone based on the Host protocol to establish a Bluetooth connection with the Bluetooth device; S3: Determine whether the automatic network configuration module is successfully connected to the Bluetooth device via Bluetooth within a predetermined time. If the Bluetooth connection is successfully established, proceed to step S4; if not, proceed to step S5; S4: After the Bluetooth connection is successfully established, the Bluetooth device uses the APP to send the router's SSID and password to the I / O-free smart device via the Bluetooth connection; S5: The microcontroller sends the router’s SSID and password to the Wi-Fi module; S6: The Wi-Fi module starts the STA mode and connects to the router using the router's SSID and password; S7: If the router is not successfully connected within the preset time, the non-I / O intelligent device increases the transmission power or reduces the distance and tries to establish a Wi-Fi connection again. When the number of attempts reaches the upper limit, it is determined that the Wi-Fi connection is not successfully established, otherwise it is determined that the Wi-Fi connection is successfully established; S8: If the Wi-Fi connection is successfully established, the microcontroller updates the SSID and password to the parameter configuration table and ends the process; If the Wi-Fi connection is not successfully established, the SSID and password are cleared, a failure prompt is issued, and the process ends.
5. The method according to claim 4, characterized in that Step S4 includes: S41: The automatic network configuration module and the Bluetooth device interact with each other through the characteristic value interaction package and the encryption interaction package to generate a key; S42: The Bluetooth device makes the routing SSID and password into an ATT bearer packet, and sends the ATT bearer packet to the automatic network configuration module; S43: After receiving the ATT bearer packet, the automatic network configuration module decrypts the ATT bearer packet according to the key generated in step S31 to obtain the routing SSID and password; S44: After obtaining the routing SSID and password, the automatic network configuration module constructs an encrypted confirmation packet and sends the encrypted confirmation packet to the Bluetooth device; S45: The Bluetooth device receives the encrypted confirmation packet, confirming that the automatic network configuration module has received the routing SSID and password.
6. The method according to claim 5, characterized in that The step S7 comprises: If the Wi-Fi connection is still not successfully established after the transmission power is increased to the predetermined power, the Wi-Fi module of the non-I / O smart device calculates the distance according to the received signal strength from the Bluetooth device, and prompts the user through the mobile phone to reduce the distance between the non-I / O smart device and the router or to close other Bluetooth connections, and returns to step S6; or If the distance is less than the preset distance and the transmission power is less than the preset power, the transmission power is increased, and the process returns to step S6, and when the transmission power reaches the preset power, the process jumps to step S7; if the distance is greater than the preset distance, a prompt to reduce the distance is issued when establishing the connection and the process returns to step S6, where the distance is the distance from the non-I / O smart device to the router.
7. An automatic networking device for non-I / O intelligent devices, characterized in that The invention comprises a microprocessor, a Wi-Fi module and an automatic network configuration module, wherein the microprocessor controls the Wi-Fi module and the automatic network configuration module respectively, and is used to implement the method described in any one of claims 1 to 6.
8. An automatic networking I / O-free intelligent device, characterized in that It comprises the automatic networking device for non-I / O intelligent devices as claimed in claim 7.