WIFI chip control method and electronic device

By controlling the power-down method of WiFi chip, the scanning abnormality caused by WiFi chip abnormality is solved, and the self-healing of WiFi chip is realized, ensuring that users can access the Internet normally and improving user experience.

WO2025123735A1PCT designated stage expired Publication Date: 2025-06-19HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/111564
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-15
Filing Date
2024-08-12
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

When surfing the Internet through WiFi, users often encounter scan abnormalities of unknown reasons, resulting in abnormal WiFi chips, which cannot guarantee the daily use needs of users to connect to the network, causing inconvenience to users.

Method used

It provides a control method for WiFi chips, which determines whether power is needed to be powered off by obtaining the flag bit of WiFi chip, and controls powered off when the WiFi chip is abnormal to achieve self-healing and ensuring that electronic devices can access the network normally through WiFi.

Benefits of technology

By controlling the power off of the WiFi chip, it can heal itself within a certain period of time, solving the scanning abnormality caused by WiFi chip abnormality, meeting users' Internet access needs and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024111564_19062025_PF_FP_ABST
    Figure CN2024111564_19062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of terminals. Disclosed are a WiFi chip control method and an electronic device. With regard to scanning abnormality caused by abnormality of a WiFi chip, the WIFI chip is controlled to be powered off and is thus self-healed, thereby ensuring daily use requirements of a user for connecting to a network. The method can be applied to an electronic device comprising a WiFi chip, and the specific solution may comprise: acquiring a flag bit of the WiFi chip, wherein the flag bit is used for indicating whether the WiFi chip is required to be powered off; and in response to the fact that the flag bit is used for indicating that the WiFi chip is required to be powered off, controlling the WIFI chip to be powered off.
Need to check novelty before this filing date? Find Prior Art

Description

WiFi chip control method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on December 15, 2023, with application number 202311735273.6 and invention name “A control method and electronic device for a WiFi chip”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a control method for a Wireless Fidelity (WiFi) chip and an electronic device. Background Art

[0003] To provide users with network convenience, current mobile phones can access the Internet using WiFi. However, when using WiFi to access the Internet, users often encounter unexplained scanning anomalies, such as those caused by WiFi chip failures. This makes it impossible to guarantee daily network connection needs, causing inconvenience to users.

[0004] Summary of the Invention

[0005] Based on this, the present application provides a control method for a WiFi chip and an electronic device. In the event of a scanning abnormality caused by an abnormality in the WiFi chip, the WiFi chip is promptly controlled to power off, thereby achieving self-healing of the WiFi chip, so that the electronic device can normally access the network through WiFi, meet the user's Internet access needs, and improve the user experience.

[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0007] In a first aspect, the present application provides a method for controlling a WiFi chip, applicable to an electronic device including a WiFi chip. In the method, the electronic device obtains a flag bit of the WiFi chip, which can be used to indicate whether the WiFi chip needs to be powered off; and in response to the flag bit indicating that the WiFi chip needs to be powered off, controls the WiFi chip to power off.

[0008] The flag bit is used to indicate that the WiFi chip needs to be powered off when the WiFi chip is abnormal. By controlling the WiFi chip to power off when the acquired flag bit indicates that the WiFi chip needs to be powered off, when a scanning anomaly occurs due to the WiFi chip anomaly, the WiFi chip is powered off, allowing it to recover within a certain period of time. This allows the electronic device to access the network normally via WiFi, meeting the user's Internet access needs and improving the user's Internet experience.

[0009] In one possible implementation of the first aspect, the electronic device may monitor for a screen-off broadcast before controlling the WiFi chip to power off. If a screen-off broadcast is detected, it indicates that the electronic device is in the screen-off state. In this state, the WiFi chip is controlled to power off, thereby not affecting the user experience.

[0010] In one implementation of the first aspect, when WiFi chip information indicates a WiFi chip abnormality, the electronic device may set a flag bit to a first value, such as true, to indicate that the WiFi chip needs to be powered off. The WiFi chip information may include WiFi scan results from the WiFi chip, status information of the WiFi switch on the WiFi chip, and a list of WiFi chip scan results. The electronic device, such as a processor of the electronic device, may determine whether the WiFi chip needs to be powered off by periodically or when predetermined conditions are met, by determining whether the WiFi chip flag bit is the first value. This simplifies operation, saves time, and further enhances the user's online experience.

[0011] In one implementation of the first aspect, if a first condition is met, the WiFi chip information can be used to indicate a WiFi chip anomaly, or to indicate that the current scenario is a WiFi chip anomaly scenario. The first condition may include: a WiFi scan result indicating a successful WiFi chip scan, WiFi switch status information indicating that the WiFi switch is on, and an empty scan result list. That is, after obtaining WiFi chip information, namely, WiFi chip scan results, WiFi switch status information, and a WiFi chip scan result list, the electronic device, such as a processor of the electronic device, can determine that the first condition is met if the WiFi scan result indicates a successful WiFi chip scan, the WiFi switch status information indicates that the WiFi switch is on, and the scan result list is empty. This can determine that the WiFi chip anomaly is met, or that the current scenario is a WiFi chip anomaly scenario. This identifies a scan anomaly scenario caused by a WiFi chip anomaly, such as a successful WiFi chip scan result but an empty reported scan result list. This improves the ability of the WiFi chip in the electronic device to automatically recover during use.

[0012] In one possible implementation of the first aspect, if the number of times the first condition is met exceeds a first threshold, the WiFi chip information can be used to indicate a WiFi chip anomaly, or to indicate that the current scenario is a WiFi chip anomaly scenario. By determining that the WiFi chip is anomaly when the first condition is met multiple times, the accuracy of identifying WiFi chip anomaly scenarios is improved.

[0013] In one possible implementation of the first aspect, the first condition may further include location information of the electronic device's current location, indicating that the electronic device is within a preset location set. By adding the determination that the electronic device's current location information is within a preset location set to the conditions for identifying WiFi chip anomaly scenarios, this can avoid misidentifying a scenario where a user carries an electronic device to a location without a WiFi network deployed as a WiFi chip anomaly scenario, further improving the accuracy of identifying WiFi chip anomaly scenarios.

[0014] In one implementation of the first aspect, a flag bit may be set to a first value based on a WiFi scan result of the WiFi chip. That is, when the WiFi scan result of the WiFi chip indicates that the WiFi chip is abnormal, the flag bit is set to the first value to indicate that the WiFi chip needs to be powered off.

[0015] In one implementation of the first aspect, if a WiFi scan result indicates a WiFi chip scan failure, and the reason for the scan failure is a preset reason, the WiFi scan result is used to indicate a WiFi chip abnormality, or to indicate that the current scenario is a WiFi chip abnormality scenario. This identifies abnormal scan scenarios where WiFi chip scans fail due to preset reasons, improves the ability of the WiFi chip in the electronic device to automatically recover during use, and enhances the user experience.

[0016] In one implementation of the first aspect, if a WiFi chip scan fails and the number of times the scan failure is due to a preset reason exceeds a second threshold, a WiFi chip abnormality may be determined. Thus, by determining that the WiFi chip is abnormal when WiFi chip scan failures are repeatedly determined to be due to a preset reason, the accuracy of identifying WiFi chip abnormality scenarios is improved.

[0017] In an implementation manner of the first aspect, after controlling the WiFi chip to power off, the flag bit may be set to a second value, such as setting the second value to false, to indicate that the WiFi chip does not need to be powered off.

[0018] In a second aspect, the present application provides a method for controlling a WiFi chip, applicable to an electronic device including a WiFi chip. In this method, WiFi chip information is obtained; the WiFi chip information includes information about changes in the WiFi chip's WiFi switch, WiFi switch status information, a cached list of WiFi chip scan results, and a timestamp of the cached list of WiFi chip scan results. In response to the WiFi chip information indicating an abnormality in the WiFi chip, the WiFi chip is powered off.

[0019] In the above method, when the acquired WiFi chip information indicates a WiFi chip anomaly, the WiFi chip is controlled to be powered off. Therefore, when a scanning anomaly occurs due to the WiFi chip anomaly, the WiFi chip is controlled to be powered off, allowing it to recover within a certain period of time. This allows the electronic device to access the network normally via WiFi, meeting the user's Internet access needs and improving the user's Internet experience.

[0020] In the above method, when the user senses that the WiFi chip is abnormal and manually operates the WiFi switch, the WiFi chip can be controlled to be powered off so that it can successfully self-heal, further ensuring the user experience.

[0021] In one implementation of the first aspect, whether the WiFi chip is abnormal, or in other words, whether the current scenario is a WiFi chip abnormality scenario, can be determined based on information about changes in the WiFi chip's WiFi switch, the WiFi switch's status information, a cached WiFi chip scan result list, and the timestamp of the cached WiFi chip scan result list. For example, if the WiFi switch's status changes, the WiFi switch's status information indicates that the WiFi switch is off, the scan result list is not empty, and the timestamp is greater than a preset threshold, an electronic device, such as a processor of the electronic device, can determine that the WiFi chip information indicates that the WiFi chip is abnormal. Based on this, WiFi chip abnormality scenarios can be accurately identified, further ensuring a positive user experience.

[0022] In a third aspect, the present application provides a control device for a WiFi chip, which has the function of implementing the electronic device behavior described in the method of the first aspect. This function can be implemented through hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, such as an acquisition unit or module, a control unit or module, and a monitoring unit or module.

[0023] In a fourth aspect, an electronic device is provided, comprising: a memory, a WiFi chip, and one or more processors; the memory, the WiFi chip, and the processor are coupled;

[0024] The memory is used to store computer program code, which includes computer instructions. When the computer instructions are executed by the processor, the electronic device executes the control method of the WiFi chip in the first aspect, the second aspect and any implementation thereof.

[0025] In a fifth aspect, a computer-readable storage medium is provided, which includes a computer program. When the computer program runs on an electronic device, the electronic device can execute the control method of the WiFi chip in the first aspect, the second aspect, and any implementation thereof.

[0026] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed on an electronic device, enables the electronic device to execute the control method for the WiFi chip in the first aspect, the second aspect, and any implementation thereof.

[0027] In a seventh aspect, an embodiment of the present application provides a chip system, the chip system including a processor, the processor being used to call a computer program in a memory to execute a control method for a WiFi chip as in the first aspect, the second aspect, and any implementation thereof.

[0028] It can be understood that the beneficial effects that can be achieved by the device described in the third aspect, the electronic device described in the fourth aspect, the computer-readable storage medium described in the fifth aspect, the computer program product described in the sixth aspect, and the chip system described in the seventh aspect provided above can refer to the beneficial effects in the first aspect, the second aspect and any possible implementation methods thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] FIG1 is a schematic diagram of a WiFi chip in an electronic device accessing the Internet in the related art;

[0030] FIG2 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application;

[0031] FIG3 is a schematic flow chart of a control method for a WiFi chip according to an embodiment of the present application;

[0032] FIG4 is a flowchart of a method for handling abnormal scenarios of a WiFi chip according to an embodiment of the present application;

[0033] FIG5 is a second flow chart of a method for handling abnormal scenarios of a WiFi chip according to an embodiment of the present application;

[0034] FIG6 is a third flow chart of a method for handling abnormal scenarios of a WiFi chip according to an embodiment of the present application;

[0035] FIG7 is a flowchart of another method for handling abnormal scenarios of a WiFi chip according to an embodiment of the present application;

[0036] FIG8 is a second flow chart of another method for handling abnormal scenarios of a WiFi chip according to an embodiment of the present application;

[0037] FIG9 is a flow chart of another control method for a WiFi chip according to an embodiment of the present application;

[0038] FIG10 is a flow chart of another method for handling abnormal scenarios of a WiFi chip according to an embodiment of the present application;

[0039] FIG11 is a schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In the description of this application, unless otherwise specified, "and / or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.

[0041] In the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0042] To facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean different.

[0043] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner to facilitate understanding.

[0044] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0045] In addition to using data traffic to access the internet, current electronic devices can also use WiFi to provide users with internet access. For example, as shown in FIG1 , a mobile phone is used as an electronic device for demonstration. To access the internet using WiFi, the user needs to enable the WiFi function on the mobile phone. For example, the user can access the WiFi function settings interface, such as interface 11 shown in FIG1 (a), through the settings application interface, such as interface 12 shown in FIG1 (b). The user can then operate the WiFi switch in interface 12, which is used to turn the mobile phone's WiFi function on / off, to trigger the mobile phone to turn the WiFi function on / off. After receiving the WiFi function enable operation, the mobile phone can periodically scan for available WiFi networks in the surrounding area. After scanning for available WiFi networks, the mobile phone can display the identifiers of the available WiFi networks scanned by the mobile phone, such as the names of the WiFi networks, such as XXX1, XXX2, etc., in the available WiFi list, such as interface 12 shown in FIG1 (b). The user can then select the WiFi network to which the mobile phone wants to connect, such as by selecting the identifier of the WiFi network to which the mobile phone wants to connect. After receiving the user's operation to select the identifier of a WiFi network in the available WiFi list, the mobile phone can connect to the selected WiFi network to access the internet.

[0046] Specifically, the mobile phone performs periodic scanning: the mobile phone's WiFi chip periodically scans available WiFi channels, such as periodically scanning available WiFi channels in the 5G frequency band, thereby determining available WiFi networks, and displaying the scanned information of available WiFi networks to the user through an available WiFi list for the user to select.

[0047] However, users may encounter unexplained scanning anomalies, such as those caused by a WiFi chip anomaly. In such an anomaly, users are unable to access the internet using WiFi. For example, in the case of a WiFi chip anomaly, as shown in screen 13 (c) of FIG1 , the list of available WiFi networks displayed on the phone may not include any information about the WiFi network. This prevents users from selecting a WiFi network to connect to, and consequently, prevents them from accessing the internet using WiFi.

[0048] In the related art, no remedial measures have been taken to prevent users from using WiFi to access the Internet when the WiFi chip is abnormal. In other words, in the scenario where the WiFi chip is abnormal, users have no way to use WiFi to access the Internet, which cannot meet the user's Internet needs.

[0049] To address the aforementioned issues, embodiments of the present application provide a method for controlling a WiFi chip. Upon determining that the current scenario is a WiFi chip anomaly, that is, a scanning anomaly caused by a WiFi chip anomaly, the method powers down the WiFi chip. By accurately identifying the WiFi chip anomaly and triggering the WiFi chip to power down and self-heal, the method enables the electronic device to access the network normally via WiFi, meeting the user's Internet access needs and improving the user experience.

[0050] The solutions provided in the embodiments of the present application can be applied to electronic devices. For example, the electronic devices may include mobile phones, tablet computers, smart watches, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, as well as cellular phones, personal digital assistants (PDAs), augmented reality (AR) and virtual reality (VR) devices, and other devices that include WiFi chips. The embodiments of the present application do not impose any particular restrictions on the specific form of the electronic devices.

[0051] In addition, it should be noted that the WiFi chip control method provided in the embodiments of the present application can be applied to scenarios where scanning anomalies are caused by abnormalities in the WiFi chip of an electronic device. The scenarios where scanning anomalies are caused by abnormalities in the WiFi chip can include scenarios where the WiFi chip successfully scans but the available WiFi list does not include information about the successfully scanned WiFi network; scenarios where the WiFi chip fails to scan, such as when the WiFi chip receives a scan command but does not scan, resulting in a scan failure; scenarios where the WiFi function is abnormal and the electronic device detects that the user has manually operated the WiFi switch in the settings interface, etc.

[0052] For example, taking a mobile phone 200 as an example of the electronic device, FIG2 shows a schematic diagram of the structure of the mobile phone 200. As shown in FIG2, the mobile phone 200 may include a processor 210, an external memory interface 220, an internal memory 221, a mobile communication module 230, a wireless communication module 240, a charging management module 250, a power management module 260, a battery 270, an antenna 1, an antenna 2, an audio module 280, a sensor module 290, a button 291, a motor 292, an indicator 293, a display 294, and a subscriber identification module (SIM) card interface 295.

[0053] It should be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the mobile phone 200. In other embodiments of the present application, the mobile phone 200 may include more or fewer components than shown, or some components may be combined or separated, or the components may be arranged differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0054] The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0055] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0056] A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or is cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system. In some embodiments, the processor 210 may include one or more interfaces. In an embodiment of the present application, the processor 210 may be used to control the WiFi chip to power off when it is determined that the current scenario is a scanning abnormality caused by an abnormality in the WiFi chip, so that the WiFi chip can self-heal.

[0057] The charging management module 250 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. While charging the battery 270, the charging management module 250 can also provide power to the mobile phone 200 via the power management module 260.

[0058] The power management module 260 is connected to the battery 270. The power management module 260 receives input from the battery 270 and / or the charging management module 250 to power the processor 210, the internal memory 221, the display 294, and the wireless communication module 240 (e.g., a WiFi chip). The power management module 260 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 260 can also be provided in the processor 210. In other embodiments, the power management module 260 and the charging management module 250 can also be provided in the same device.

[0059] The wireless communication function of the mobile phone 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 230, the wireless communication module 240, the modem processor and the baseband processor.

[0060] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0061] Mobile communication module 230 can provide wireless communication solutions for mobile phone 200, including 2G / 3G / 4G / 5G. Mobile communication module 230 can include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. Mobile communication module 230 can receive electromagnetic waves from antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation.

[0062] The wireless communication module 240 can provide wireless communication solutions for the mobile phone 200, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. In some embodiments of the present application, when the wireless communication module 240 provides a WLAN solution on the mobile phone 200, the wireless communication module 240 may include the WiFi chip in the present application.

[0063] In some embodiments, the antenna 1 of the mobile phone 200 is coupled to the mobile communication module 230, and the antenna 2 is coupled to the wireless communication module 240, so that the mobile phone 200 can communicate with the network and other devices through wireless communication technology.

[0064] Mobile phone 200 implements display functionality through a GPU, display screen 294, and an application processor. The GPU is a microprocessor for image processing that connects display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or modify display information.

[0065] Display screen 294 is used to display images, videos, and the like. Display screen 294 includes a display panel. For example, display screen 294 may be a touch screen. In some embodiments of the present application, after a user opens a settings application, display screen 294 may be used to display a WiFi function settings interface. This settings interface may include a WiFi switch for turning the WiFi function on and off. This settings interface may also be used to display information about scanned WiFi networks, such as WiFi network identifiers, allowing the user to select a WiFi network to connect to.

[0066] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 200.

[0067] The internal memory 221 can be used to store computer executable program codes, which include instructions. The internal memory 221 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile phone 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various functions and data processing of the mobile phone 200 by running instructions stored in the internal memory 221 and / or instructions stored in a memory provided in the processor 210.

[0068] The audio module 280 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 280 can also be used to encode and decode audio signals. In some embodiments, the audio module 280 can be provided in the processor 210, or some functional modules of the audio module 280 can be provided in the processor 210.

[0069] The sensor module 290 may include a pressure sensor 290A, a fingerprint sensor 290B, a temperature sensor 290C, a touch sensor 290D, and the like.

[0070] Among them, the pressure sensor 290A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 290A can be set on the display screen 294. There are many types of pressure sensors 290A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a device including at least two parallel plates with conductive material. When a force acts on the pressure sensor 290A, the capacitance between the electrodes changes. The mobile phone 200 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 294, the mobile phone 200 detects the intensity of the touch operation based on the pressure sensor 290A. The mobile phone 200 can also calculate the position of the touch based on the detection signal of the pressure sensor 290A.

[0071] Fingerprint sensor 290B is used to collect fingerprints. Mobile phone 200 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application lock, fingerprint photo taking, fingerprint answering call, etc.

[0072] Temperature sensor 290C is used to detect temperature. In some embodiments, mobile phone 200 uses the temperature detected by temperature sensor 290C to implement a temperature management strategy. For example, when the temperature reported by temperature sensor 290C exceeds a threshold, mobile phone 200 reduces the performance of a processor located near temperature sensor 290C to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is below another threshold, mobile phone 200 heats battery 270 to prevent abnormal shutdown of mobile phone 200 due to low temperature. In other embodiments, when the temperature is below yet another threshold, mobile phone 200 boosts the output voltage of battery 270 to prevent abnormal shutdown due to low temperature.

[0073] Touch sensor 290D, also known as a "touch device," can be disposed on display screen 294. Touch sensor 290D and display screen 294 form a touch screen, also known as a "touch screen." Touch sensor 290D is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via display screen 294. In other embodiments, touch sensor 290D can also be disposed on the surface of mobile phone 200, at a location different from that of display screen 294.

[0074] Keys 291 include a power button, a volume button, etc. Keys 291 can be mechanical keys or touch keys. Mobile phone 200 can receive key inputs and generate key signal inputs related to user settings and function control of mobile phone 200.

[0075] Motor 292 can generate vibration prompts. Motor 292 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 294, motor 292 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0076] The indicator 293 may be an indicator light, which may be used to indicate the charging status, power level change, messages, missed calls, notifications, etc.

[0077] The SIM card interface 295 is used to connect a SIM card. The SIM card can be connected to or disconnected from the mobile phone 200 by inserting or removing the SIM card into or from the SIM card interface 295.

[0078] The following describes a specific process of implementing self-healing of a WiFi chip in an electronic device in conjunction with Figure 3. As shown in Figure 3, Figure 3 is a schematic flow chart of a control method for a WiFi chip according to an embodiment of the present application. The method may include: S301-S302.

[0079] S301. Obtain a flag bit of the WiFi chip, where the flag bit is used to indicate whether the WiFi chip needs to be powered off.

[0080] To ensure that the WiFi chip can work properly, in some embodiments of the present application, an electronic device, such as a processor of the electronic device, may periodically monitor the WiFi chip, i.e., execute S301 to determine whether an abnormality occurs in the WiFi chip, thereby ensuring the user's Internet experience when using WiFi.

[0081] In some other embodiments, an electronic device, such as a processor of an electronic device, may monitor the WiFi chip when it determines that a predetermined condition is met, that is, execute S301 to determine whether an abnormality occurs in the WiFi chip. For example, the predetermined condition may include whether a screen-off broadcast is monitored. An electronic device, such as a processor of an electronic device, may monitor the WiFi chip when a screen-off broadcast is monitored to determine whether an abnormality occurs in the WiFi chip. Among them, an electronic device, such as an electronic device processor, may periodically monitor whether there is a screen-off broadcast. Among them, when the electronic device needs to turn off the screen (hereinafter referred to as screen-off), the processor may send a screen-off broadcast. The screen-off of an electronic device may be triggered by the user or automatically by the electronic device. For example, if the electronic device does not receive any user operation on the electronic device after a predetermined period of time, the electronic device will automatically turn off the screen.

[0082] Among them, monitoring whether the WiFi chip is abnormal can be determined based on a flag bit in the WiFi chip. In this embodiment, the flag bit in the WiFi chip can be a flag used to indicate whether the WiFi chip needs to be powered off. This flag bit can also be called a power-off flag bit, a power-off self-healing flag bit, or a screen-off power-off self-healing flag bit. This flag bit can be set in the WiFi chip or not in the WiFi chip, for example, set in other components of the electronic device, such as a processor.

[0083] For example, if the acquired WiFi chip flag indicates that the WiFi chip does not need to be powered off, this indicates that the WiFi chip is not abnormal, i.e., the WiFi chip can scan normally, and the user can access the Internet normally using WiFi. In this case, S301 can be re-executed. If the acquired WiFi chip flag indicates that the WiFi chip needs to be powered off, this indicates that the WiFi chip is abnormal, such as the WiFi chip may not be able to scan normally, and the user cannot access the Internet normally using WiFi. In this case, S302 below can be executed.

[0084] S302 . In response to the flag indicating that the WiFi chip needs to be powered off, control the WiFi chip to power off.

[0085] If the flag indicates that the WiFi chip needs to be powered off, the electronic device, such as the processor of the electronic device, can control the WiFi chip to power off. Powering off means disconnecting the WiFi chip from a power source, such as by stopping power supply to the WiFi chip. For example, if the electronic device, such as the processor of the electronic device, determines that the flag indicates that the WiFi chip needs to be powered off, it can send a power-off control instruction to the power management module of the electronic device. The power-off control instruction is used to instruct the power management module of the electronic device to stop supplying power to the WiFi chip. After receiving the power-off control instruction, the power management module of the electronic device stops supplying power to the WiFi chip.

[0086] As described in S301, S301 can be executed periodically. In the case where S301 is executed periodically, in some embodiments, the electronic device, such as the processor of the electronic device, can control the WiFi chip to power off when it determines that the WiFi chip needs to be powered off based on the acquired flag of the WiFi chip. In some other embodiments, after the electronic device, such as the processor of the electronic device, determines that the WiFi chip needs to be powered off based on the acquired flag of the WiFi chip, the electronic device, such as the processor of the electronic device, can monitor whether there is a screen-off broadcast, and control the WiFi chip to power off when the screen-off broadcast is monitored. S301 can also be executed when a predetermined condition is met, such as when a screen-off broadcast is monitored. When S301 is executed only when a screen-off broadcast is monitored, the electronic device, such as the processor of the electronic device, can execute S301 after monitoring the screen-off broadcast, and control the WiFi chip to power off when it determines that the WiFi chip needs to be powered off based on the acquired flag of the WiFi chip.

[0087] It should be noted that the above embodiments are introduced by first monitoring whether there is a screen-off broadcast and then monitoring the WiFi chip, or first monitoring the WiFi chip and then monitoring whether there is a screen-off broadcast. In some other embodiments, electronic devices, such as the processor of an electronic device, can also monitor the WiFi chip and whether there is a screen-off broadcast at the same time, and control the WiFi chip to power off when the screen-off broadcast is monitored and the flag of the WiFi chip is used to indicate that the WiFi chip needs to be powered off. The embodiments of the present application do not specifically limit the order of monitoring the screen-off broadcast and monitoring the WiFi chip.

[0088] With the technical solution of this application, when the WiFi chip flag indicates that the WiFi chip needs to be powered off, it indicates that there may be an abnormality in the WiFi chip. In this case, the WiFi chip can be controlled to be powered off, thereby restoring the WiFi chip's functionality. This eliminates the scanning abnormality caused by the WiFi chip abnormality in the current scenario, allowing the user to use the WiFi function of the electronic device to surf the Internet normally, thereby improving the user experience. In addition, the WiFi chip can be controlled to be powered off when the electronic device's screen is off, thereby not affecting the user experience.

[0089] In actual use, there may be many scenarios that can indicate that the WiFi chip is abnormal. The following two embodiments are used to illustrate.

[0090] In the first embodiment, a scenario that can indicate a WiFi chip anomaly is: the WiFi chip's scan result is a successful scan, but the reported scan result list is empty. For example, the number of available WiFi networks in the scan result list reported to the upper-layer application is 0. In other words, after the user turns on WiFi in the settings interface, the WiFi chip can scan normally and successfully scans for WiFi networks, but the available WiFi list displayed in the settings interface does not display the identifiers of the scanned WiFi networks. As a result, the user cannot select the WiFi network they want their electronic device to connect to, resulting in an inability to use WiFi to access the Internet. Users are generally unaware of this WiFi chip anomaly.

[0091] In the second embodiment, a scenario that indicates a WiFi chip anomaly is when the WiFi chip performs a scan and the scan result is a scan failure, with the reason for the scan failure being a preset reason. In this scenario, the user is unable to access the WiFi network. Furthermore, users are generally unaware of this WiFi chip anomaly.

[0092] The two aforementioned scenarios indicating WiFi chip anomalies can often be controlled by powering off the WiFi chip, allowing it to self-heal. In these scenarios, a flag bit in the WiFi chip can be set to indicate that the WiFi chip needs to be powered off. This control restores WiFi chip functionality and ensures normal WiFi access for users. These two embodiments are described in detail below.

[0093] Example 1

[0094] In a scenario where the WiFi chip scan result indicates a successful scan, but the reported scan result list is empty, the electronic device, such as a processor of the electronic device, may set a flag bit of the WiFi chip based on the WiFi chip information. For example, if the WiFi chip information indicates an abnormal WiFi chip, the WiFi chip flag bit may be set to a first value to indicate that the WiFi chip needs to be powered off. The specific process may be as follows:

[0095] In some embodiments of the present application, an electronic device, such as a processor of the electronic device, may determine whether a first condition is satisfied based on information about the WiFi chip to determine whether the WiFi chip is abnormal, or in other words, determine whether the current scenario is a WiFi chip abnormal scenario. The WiFi chip information may include WiFi scan results of the WiFi chip, status information of a WiFi switch of the WiFi chip, and a list of scan results of the WiFi chip.

[0096] Among them, the scanning results of the WiFi chip may include a successful scan and a failed scan. For example, if the processor of an electronic device, such as an electronic device, monitors the WiFi scan broadcast, it can be determined that the scan result is a successful scan. If the processor of an electronic device, such as an electronic device, does not monitor the WiFi scan broadcast, it can be determined that the scan result is a failed scan. The switch of the WiFi chip can be a control for the user to turn on / off the WiFi function. The control can be included in the setting application of the electronic device, or in the control center of the electronic device, and of course can also be included in other applications for the user to turn on / off the WiFi function of the electronic device. The status information of the WiFi switch may include an on state and an off state. The scan result list can be a list for displaying information about scanned available WiFi networks to the user. Currently, the way to display information about scanned available WiFi networks to the user may not be in the form of a list, but in other forms, and this embodiment does not make specific restrictions here.

[0097] In some examples, the first condition may include a WiFi scan result indicating that the WiFi chip scan was successful, status information of the WiFi switch indicating that the WiFi switch is in the on state, and a scan result list being empty. That is, the electronic device, such as the processor of the electronic device, may obtain information about the WiFi chip, i.e., obtain the WiFi scan result of the WiFi chip, status information of the WiFi switch of the WiFi chip, and a scan result list of the WiFi chip. When the WiFi scan result indicates that the WiFi chip scan was successful, the status information of the WiFi switch indicates that the WiFi switch is in the on state, and the scan result list is empty, the electronic device, such as the processor of the electronic device, may determine that the information of the WiFi chip meets the first condition, i.e., determine that the information of the WiFi chip indicates that the WiFi chip is abnormal, or determine that the current scenario is a WiFi chip abnormal scenario. At this time, the electronic device, such as the processor of the electronic device, may set a flag bit of the WiFi chip to a first value to indicate that the WiFi chip needs to be powered off.

[0098] It should be noted that there is no specific order in which to determine whether the WiFi scan result indicates a successful WiFi chip scan, whether the WiFi switch status information indicates that the WiFi switch is on, and whether the scan result list is empty. As an example, as shown in FIG4 , based on the first condition, the specific process for determining whether the current scenario is a WiFi chip abnormality scenario is as follows:

[0099] An electronic device, such as a processor of an electronic device, may first obtain the WiFi scan results of a WiFi chip. For example, the processor of the electronic device may monitor for a broadcast of WiFi scan results (e.g., android.net.wifi.SCAN_RESULTS). If no WiFi scan results are broadcast, the electronic device, such as the processor of the electronic device, may re-execute the operation of monitoring for a broadcast of WiFi scan results. If a WiFi scan results broadcast is monitored, the electronic device, such as the processor of the electronic device, may obtain WiFi switch status information to further determine whether the WiFi switch is on. If the WiFi switch is determined to be off, the operation of monitoring for a broadcast of WiFi scan results may be re-executed. If the WiFi switch is determined to be on, the operation of further determining whether the WiFi chip's scan result list is empty may be continued. If the scan result list is determined to be not empty, the operation of monitoring for a broadcast of WiFi scan results may be re-executed. If the scan result list is determined to be empty, indicating that the current scenario is a WiFi chip abnormality scenario, the electronic device, such as the processor of the electronic device, may set a flag bit of the WiFi chip to a first value to indicate that the WiFi chip needs to be powered off.

[0100] In another example, the first condition may also include location information of the electronic device's current location, indicating that the electronic device is within a preset location set. That is, in addition to the aforementioned WiFi chip's WiFi scan results, the WiFi chip's WiFi switch status information, and the WiFi chip's scan result list, the electronic device, such as the electronic device's processor, may also determine whether the WiFi chip is abnormal based on the device's current location information. That is, based on these four parameters, it may determine whether the current scenario is a WiFi chip abnormality scenario, thereby determining whether to power off the WiFi chip for self-healing. That is, in addition to obtaining the WiFi chip's WiFi scan results, the WiFi chip's WiFi switch status information, and the WiFi chip's scan result list, the electronic device, such as the electronic device's processor, may also obtain the device's current location information. If the WiFi scan results indicate that the WiFi chip scan was successful, the WiFi switch status information indicates that the WiFi switch is on, the scan result list is empty, and the device's current location information indicates that the device is within a preset location set, the electronic device, such as the electronic device's processor, may determine that the WiFi chip information satisfies the first condition, i.e., determine that the WiFi chip is abnormal, or that the current scenario is a WiFi chip abnormality scenario. At this time, the electronic device, such as the processor of the electronic device, may set the flag bit of the WiFi chip to a first value, to indicate that the WiFi chip needs to be powered off.

[0101] Among them, the current location information of the electronic device is used as a judgment condition to avoid the situation when the user takes the electronic device to some unfamiliar environments that the user does not often go to. For example, these unfamiliar environments (such as mountainous areas) may not have WiFi networks deployed. If this judgment is not performed, the current scene may be mistakenly judged as a WiFi chip abnormality scene.

[0102] Similarly, there is no specific order in which to determine whether the WiFi scan result indicates a successful WiFi chip scan, whether the WiFi switch status information indicates that the WiFi switch is on, whether the scan result list is empty, and whether the current location information indicates that the electronic device is within a set of preset locations. As an example, in conjunction with FIG4 , as shown in FIG5 , the specific process for determining whether the current scenario is a WiFi chip abnormality scenario based on the first condition is as follows:

[0103] An electronic device, such as a processor of the electronic device, may first obtain WiFi scan results from a WiFi chip. For example, the processor of the electronic device may monitor for a broadcast of WiFi scan results (e.g., android.net.wifi.SCAN_RESULTS). If no WiFi scan results are broadcast, the process of monitoring for a broadcast of WiFi scan results may be repeated. If a WiFi scan result broadcast is detected, the electronic device, such as the processor of the electronic device, may obtain WiFi switch status information to further determine whether the WiFi switch is on. If the WiFi switch is determined to be off, the process of monitoring for a broadcast of WiFi scan results may be repeated. If the WiFi switch is determined to be on, the process of determining whether the WiFi chip's scan result list is empty may be continued. If the scan result list is determined to be not empty, the process of monitoring for a broadcast of WiFi scan results may be repeated. If the scan result list is determined to be empty, the process of determining whether the current location of the electronic device is within a preset location set may be continued. For example, the identifier of the cell to which the electronic device is currently connected (referred to as the current cell identifier, or current cell ID) may be obtained to determine whether the current cell ID is included in a set of commonly used cell IDs, which is preconfigured in the electronic device. If the current location of the electronic device is not in the preset location set, the operation of monitoring whether there is a broadcast of the WiFi scan result can be performed again. If the current location of the electronic device is in the preset location set, the electronic device, such as the processor of the electronic device, can set a flag bit of the WiFi chip to a first value to indicate that the WiFi chip needs to be powered off.

[0104] In some other embodiments of the present application, an electronic device, such as a processor of an electronic device, can determine multiple times whether a first condition is satisfied based on the information of the WiFi chip, that is, determine whether the number of times the first condition is satisfied is greater than a first threshold, so as to determine whether the current scene is a WiFi chip abnormality scene. When the number of times the first condition is satisfied is greater than the first threshold, it can be considered that the information of the WiFi chip is used to indicate that the WiFi chip is abnormal, or it can be determined that the current scene is a WiFi chip abnormality scene, based on which the flag bit of the WiFi chip can be set to a first value. Among them, the specific description of the WiFi chip information and the first condition can refer to the description of the corresponding content of the above embodiment, and will not be repeated here. Here, the first condition includes: the WiFi scan result is used to indicate that the WiFi chip scan is successful, the status information of the WiFi switch is used to indicate that the WiFi switch is in the on state, the scan result list is empty, and the location information of the current location of the electronic device is used to indicate that the electronic device is in a preset location set. For example, this embodiment is illustrated in conjunction with Figure 6.

[0105] As shown in Figure 6, an electronic device, such as a processor of an electronic device, can obtain WiFi scan results from a WiFi chip. For example, the processor of the electronic device can monitor for WiFi scan results broadcasts. If no WiFi scan results broadcast is monitored, the electronic device, such as the processor of the electronic device, can re-enable the monitoring for WiFi scan results broadcasts. If the WiFi scan results broadcast is monitored, the electronic device, such as the processor of the electronic device, can obtain WiFi switch status information to further determine whether the WiFi switch is on. If the WiFi switch is determined to be off, the monitoring for WiFi scan results broadcasts can be re-enable. If the WiFi switch is determined to be on, the system continues to determine whether the scan result list is empty. If the scan result list is not empty, the accumulated number of times the scan result list is empty is cleared, and the system re-enables the monitoring for WiFi scan results broadcasts. If the scan result list is empty, the system continues to determine whether the current location of the electronic device is within a preset location set. If the current location of the electronic device is not within the preset location set, the system re-enables the monitoring for WiFi scan results broadcasts. If the current location of the electronic device is within the preset location set, the accumulated number of times the scan result list is empty is incremented by one. Afterwards, it can be determined whether the cumulative number of times the scan result list is empty is greater than a first threshold, such as whether the cumulative number of times the scan result list is empty is greater than 5. If the cumulative number of times the scan result list is empty is not greater than the first threshold, the operation of monitoring for broadcasts of WiFi scan results can be re-executed. If the cumulative number of times the scan result list is empty is greater than the first threshold, it indicates that the number of times the first condition is satisfied is greater than the first threshold, i.e., it can be determined that the WiFi chip is abnormal, or that the current scenario is a scenario in which the WiFi chip is abnormal. The electronic device, such as the processor of the electronic device, can set a flag bit of the WiFi chip to a first value to indicate that the WiFi chip needs to be powered off.

[0106] It should be noted that there is no restriction on the order in which the parameters in the first condition are determined. In the example of Figure 6, the Wi-Fi scan result is determined first, the Wi-Fi switch status is determined second, the scan result list is determined, and finally the location information of the electronic device is determined. This is only an example of an execution order and is not intended to be a limitation.

[0107] Example 2

[0108] After the WiFi chip performs a scan, if the scan result indicates a scan failure and the reason for the scan failure is a preset reason, the electronic device, such as a processor of the electronic device, can set a flag bit of the WiFi chip based on the information of the WiFi chip. For example, if the information of the WiFi chip indicates that the WiFi chip is abnormal, the flag bit of the WiFi chip is set to a first value to indicate that the WiFi chip needs to be powered off. The specific process can be as follows:

[0109] In some embodiments, an electronic device, such as a processor of an electronic device, can determine whether the WiFi chip is abnormal based on the WiFi chip's WiFi scan results, or determine whether the current scenario is a WiFi chip abnormality scenario. For example, if the WiFi chip's WiFi scan result indicates a WiFi chip scan failure, and the reason for the scan failure is a preset reason, the WiFi chip is determined to be abnormal. For example, if the electronic device, such as the processor of an electronic device, determines that the WiFi scan result indicates a scan failure, it can further determine the cause of the scan failure, and then determine whether it is necessary to power off the WiFi chip to enable self-healing based on the cause of the scan failure. The reason for determining the scan failure reason is that there are many reasons for WiFi chip scan failure, and only when the cause of the scan failure is a preset reason can the WiFi chip be powered off to enable self-healing. As an example, the preset reasons can be 1, 22, 95, or 100. Preset reason 1 corresponds to "Operation not permitted" (EPERM). Preset reason 22 corresponds to "Invalid argument" (EINVAL). Preset reason 95 corresponds to "Operation not supported on transport endpoint" (EOPNOTSUPP). The preset reason 100 corresponds to the network is down (ENETDOWN). Therefore, in the embodiment of the present application, when it is determined that the WiFi scan result of the WiFi chip indicates that the WiFi chip scan failed, and the reason for the scan failure is a preset reason, the flag bit of the WiFi chip can be set to a first value to indicate that the WiFi chip is abnormal, so that the WiFi chip can be controlled to power off to enable self-healing.

[0110] As an example, as shown in FIG7 , based on the WiFi scanning result of the WiFi chip, the specific process of determining whether the current scene is a WiFi chip abnormal scene, or determining whether the current scene is a WiFi chip scanning failure scene, is as follows:

[0111] An electronic device, such as a processor of an electronic device, can determine whether the WiFi scan result of the WiFi chip is a scan failure. For example, the processor of the electronic device can determine whether the broadcast of the WiFi scan result is heard within a preset time. If the broadcast of the scan result is not heard within the preset time, it can be determined that the scan has failed. In the case of determining that the WiFi scan result of the WiFi chip is a scan failure, determine the cause of the scan failure (e.g., Handle wifi condsc an fail). Then, determine whether the cause of the scan failure is a preset cause. In the case where the cause of the scan failure is not a preset cause, it can be re-determined whether the WiFi scan result of the WiFi chip is a scan failure. In the case where the cause of the scan failure is a preset cause, it can be determined that the WiFi chip is abnormal, or it can be determined that the current scene is a WiFi chip abnormal scene. The electronic device, such as the processor of the electronic device, can set the flag bit of the WiFi chip to a first value to indicate that the WiFi chip needs to be powered off.

[0112] In other embodiments, an electronic device, such as a processor of an electronic device, may determine multiple times based on the WiFi scan results of the WiFi chip whether the WiFi scan result indicates a scan failure and whether the failure reason is a preset reason. Specifically, the determination is made whether the number of times the WiFi scan result indicates a scan failure and the failure reason is a preset reason is greater than a second threshold. This may be used to deem the WiFi chip information as indicating a WiFi chip abnormality. Based on this, a flag bit of the WiFi chip may be set to a first value. The specific description of the WiFi scan results of the WiFi chip can be found in the corresponding description of the above embodiments and will not be repeated here.

[0113] In conjunction with Figure 7, as shown in Figure 8, this embodiment is illustrated by way of example. As shown in Figure 8, an electronic device, such as a processor of an electronic device, can determine whether the WiFi scan result of the WiFi chip is a scan failure. If the broadcast of the WiFi scan result is not heard within a preset time period, the scan is deemed to have failed. If it is determined that the WiFi scan result of the WiFi chip is a scan failure, the cause of the scan failure is determined. Next, it is determined whether the cause of the scan failure is a preset cause. If the cause of the scan failure is not a preset cause, the accumulated number of causes of scan failure is cleared, and the operation of determining whether the WiFi scan result of the WiFi chip is a scan failure is re-executed. If the cause of the scan failure is a preset cause, the accumulated number of causes of scan failure is incremented by one, and the operation of determining whether the accumulated number of causes of scan failure is greater than a second threshold, such as whether the accumulated number of causes of scan failure is greater than 3. If the accumulated number of causes of scan failure is less than the second threshold, the operation of determining whether the WiFi scan result of the WiFi chip is a scan failure can be re-executed. When the cumulative number of scan failure reasons is greater than the second threshold, it indicates that the number of scan failures caused by the preset reason is greater than the second threshold, which means that it can be determined that the WiFi chip is abnormal, or that the current scenario is a scenario where the WiFi chip is abnormal. The electronic device, such as the processor of the electronic device, can set the flag bit of the WiFi chip to the first value to indicate that the WiFi chip needs to be powered off.

[0114] It should be noted that when the cumulative number of reasons for scan failure is equal to the second threshold, the WiFi chip can be considered abnormal, that is, the operation of setting the flag to the first value is performed, or the operation of determining whether the WiFi scan result of the WiFi chip is a scan failure can be re-executed. The embodiment of the present application does not impose specific restrictions on the operations performed by the electronic device when the cumulative number of reasons is equal to the second threshold, and can be set according to the needs of the actual application scenario.

[0115] It will be understood that, through the above-described first and second embodiments, an electronic device, such as a processor of an electronic device, can set a flag bit of a WiFi chip to a first value, such as true, when conditions are met, to indicate that the WiFi chip needs to be powered off. Therefore, by executing the embodiment shown in FIG3 , the purpose of controlling the WiFi chip to power off and allow it to self-heal can be achieved when the flag bit of the WiFi chip is set to the first value. Furthermore, an electronic device, such as a processor of an electronic device, can control the WiFi chip to power on after controlling the WiFi chip to power off. Alternatively, the device can control the WiFi chip to power on again after a preset time has elapsed since the WiFi chip was powered off. The embodiments of the present application do not specifically limit the timing or triggering conditions for re-powering the WiFi chip after controlling the WiFi chip to power off. Furthermore, with reference to FIG3 , after controlling the WiFi chip to power off, the electronic device, such as the processor of an electronic device, can set the flag bit to a second value, such as false, to indicate that the WiFi chip does not need to be powered off.

[0116] It should be noted that in the first and second embodiments, the example of setting a flag bit after the corresponding conditions are met so that the WiFi chip can be powered off based on the flag bit is used for description. In other embodiments, the WiFi chip can be powered off after determining that the corresponding conditions are met. For example, if it is determined that the first condition is met or the number of times the first condition is met is greater than a first threshold, the electronic device, such as the processor of the electronic device, can control the WiFi chip to power off. For another example, if it is determined that the WiFi scan result is a scan failure and the reason for the failure is a preset reason, the WiFi chip can be controlled to power off.

[0117] Example 3

[0118] The user may not be aware of the two WiFi chip abnormality scenarios in the above embodiments. In actual use, the user may be able to perceive the abnormality. For example, the user has previously used a mobile phone to connect to the home WiFi network, but the user is currently at home and the WiFi switch is on, but the mobile phone cannot access the home WiFi network. In this case, the user generally tries to restore the WiFi function by manually operating the WiFi switch. However, the user may not be able to restore the WiFi function by manually operating the WiFi switch. Therefore, in the embodiment of the present application, when the user manually operates the WiFi switch, it can be determined whether the current scenario is a WiFi chip abnormality scenario, and if the current scenario is a WiFi chip abnormality scenario, the WiFi chip is controlled to power off to achieve self-healing.

[0119] The following describes a specific process of implementing self-healing of a WiFi chip in an electronic device in conjunction with Figure 9. As shown in Figure 9, Figure 9 provides a flow chart of another method for controlling a WiFi chip according to an embodiment of the present application, the method including S901-S902.

[0120] S901. Obtain information about the WiFi chip; the information about the WiFi chip includes information about changes in the WiFi switch of the WiFi chip, status information of the WiFi switch, a cached list of scan results of the WiFi chip, and a timestamp of the cached list of scan results of the WiFi chip.

[0121] When a user attempts to connect to a WiFi network, they may often be unable to connect. The user may manually switch the WiFi on and off on the settings interface in an attempt to connect to the WiFi network. To ensure the normal operation of the WiFi chip, in some embodiments of the present application, an electronic device, such as a processor of the electronic device, may obtain information about the WiFi chip, i.e., execute S901 to determine whether an abnormality has occurred in the WiFi chip, or in other words, determine whether the current scenario is a WiFi chip abnormality scenario, thereby ensuring the user's Internet experience when using WiFi.

[0122] The WiFi chip information may include information about changes in the WiFi chip's WiFi switch, WiFi switch status information, a cached WiFi chip scan result list, and a timestamp for the cached WiFi chip scan result list. The WiFi chip switch change information refers to whether the WiFi switch status on the electronic device's settings interface has changed, such as whether the WiFi switch has changed from on to off, or vice versa. The WiFi chip's WiFi switch status information refers to whether the WiFi switch is on or off. The cached WiFi chip scan result list refers to the WiFi scan result list stored in the electronic device's cache, specifically, the scan result list of the WiFi networks last scanned by the WiFi chip. The timestamp may refer to the time the scan result list was stored in the electronic device's cache, or the time the scan result list was cached. For example, if the scan result list includes information on multiple scanned WiFi networks, the cache time of the scan result list, i.e., the timestamp, may be the time when the first WiFi network was scanned. For example, the scan result list may include information on two WiFi networks, WiFi1 and WiFi2. The time when WiFi1 is scanned is 12:02, and the time when WiFi2 is scanned is 12:03. The cache time of the scan result list is 12:02, that is, the timestamp is 12:02.

[0123] S902 . In response to the information from the WiFi chip indicating that the WiFi chip is abnormal, control the WiFi chip to power off.

[0124] When the information of the WiFi chip obtained in the above S901 indicates that the WiFi chip is abnormal, the electronic device, such as the processor of the electronic device, may control the WiFi chip to power off.

[0125] In some embodiments of the present application, an electronic device, such as a processor of an electronic device, can determine whether the WiFi chip is abnormal based on WiFi chip information, or determine whether the current scenario is a WiFi chip abnormality scenario. If WiFi switch change information indicates a change in the WiFi switch state, WiFi switch state information indicates that the WiFi switch is off, a scan result list is not empty, and a timestamp is greater than a preset threshold, the WiFi chip information can be considered to indicate a WiFi chip abnormality. That is, an electronic device, such as a processor of an electronic device, can obtain WiFi switch change information, WiFi switch state information, a cached WiFi chip scan result list, and a timestamp of the cached WiFi chip scan result list. If the WiFi switch state changes, WiFi switch state information indicates that the WiFi switch is off, a scan result list is not empty, and a timestamp is greater than a preset threshold, the electronic device, such as a processor of an electronic device, can determine that the WiFi chip information indicates that the WiFi chip is abnormal. Based on this, the electronic device, such as the processor of an electronic device, can control the WiFi chip to power off.

[0126] It should be noted that there is no order restriction for determining the WiFi chip's WiFi switch change information, WiFi switch status information, cached WiFi chip scan result list, and the timestamp of the cached WiFi chip scan result list. As an example, as shown in FIG10 , the specific process for determining that the current scenario is a WiFi chip abnormality scenario based on WiFi chip information can be as follows:

[0127] An electronic device, such as a processor of an electronic device, may first monitor for information about changes in the WiFi switch state. For example, the processor of the electronic device may monitor for broadcasts indicating changes in the WiFi switch state. If no broadcast indicating a change in the WiFi switch state is monitored, the process of monitoring the WiFi switch state change information is repeated. If a broadcast indicating a change in the WiFi switch state is monitored, the electronic device, such as the processor of the electronic device, may obtain WiFi switch state information to further determine whether the WiFi switch is in an off state. If the WiFi switch is determined to be in an on state, the process of monitoring the WiFi switch state change information is repeated. If the WiFi switch is determined to be in an off state, the electronic device, such as the processor of the electronic device, may obtain a cached WiFi chip scan result list and further determine whether the cached WiFi chip scan result list is empty. If the cached WiFi chip scan result list is empty, the process of monitoring the WiFi switch state change information is repeated. If the cached WiFi chip scan result list is not empty, the process of monitoring the WiFi switch state change information is repeated. If the timestamp of the cached WiFi chip scan result list is greater than a preset threshold, such as determining whether the timestamp is greater than 20 seconds. If the timestamp is greater than the preset threshold, the electronic device, such as the processor of the electronic device, controls the WiFi chip to power off.

[0128] It should be noted that when the above-mentioned timestamp is equal to the preset threshold, the electronic device, such as the processor of the electronic device, may consider that the WiFi chip is abnormal, that is, execute the operation of controlling the WiFi chip to power off, or re-execute the operation of monitoring the change information of the WiFi switch state. The embodiment of the present application does not impose specific restrictions on the operation performed by the electronic device when the timestamp is equal to the preset threshold, and can be set according to the needs of the actual application scenario.

[0129] The preset threshold value can be set based on empirical values. Specifically, the preset threshold value can be set to a value greater than the scanning period, which is not limited here.

[0130] It should be noted that, in the above embodiments, the execution process of the solution of the present application is described by taking the processor in the electronic device as an example. The process of the solution of the present application may also be executed by other devices in the electronic device, and no specific limitation is made here.

[0131] In summary, in the above three scenarios where WiFi chip abnormalities occur, the WiFi chip can be powered off to enable self-healing within a certain period of time, thereby ensuring the normal use of the user's WiFi function and improving the user's Internet experience.

[0132] Other embodiments of the present application provide an electronic device that may include a memory, a WiFi chip, and one or more processors. The memory, WiFi chip, and processor are coupled. The memory is used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device may perform the various functions or steps performed in the above-described method embodiments. The structure of the electronic device may refer to the structure of the electronic device shown in Figure 2, taking a mobile phone as an example.

[0133] An embodiment of the present application also provides a chip system, as shown in Figure 11, the chip system 1100 includes at least one processor 1101 and at least one interface circuit 1102. The processor 1101 and the interface circuit 1102 can be interconnected via lines. For example, the interface circuit 1102 can be used to receive signals from other devices (such as the memory of an electronic device). For another example, the interface circuit 1102 can be used to send signals to other devices (such as the processor 1101). Exemplarily, the interface circuit 1102 can read instructions stored in the memory and send the instructions to the processor 1101. When the instructions are executed by the processor 1101, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.

[0134] An embodiment of the present application further provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes the various functions or steps executed by the electronic device in the above-mentioned method embodiment.

[0135] An embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the functions or steps executed by the electronic device in the above method embodiment.

[0136] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0137] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0138] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0139] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0140] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0141] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A control method for a wireless fidelity WiFi chip, characterized in that: Applied to an electronic device including a WiFi chip, the method comprises: Obtaining a flag bit of the WiFi chip, where the flag bit is used to indicate whether the WiFi chip needs to be powered off; In response to the flag bit being used to indicate that the WiFi chip needs to be powered off, the WiFi chip is controlled to be powered off.

2. The method according to claim 1, characterized in that Before controlling the WiFi chip to power off, the method further includes: Monitor the screen off broadcast.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Acquire information of the WiFi chip, the information of the WiFi chip including: a WiFi scan result of the WiFi chip, status information of a WiFi switch of the WiFi chip, and a scan result list of the WiFi chip; In response to the information of the WiFi chip indicating that the WiFi chip is abnormal, the flag bit is set to a first value to indicate that the WiFi chip needs to be powered off.

4. The method according to claim 3, characterized in that When the first condition is met or the number of times the first condition is met is greater than a first threshold, the information of the WiFi chip is used to indicate that the WiFi chip is abnormal; The first condition includes: the WiFi scanning result is used to indicate that the WiFi chip scan is successful, the status information of the WiFi switch is used to indicate that the WiFi switch is in an on state, and the scanning result list is empty.

5. The method according to claim 4, characterized in that The first condition also includes: the location information of the current location of the electronic device is used to indicate that the electronic device is in a preset location set.

6. The method according to claim 1 or 2, characterized in that: The method further comprises: Obtaining the WiFi scanning result of the WiFi chip; In response to the WiFi scanning result indicating that the WiFi chip is abnormal, the flag bit is set to a first value to indicate that the WiFi chip needs to be powered off.

7. The method according to claim 6, characterized in that When the WiFi scanning result is used to indicate that the WiFi chip scanning fails, and the reason for the scanning failure is a preset reason, the WiFi scanning result is used to indicate that the WiFi chip is abnormal; or, When the WiFi scanning result is used to indicate that the WiFi chip scanning fails, and the number of times that the scanning failure is caused by a preset reason is greater than a second threshold, the WiFi scanning result is used to indicate that the WiFi chip is abnormal.

8. The method according to any one of claims 1 to 7, characterized in that After controlling the WiFi chip to power off, the method further includes: The flag bit is set to a second value to indicate that the WiFi chip does not need to be powered off.

9. A control method for a wireless fidelity WiFi chip, characterized in that: Applied to an electronic device including a WiFi chip, the method comprises: Acquire information of the WiFi chip; the information of the WiFi chip includes change information of the WiFi switch of the WiFi chip, status information of the WiFi switch, a cached scan result list of the WiFi chip, and a timestamp of the cached scan result list of the WiFi chip; In response to the information of the WiFi chip indicating that the WiFi chip is abnormal, the WiFi chip is controlled to be powered off.

10. The method according to claim 9, characterized in that When the change information of the WiFi switch is used to indicate that the state of the WiFi switch has changed, the state information of the WiFi switch is used to indicate that the WiFi switch is in an off state, the scan result list is not empty and the timestamp is greater than a preset threshold, the information of the WiFi chip is used to indicate that the WiFi chip is abnormal.

11. An electronic device, characterized in that: The electronic device comprises: a memory, a WiFi chip and one or more processors; the memory, the WiFi chip and the processor are coupled; The memory is used to store computer program codes, and the computer program codes include computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that: including computer instructions; When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

  • WiFi failure recovery method and device, storage medium and electronic device

    CN109032826A

  • WiFi connection method, electronic equipment, storage medium and chip

    CN116668583A

  • Control method and control device of fingerprint module

    CN116700802A

  • Detection method for WiFi switching crash and related equipment

    CN116866968A

  • Apparatus and method for controlling communication module

    US20150312857A1