A WIFI password management method, device and mobile equipment
By setting a password setting button on mobile devices and differentiating functions based on the duration of the press, the system enables the display of the master password, generation and reset of the guest password, thus solving the problem of complex mobile WiFi password management and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUIZHOU TCL MOBILE COMM CO LTD
- Filing Date
- 2026-03-09
- Publication Date
- 2026-07-03
Smart Images

Figure CN122340467A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, specifically to a WIFI password management method, device, and mobile device. Background Technology
[0002] Mobile WiFi devices, such as MiFi (Mobile Wi-Fi, portable broadband wireless device) and portable hotspot devices, are widely used in personal mobile internet access scenarios. Their password management mechanisms directly affect the user experience and network security.
[0003] Currently, mobile WiFi password management primarily includes web-based backend management and app-based management. In web-based backend management, users need to enter the device's default LAN IP address in a browser to log in to the management backend before they can query or modify the WiFi password. This method relies on users having some network operation skills, is not user-friendly for non-technical users, and is cumbersome, typically requiring 3 steps. Five steps to operate. In the APP management mode, users need to install the accompanying management APP on their smart device and pair it with a mobile WiFi device via Bluetooth or WiFi before they can view or change the password. This method improves configurability, but its reliance on smart devices and APP installation presents a significant usage barrier for elderly users or users in lower-tier markets.
[0004] Overall, current mobile WiFi password management solutions generally focus on improving security and configurability, while neglecting the user's learning curve. For non-technical groups such as the elderly and those in lower-tier cities, the process remains complex and inconvenient.
[0005] Therefore, the technology still needs to be improved and enhanced. Summary of the Invention
[0006] This application provides a WIFI password management method, device, and mobile device, which can alleviate the technical problem that the WIFI password setting steps of current mobile devices are complicated and inconvenient to operate.
[0007] This application provides a WIFI password management method, which is applied to a mobile device. The mobile device includes a password setting button, and the WIFI password management includes: Determine the actual duration of pressing the password setting key; Based on the actual pressing duration and the preset duration threshold, determine whether to execute at least one of the following functions: master password display function, guest password generation function, and master password reset function.
[0008] In some embodiments of the WIFI password management method, the preset duration threshold includes a first duration threshold, a second duration threshold, a third duration threshold, and a fourth duration threshold that increase sequentially; the step of determining to execute at least one of the following functions—master password display function, guest password generation function, and master password reset function—based on the press duration and the preset duration threshold includes: The compression duration is compared with the first duration threshold, the second duration threshold, and the third duration threshold; If the pressing duration is less than the first duration threshold, the master password display function will be executed; When the press duration is greater than or equal to the first duration threshold and less than the second duration threshold, the visitor password generation function is executed. When the pressing duration is greater than or equal to the second duration threshold and less than the third duration threshold, the master password reset function is executed.
[0009] In some embodiments of the WIFI password management method, the mobile device further includes a display module, and the steps of performing the master password display function include: Determine the wireless network name of the mobile device and the master password corresponding to the wireless network name; The control display module displays the wireless network name and master password.
[0010] In some embodiments of the WIFI password management method, the mobile device further includes an indication module, and after the step of controlling the display module to display the wireless network name and master password, the method further includes: The control indicator module outputs indication information showing the wireless network name and master password; Determine the display duration of the wireless network name and master password in the display module; When the display duration exceeds the fifth duration threshold, the display control module clears the display and the indicator control module turns off the indicator.
[0011] In some embodiments of the WIFI password management method, the step of performing the guest password generation function includes: Temporary access passwords and password validity periods are generated from alphanumeric character sets using a random number algorithm. The control display module displays the temporary access password and the password validity period, and the control indication module outputs indication information for the temporary access password and the password validity period. Send a configuration command containing a temporary access password and the password's validity period to the WIFI module in the mobile device; Determine whether to receive the first feedback information from the WIFI module in response to the configuration command; When the first feedback information is received within the preset feedback time, the timer starts according to the first feedback information. When the time for which the temporary access password and the password validity period are displayed on the display module exceeds the fifth time threshold, the display module is controlled to clear the display and the indicator module is controlled to turn off the indicator.
[0012] In some embodiments of the WIFI password management method, the step of determining whether to receive feedback information regarding the corresponding configuration instructions from the WIFI module further includes: If the first feedback information is not received within the preset feedback time, the configuration command is resent to the WIFI module. If it is confirmed again that no first feedback information is received within the preset feedback time, the control indication module outputs the first alarm information and controls the display module to display the second alarm information.
[0013] In some embodiments of the WIFI password management method, the step of performing the master password reset function includes: Update the master password to the target password, and use the target password as the new master password; Send a master password update command to the WIFI module in the mobile device, so that the WIFI module updates to obtain the new master password; Determine whether to receive the second feedback information from the WIFI module in response to the master password update command; When the second feedback information is received within the preset feedback time, the control display module displays the message that the master password has been updated successfully, and the control indicator module outputs the message that the master password has been updated successfully.
[0014] In some embodiments of the WIFI password management method, after the step of determining whether to receive second feedback information from the WIFI module in response to the master password update instruction, the method further includes: If no second feedback information is received within the preset feedback time, the master password update command will be resent to the WIFI module. If it is confirmed again that no second feedback information is received within the preset feedback time, the control indication module outputs the first alarm information and controls the display module to display the second alarm information.
[0015] This application also provides a WIFI password management device, which includes: The press time acquisition module is used to determine the press duration of the password setting key; The password management module is used to determine, based on the press duration and a preset duration threshold, to execute at least one of the following functions: master password display function, guest password generation function, and master password reset function.
[0016] This application also provides a mobile device, which includes: One or more processors; Memory; and one or more applications, wherein the applications are stored in memory and configured to be executed by the processor to implement the above-described WIFI password management method.
[0017] This application provides a WIFI password management method, device, and mobile device. The WIFI password management method determines the actual pressing duration of the password setting button; based on the actual pressing duration and a preset duration threshold, it determines to execute at least one of the following functions: master password display function, guest password generation function, and master password reset function. In this embodiment, different functions are distinguished by pressing duration. It requires no menu, no APP, and no web backend, making it simple to operate and easy for non-technical users to understand and use, thereby improving the user experience. Attached Figure Description
[0018] The technical solution and other beneficial effects of this application will become apparent from the following detailed description of specific embodiments in conjunction with the accompanying drawings.
[0019] Figure 1 This is a schematic block diagram of a module of a mobile device provided in an embodiment of this application.
[0020] Figure 2 This is a flowchart illustrating the WIFI password management method provided in an embodiment of this application.
[0021] Figure 3 This is a flowchart illustrating step S200 in the WIFI password management method provided in this application embodiment.
[0022] Figure 4 This is a schematic block diagram of another module of the mobile device provided in an embodiment of this application.
[0023] Figure 5 This is a structural block diagram of one embodiment of the WIFI password management device provided in this application.
[0024] Figure 6 This is a structural block diagram of one embodiment of the mobile device provided in this application. Detailed Implementation
[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0026] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Features thus defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0027] This application provides a WIFI password management method, device, and mobile device, which will be described in detail below.
[0028] The WIFI password management method provided in this application determines the pressing duration of the password setting button; based on the pressing duration and a preset duration threshold, it determines to execute at least one of the following functions: master password display function, guest password generation function, and master password reset function.
[0029] Please see Figure 1 and Figure 2 , Figure 1 This is a flowchart illustrating one embodiment of the WIFI password management method provided in this application. Figure 2 This is a schematic diagram of a mobile device provided in an embodiment of this application. The WIFI password management method is applied to a mobile device, which includes a password setting button 11, a microcontroller 12, and a display module 13. Both the password setting button 11 and the display module 13 are electrically connected to the microcontroller 12.
[0030] The display module 13 can be either an OLED or an LCD display module. The OLED display module supports a full-color graphical interface and can display rich information such as password strength prompts and operation guidance, making it suitable for scenarios with high requirements for interactive experience. The LCD display module only needs to display key information such as an 8-digit numeric password and status indication. Compared with OLED, the material and driving costs can be reduced by about 50%, adapting to the needs of ultra-low-cost products. The specific settings for the display module 13 can be selected according to actual needs, and this application does not impose any limitations on this.
[0031] The WIFI password management method in this embodiment includes the following steps S100~S200, as detailed below: S100. Determine the actual pressing duration of the password setting key.
[0032] The password setting button 11 is a physical button located on the mobile device casing, used to receive user press operations and trigger corresponding password management functions. The password setting button 11 can be an independently set mechanical button with a press-type structure, including a keycap, a return spring, and conductive contacts. When the user presses the keycap, the conductive contacts make contact with contacts on the circuit board in the mobile device, causing a change in the GPIO pin level; after releasing the button, the spring returns to its original position, the contacts disconnect, and the GPIO returns to its initial level. The password setting button 11 can also be a surface-mount tactile button, soldered to the circuit board and exposed through a button hole on the mobile device casing for user pressing. To adapt to outdoor use scenarios, the password setting button 11 can adopt a waterproof structure, including a waterproof silicone cap and sealing gaskets, to mitigate the problem of button failure caused by rainwater or sweat entering the device. Of course, other buttons with the same function can be selected in other embodiments, and this application does not limit this.
[0033] When the user presses the password setting button 11, the button sends a low-level signal to the microcontroller via the GPIO pin, triggering an external interrupt. The microcontroller then starts an internal hardware timer to continuously scan the button's press state with a timing precision of 10ms: it checks the GPIO pin level every 10ms; if the button is still pressed, the cumulative duration counter increments by 1. When the user releases the password setting button 11, the GPIO pin returns to a high level, the microcontroller stops timing, and calculates the actual button press duration based on the cumulative counter value. For example, actual press duration = counter value × 10ms.
[0034] S200: Based on the actual pressing duration and the preset duration threshold, determine to execute at least one of the following functions: master password display function, guest password generation function, and master password reset function.
[0035] After obtaining the actual pressing duration of the user's password setting button 11, the actual pressing duration is compared with multiple preset duration thresholds, and the function to be executed is determined based on the comparison result. The executed function includes at least one of the following: master password display function, guest password generation function, and master password reset function.
[0036] The preset duration thresholds include a first duration threshold, a second duration threshold, a third duration threshold, and a fourth duration threshold, which increase sequentially. For example, the first duration threshold is 0.5 seconds, the second duration threshold is 3 seconds, the third duration threshold is 6 seconds, and the fourth duration threshold is 8 seconds. These thresholds can be adjusted according to actual product requirements and are stored in the memory or microcontroller firmware.
[0037] Please see Figure 3Specifically, step S200 includes steps S210 to S240, and the specific steps are as follows: S210. Compare the compression duration with the first duration threshold, the second duration threshold, and the third duration threshold; S220. When the pressing duration is less than the first duration threshold, the master password display function is executed. S230. When the press duration is greater than or equal to the second duration threshold and less than the third duration threshold, the visitor password generation function is executed. S240. When the pressing duration exceeds the fourth duration threshold, the master password reset function is executed.
[0038] In this embodiment, the actual press duration is compared with the aforementioned first, second, and fourth duration thresholds, and the corresponding functions are executed. When the actual press duration is less than the first duration threshold (e.g., actual press duration ≤ 0.5 seconds), it is determined that the user's intention is to view the master password, and the master password display function is executed accordingly. When the actual press duration is greater than or equal to the second duration threshold and less than the third duration threshold (e.g., 3 seconds ≤ actual press duration < 6 seconds), it is determined that the user's intention is to generate a temporary visitor password, and the visitor password generation function is executed. When the actual press duration is greater than the fourth duration threshold (e.g., ≥ 8 seconds), it is determined that the user's intention is to reset the master password, and the master password reset function is executed. In this embodiment, by setting different duration intervals instead of a single threshold point, the erroneous execution of functions caused by key bounce or accidental triggering can be effectively mitigated. At the same time, the duration intervals corresponding to different functions have significant differences, making it easier for users to remember and operate.
[0039] In this embodiment, different functions are distinguished by the duration of the press. No menu, no APP, and no web backend are required. The operation is simple and easy for non-technical users (such as the elderly) to understand and use, thereby improving the user experience.
[0040] In some embodiments, step S220 specifically includes: determining the wireless network name of the mobile device and the master password corresponding to the wireless network name; and controlling the display module to display the wireless network name and the master password.
[0041] When the master password display function is triggered, the device first reads the pre-stored wireless network name (i.e., the master SSID) and the corresponding master password. The master SSID is the primary wireless network identifier broadcast by the mobile device, and the master password is the access password used to verify the user's access to the wireless network. The two are stored in pairs and correspond one-to-one. After obtaining the master SSID and master password, a display command is sent to the display module 13 via the I2C bus to control the display module 13 to display the wireless network name and master password, so as to intuitively display the Wi-Fi password of the Wi-Fi module in the mobile device.
[0042] During the process of controlling the display module 13 to display the master password corresponding to the wireless network name, the display module 13 can first be controlled to perform a screen clearing operation to ensure the accuracy of the displayed content. Then, "SSID:XXX" is displayed on the first line of the display module 13, where "XXX" is the read master SSID; and "PWD:XXX" is displayed on the second line of the display module 13, where "XXX" is the read master password.
[0043] Please see Figure 4 In one embodiment, the mobile device further includes an indicator module 14, which is electrically connected to the microcontroller 12. The microcontroller 12 controls the indicator module 14 to output corresponding indicator information according to the operation status. The indicator module 14 is used to output corresponding status indicator information to the user when performing operations such as displaying the wireless network name and master password, generating a guest password, or resetting the master password. The indicator module 14 includes, but is not limited to, at least one of a status indicator light, an LED light group, a buzzer, or a vibration motor. The indicator module 14 is configured to output corresponding indicator information at different operation stages, including constant light, flashing, sound prompts, or vibration prompts.
[0044] Specifically, after the step of controlling the display module to display the wireless network name and master password, the following steps are also included: the control indication module 14 outputs indication information for the display of the wireless network name and master password; determines the display duration of the wireless network name and master password in the display module; when the display duration exceeds the fifth duration threshold, the control display module clears the display and the control indication module 14 turns off the indication.
[0045] When indicator module 14 is a status indicator, controlling indicator module 14 to output indication information of the wireless network name and master password display will keep the green light in the indicator light on, providing feedback to the user that "the master SSID and master password have been successfully displayed," enhancing user awareness and serving as a reminder. Simultaneously, a hardware timer will be started to count the duration for which the wireless network name and master password are continuously displayed on the display module; the display duration is the cumulative time from the appearance of the displayed content until the user actively operates or the system automatically clears it. The current cumulative display duration is compared with a preset fifth duration threshold (e.g., 5 seconds). When the display duration exceeds the fifth duration threshold, the display module is controlled to clear the current displayed content (i.e., clear the screen) to reduce the security risks caused by prolonged password exposure; at the same time, indicator module 14 is controlled to turn off the indication information, such as turning off the green light, restoring the device to normal working state. In this embodiment, sensitive information can be automatically cleared while giving the user sufficient time to view the wireless network name and master password, improving device security and user experience.
[0046] In some embodiments, step S230 specifically includes: generating a temporary access password and a password validity period from an alphanumeric character set and a numeric character set according to a random number algorithm; controlling the display module 13 to display the temporary access password and the password validity period, and controlling the indication module 14 to output indication information for displaying the temporary access password and the password validity period; sending a configuration instruction containing the temporary access password and the password validity period to the WIFI module in the mobile device; determining whether to receive first feedback information from the WIFI module in response to the configuration instruction; when the first feedback information is received within a preset feedback period, starting a timer according to the first feedback information, and when the time for the display module 13 to display the temporary access password and the password validity period exceeds a fifth duration threshold, controlling the display module to clear the display, and controlling the indication module 14 to turn off the indication.
[0047] When the temporary visitor password generation function is triggered, a temporary access password and its corresponding validity period can be generated according to a random number algorithm. The random number algorithm uses the real-time count value of the internal hardware timer of the microcontroller 12 as a seed, and randomly selects a number of characters from the alphanumeric character set to form a temporary access password with a certain complexity (e.g., 8 characters). The password validity period can be preset by the system (e.g., 2 hours) or set through other methods.
[0048] After generating a temporary access password and its validity period, the microcontroller 12 controls the display module 13 to display the temporary access password and its validity period. For example, the display module 13 displays "Visitor PWD: A3B7D9E2" and "Valid: 2h". Simultaneously, it controls the indicator module 14 to output corresponding indicator information, such as keeping a green light constantly on, to indicate to the user that the temporary access password and validity period are currently displayed on the screen.
[0049] Subsequently, a configuration command containing a temporary access password and password validity period is sent to the WiFi module in the mobile device. For example, the AT command "AT+SET_VISITOR_PWD=XXX,7200" is used, where "XXX" is the generated temporary access password and "7200" is the password validity period (in seconds). After receiving the configuration command, the WiFi module creates a temporary guest network and sets the corresponding access password and validity period mechanism.
[0050] After sending the configuration command, start a timer for a preset feedback duration (e.g., 1 second) and wait for the WiFi module to return the first feedback message (e.g., "OK") in response to the configuration command. If the first feedback message is successfully received within the preset feedback duration, it indicates that the WiFi module has successfully configured the temporary guest network.
[0051] Upon receiving the first feedback information, the timer for displaying the temporary access password and password validity period on the display module 13 begins. When the display time exceeds the fifth duration threshold (e.g., 5 seconds), the display module 13 is controlled to clear the current display content, and the indicator module 14 is controlled to turn off the indicator information (e.g., turn off the green light), restoring the device to normal working state.
[0052] In this embodiment of the application, a temporary access password is quickly generated and displayed without the need for an APP or Web backend. At the same time, the WiFi module is automatically configured and the display duration is managed, which improves the convenience and security of operation.
[0053] In some embodiments, the step of determining whether to receive feedback information of the corresponding configuration instruction of the WIFI module further includes: if the first feedback information is not received within a preset feedback time, then resend the configuration instruction to the WIFI module; if it is determined again that the first feedback information is not received within the preset feedback time, then control the instruction module 14 to output the first alarm information and control the display module 13 to display the second alarm information.
[0054] After sending a configuration command containing a temporary access password and password validity period to the WiFi module, a timer with a preset feedback duration (e.g., 1 second) is started, and the system waits for the WiFi module to return a first feedback message (e.g., "OK"). If the first feedback message is not received within the preset feedback duration, it is determined that the WiFi module may not have successfully received or processed the configuration command. In this case, the same configuration command is resent to the WiFi module to ensure that the command is correctly received. After resending the configuration command, the timer with the preset feedback duration is started again, and the system waits for the WiFi module to return a first feedback message again. If the first feedback message is still not received within the preset feedback duration again, it is determined that the WiFi module may have a communication abnormality, malfunction, or failure to respond correctly to the command. Therefore, the control indicator module 14 outputs a first alarm message, for example, controlling a red light to flash 3 times, or controlling a buzzer to emit 3 short beeps. The first alarm message is used to indicate "Temporary visitor password configuration failed". At the same time, the display module 13 is also controlled to display a second alarm message, for example, displaying "Fail, Retry" on the display module 13. The second alarm message provides clear textual prompts to the user, helping them understand the current device status. After the alarm message is output, the process terminates, and the mobile device returns to normal operation.
[0055] As one embodiment, the mobile device also includes a DIP switch for manually setting the validity period of the guest password. This DIP switch is electrically connected to the microcontroller and offers multiple time settings, such as 1 hour, 2 hours, and 4 hours. Users can configure this directly at the device installation or usage site by switching the switch, without relying on an app or complex operations. When the DIP switch is switched to different settings, the microcontroller reads its status and automatically adjusts the validity period parameter of the guest password. For example, when switched to the "1h" setting, the guest password is valid for only 1 hour after generation; when switched to the "2h" setting, the validity period is extended to 2 hours; and when switched to the "4h" setting, the validity period is extended to 4 hours.
[0056] The DIP switch design in this embodiment allows mobile devices to adapt to different usage scenarios, such as: short-term needs like temporary repairs and door-to-door delivery; medium-term needs like visitor visits within half a day; and longer-term needs like family gatherings and cleaning services. Therefore, using a mechanical DIP switch to set timeliness not only improves operational convenience but also enhances system reliability, mitigating timeliness configuration failures caused by software or communication malfunctions. This is particularly suitable for devices with high cost and stability requirements.
[0057] In some embodiments, step S240 specifically includes: updating the master password to the target password and using the target password as the new master password; sending a master password update instruction to the WIFI module in the mobile device, so that the WIFI module updates to obtain the new master password; determining whether to receive second feedback information from the WIFI module in response to the master password update instruction; when the second feedback information is received within a preset feedback time, controlling the display module to display a message indicating that the master password update is successful, and controlling the indication module 14 to output an indication message indicating that the master password update is successful.
[0058] When the master password reset function is triggered, the master password is updated to the target password, and the target password is used as the new master password. The target password can be the system's default password (e.g., "12345678"), or a password entered by the user through other means.
[0059] After completing the master password update, a master password update command is sent to the WiFi module in the mobile device, such as the AT command "AT+UPDATE_MAIN_PWD=XXX", where "XXX" is the target password. Upon receiving the master password update command, the WiFi module updates its internally maintained master password to the new master password. After sending the master password update command, a timer with a preset feedback duration (e.g., 1 second) is started, and the device waits for the WiFi module to return a second feedback message in response to the master password update command (e.g., "OK").
[0060] If a second feedback message is received within the preset feedback time, it indicates that the WiFi module has successfully updated the master password. Therefore, the display module will be controlled to show a message indicating a successful master password update, such as "PWDReset OK" on display module 13, thus clearly indicating to the user that the master password has been successfully updated. Simultaneously, the control indicator will output a message indicating a successful master password update, such as keeping the green light on for 3 seconds or flashing the green light 3 times, thus providing the user with intuitive feedback on the successful operation.
[0061] In some embodiments, after determining whether to receive the second feedback information in response to the master password update command from the WIFI module, the method further includes: if the second feedback information is not received within a preset feedback time, then resending the master password update command to the WIFI module; if it is determined again that the second feedback information is not received within the preset feedback time, then controlling the indication module 14 to output the first alarm information and controlling the display module 13 to display the second alarm information.
[0062] After sending the master password update command to the WiFi module, a timer with a preset feedback duration (e.g., 1 second) is started, and the system waits for the WiFi module to return a second feedback message (e.g., "OK") in response to the master password update command. If the second feedback message is not received within the preset feedback duration, it is determined that the WiFi module may have failed to successfully receive or process the master password update command. In this case, the same master password update command is resent to the WiFi module to ensure that the command is correctly received. After resending the master password update command, the timer with the preset feedback duration is started again, and the system waits for the WiFi module to return a second feedback message again. If the second feedback message is still not received within the preset feedback duration again, it is determined that the WiFi module may have a communication abnormality, malfunction, or failure to respond correctly to the command. In this case, the control indicator module 14 outputs a first alarm message, for example, controlling a red light to flash 3 times, or controlling a buzzer to emit 3 short beeps, thereby prompting the user that the master password update has failed. At the same time, the control display module 13 displays a second alarm message, for example, displaying "Fail, Retry" on the display module 13, thereby providing the user with a clear text prompt to help the user understand the current device status.
[0063] As one embodiment, after determining the actual pressing duration of the password setting button 11 by the user, if the actual pressing duration does not fall within any preset duration range (e.g., it does not reach the first duration threshold for the master password display function, the second duration threshold for the visitor password generation function, or the third duration threshold for the master password reset function), the current operation is determined to be an "invalid operation". For example, if the actual pressing duration is 1500ms, and the first preset threshold is 2000ms, then this duration does not meet the triggering conditions of any function, and is therefore considered an invalid operation. After being determined to be an invalid operation, the status indicator light (such as a red light) can be controlled to flash briefly to prompt the user that the current operation has not been recognized or supported. After the flashing is completed, the entire button processing flow terminates, the device returns to normal working state, and does not execute any password management functions. The invalid operation prompt mechanism in this embodiment can effectively alleviate erroneous execution caused by accidental touch, button bounce, or user unfamiliarity with operation, and improve the reliability of the device and user experience.
[0064] As one embodiment, to prevent misoperation due to abnormal power outages, the WIFI password management method in this application embodiment also adds a power outage protection mechanism. When a user presses the password setting button, if the mobile device experiences a power outage (e.g., the power supply is disconnected), the initialization process will be executed first after the mobile device is powered on again, automatically clearing the timing data, status flags, and unfinished operation records related to the button. Specifically, if the device suddenly loses power while the password setting button is pressed, the software will not inherit the previous button timing information after restarting; it will restore the button state to the default value and will not execute any functions related to that button press (such as password generation, mode switching, etc.); only when the user presses the button again after the mobile device is powered on normally will the timing restart and the corresponding operation be executed, thereby improving the stability and security of the mobile device under abnormal conditions.
[0065] The initialization process of a mobile device after power-on includes two parts: hardware initialization and software initialization. For hardware initialization, the microcontroller configures the password setting button to interrupt-triggered mode (e.g., falling edge or rising edge interrupt) via the GPIO interface to ensure real-time response to button operations. Pull-up or pull-down resistors for the GPIO are also configured to prevent false triggering. The display module is initialized via the I2C bus, configuring parameters such as display resolution, communication rate, and display buffer to bring the module into a displayable state. Communication initialization of the WiFi module is completed via the UART serial port (including baud rate, data bits, parity, etc.), establishing a command or data transmission channel with the WiFi module. The storage chip is initialized via the I2C bus, configuring read / write timing, address mapping, and other parameters to ensure stable read / write operations on the storage chip. After hardware initialization, for software initialization, preset system parameters are loaded from the storage chip. All parameters support factory configuration or post-modification; these include the main SSID and its corresponding password, guest password generation rules, press duration threshold, and display duration.
[0066] After the hardware and software initialization is completed, the mobile device enters standby mode: physical buttons wait for interrupt triggering, the display module enters a low-power screen-off state, the WiFi module maintains a communication-ready state with the microcontroller, the storage chip is in a read-write state, and all preset parameters are loaded into the microcontroller's memory, providing basic support for subsequent button operations, password generation or display, network configuration and other functions.
[0067] Please see Figure 5 To better implement the WIFI password management method in this application embodiment, based on the WIFI password management method, this application embodiment also provides a WIFI password management device 20, which is integrated into a mobile device. The WIFI password management device includes a press time acquisition module 21 and a password management module 22. The press time acquisition module 21 is electrically connected to the password setting button, and the press time acquisition module 21 is also electrically connected to the password management module 22. The press time acquisition module 21 is used to determine the press duration of the password setting button, and the password management module 22 is used to determine, based on the press duration and a preset duration threshold, at least one of the following functions: master password display function, guest password generation function, and master password reset function.
[0068] In this embodiment, after obtaining the actual pressing duration of the user's password setting key, the password management module compares the actual pressing duration with multiple preset duration thresholds, and determines the function to be executed based on the comparison results. Thus, different functions are distinguished by pressing duration. No menu, no APP, no web backend are required, the operation is simple, and non-technical users (such as the elderly) can easily understand and use it, thereby improving the user experience.
[0069] In some embodiments, the password management module is specifically used to: compare the press duration with a first duration threshold, a second duration threshold, and a third duration threshold; when the press duration is less than the first duration threshold, execute the master password display function; when the press duration is greater than or equal to the first duration threshold and less than the second duration threshold, execute the guest password generation function; when the press duration is greater than or equal to the second duration threshold and less than the third duration threshold, execute the master password reset function.
[0070] As one embodiment, the password management module is further configured to: determine the wireless network name of the mobile device and the master password corresponding to the wireless network name during the execution of the master password display function, control the display module to display the wireless network name and master password, and control the indication module to output indication information for displaying the wireless network name and master password; determine the display duration of the wireless network name and master password in the display module; and when the display duration exceeds the fifth duration threshold, control the display module to clear the display and control the indication module to turn off the indication.
[0071] As one embodiment, the password management module is further configured to: generate a temporary access password and password validity period from an alphanumeric character set and a numeric character set according to a random number algorithm during the execution of the visitor password generation function; control the display module to display the temporary access password and password validity period, and control the indicator module to output indication information for displaying the temporary access password and password validity period; send a configuration command containing the temporary access password and password validity period to the WIFI module in the mobile device; determine whether to receive the first feedback information from the WIFI module in response to the configuration command; when the first feedback information is received within a preset feedback period, start timing according to the first feedback information, and when the time for the display module to display the temporary access password and password validity period exceeds a fifth duration threshold, control the display module to clear the display, and control the indicator module to turn off the indication; when the first feedback information is not received within the preset feedback period, resend the configuration command to the WIFI module; when it is determined again that the first feedback information is not received within the preset feedback period, control the indicator module to output the first alarm information, and control the display module to display the second alarm information.
[0072] As one embodiment, the password management module is further configured to: update the master password to the target password during the execution of the master password reset function, and use the target password as the new master password; send a master password update command to the WIFI module in the mobile device, so that the WIFI module updates to obtain the new master password; determine whether to receive the second feedback information of the WIFI module responding to the master password update command; if the second feedback information is received within a preset feedback time, control the display module to display the master password update success information, and control the indication module to output the indication information of the master password update success; if the second feedback information is not received within the preset feedback time, resend the master password update command to the WIFI module; if it is determined again that the second feedback information is not received within the preset feedback time, control the indication module to output the first alarm information, and control the display module to display the second alarm information.
[0073] Please see Figure 6 This application also provides a mobile device that integrates the aforementioned WIFI password management device. The mobile device includes one or more processors 301, a memory 302, and one or more applications. The one or more applications are stored in the memory 302 and configured to be executed by the processor 301 of any of the steps in the WIFI password management method described in the above embodiments. Since the WIFI password management method has been described in detail above, it will not be repeated here.
[0074] The processor 301 is the control center of the mobile device. It connects to various parts of the display device through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the mobile device and processes data, thereby monitoring the mobile device as a whole.
[0075] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc.; the data storage area may store data created based on the use of the mobile device, etc. In addition, the memory 302 may include high-speed random access memory 302, and may also include non-volatile memory 302, such as at least one disk storage device 302, flash memory device, or other volatile solid-state memory 302. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0076] The mobile device also includes a power supply 303 that supplies power to the various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power supply 303 management system, thereby enabling functions such as charging, discharging, and power consumption management through the power supply 303 management system.
[0077] Specifically, in this embodiment, the processor 301 in the mobile device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to corresponding instructions, and the processor 301 runs the applications stored in the memory 302 to achieve various functions, such as the WIFI password management method described above. Since the WIFI password management method has been described in detail above, it will not be repeated here.
[0078] As one embodiment, the mobile devices in this application include, but are not limited to, in-vehicle WiFi devices, IoT gateway devices, and other terminals with network access or access control functions. Taking an in-vehicle scenario as an example, when a user needs to temporarily share network or device access permissions while the vehicle is in motion, they can trigger the generation of a "visitor password during driving" by pressing and holding the password setting button. This visitor password is only valid when the vehicle is in motion or ignited. When the vehicle is turned off, the visitor password will automatically become invalid without requiring manual operation by the user, thereby mitigating the security risks caused by forgetting to close permissions. Furthermore, it does not rely on a mobile app or complex configuration, is simple to operate, and responds quickly, effectively improving security and convenience in in-vehicle scenarios.
[0079] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0080] Therefore, embodiments of this application also provide a computer-readable storage medium, which may include a read-only memory (ROM), a random access memory (RAM), a disk, or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the WIFI password management methods provided in embodiments of this application. For example, the computer program loaded by the processor can execute the following steps: Determine the actual duration of pressing the password setting key; Based on the actual pressing duration and the preset duration threshold, determine whether to execute at least one of the following functions: master password display function, guest password generation function, and master password reset function.
[0081] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0082] The WIFI password management method, apparatus, mobile device, and storage medium provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the technical solutions and core ideas of this application. Those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A WIFI password management method, characterized in that, The Wi-Fi password management method is applied to a mobile device, the mobile device including a password setting button, and the Wi-Fi password management includes: Determine the actual press duration of the password setting key; Based on the actual pressing duration and the preset duration threshold, determine whether to execute at least one of the following functions: master password display function, guest password generation function, and master password reset function.
2. The WIFI password management method of claim 1, wherein, The preset duration thresholds include a first duration threshold, a second duration threshold, a third duration threshold, and a fourth duration threshold that increase sequentially; the step of determining to execute at least one of the following functions—master password display function, guest password generation function, and master password reset function—based on the press duration and the preset duration thresholds includes: The pressing duration is compared with the first duration threshold, the second duration threshold, and the third duration threshold; When the pressing duration is less than the first duration threshold, the master password display function is executed; When the press duration is greater than or equal to the first duration threshold and less than the second duration threshold, the visitor password generation function is executed. When the pressing duration is greater than or equal to the second duration threshold and less than the third duration threshold, the master password reset function is executed.
3. The WIFI password management method of claim 2, wherein, The mobile device further includes a display module, and the step of performing the master password display function includes: Determine the wireless network name of the mobile device and the master password corresponding to the wireless network name; The display module is controlled to display the wireless network name and the master password.
4. The WIFI password management method of claim 3, wherein, The mobile device further includes an indicator module, and after the step of controlling the display module to display the wireless network name and the master password, the following is also included: The control module outputs the indication information for the wireless network name and the master password display; Determine the display duration of the wireless network name and the master password in the display module; When the display duration exceeds the fifth duration threshold, the display module is controlled to clear the display, and the indicator module is controlled to turn off the indicator.
5. The WIFI password management method of claim 4, wherein, The steps for performing the visitor password generation function include: Temporary access passwords and password validity periods are generated from alphanumeric character sets using a random number algorithm. The display module is controlled to display the temporary access password and the password validity period, and the indicator module is controlled to output the indicator information for displaying the temporary access password and the password validity period; Send a configuration command containing the temporary access password and the password's validity period to the WIFI module in the mobile device; Determine whether to receive the first feedback information from the WIFI module in response to the configuration command; When the first feedback information is received within the preset feedback time, the timer starts according to the first feedback information, and when the time for which the display module displays the temporary access password and the password validity period is greater than the fifth time threshold, the display module is controlled to clear the display, and the indicator module is controlled to turn off the indicator.
6. The WIFI password management method of claim 5, wherein, The step of determining whether to receive feedback information from the WIFI module in response to the configuration command further includes: If the first feedback information is not received within the preset feedback time, the configuration command is resent to the WIFI module. If it is determined again that the first feedback information is not received within the preset feedback time, the indicator module is controlled to output the first alarm information, and the display module is controlled to display the second alarm information.
7. The WIFI password management method of claim 5, wherein, The steps for performing the master password reset function include: Update the master password to the target password, and use the target password as the new master password; Send a master password update command to the WIFI module in the mobile device, so that the WIFI module updates to obtain a new master password; Determine whether to receive the second feedback information from the WIFI module in response to the master password update command; When the second feedback information is received within the preset feedback time, the display module is controlled to display the message that the master password has been updated successfully, and the indicator module is controlled to output the indication message that the master password has been updated successfully.
8. The WIFI password management method of claim 7, wherein, Following the step of determining whether to receive the second feedback information from the WIFI module in response to the master password update instruction, the method further includes: If the second feedback information is not received within the preset feedback time, the master password update command is resent to the WIFI module. If it is determined again that no second feedback information is received within the preset feedback time, the indicator module is controlled to output the first alarm information, and the display module is controlled to display the second alarm information.
9. A WIFI password management apparatus, characterized in that, The WIFI password management device includes: The press time acquisition module is used to determine the press duration of the password setting key; The password management module is used to determine, based on the pressing duration and a preset duration threshold, to execute at least one of the following functions: master password display function, guest password generation function, and master password reset function.
10. A mobile device, comprising: The mobile device includes: One or more processors; Memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the WIFI password management method as claimed in any one of claims 1-8.