Low-power-consumption WiFi fast connection sleep keep-alive wake-up system and method thereof
Patent Information
- Application Number
- CN202510327623.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2026-09-22
AI Technical Summary
[0008]2、工具文件比较大
[0080]由此,本申请的优势在于:单独设计了一套产品快速配网、休眠保活唤醒系统及其方法,方案成熟易用。本方案是实现物联网设备高效、低功耗运行的重要技术手段。它通过智能化的控制模块和动态调整的休眠机制,显著提高了设备的连接稳定性和电池寿命,为物联网技术的广泛应用提供了有力支持。
Smart Images

Figure CN122802998A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of IPC product technology, and specifically relates to a low-power WiFi fast connection sleep keep-alive wake-up system and method. Background Technology
[0002] With the rapid development of networks, network cameras are increasingly covering every corner of our lives and are widely used in various fields, such as homes, businesses, healthcare, and public utilities. As people's awareness of home security and elderly / infant care continues to rise, consumer-grade IPCs are gaining increasing market acceptance. Currently, traditional IPC network cameras require external power cords, leading to inconvenient installation and a less aesthetically pleasing appearance. Therefore, battery-powered IPCs are becoming increasingly popular, such as battery-operated doorbells, door locks, and peephole cameras. Due to the limited battery capacity, low-power operation and low-power persistence are essential features for battery-powered products and represent an inevitable trend in the future development of IPC products.
[0003] This application focuses on battery-powered IPC products, providing an ultra-low power wireless Wi-Fi keep-alive system. In sleep keep-alive mode, the device's Wi-Fi module maintains a certain level of activity to quickly restore connection when needed. Furthermore, by dynamically adjusting the sleep mechanism, the device's power consumption can be further reduced, thereby enabling battery-powered doorbell IPC products to achieve longer standby times.
[0004] This low-power WiFi fast-connection sleep-keep system is widely used in various IoT scenarios, such as smart homes, wearable devices, and industrial automation. In these scenarios, devices need to maintain network connectivity for extended periods while requiring extremely low power consumption. By introducing this system, the connection stability and battery life of devices can be significantly improved, thereby enhancing user experience and the market competitiveness of the devices.
[0005] Existing technologies mainly rely on traditional methods, using the wpa_supplicant tool for network configuration. Furthermore, there is a lack of mature and comprehensive system solutions for rapid network configuration, hibernation, keep-alive, and wake-up.
[0006] In other words, the current Wi-Fi network configuration scheme, which uses the wpa_supplicant tool for network configuration, has the following drawbacks:
[0007] 1. Slow network configuration speed: After configuring the Wi-Fi network using the wpa_supplicant tool, it is still necessary to perform udhcpc to assign a network IP address before the device can be used normally. This process usually takes about 3-5 seconds.
[0008] 2. The tool file is relatively large. wpa_supplicant is about 3MB in size, and many of its functional modules are unnecessary and can be trimmed. Larger files consume more memory and flash storage, increasing the product's hardware cost.
[0009] 3. Low-power WIFI chips are already available on the market, but the software debugging for WIFI sleep and keep-alive is quite complex, especially when the complete system is integrated with the main control CPU for debugging. There are few mature solutions at present, and the sleep and keep-alive solution is also the most important function of battery-powered low-power WIFI.
[0010] In addition, the terminology commonly used in this technology includes:
[0011] IPC: IPCamera, network camera.
[0012] Low-power cameras: These generally refer to IPCs that are battery powered, have extremely low operating power consumption, and require fast startup functionality.
[0013] Bcm43438: One of the models of low-power Wi-Fi.
[0014] Beacon: WiFi Beacon packets are data packets periodically sent by wireless network devices, helping devices to more accurately detect the presence and status of the network.
[0015] PIR: Human Infrared Sensor.
[0016] wpa_supplicant: wpa_supplicant is a widely used network configuration tool, mainly used to configure wireless networks and implement secure authentication for Wi-Fi networks.
[0017] Udhcpc: udhcpc is a lightweight DHCP client tool, typically used in embedded Linux systems, to dynamically obtain network IP addresses and other network configuration information. Summary of the Invention
[0018] To address the aforementioned issues, the purpose of this application is to develop a dedicated fast network configuration solution specifically for low-power products such as battery-powered devices, addressing their power-saving requirements. The software tool designed for this solution is only 200KB in size and stored in flash memory, making it 10 times smaller than the traditional wpa_supplicant network configuration tool and requiring significantly less hardware memory. This solution offers advantages such as fast network configuration speed, minimal memory and flash memory usage, and reduced hardware costs for the product.
[0019] Specifically, the present invention provides a low-power WiFi fast connection sleep keep-alive wake-up system, the system comprising:
[0020] The main control CPU is used as the device side;
[0021] Low-power WiFi module for wireless network connectivity;
[0022] MCU is used to control buttons, PIR peripherals, and CPU power.
[0023] The server is used to receive WiFi heartbeat data and determine whether the device's WiFi is online; the CPU and WiFi module are connected via the SDIO bus protocol to transmit video data to the server or mobile APP.
[0024] When the user does not need to view the monitoring screen, the CPU sets the WiFi sleep / keep-alive parameters to put the WiFi into a sleep / keep-alive state, saving power consumption.
[0025] The WiFi module sends Beacon heartbeat packets to the server periodically according to the set parameters to ensure that the system is in a hibernation keep-alive state and can be woken up normally remotely;
[0026] The MCU controls the CPU power supply and performs a power-off operation on the CPU, so that the entire product enters a low-power operation state.
[0027] When a user needs to view the monitoring screen through a mobile app, the server sends a wake-up packet to the WiFi network.
[0028] After receiving the wake-up packet, the WiFi module performs wake-up packet data verification. If the data verification is successful, it notifies the MCU to wake up the CPU.
[0029] The MCU controls the CPU voltage to power on the CPU, putting the product into operation. Customers can then view the video monitoring footage via a mobile app.
[0030] The WiFi module enables rapid connection, entering the network transmission IPC video data mode, reducing the initial network configuration time, and connecting to the designated WiFi account to achieve the purpose of rapid network configuration; since the product is in sleep mode, the WiFi is in a sleep-keep-alive state. In this state, the WiFi maintains a connection with the router and server, but IPC video data does not need to be transmitted during sleep, reducing the WiFi radio frequency transmission time and achieving the effect of reducing power consumption.
[0031] The WiFi module enables rapid network configuration and further includes:
[0032] Upon first power-on, the product dynamically acquires network IP information via the udhcpc program. After successful initial network configuration, the CPU writes the acquired network IP information to the flash storage device. When the user does not need to view the video monitoring screen, the device enters sleep mode.
[0033] When waking from hibernation, the network IP information is directly retrieved from flash storage and configured into WiFi through the network configuration program, without needing to retrieve network information again;
[0034] The system repeatedly operates between hibernation and wake-up states to achieve rapid network configuration and hibernation-keep-alive-wake-up operation.
[0035] The hibernation preservation further includes:
[0036] In addition to supporting wake-up via remote Wi-Fi wake-up package, the system can also be woken up via external buttons and human infrared sensor.
[0037] The main control CPU is a T31Z; the low-power WiFi module is a bcm43438; and the MCU is an STM32.
[0038] The system is designed to repeatedly switch between sleep and wake-up states to achieve low-power operation and rapid response to user needs.
[0039] The system is designed to adapt to different network environments and user configurations to achieve flexible network connectivity and device management.
[0040] This invention also relates to a low-power WiFi fast connection sleep keep-alive wake-up method, applicable to any of the systems described above. The method includes a fast network configuration process, enabling low-power products to quickly connect to WiFi and set WiFi sleep keep-alive parameters; it also includes a sleep keep-alive wake-up process, enabling normal remote wake-up of the product; the fast network configuration process includes: fast WiFi connection, entering network transmission IPC video data mode to reduce initial network configuration time, directly executing separately developed network configuration program code, and connecting to the designated WiFi account to achieve fast network configuration; further including:
[0041] S1: Upon first power-on, the product dynamically acquires network IP information via the udhcpc program; S2: After successful initial network configuration, the CPU writes the acquired network IP information into the flash storage device.
[0042] S3: When the user does not need to view the video surveillance footage, the device enters sleep mode;
[0043] Entering hibernation / stay-alive mode involves the following steps:
[0044] 1. Configure wake-up package
[0045] 2. Wi-Fi enters sleep mode
[0046] S4: When the product wakes up from hibernation, it directly retrieves network IP and other information from flash storage. Through the function wifi_join_ap, it can directly configure and connect to the router without having to retrieve network information again.
[0047] The method further includes:
[0048] Step S1 further includes using the udhcpc tool to request a dynamic IP address for the wlan0 network interface and outputting the result to the / tmp / dhcpc_result file;
[0049] Step S2 further includes calling the cmdline_set_env function to set the WIFI-related DHCP client configuration information, including IP address, subnet mask, gateway, DNS server and lease time, as environment variables and storing them in flash for use by subsequent programs;
[0050] Step S3:
[0051] 1. Configure wake-up package
[0052] Further, it includes using the function zrt_wifi_wakeup_pattern_add to add a WiFi wake-up mode by calling wlc_wowl_pattern, which is used to wake up the device under specific network conditions;
[0053] 2. Wi-Fi enters sleep mode
[0054] Further, it includes configuring the device's power management mode, beacon interval, DTIM interval, and host sleep state by calling multiple functions to optimize the device's power consumption;
[0055] Step S4 further includes implementing a quick WIFI connection function through code: obtaining WIFI-related DHCP configuration information, including IP address and subnet mask, through cmdline_get_env;
[0056] In the ZRT_WIFI_Fast_Connect function, the WiFi connection status is set to WIFI_CONNECTING;
[0057] Call ZRT_Get_WIFI_Config to obtain WIFI configuration information. If it fails, return an error and set the status to WIFI_DISCONNECTED.
[0058] Call wifi_join_ap to attempt to connect to the specified AP. If it fails, set the status to WIFI_CONNECT_FAILED and return an error.
[0059] The system repeatedly operates between the S3 sleep state and the S4 wake-up state to achieve fast network distribution and sleep-keep-alive-wake-up working states.
[0060] The hibernation-keep-wake process further includes:
[0061] The main control CPU serves as the device side;
[0062] WIFI, as a low-power WIFI option;
[0063] MCU: Control buttons, PIR peripherals, and CPU power supply;
[0064] Server; used to receive WiFi heartbeat data and determine whether the device's WiFi is online; further includes the following steps:
[0065] Step 1: The CPU and WIFI are connected via the SDIO bus protocol. The video images captured by the CPU can be transmitted to the server or mobile APP through the WIFI module, and users can view the monitoring screen.
[0066] Step 2: When the user does not need to view the monitoring screen, the CPU will set the WIFI sleep-keep parameters to put the WIFI into a sleep-keep state, saving power and making the battery product standby time longer.
[0067] Entering the keep-alive state is achieved through the following function:
[0068] 1. Configure wake-up package
[0069] This includes using the function zrt_wifi_wakeup_pattern_add to add a Wi-Fi wake-up mode by calling wlc_wowl_pattern, which is used to wake up the device under specific network conditions;
[0070] 2. Wi-Fi enters sleep mode
[0071] This includes configuring the device's power management mode, beacon interval, DTIM interval, and host sleep state by calling multiple functions to optimize the device's power consumption;
[0072] Step 3: The WIFI will periodically send Beacon heartbeat packets to the server according to the set parameters to ensure that the system is in a hibernation keep-alive state. In this state, it can be woken up by the remote.
[0073] Step 4: The MCU controls the CPU power supply to power off the CPU, so that the entire product enters a low-power operation state.
[0074] Step 5: When the mobile app needs to view the monitoring screen, it will send a wake-up packet to the WIFI via the server.
[0075] Step 6: After receiving the wake-up packet, the WIFI performs wake-up packet data verification. If the data verification is successful, it will notify the MCU to wake up the CPU and make the system run again.
[0076] After the system wakes up, the reason for the WiFi wake-up can be obtained through functions, including: WiFi wake-up packet wake-up, WiFi disconnection from router abnormal wake-up;
[0077] This includes using the function wifi_get_wakeup_flag to obtain the current WIFI wake-up status flag by calling wlc_wowl_status, and returning the flag value to indicate whether the device is in wake-up mode;
[0078] Step 7: The MCU controls the CPU voltage to power on the CPU, putting the product into operation. Customers can then view the video monitoring footage via a mobile app.
[0079] In addition to supporting wake-up via remote WIFI wake-up package, the method can also wake up the system via external buttons and human infrared sensor.
[0080] Therefore, the advantage of this application lies in its independently designed system and method for rapid network configuration, hibernation, and wake-up, which is mature and easy to use. This solution is an important technical means to achieve efficient and low-power operation of IoT devices. Through intelligent control modules and dynamically adjusted hibernation mechanisms, it significantly improves the connection stability and battery life of devices, providing strong support for the widespread application of IoT technology. Attached Figure Description
[0081] The accompanying drawings, which are provided to further illustrate the invention and form part of this application, are not intended to limit the scope of the invention.
[0082] Figure 1 This is a schematic diagram of the system structure of this application.
[0083] Figure 2 This is a flowchart illustrating the rapid network configuration process in this application. Detailed Implementation
[0084] To better understand the technical content and advantages of the present invention, the present invention will now be described in further detail with reference to the accompanying drawings.
[0085] This application proposes a low-power WiFi fast connection sleep keep-alive wake-up system and its application method, such as... Figure 1 As shown, the system includes:
[0086] The main control CPU is used as the device side;
[0087] Low-power WiFi module for wireless network connectivity;
[0088] MCU is used to control buttons, PIR peripherals, and CPU power.
[0089] The server is used to receive WiFi heartbeat data and determine whether the device's WiFi is online; the CPU and WiFi module are connected via the SDIO bus protocol to transmit video data to the server or mobile APP.
[0090] When the user does not need to view the monitoring screen, the CPU sets the WiFi sleep / keep-alive parameters to put the WiFi into a sleep / keep-alive state, saving power consumption.
[0091] The WiFi module sends Beacon heartbeat packets to the server periodically according to the set parameters to ensure that the system is in a hibernation keep-alive state and can be woken up normally remotely;
[0092] The MCU controls the CPU power supply and performs a power-off operation on the CPU, so that the entire product enters a low-power operation state.
[0093] When a user needs to view the monitoring footage through a mobile app, a wake-up packet is sent from the server to the Wi-Fi network.
[0094] After receiving the wake-up packet, the WiFi module performs wake-up packet data verification. If the data verification is successful, it notifies the MCU to wake up the CPU.
[0095] The MCU controls the CPU voltage to power on the CPU, putting the product into operation. Customers can then view the video monitoring footage via a mobile app.
[0096] The WiFi module enables rapid connection, entering network transmission IPC video data mode to reduce initial network configuration time and connect to the designated WiFi account for quick network setup. During product sleep mode, the WiFi operates in a sleep-keep-alive state, maintaining connectivity with the router and server. However, IPC video data transmission is not required during sleep, reducing WiFi radio frequency transmission time and thus lowering power consumption. The transition from sleep to wake-up involves the WiFi module resuming its radio frequency function without requiring network reconfiguration, thus achieving rapid connection.
[0097] The main control CPU is a T31Z; the low-power WiFi module is a bcm43438; and the MCU is an STM32.
[0098] The WiFi module enables rapid network configuration and further includes:
[0099] Upon first power-on, the product dynamically acquires network IP information via the udhcpc program. After successful initial network configuration, the CPU writes the acquired network IP information to the flash storage device. When the user does not need to view the video monitoring screen, the device enters sleep mode.
[0100] When waking from hibernation, the network IP information is directly retrieved from flash storage and configured into WiFi through the network configuration program, without needing to retrieve network information again;
[0101] The system repeatedly operates between hibernation and wake-up states to achieve rapid network configuration and hibernation-keep-alive-wake-up operation.
[0102] The hibernation keep-alive wake-up further includes:
[0103] In addition to supporting wake-up via remote Wi-Fi wake-up package, the system can also be woken up via external buttons and human infrared sensor.
[0104] The system is designed to switch between sleep and wake states repeatedly to achieve low-power operation and rapid response to user needs.
[0105] The system is designed to adapt to different network environments and user configurations to achieve flexible network connectivity and device management.
[0106] The method is applicable to any of the systems described above. The method includes a fast network configuration process, which enables low-power products to quickly connect to WiFi and set WiFi sleep / keep-alive parameters; it also includes a sleep / keep-alive wake-up process, which enables the product to be remotely woken up normally.
[0107] The rapid network configuration process mainly includes the following steps:
[0108] Quick Wi-Fi connection enables entry into network transmission IPC video data mode, reducing initial network setup time. A separate network setup program has been developed specifically for this quick Wi-Fi connection solution. This program can be executed directly to connect to the designated Wi-Fi account, achieving rapid network setup.
[0109] like Figure 2 As shown, the detailed process of rapid network configuration is as follows:
[0110] S1, the product must be powered on for the first time and network configuration must be performed through the udhcpc program to dynamically obtain network IP and other relevant information before the network can be connected and used normally. This process takes 3-5 seconds.
[0111] S2, after the initial network configuration is successful, the CPU can write the network IP and other related information obtained this time into the flash storage device.
[0112] S3: When the user no longer needs to view the video surveillance footage, the device will enter sleep mode.
[0113] When the S4 product wakes up from sleep mode, it directly retrieves network IP and other information from flash storage and sets it to WIFI directly through the configuration program. There is no need for udhcpc to retrieve network information again, which greatly shortens the configuration time and can complete the configuration operation in less than 1 second.
[0114] Furthermore, the steps specifically include:
[0115] Step S1: When the product is powered on for the first time, network IP-related information is dynamically obtained through the udhcpc program.
[0116] The code implementation can be described as follows:
[0117] system("udhcpc-i wlan0-s / usr / share / udhcpc / zudhcpc.script-qfant 7> / tmp / dhcpc_result");
[0118] This code uses the udhcpc tool to dynamically obtain an IP address for the wlan0 network interface and outputs the result to the / tmp / dhcpc_result file.
[0119] Step S2: After the initial network configuration is successful, the CPU writes the obtained network IP information into the flash storage device;
[0120] The code implementation can be described as follows:
[0121] cmdline_set_env("WIFI","dhcpc_ip_addr",ip_str);
[0122] cmdline_set_env("WIFI","dhcpc_ip_mask",mask_str);
[0123] cmdline_set_env("WIFI","dhcpc_gateway",gateway_str);
[0124] cmdline_set_env("WIFI","dhcpc_dns_server",dns_str);
[0125] cmdline_set_env("WIFI","dhcpc_lease_time",leasetime_str);
[0126] This code calls the cmdline_set_env function to set WIFI-related DHCP client configuration information (such as IP address, subnet mask, gateway, DNS server, and lease time) as environment variables and store them in flash memory for use by subsequent programs.
[0127] Step S3: When the user does not need to view the video surveillance footage, the device enters a sleep state; entering the sleep-keep state is mainly achieved through the following function:
[0128] 1. Configure wake-up package
[0129] The code implementation can be described as follows:
[0130]
[0131]
[0132] The function zrt_wifi_wakeup_pattern_add adds a WiFi wake-up mode by calling wlc_wowl_pattern, which is used to wake up the device under specific network conditions.
[0133] 2. Wi-Fi enters sleep mode
[0134] The code implementation can be described as follows:
[0135] wlc_pm_mode(&pm,TRUE);
[0136] wlc_bcn_li_bcn(&g_bcn,TRUE);
[0137] wlc_bcn_li_dtim(&g_dtim,TRUE);
[0138] wlc_hostsleep(&sleep_v,TRUE);
[0139] This code optimizes device power consumption by calling multiple functions to configure the device's power management mode, beacon interval, DTIM interval, and host sleep state.
[0140] Step S4: The product wakes up from the hibernation state and directly obtains network IP and other information from the flash storage. Through the function wifi_join_ap, it can be directly configured to connect to the router without having to obtain network information again.
[0141] The code implementation can be described as follows:
[0142]
[0143]
[0144] This code implements a fast Wi-Fi connection function:
[0145] Get DHCP configuration information related to WIFI (such as IP address, subnet mask, etc.) through cmdline_get_env.
[0146] In the ZRT_WIFI_Fast_Connect function, set the WiFi connection status to WIFI_CONNECTING.
[0147] Call ZRT_Get_WIFI_Config to retrieve WIFI configuration information. If it fails, return an error and set the status to WIFI_DISCONNECTED.
[0148] Call wifi_join_ap to attempt to connect to the specified AP. If it fails, set the status to WIFI_CONNECT_FAILED and return an error.
[0149] The system repeatedly operates between the S3 sleep state and the S4 wake-up state to achieve fast network distribution and sleep-keep-alive-wake-up working states.
[0150] The system will continuously run in S3 sleep and S4 wake-up states to achieve fast network configuration and sleep-keep-alive-wake-up operation.
[0151] like Figure 1 As shown in the figure, the workflow of the complete hibernation and survival system application method is as follows:
[0152] The method includes:
[0153] Taking the T31Z CPU as an example, this is the main CPU model of the system, used as the device side.
[0154] WIFI: bcm43438, is the WIFI model for this system, selected as a low-power WIFI option.
[0155] MCU: STM32, the MCU model for this system, controlling buttons, PIR peripherals, and CPU power; Server: used to receive WiFi heartbeat data and determine if the device's WiFi is online; further includes the following steps:
[0156] Step 1: The CPU and WIFI are connected via the SDIO bus protocol. The video images captured by the CPU can be transmitted to the server or mobile APP through the WIFI module, and users can view the monitoring screen.
[0157] Step 2: When the user does not need to view the monitoring screen, the CPU will set the WIFI sleep-keep parameters to put the WIFI into a sleep-keep state, saving power and making the battery product standby time longer.
[0158] Step 3: The WIFI will periodically send Beacon heartbeat packets to the server according to the set parameters to ensure that the system is in a hibernation keep-alive state. In this state, it can be woken up by the remote.
[0159] Step 4: The MCU controls the CPU power supply to power off the CPU, so that the entire product enters a low-power operation state.
[0160] Step 5: When the mobile app needs to view the monitoring screen, it will send a wake-up packet to the WIFI via the server.
[0161] Step 6: After receiving the wake-up packet, the WIFI performs wake-up packet data verification. If the data verification is successful, it will notify the MCU to wake up the CPU and make the system run again.
[0162] The code implementation can be described as follows:
[0163]
[0164] This includes using the function wifi_get_wakeup_flag to obtain the current WIFI wake-up status flag by calling wlc_wowl_status, and returning the flag value to indicate whether the device is in wake-up mode;
[0165] Step 7: The MCU controls the CPU voltage to power on the CPU, putting the product into operation. Customers can then view the video monitoring footage via a mobile app.
[0166] In addition to supporting wake-up via remote WIFI wake-up package, the system can also be woken up via external buttons and human infrared sensor.
[0167] In summary, this invention provides a complete system solution for low-power products to quickly connect to Wi-Fi upon startup, set Wi-Fi sleep / keep-alive parameters, and be remotely woken up normally. Related aspects of this system, such as rapid Wi-Fi network configuration and the Wi-Fi sleep / keep-alive wake-up mechanism, are all protected by this invention.
[0168] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A low-power WiFi fast connection sleep keep-alive wake-up system, characterized in that, The system includes: The main control CPU is used as the device side; Low-power WiFi module for wireless network connectivity; MCU is used to control buttons, PIR peripherals, and CPU power. The server is used to receive WiFi heartbeat data and determine whether the device's WiFi is online; the CPU and WiFi module are connected via the SDIO bus protocol to transmit video data to the server or mobile APP. When the user does not need to view the monitoring screen, the CPU sets the WiFi sleep / keep-alive parameters to put the WiFi into a sleep / keep-alive state, saving power consumption. The WiFi module sends Beacon heartbeat packets to the server periodically according to the set parameters to ensure that the system is in a hibernation keep-alive state and can be woken up normally remotely; The MCU controls the CPU power supply and performs a power-off operation on the CPU, so that the entire product enters a low-power operation state. When a user needs to view the monitoring screen through a mobile app, the server sends a wake-up packet to the WiFi network. After receiving the wake-up packet, the WiFi module performs wake-up packet data verification. If the data verification is successful, it notifies the MCU to wake up the CPU. The MCU controls the CPU voltage to power on the CPU, putting the product into operation. Customers can then view the video monitoring footage via a mobile app. The WiFi module enables rapid connection, entering the network transmission IPC video data mode, reducing the initial network configuration time, and connecting to the designated WiFi account to achieve the purpose of rapid network configuration; since the product is in sleep mode, the WiFi is in a sleep-keep-alive state. In this state, the WiFi maintains a connection with the router and server, but IPC video data does not need to be transmitted during sleep, reducing the WiFi radio frequency transmission time and achieving the effect of reducing power consumption.
2. The low-power WiFi fast connection sleep keep-alive wake-up system according to claim 1, characterized in that, The WiFi module enables rapid network configuration and further includes: Upon first power-on, the product dynamically obtains network IP-related information via the udhcpc program. After successful initial network configuration, the CPU writes the acquired network IP information to the flash storage device; when the user does not need to view the video monitoring screen, the device enters sleep mode. When waking from hibernation, the network IP information is directly retrieved from flash storage and configured into WiFi through the network configuration program, without needing to retrieve network information again; The system repeatedly operates between hibernation and wake-up states to achieve rapid network configuration and hibernation-keep-alive-wake-up operation.
3. A low-power WiFi fast connection sleep keep-alive wake-up system according to claim 1, characterized in that, The hibernation preservation further includes: In addition to supporting wake-up via remote Wi-Fi wake-up package, the system can also be woken up via external buttons and human infrared sensor.
4. A low-power WiFi fast connection sleep keep-alive wake-up system according to claim 1, characterized in that, The main control CPU is a T31Z; the low-power WiFi module is a bcm43438; and the MCU is an STM32.
5. A low-power WiFi fast connection sleep keep-alive wake-up system according to claim 1, characterized in that, The system is designed to repeatedly switch between sleep and wake-up states to achieve low-power operation and rapid response to user needs.
6. A low-power WiFi fast connection sleep keep-alive wake-up system according to claim 1, characterized in that, The system is designed to adapt to different network environments and user configurations to achieve flexible network connectivity and device management.
7. A low-power WiFi fast connection sleep keep-alive wake-up method, characterized in that, The method is applicable to any of the systems described in claims 1-6 above, and the method includes a fast network configuration process, enabling low-power products to quickly connect to WiFi upon startup and setting WiFi sleep-keep parameters; It also includes a hibernation keep-alive wake-up process, enabling normal remote wake-up of the product; the method includes a rapid network configuration process including: rapid Wi-Fi connection, entering network transmission IPC video data mode to reduce the initial network configuration time, directly executing separately developed network configuration program code, connecting to the designated Wi-Fi account, and achieving the purpose of rapid network configuration; further including: S1: When the product is powered on for the first time, it dynamically obtains network IP information through the udhcpc program. S2: After the initial network configuration is successful, the CPU writes the obtained network IP information into the flash storage device; S3: When the user does not need to view the video surveillance footage, the device enters sleep mode; Entering hibernation / stay-alive mode involves the following steps:
1. Configure wake-up package 2. Wi-Fi enters sleep mode S4: When the product wakes up from hibernation, it directly retrieves network IP and other information from flash storage. Through the function wifi_join_ap, it can directly configure and connect to the router without having to retrieve network information again.
8. A low-power WiFi fast connection sleep keep-alive wake-up method according to claim 7, characterized in that, The method further includes: Step S1 further includes using the udhcpc tool to request a dynamic IP address for the wlan0 network interface and outputting the result to the / tmp / dhcpc_result file; Step S2: Further includes calling the cmdline_set_env function to set the WIFI-related DHCP client configuration information, including IP address, subnet mask, gateway, DNS server, and lease time, as environment variables and writing them into flash memory for subsequent program use; Step S3:
1. Configure wake-up package Further, it includes using the function zrt_wifi_wakeup_pattern_add to add WiFi wake-up packet information by calling wlc_wowl_pattern, which is used to wake up the device under specific network conditions; 2. Wi-Fi enters sleep mode Further, it includes configuring the device's power management mode, beacon interval, DTIM interval, and host sleep state by calling multiple functions to optimize the device's power consumption; Step S4 further includes implementing a fast Wi-Fi connection function through code: Get DHCP configuration information related to WIFI, including IP address and subnet mask, through cmdline_get_env; In the ZRT_WIFI_Fast_Connect function, the WiFi connection status is set to WIFI_CONNECTING; Call ZRT_Get_WIFI_Config to obtain WIFI configuration information. If it fails, return an error and set the status to WIFI_DISCONNECTED. Call wifi_join_ap to attempt to connect to the specified AP. If it fails, set the status to WIFI_CONNECT_FAILED and return an error. The system repeatedly operates between the S3 sleep state and the S4 wake-up state to achieve fast network distribution and sleep-keep-alive-wake-up working states.
9. A low-power WiFi fast connection sleep keep-alive wake-up method according to claim 7, characterized in that, The hibernation-keep-wake process further includes: The main control CPU serves as the device side; WIFI, as a low-power WIFI option; MCU: Control buttons, PIR peripherals, and CPU power supply; Server; used to receive WiFi heartbeat data and determine whether the device's WiFi is online; further includes the following steps: Step 1: The CPU and WIFI are connected via the SDIO bus protocol. The video images captured by the CPU can be transmitted to the server or mobile APP through the WIFI module, and users can view the monitoring screen. Step 2: When the user does not need to view the monitoring screen, the CPU will set the WIFI sleep-keep parameters to put the WIFI into a sleep-keep state, saving power and making the battery product standby time longer. Entering the keep-alive state is achieved through the following function:
1. Configure wake-up package This includes using the function zrt_wifi_wakeup_pattern_add to add a Wi-Fi wake-up mode by calling wlc_wowl_pattern, which is used to wake up the device under specific network conditions; 2. Wi-Fi enters sleep mode This includes configuring the device's power management mode, beacon interval, DTIM interval, and host sleep state by calling multiple functions to optimize the device's power consumption management; Step 3: The WIFI will periodically send Beacon heartbeat packets to the server according to the set parameters to ensure that the system is in a hibernation keep-alive state. In this state, it can be woken up by the remote. Step 4: The MCU controls the CPU power supply to power off the CPU, so that the entire product enters a low-power operation state. Step 5: When the mobile app needs to view the monitoring screen, it will send a wake-up packet to the WIFI via the server. Step 6: After receiving the wake-up packet, the WIFI performs wake-up packet data verification. If the data verification is successful, it will notify the MCU to wake up the CPU and make the system run again. After the system wakes up, the reason for the WiFi wake-up can be obtained through functions, including: WiFi wake-up packet wake-up, WiFi disconnection from router abnormal wake-up; This includes using the function wifi_get_wakeup_flag to obtain the current WIFI wake-up status flag by calling wlc_wowl_status, and returning the flag value to indicate whether the device is in wake-up mode; Step 7: The MCU controls the CPU voltage to power on the CPU, putting the product into operation. Customers can then view the video monitoring footage via a mobile app.
10. A low-power WiFi fast connection sleep keep-alive wake-up method according to claim 7, characterized in that, In addition to supporting wake-up via remote WIFI wake-up package, the method can also wake up the system via external buttons and human infrared sensor.