Mode switching method, device and equipment of WiFi chip
By using NFC tag automatic switching mode in WiFi chips, the problem of users needing to manually operate hardware switches in the prior art is solved, and a simpler mode switching process is realized.
Patent Information
- Application Number
- CN202111007667.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-30
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-08-30
AI Technical Summary
The existing WiFi chip requires the user to manually control the hardware switch when switching the working mode, resulting in complex operation.
By configuring the near field communication (NFC) tag, the mode switching information is written. When the NFC tag is close to the WiFi chip, the mode of the WiFi chip is automatically switched according to the information in the tag.
Simplifies user operations, avoids the steps of manually controlling hardware switches, and improves the convenience of WiFi chip mode switching.
Smart Images

Figure CN113709713B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of mode switching of WiFi chips, and more particularly to a method, device and apparatus for mode switching of a WiFi chip. Background Art
[0002] A WiFi chip is a chip that can convert wired network signals into WiFi signals.
[0003] At present, WiFi chips have multiple working modes, such as access point (AP) mode, station (STA) mode and mesh mode, etc. In the related art, a hardware switch corresponding to each mode is set on the WiFi chip, and the user manually controls a hardware switch to turn on, so that the WiFi chip has the working mode corresponding to the hardware switch.
[0004] In the above-mentioned related technologies, when the working mode of the WiFi chip needs to be switched from one mode to another mode, the user needs to manually control the hardware switch corresponding to the other mode to turn on, which makes the user operation complicated. Summary of the invention
[0005] The embodiments of the present application provide a mode switching method, device and equipment of a WiFi chip, which are used to simplify user operations.
[0006] In a first aspect, an embodiment of the present application provides a mode switching method for a WiFi chip, comprising: receiving mode switching information sent by a near field communication NFC tag, the mode switching information being used to indicate that the mode of the WiFi chip is switched to a target WiFi mode; obtaining a target identifier of the target WiFi mode from the mode switching information; obtaining a target firmware corresponding to the target identifier, and controlling the WiFi chip to run the target firmware in the target WiFi mode.
[0007] In a possible design, obtaining the target firmware corresponding to the target identifier includes: determining whether the target identifier is the same as an identifier of a current WiFi mode of the WiFi chip; if they are not the same, obtaining the target firmware corresponding to the target identifier.
[0008] In one possible design, obtaining the target firmware corresponding to the target identifier includes: determining whether the target WiFi mode matches the current operating system; if not, determining the target operating system corresponding to the target WiFi mode, running the target operating system, and obtaining the target firmware corresponding to the target identifier.
[0009] In one possible design, the method further includes: determining whether the target WiFi mode matches the host bus currently connected to the WiFi chip; if not, switching the host bus currently connected to the WiFi chip to a host bus that matches the target WiFi mode.
[0010] In one possible design, determining whether the target WiFi mode matches the current operating system includes: determining whether at least one mode identifier corresponding to the system identifier of the current operating system includes the target identifier; if so, the target WiFi mode matches the current operating system; if not, the target WiFi mode does not match the current operating system.
[0011] In one possible design, the mode switching information includes encrypted information after encrypting the target identifier; obtaining the target identifier of the target WiFi mode from the mode switching information includes: decrypting the encrypted information according to a preset decryption algorithm to obtain the target identifier of the target WiFi mode.
[0012] In one possible design, receiving mode switching information sent by a near field communication (NFC) tag includes: controlling an NFC detection chip to turn on; and receiving the mode switching information sent by the NFC tag through the NFC detection chip.
[0013] In a second aspect, an embodiment of the present application provides a mode switching device for a WiFi chip, comprising: a receiving module, a first acquisition module, a second acquisition module and a control module; wherein:
[0014] A receiving module, used to receive mode switching information sent by a near field communication NFC tag, where the mode switching information is used to instruct to switch the mode of the WiFi chip to a target WiFi mode;
[0015] A first acquisition module is used to acquire a target identifier of a target WiFi mode from the mode switching information;
[0016] A second acquisition module is used to acquire the target firmware corresponding to the target identifier;
[0017] The control module is used to control the WiFi chip to run the target firmware in the target WiFi mode.
[0018] In one possible design, the second acquisition module is specifically used to: determine whether the target identifier and the identifier of the current WiFi mode of the WiFi chip are the same; if they are not the same, obtain the target firmware corresponding to the target identifier.
[0019] In one possible design, the second acquisition module is specifically used to: determine whether the target WiFi mode matches the current operating system; if not, determine the target operating system corresponding to the target WiFi mode, run the target operating system, and obtain the target firmware corresponding to the target identifier.
[0020] In one possible design, the device further includes: a switching module;
[0021] The switching module is used to determine whether the target WiFi mode matches the host bus currently connected to the WiFi chip; if not, the host bus currently connected to the WiFi chip is switched to a host bus that matches the target WiFi mode.
[0022] In one possible design, the second acquisition module is specifically used to: determine whether at least one mode identifier corresponding to the system identifier of the current operating system includes a target identifier; if so, the target WiFi mode matches the current operating system; if not, the target WiFi mode does not match the current operating system.
[0023] In a possible design, the mode switching information includes encrypted information after encrypting the target identifier; the first acquisition module is specifically used to: decrypt the encrypted information according to a preset decryption algorithm to obtain the target identifier of the target WiFi mode.
[0024] In a possible design, the receiving module is specifically used to: control the NFC detection chip to turn on; and receive mode switching information sent by the NFC tag through the NFC detection chip.
[0025] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory;
[0026] Memory stores computer-executable instructions;
[0027] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the mode switching method of the WiFi chip as described in any one of the first aspects.
[0028] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, a mode switching method of a WiFi chip as described in any one of the first aspects is implemented.
[0029] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the mode switching method of a WiFi chip as described in any one of the first aspects.
[0030] The embodiment of the present application provides a method, device and equipment for mode switching of a WiFi chip, the method comprising: receiving mode switching information sent by a near field communication NFC tag, the mode switching information being used to indicate that the mode of the WiFi chip is switched to a target WiFi mode; obtaining a target identifier of the target WiFi mode from the mode switching information; obtaining a target firmware corresponding to the target identifier, and controlling the WiFi chip to run the target firmware in the target WiFi mode. In the above process, the NFC tag touches the electronic device, so that the mode switching method of the WiFi chip can be executed, thereby realizing the mode switching of the WiFi chip and simplifying the user's operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0032] Figure 1 An application scenario diagram of the mode switching method of the WiFi chip provided in an embodiment of the present application;
[0033] Figure 2 The process of the mode switching method of the WiFi chip provided in the embodiment of the present application Figure 1 ;
[0034] Figure 3 The process of the mode switching method of the WiFi chip provided in the embodiment of the present application Figure 2 ;
[0035] Figure 4 A schematic diagram of the structure of the mode switching device of the WiFi chip provided in the embodiment of the present application Figure 1 ;
[0036] Figure 5 A schematic diagram of the structure of the mode switching device of the WiFi chip provided in the embodiment of the present application Figure 2 ;
[0037] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. In addition, although the disclosure in the present application is introduced according to one or more exemplary examples, it should be understood that each aspect of these disclosures can also constitute a complete implementation method separately.
[0039] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0040] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] In the related art, when the working mode of the WiFi chip is switched from one mode to another mode, the user is required to manually control the hardware switch corresponding to the other mode to turn on (or implement it through a serial port AT command), which makes the user operation complicated.
[0042] In order to simplify user operations in the process of switching the working mode of a WiFi chip from one mode to another, in the present application, the inventors conceived of configuring a near field communication (NFC) tag for the WiFi chip, writing mode switching information in the NFC tag, and when the distance between the NFC tag and the WiFi chip is close, the mode of the WiFi chip can be switched according to the mode switching information in the NFC tag.
[0043] Figure 1 This is an application scenario diagram of the mode switching method of the WiFi chip provided in the embodiment of the present application. Figure 1As shown, it includes: NFC tag, system on chip (SoC), NFC detection chip, WiFi chip. The NFC detection chip and WiFi chip can be set on the SoC.
[0044] Optionally, a WiFi chip may be included in the NFC detection chip.
[0045] Among them, SoC, also known as system on chip, is an integrated circuit with a dedicated purpose, which contains all the contents of a complete system and embedded software.
[0046] When the distance between the NFC tag and the NFC detection chip is close, the NFC detection chip can receive mode switching information, and the SoC can switch the mode of the WiFi chip according to the mode switching information, thereby simplifying user operations and avoiding the need for users to manually control the corresponding hardware switch to turn on when switching the working mode of the WiFi chip from one mode to another.
[0047] The mode switching method of the WiFi chip provided by the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0048] Figure 2 The process of the mode switching method of the WiFi chip provided in the embodiment of the present application Figure 1 .like Figure 2 As shown, the method includes:
[0049] S201. Receive mode switching information sent by an NFC tag, where the mode switching information is used to instruct to switch the mode of the WiFi chip to a target WiFi mode.
[0050] The mode switching method of the WiFi chip provided in the embodiment of the present application can be applied to various electronic devices including SoC, such as routers, mobile terminals, smart phones, PDAs, handheld devices with wireless communication functions, computing devices, vehicle-mounted devices, wearable devices, and household appliances such as televisions, stereos, and refrigerators. The specific form of the electronic device is not limited in the embodiment of the present application, as long as the electronic device has a WiFi chip.
[0051] The NFC tag is the tag corresponding to the target WiFi mode.
[0052] For example, an NFC tag may be a tag specially configured for an electronic device.
[0053] For example, the NFC tag may also be an NFC module in a mobile phone, and the NFC module is a module implemented by hardware and / or software. When the NFC tag is an NFC module in a mobile phone, the user can switch information through a custom editing mode.
[0054] The modes of the WiFi chip include but are not limited to at least one of the following modes: AP mode, STA mode, AP and STA coexistence mode, Mesh mode, Monitor (MON) mode, Independent Basic Service Set (IBSS) mode (Ad-hoc mode), Wireless Distribution System (WDS) mode, custom mode, etc. The custom mode may be, for example, a sniffer filtering air broadcast packet mode.
[0055] The target WiFi mode may be any one of the at least one mode mentioned above.
[0056] Optionally, when the NFC tag is a tag specially configured for the electronic device, if there are multiple modes of the WiFi chip, there may also be multiple NFC tags, wherein the target WiFi modes indicated by the multiple NFC tags are different.
[0057] S202: Obtain a target identifier of a target WiFi mode from the mode switching information.
[0058] Optionally, the mode switching information may include a target identifier of a target WiFi mode, may include encrypted information obtained by encrypting the target identifier of the target WiFi mode, may include mapping information corresponding to the target identifier, and may include preset information.
[0059] For example, when the mode switching information includes the target identifier, the target identifier may be directly acquired from the mode switching information.
[0060] For example, when the mode switching information includes encrypted information obtained by encrypting the target identifier, the encrypted information is decrypted according to a preset decryption algorithm to obtain the target identifier of the target WiFi mode.
[0061] For example, when the mode switching information includes mapping information corresponding to the target identifier, the mapping information is obtained from the mode switching information, wherein the mapping information indicates the target identifier; the mode identifier corresponding to the mapping information is searched in a pre-stored mapping list, and the mode identifier corresponding to the mapping information is determined as the target identifier of the target WiFi mode. The mapping list includes multiple mapping information and the mode identifier corresponding to each mapping information.
[0062] For example, when the mode switching information includes a preset information, the electronic device counts the total number of times the preset information is currently received, searches for the mode identifier corresponding to the total number of times in the pre-stored information list, and determines the mode identifier corresponding to the total number of times as the target identifier of the target WiFi mode. The information list includes multiple times and the mode identifier corresponding to each time.
[0063] It should be noted that when the mode switching information includes a preset information, if the total number of times is greater than the preset threshold, the electronic device will restart the counting from 0. For example, when the modes of the WiFi chip include AP mode, STA mode, and Mesh mode, when the preset information is received for the first time, the target identifier may be the identifier of the AP mode, when the preset information is received for the second time, the target identifier may be the identifier of the STA mode, and when the preset information is received for the third time, the target identifier may be the identifier of the Mesh mode. For example, when the preset threshold is equal to 3, starting from 0, when the preset information is received for the first time, the target identifier may be the identifier of the AP mode, when the preset information is received for the second time, the target identifier may be the identifier of the STA mode, and when the preset information is received for the third time, the target identifier may be the identifier of the Mesh mode. Repeating this process can enable WiFi to cyclically switch between multiple modes.
[0064] Optionally, after the target identifier is acquired, the target identifier may be recorded and stored first.
[0065] S203, obtaining the target firmware corresponding to the target identifier, and controlling the WiFi chip to run the target firmware in the target WiFi mode.
[0066] Specifically, the operating system in the SoC initializes the WiFi chip, obtains the target firmware corresponding to the target identifier, and controls the WiFi chip to run the target firmware in the target WiFi mode.
[0067] Specifically, obtaining the target firmware corresponding to the target identifier includes: determining whether the target identifier is identical to the identifier of the current WiFi mode of the WiFi chip; if not, executing S203. Further, if identical, stopping executing S203.
[0068] Acquiring the target firmware corresponding to the target identifier may include: a boot ROM acquires the target firmware corresponding to the target identifier from a flash memory (FLASH), and downloads the target firmware to a random access memory (Random Access Memory, RAM).
[0069] The flash memory stores firmware corresponding to a plurality of identifiers, each firmware has a different storage address in the flash memory, and the firmware corresponding to the plurality of identifiers includes a target firmware corresponding to the target identifier.
[0070] Specifically, a list including multiple mode identifiers and storage addresses corresponding to each mode identifier can be pre-stored in the electronic device (or SoC), and the multiple mode identifiers include a target identifier; the boot program can search the list according to the target identifier to obtain the storage address corresponding to the target identifier, and obtain the target firmware corresponding to the target identifier from the storage address corresponding to the target identifier.
[0071] It should be noted that in this application, when the mode of the WiFi chip is different, the electronic device has different functions. For example, when the electronic device is a device including a High Definition Multimedia Interface (HDMI), the mode of the WiFi chip in the device can be switched to AP mode through an NFC tag, so that the electronic device can also be used as an AP device for transmitting WiFi signals. The mode of the WiFi chip in the device can also be switched to STA mode through an NFC tag, so that the electronic device can be used as a STA device for WIFI multicast video formation.
[0072] exist Figure 2 In the mode switching method of the WiFi chip provided in the embodiment, the mode switching information sent by the near field communication NFC tag is received, and the target identifier of the target WiFi mode is obtained from the mode switching information; the target firmware corresponding to the target identifier is obtained, and the WiFi chip is controlled to run the target firmware in the target WiFi mode, so that the WiFi chip has the target WiFi mode. In practical applications, for example, when a user holds an NFC tag and makes the NFC tag touch an electronic device (i.e., the distance between the NFC tag and the electronic device is less than or equal to the preset distance), the mode switching method of the WiFi chip can be executed, thereby realizing the mode switching of the WiFi chip, simplifying the user's operation.
[0073] In actual applications, as technology develops, a single hardware may have dual systems (i.e., the number of systems is equal to 2) or multiple systems (the number of systems is greater than 2). For example, USB may switch between different devices or buses as the system switches. Similarly, WiFi chips may switch to different modes as the system switches.
[0074] Combine the following Figure 3 Explains how to switch the WiFi chip mode between different systems.
[0075] Figure 3 The process of the mode switching method of the WiFi chip provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, the method includes:
[0076] S301, control the NFC detection chip to turn on.
[0077] When the WiFi chip works in a certain mode, the NFC detection chip can handle the closed state (i.e., the power-off state). Since the NFC detection chip is in the open state (i.e., the power-on state) for a long time, it wastes the power of the electronic device, which will cause the battery life of the electronic device to be reduced. Therefore, in this application, when the mode of the WiFi chip needs to be switched, the NFC detection chip is controlled to be turned on, which can save the power of the electronic device and extend the battery life of the electronic device.
[0078] S302: Receive mode switching information sent by the NFC tag through the NFC detection chip. The mode switching information is used to instruct to switch the mode of the WiFi chip to the target WiFi mode.
[0079] Specifically, the execution method of S302 is similar to the execution method of S201, and the execution process of S302 is not repeated here.
[0080] S303: Obtain a target identifier of the target WiFi mode from the mode switching information.
[0081] Specifically, the execution method of S303 is the same as the execution method of S202, and the execution process of S303 is not repeated here.
[0082] S304: Determine whether the target WiFi mode matches the current operating system.
[0083] If not, execute S305; otherwise, execute S306.
[0084] Optionally, before S304, the process may further include: determining whether the target identifier is identical to an identifier of a current WiFi mode of the WiFi chip; if they are not identical, executing S304.
[0085] Optionally, determining whether the target WiFi mode matches the current operating system includes: determining whether the target identifier is included in at least one mode identifier corresponding to the system identifier of the current operating system; if so, the target WiFi mode matches the current operating system; if not, the target WiFi mode does not match the current operating system. Among them, the electronic device (or SoC) can pre-store system identifiers of multiple operating systems and at least one mode identifier corresponding to each system identifier. For example, if at least one mode identifier corresponding to the system identifier of the current operating system includes the target identifier, the target WiFi mode matches the current operating system. For example, if at least one mode identifier corresponding to the system identifier of the current operating system does not include the target identifier, the target WiFi mode does not match the current operating system.
[0086] S305: Determine a target operating system corresponding to the target WiFi mode, run the target operating system, obtain a target firmware corresponding to the target identifier, and control the WiFi chip to run the target firmware in the target WiFi mode.
[0087] Optionally, before, after, or during running the target operating system, it may also include: determining whether the target WiFi mode matches the host bus currently connected to the WiFi chip; if not, switching the host bus currently connected to the WiFi chip to a host bus matching the target WiFi mode.
[0088] Currently, WiFi chips support multiple host buses, such as Universal Serial Bus (USB), Secure Digital Input and Output (SDIO) bus, Universal Asynchronous Receiver / Transmitter (UART) bus, high-speed serial computer expansion bus (peripheral component interconnect express, PCIE), Serial Peripheral Interface (SPI) bus, I2C bus, etc.
[0089] Optionally, a bus identifier may be configured for each host bus, and a mapping relationship between multiple bus identifiers and at least one mode identifier corresponding to each bus identifier may be pre-stored, wherein the host bus indicated by the bus identifier matches the mode indicated by the mode identifier corresponding to the bus identifier.
[0090] Specifically, the identifier of the host bus currently connected to the WiFi chip can also be pre-stored
[0091] Furthermore, the identifier of the host bus currently connected to the WiFi chip can be obtained, and it can be determined whether at least one mode identifier corresponding to the identifier of the host bus currently connected to the WiFi chip in the above mapping relationship includes the target mode of the target WiFi mode; if so, the target WiFi mode matches the host bus currently connected to the WiFi chip; if not, the target WiFi mode does not match the host bus currently connected to the WiFi chip.
[0092] In the present application, it is determined whether the target WiFi mode matches the host bus currently connected to the WiFi chip; if not, the host bus currently connected to the WiFi chip is switched to a host bus that matches the target WiFi mode. This allows different host buses to be used for data communication when the throughput of electronic devices is different, thereby improving the data transmission efficiency during data transmission.
[0093] S305: Obtain target firmware corresponding to the target identifier, and control the WiFi chip to run the target firmware in the target WiFi mode.
[0094] Determining the target operating system corresponding to the WiFi mode may include: determining the target system identifier corresponding to the target identifier of the target WiFi mode among at least one mode identifier corresponding to each of the system identifiers of multiple operating systems, and determining the operating system with the target system identifier as the target operating system corresponding to the target WiFi mode.
[0095] Running the target operating system may include: running the target operating system through a boot system in the electronic device.
[0096] Specifically, the method of obtaining the target firmware corresponding to the target identifier and controlling the WiFi chip to run the target firmware in the target WiFi mode is similar to the method in S203 and will not be repeated here.
[0097] It should be noted that in this application, the electronic device can have a variety of WiFi functional device forms. For example, when the WiFi chip mode is AP mode, the target operating system is a router system (openwrt system), the target firmware can be WiFi AP firmware or the firmware corresponding to the WiFi AP and STA coexistence mode, and the electronic device has an AP functional device form. For example, when the WiFi chip mode is STA mode, the target operating system is the mbedos RTOS system, the target firmware can be the WIFI STA firmware, and the electronic device has a STA functional device form.
[0098] exist Figure 3 In the mode switching method of the WiFi chip provided in the embodiment, it is determined whether the target WiFi mode matches the current operating system. If not, the target operating system corresponding to the target WiFi mode is determined, the target operating system is run, and the target firmware corresponding to the target identifier is obtained, and the WiFi chip is controlled to run the target firmware in the target WiFi mode. The mode switching method of the WiFi chip provided in the present application can be applied to electronic devices with dual systems or multiple systems, which expands the application scope of the mode switching method of the WiFi chip and can better meet the needs of the market.
[0099] Figure 4 A schematic diagram of the structure of the mode switching device of the WiFi chip provided in the embodiment of the present application Figure 1 .like Figure 4 As shown, the mode switching device 10 includes: a receiving module 101, a first acquisition module 102, a second acquisition module 103 and a control module 104; wherein,
[0100] The receiving module 101 is used to receive mode switching information sent by a near field communication NFC tag, where the mode switching information is used to instruct to switch the mode of the WiFi chip to a target WiFi mode;
[0101] A first acquisition module 102 is used to acquire a target identifier of a target WiFi mode from the mode switching information;
[0102] The second acquisition module 103 is used to acquire the target firmware corresponding to the target identifier;
[0103] The control module 104 is used to control the WiFi chip to run the target firmware in the target WiFi mode.
[0104] The mode switching device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0105] Figure 5 A schematic diagram of the structure of the mode switching device of the WiFi chip provided in the embodiment of the present application Figure 2 .exist Figure 4 On the basis of Figure 5 As shown, the mode switching device 10 further includes: a switching module 105; wherein,
[0106] The switching module 105 is used to determine whether the target WiFi mode matches the host bus currently connected to the WiFi chip; if not, the host bus currently connected to the WiFi chip is switched to a host bus matching the target WiFi mode.
[0107] The mode switching device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0108] In a possible design, the second acquisition module 103 is specifically used to: determine whether the target identifier and the identifier of the current WiFi mode of the WiFi chip are the same; if they are not the same, obtain the target firmware corresponding to the target identifier.
[0109] In one possible design, the second acquisition module 103 is specifically used to: determine whether the target WiFi mode matches the current operating system; if not, determine the target operating system corresponding to the target WiFi mode, run the target operating system, and obtain the target firmware corresponding to the target identifier.
[0110] In one possible design, the second acquisition module 103 is specifically used to: determine whether at least one mode identifier corresponding to the system identifier of the current operating system includes a target identifier; if so, the target WiFi mode matches the current operating system; if not, the target WiFi mode does not match the current operating system.
[0111] In a possible design, the mode switching information includes encrypted information after encrypting the target identifier; the first acquisition module 102 is specifically used to: decrypt the encrypted information according to a preset decryption algorithm to obtain the target identifier of the target WiFi mode.
[0112] In a possible design, the receiving module 101 is specifically used to: control the NFC detection chip to turn on; and receive mode switching information sent by the NFC tag through the NFC detection chip.
[0113] The mode switching device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0114] Figure 6 The hardware structure diagram of the electronic device provided in the embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device 20 includes: a processor 201 and a memory 202,
[0115] The processor 201 and the memory 202 are connected via a bus 203 .
[0116] In a specific implementation process, the processor 201 executes the computer execution instructions stored in the memory 202, so that the processor 201 executes the above-mentioned mode switching method of the WiFi chip.
[0117] The specific implementation process of the processor 201 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0118] In the above Figure 6In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in the application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0119] The memory may include high-speed RAM memory and may also include non-volatile storage NVM, such as disk storage.
[0120] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0121] The embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the mode switching method of the WiFi chip in the above method embodiment is implemented.
[0122] The embodiment of the present application further provides a computer program product, including a computer program, which implements the mode switching method of the WiFi chip in the above method embodiment when the computer program is executed by a processor.
[0123] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0124] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0125] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, 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 an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0127] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0128] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the 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 a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0129] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A mode switching method for a WiFi chip, characterized in that: include: Receiving mode switching information sent by a near field communication NFC tag, wherein the mode switching information is used to instruct to switch the mode of the WiFi chip to a target WiFi mode; Acquire a target identifier of the target WiFi mode from the mode switching information; Obtaining a target firmware corresponding to the target identifier, and controlling the WiFi chip to run the target firmware in the target WiFi mode; The obtaining the target firmware corresponding to the target identifier includes: Determine whether the target WiFi mode matches the current operating system; If there is no match, determining a target operating system corresponding to the target WiFi mode, running the target operating system, and obtaining a target firmware corresponding to the target identifier; Determine whether the target WiFi mode matches the host bus currently connected to the WiFi chip; If there is no match, the host bus currently connected to the WiFi chip is switched to a host bus matching the target WiFi mode, wherein if at least one mode identifier corresponding to the identifier of the host bus currently connected to the WiFi chip does not include the mode identifier of the target WiFi mode, the target WiFi mode does not match the host bus currently connected to the WiFi chip.
2. The method according to claim 1, characterized in that The obtaining the target firmware corresponding to the target identifier includes: Determine whether the target identifier is the same as an identifier of the current WiFi mode of the WiFi chip; If they are not the same, the target firmware corresponding to the target identifier is obtained.
3. The method according to claim 1, characterized in that The determining whether the target WiFi mode matches the current operating system includes: Determining whether at least one mode identifier corresponding to the system identifier of the current operating system includes the target identifier; If yes, the target WiFi mode matches the current operating system; If not, the target WiFi mode does not match the current operating system.
4. The method according to claim 1 or 2, characterized in that: The mode switching information includes encrypted information after encrypting the target identifier; Acquiring the target identifier of the target WiFi mode from the mode switching information includes: The encrypted information is decrypted according to a preset decryption algorithm to obtain the target identifier of the target WiFi mode.
5. The method according to claim 1 or 2, characterized in that: The receiving mode switching information sent by a near field communication NFC tag includes: Control the NFC detection chip to turn on; The mode switching information sent by the NFC tag is received by the NFC detection chip.
6. A mode switching device for a WiFi chip, characterized in that: include: A receiving module, a first acquisition module, a second acquisition module and a control module; wherein, The receiving module is used to receive mode switching information sent by a near field communication NFC tag, where the mode switching information is used to instruct to switch the mode of the WiFi chip to a target WiFi mode; The first acquisition module is used to acquire the target identifier of the target WiFi mode from the mode switching information; The second acquisition module is used to acquire the target firmware corresponding to the target identifier; The control module is used to control the WiFi chip to run the target firmware in the target WiFi mode; The second acquisition module is specifically used for: Determine whether the target WiFi mode matches the current operating system; If there is no match, determining a target operating system corresponding to the target WiFi mode, running the target operating system, and obtaining a target firmware corresponding to the target identifier; The device further comprises: a switching module; The switching module is used to determine whether the target WiFi mode matches the host bus currently connected to the WiFi chip; if not, the host bus currently connected to the WiFi chip is switched to a host bus matching the target WiFi mode; wherein, if at least one mode identifier corresponding to the identifier of the host bus currently connected to the WiFi chip does not include the mode identifier of the target WiFi mode, the target WiFi mode does not match the host bus currently connected to the WiFi chip.
7. The device according to claim 6, characterized in that The second acquisition module is specifically used for: Determine whether the target identifier is the same as an identifier of the current WiFi mode of the WiFi chip; If they are not the same, the target firmware corresponding to the target identifier is obtained.
8. The device according to claim 6, characterized in that The second acquisition module is specifically used for: Determining whether at least one mode identifier corresponding to the system identifier of the current operating system includes the target identifier; If yes, the target WiFi mode matches the current operating system; If not, the target WiFi mode does not match the current operating system.
9. The device according to claim 6 or 7, characterized in that The mode switching information includes encrypted information after encrypting the target identifier; The first acquisition module is specifically used for: The encrypted information is decrypted according to a preset decryption algorithm to obtain the target identifier of the target WiFi mode.
10. The device according to claim 6 or 7, characterized in that The receiving module is specifically used for: Control the NFC detection chip to turn on; The mode switching information sent by the NFC tag is received by the NFC detection chip.
11. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the mode switching method of the WiFi chip according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the mode switching method of the WiFi chip according to any one of claims 1 to 5 is implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the mode switching method of the WiFi chip according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Household appliance product
CN113259920A
Household appliance product
CN113259921A