A building intercom dual-wifi implementation method, system, device and medium
Patent Information
- Application Number
- CN202610624050.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-07
- Publication Date
- 2026-09-11
AI Technical Summary
[0005]本申请提供了一种楼宇对讲机双wifi实现方法、系统、设备及介质,以解决现有的通过有线网络连接到园区公网导致楼宇对讲机的移动性和灵活性较低和安装复杂等问题
Smart Images

Figure CN122741879A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent building intercom technology, and in particular to a method, system, device and medium for implementing dual WiFi in a building intercom. Background Technology
[0002] In recent years, with the rapid development of smart technology, building intercom technology has also penetrated into the smart home field. Indoor units are no longer just simple building intercom devices, but have gradually evolved into multifunctional terminals that integrate smart home functions. They can not only realize the function of building intercom, but also connect and control smart home devices, making users' lives more comfortable and safer.
[0003] Since the indoor unit only supports single WiFi functionality and cannot connect to multiple networks, the traditional approach is to integrate both wired and wireless network capabilities into the indoor unit. Specifically, the solution involves connecting to the park's public network via a wired network to enable video intercom functionality with the door station and management center unit; and connecting to the home LAN via a wireless network to control smart home devices.
[0004] However, using wired networks has significant drawbacks: First, wired network connections result in lower mobility and flexibility for indoor units, preventing users from easily moving their indoor units; second, wired networks require cabling and connection equipment, which can complicate the installation process and increase installation and maintenance costs. Summary of the Invention
[0005] This application provides a method, system, device, and medium for implementing dual Wi-Fi in building intercoms, in order to solve the problems of low mobility and flexibility and complex installation of existing building intercoms caused by connecting to the public network of the campus via wired network.
[0006] The first aspect of this application provides a method for implementing dual Wi-Fi in a building intercom. The building intercom includes a first Wi-Fi module and a second Wi-Fi module. The method includes: after starting the building intercom, loading a first driver file corresponding to the first Wi-Fi module and a second driver file corresponding to the second Wi-Fi module; generating a first virtual network interface card (NIC) based on the first driver file; generating a second virtual NIC based on the second driver file; configuring a wireless network management service file, and setting both the first virtual NIC and the second virtual network to site mode in the wireless network management service file; creating a first Wi-Fi state machine management object and a second Wi-Fi state machine management object, binding the first Wi-Fi state machine management object to the first virtual NIC to construct a first Wi-Fi state machine, and binding the second Wi-Fi state machine management object to the second virtual NIC to construct a second Wi-Fi state machine; and according to the settings application of the Android system, controlling the first Wi-Fi module to connect to the first network and controlling the second Wi-Fi module to connect to the second network respectively by calling the first Wi-Fi state machine and the second Wi-Fi state machine according to the application.
[0007] In this embodiment, the steps of loading the first driver file corresponding to the first Wi-Fi module and the second driver file corresponding to the second Wi-Fi module include: adding instructions to load the first kernel object file and the second kernel object file in the initialization configuration file of the Android system kernel, wherein the first kernel object file corresponds to the first driver file and the second kernel object file corresponds to the second driver file, so that the instructions are automatically executed to load the first driver file and the second driver file when the building intercom is started.
[0008] In some embodiments of this application, the step of configuring the wireless network management service file includes: modifying the configuration file of the wpa_supplicant service in the Android system, and setting interface parameters for the first virtual network interface and the second virtual network interface in the configuration file, so that a single wpa_supplicant service process can manage the connection authentication of the two virtual network interfaces in site mode at the same time.
[0009] In some embodiments of this application, the steps of creating a first Wi-Fi state machine management object and a second Wi-Fi state machine management object include: creating a first client mode manager object with the role ROLE_CLIENT_PRIMARY as the first Wi-Fi state machine management object; and creating a second client mode manager object with the role ROLE_CLIENT_SECONDARY_LONG_LIVED as the second Wi-Fi state machine management object; wherein the second client mode manager object and the first client mode manager object run independently of each other at the Android system framework layer.
[0010] In some embodiments of this application, the second client mode manager object is specifically an instance of the ConcreteClientModeManager class, which independently implements the connection state switching logic of the second Wi-Fi module by binding to the second virtual network card interface, and provides an independent application programming interface to the application layer in the Android system framework layer.
[0011] In this embodiment, the steps of calling the first and second Wi-Fi state machines according to the settings application of the Android 12 system include: generating an independent graphical user interface for the second Wi-Fi module in the settings application; receiving user operations through the graphical user interface and calling the application programming interface provided by the second Wi-Fi state machine management object to realize the switching, scanning and connection control of the second Wi-Fi module.
[0012] In this embodiment, the first network is the public network of the campus, which is used to realize video intercom communication with the door station or management center; the second network is the home local area network, which is used to realize the connection and control of smart home devices.
[0013] According to a second aspect of this application, a building intercom system is provided, comprising: a driver layer, including a first Wi-Fi module and a second Wi-Fi module; a kernel layer, used to load a first driver file corresponding to the first Wi-Fi module and a second driver file corresponding to the second Wi-Fi module after the building intercom is started; a hardware abstraction layer, used to configure a wireless network management service file, and set both the first virtual network interface and the second virtual network to site mode in the wireless network management service file; a framework layer, used to create a first Wi-Fi state machine management object and a second Wi-Fi state machine management object, bind the first Wi-Fi state machine management object to the first virtual network interface to construct a first Wi-Fi state machine, and bind the second Wi-Fi state machine management object to the second virtual network interface to construct a second Wi-Fi state machine; and an application layer, used to control the first Wi-Fi module to connect to the first network and control the second Wi-Fi module to connect to the second network according to the settings application of the Android 12 system, and according to the application to call the first Wi-Fi state machine and the second Wi-Fi state machine respectively.
[0014] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in any of the first aspects of the above embodiments.
[0015] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the first aspects of the above embodiments.
[0016] This application has the following beneficial effects: This application integrates two independent Wi-Fi modules into the building intercom, and creates virtual network cards, configures site modes, and assigns independent state machine management objects to each module at the Android system level, enabling the device to connect to two different wireless networks simultaneously. This application completely replaces the traditional wired network reliance with a purely wireless connection, thus solving problems such as fixed indoor unit locations, high installation and maintenance costs, and poor flexibility caused by cabling. This makes device deployment more convenient and allows for greater mobility, significantly reducing the overall deployment and maintenance costs of large-scale building intercom systems. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0018] Figure 1 This is a flowchart illustrating an embodiment of the dual Wi-Fi implementation method for building intercoms provided in this application; Figure 2 This is a schematic diagram of the framework of an embodiment of the building intercom system provided in this application; Figure 3 This is a schematic diagram illustrating an example framework of the connection method between the two Wi-Fi modules provided in this application; Figure 4 This is an example diagram illustrating one of the application scenarios for the building intercom provided in this application; Figure 5 This is a flowchart illustrating an embodiment of the virtual network interface card generation method provided in this application; Figure 6 This is a schematic diagram of the framework of an embodiment of the electronic device provided in this application; Figure 7 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium provided in this application. Detailed Implementation
[0019] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0020] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0021] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0022] As described in the background section, the use of wired networks has significant drawbacks: First, wired network connections result in lower mobility and flexibility of indoor units, preventing users from easily moving the indoor units; second, wired networks require the laying of cables and connecting equipment, which can be complex to install, increasing installation and maintenance costs.
[0023] The inventors discovered through research that current building intercoms on the market only support single Wi-Fi functionality. Therefore, by integrating wired and wireless network functions into the building intercom, the wired network connects to the public network of the park to achieve video intercom functionality with the door station and management center station, while the wireless network connects to the home LAN to control smart home devices.
[0024] Based on the above research, in order to solve the above problems, this application improves the building intercom based on the Android system to realize dual WiFi function, which solves the problems of low mobility and flexibility of indoor units and complex installation process of wired network connection.
[0025] The technical solution of this application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0026] According to one embodiment of this application, a method for implementing dual Wi-Fi in a building intercom is proposed. The building intercom includes a first Wi-Fi module and a second Wi-Fi module, such as... Figure 1As shown, the method enables the building intercom to achieve dual Wi-Fi functionality by executing the following steps S1-S5: S1. After starting the building intercom, load the first driver file corresponding to the first Wi-Fi module and the second driver file corresponding to the second Wi-Fi module; generate a first virtual network interface card based on the first driver file; S2. Generate a second virtual network interface card based on the second driver file; S3. Configure the wireless network management service file, and set both the first virtual network interface card and the second virtual network to site mode in the wireless network management service file; S4. Create a first Wi-Fi state machine management object and a second Wi-Fi state machine management object, bind the first Wi-Fi state machine management object to the first virtual network interface card to construct the first Wi-Fi state machine, and bind the second Wi-Fi state machine management object to the second virtual network interface card to construct the second Wi-Fi state machine; S5. According to the Android system's settings application, and according to the application calling the first Wi-Fi state machine and the second Wi-Fi state machine, respectively control the first Wi-Fi module to connect to the first network and control the second Wi-Fi module to connect to the second network.
[0027] It should be noted that a state machine is a computational model used to describe the transitions and behaviors of a building intercom between different states.
[0028] As described above, the embodiments of this application integrate two independent WiFi modules into the building intercom, and create virtual network cards, configure site modes, and assign independent state machine management objects to each module at the Android system level, thereby enabling the device to connect to two different wireless networks simultaneously. This application completely replaces the traditional reliance on wired networks with a purely wireless connection, thus solving problems such as fixed indoor unit locations, high installation and maintenance costs, and poor flexibility caused by cabling. This makes device deployment more convenient and allows for greater mobility, significantly reducing the overall deployment and maintenance costs of large-scale building intercom systems.
[0029] In this embodiment, step S1 includes: adding instructions to load a first kernel object file and a second kernel object file in the initialization configuration file of the Android system kernel, wherein the first kernel object file corresponds to the first driver file and the second kernel object file corresponds to the second driver file, so that the instructions are automatically executed to load the first driver file and the second driver file when the building intercom is started.
[0030] As can be seen from the above description, the above embodiments of this application realize the automatic loading of dual WiFi drivers by pre-setting loading instructions in the system kernel initialization configuration, ensuring that the dual wireless modules can be ready immediately and reliably after the building intercom is started, thereby establishing a stable dual network connection.
[0031] In this embodiment, step S3 includes: modifying the configuration file of the wpa_supplicant service in the Android system, setting interface parameters for the first virtual network interface and the second virtual network interface in the configuration file, so that a single wpa_supplicant service process can manage the connection authentication of the two virtual network interfaces in site mode at the same time.
[0032] wpa_supplicant is an open-source WiFi connection manager used to implement WiFi network connection and security functions on Linux and other operating systems. It is responsible for implementing WiFi security protocol authentication and encrypted connection in client devices (such as mobile phones, computers, and embedded devices).
[0033] As described above, the embodiments of this application modify the configuration of the core network service of the Android system, enabling a single wpa_supplicant service process to manage two virtual network cards simultaneously. This effectively simplifies the system architecture, reduces resource overhead, and ensures the unified, efficient, and stable operation of the dual Wi-Fi connection authentication process.
[0034] In this embodiment, step S4 includes: A first client mode manager object with the role ROLE_CLIENT_PRIMARY is created as the first Wi-Fi state machine management object; a second client mode manager object with the role ROLE_CLIENT_SECONDARY_LONG_LIVED is created as the second Wi-Fi state machine management object; wherein, the second client mode manager object and the first client mode manager object run independently of each other in the Android system framework layer.
[0035] In this context, `ROLE_CLIENT_PRIMARY` is a role defined in the Android WiFi framework, representing the primary client. It is the state machine manager responsible for managing the primary, priority WiFi connection. Typically, it manages and maintains the WiFi network that the user actively connects to or that the system defaults to (such as home or office networks). It has higher system priority and is the core of the WiFi functionality. `ROLE_CLIENT_SECONDARY_LONG_LIVED` is also a role defined within the framework, representing a long-lived secondary client. It was introduced to support features like "dual WiFi" in this embodiment. This role manager runs independently of the primary client and is dedicated to establishing and maintaining a long-term, stable second WiFi connection (e.g., a channel specifically for device background data synchronization or specific application traffic). Its design goal is to supplement the primary connection without competing for control, thus achieving parallel management and coexistence of dual network connections at the system level.
[0036] As described above, the embodiments of this application achieve independent and parallel management of dual WiFi connections by creating independently running ROLE_CLIENT_PRIMARY and ROLE_CLIENT_SECONDARY_LONG_LIVED role managers. This ensures that the high priority and stability of the primary connection are not affected, while providing a dedicated, long-term channel for the second connection, effectively improving network throughput, reducing latency, and supporting differentiated service traffic scheduling.
[0037] In this embodiment, the second client mode manager object is specifically an instance of the ConcreteClientModeManager class. It independently implements the connection state switching logic of the second Wi-Fi module by binding to the second virtual network card interface, and provides an independent application programming interface to the application layer in the Android system framework layer.
[0038] As described above, the embodiments of this application implement the second client mode manager as an independent instance bound to the second virtual network card interface, thereby decoupling the control of the connection status of the second Wi-Fi module from the building intercom. This provides an independent API interface for the application layer, enabling upper-layer applications to directly and flexibly manage and use the second Wi-Fi connection, thus supporting more refined network resource scheduling and dual-channel concurrent services.
[0039] In this embodiment, step S5 includes: generating an independent graphical user interface for the second Wi-Fi module in the settings application; receiving user operations through the graphical user interface and calling the application programming interface provided by the second Wi-Fi state machine management object to realize the switching, scanning and connection control of the second Wi-Fi module.
[0040] As described above, the embodiments of this application provide an independent graphical user interface for the second Wi-Fi module in the system settings, allowing it to directly call the dedicated API of the second Wi-Fi state machine manager. This enables intuitive, convenient, and completely independent user control over the second Wi-Fi connection. This significantly improves the ease of management and user autonomy of the dual Wi-Fi function, allowing users to flexibly switch, scan, and connect to the second network as if managing the main network.
[0041] In this embodiment, the first network is the public network of the campus, which is used to realize video intercom communication with the door station or management center; the second network is the home local area network, which is used to realize the connection and control of smart home devices.
[0042] In this embodiment, the first Wi-Fi module is an SKI.WB800DS2.1 module, and the second Wi-Fi module is an SKI.W7601.1 module.
[0043] The SKI.WB800DS2.1 module, serving as the high-performance main communication module, is dedicated to accessing the campus public network (the first network). Its powerful signal processing capabilities and stability ensure low-latency, high-definition transmission of audio and video streams during video intercoms with door stations and the management center. The SKI.W7601.1 module, on the other hand, is a dedicated local connection module responsible for establishing and managing the home LAN (the second network). Its design emphasizes low power consumption, multi-device connectivity, and efficient intranet data exchange, thus reliably connecting and controlling various smart home devices. These two modules, each with its specific function, achieve physical isolation and parallel operation between critical security communication and the control of a vast number of smart home devices.
[0044] In addition, this application also proposes a building intercom system, such as Figure 2As shown, the system includes: a driver layer, comprising a first Wi-Fi module and a second Wi-Fi module; a kernel layer, used to load a first driver file corresponding to the first Wi-Fi module and a second driver file corresponding to the second Wi-Fi module after the building intercom is started; a hardware abstraction layer, used to configure a wireless network management service file, and set both the first virtual network interface and the second virtual network to site mode in the wireless network management service file; a framework layer, used to create a first Wi-Fi state machine management object and a second Wi-Fi state machine management object, bind the first Wi-Fi state machine management object to the first virtual network interface to construct the first Wi-Fi state machine, and bind the second Wi-Fi state machine management object to the second virtual network interface to construct the second Wi-Fi state machine; and an application layer, used to control the first Wi-Fi module to connect to the first network and control the second Wi-Fi module to connect to the second network according to the settings application of the Android 12 system, and according to the application calling the first Wi-Fi state machine and the second Wi-Fi state machine respectively.
[0045] In summary, such as Figure 4 As shown, the above embodiments of this application aim to introduce a second WiFi module on the basis of the single WiFi application framework of the Android system so that the building intercom can support the dual WiFi function, and meet the scenario that the building intercom can connect to the public network of the park through WiFi1 for video intercom function, while also connecting to the home LAN through WiFi2 to realize the control of smart home devices.
[0046] In this embodiment, the dual Wi-Fi logic is implemented in five layers: driver layer, kernel layer, hardware abstraction layer (HAL layer), framework layer, and application layer.
[0047] In this embodiment, the driver layer needs to select two compatible Wi-Fi modules and connect them to the main controller via a hardware communication interface, such as... Figure 3 As shown.
[0048] In this embodiment, the kernel layer ports two Wi-Fi drivers provided by the first and second Wi-Fi module vendors. Two .ko files, wifi1.ko and wifi2.ko (i.e., the first and second driver files), are generated through compilation on the Linux system. Instructions for loading wifi1.ko and wifi2.ko files (insmod wifi1.ko and insmod wifi2.ko) are added to the init.insmod.cfg file to ensure that the system can execute these instructions correctly during startup to load the drivers. After successful driver loading, the drivers are matched with the corresponding Wi-Fi modules to generate two virtual network interface cards (wlan0 and wlan1) for use by the hardware abstraction layer, such as... Figure 5 As shown.
[0049] In this embodiment, the hardware abstraction layer modifies the startup parameters of the wpa_supplicant service process and sets the parameters of the two virtual network interface cards, wlan0 and wlan1, in the wpa_config.txt configuration file, so that both the wifi1 module and the wifi2 module work in station mode.
[0050] In this embodiment, the framework layer instantiates a ConcreteClientModeManager object with the role of ROLE_CLIENT_SECONDARY_LONG_LIVED, and establishes a binding relationship with the second Wi-Fi module by binding it to the wlan1 virtual network card interface. This object mainly implements the state machine of the second Wi-Fi module, is responsible for implementing the switching logic of different connection states of the second Wi-Fi module, and provides the application layer with the on / off and connection API interface of the second Wi-Fi module, so that the first Wi-Fi module and the second Wi-Fi module are independent of each other in the framework layer.
[0051] In this embodiment, the application layer adds a graphical user interface for the second Wi-Fi module based on the existing system settings application of Android 12, and manages and controls Wi-Fi 2 by calling the API interface provided by the framework layer.
[0052] In summary, this application reduces the cost of physical cables and connection equipment required for wired network connections by employing a wireless network connection. It also avoids the manpower and time costs associated with maintaining and replacing physical connections. For large-scale network deployments, especially building intercom systems, wireless connectivity can save significant costs and resources.
[0053] Based on the inventive concept of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method described in the above embodiments. The following is in conjunction with... Figure 6 Please provide a detailed explanation.
[0054] like Figure 6 As shown, it illustrates the electronic device 100 of this application, which may specifically include a processor 110 and a memory 120. The memory 120 is coupled to the processor 110.
[0055] Processor 110 is used to control the operation of electronic devices. Processor 110 may also be referred to as a CPU (Central Processing Unit). Processor 110 may be an integrated circuit chip with signal processing capabilities. Processor 110 may also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The general-purpose processor may be a microprocessor, or processor 110 may be any conventional processor.
[0056] The memory 120 is used to store computer programs and may be RAM, ROM, or other types of storage terminals. Specifically, the memory 120 may include one or more computer-readable storage media, which may be non-transitory or transient. The memory 120 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage terminals or flash memory terminals. In some embodiments, the non-transitory computer-readable storage media in the memory 120 is used to store at least one line of program code.
[0057] The processor 110 is used to execute computer programs stored in the memory 120 to implement the methods described in the various method embodiments of this application.
[0058] In some embodiments, the electronic device may further include a peripheral terminal interface 130 and at least one peripheral terminal. The processor 110, memory 120, and peripheral terminal interface 130 may be connected via a bus or signal line. Each peripheral terminal may be connected to the peripheral terminal interface 130 via a bus, signal line, or circuit board. Specifically, the peripheral terminal includes at least one of a radio frequency circuit 140, a display screen 150, an audio circuit 160, and a power supply 170.
[0059] The peripheral terminal interface 130 can be used to connect at least one I / O (Input / Output) related peripheral terminal to the processor 110 and the memory 120. In some embodiments, the processor 110, memory 120 and peripheral terminal interface 130 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 110, memory 120 and peripheral terminal interface 130 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0060] The radio frequency (RF) circuit 140 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 140 communicates with communication networks and other IoT devices via electromagnetic signals; it is the communication circuit of the electronic device. The RF circuit 140 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 140 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, an operator identification module card, etc. The RF circuit 140 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 140 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0061] Display screen 150 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 150 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 110 for processing. In this case, display screen 150 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 150, located on the front panel of the electronic device; in other embodiments, there may be at least two display screens, located on different surfaces of the electronic device or in a folded design; in still other embodiments, display screen 150 may be a flexible display screen, located on a curved or folded surface of the electronic device. Furthermore, display screen 150 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. Display screen 150 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0062] The audio circuit 160 may include a microphone and a speaker. The microphone is used to collect sound waves from the operator and the environment, converting the sound waves into electrical signals that are input to the processor 110 for processing, or input to the radio frequency circuit 140 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned in a different part of the electronic device. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 110 or the radio frequency circuit 140 into sound waves. The speaker may be a conventional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 160 may also include a headphone jack.
[0063] Power supply 170 is used to supply power to various components in an electronic device. Power supply 170 can be alternating current, direct current, a disposable battery, or a rechargeable battery. When power supply 170 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0064] For a detailed description of the functions and execution processes of each functional module or component in the electronic device embodiments of this application, please refer to the descriptions in the above-described method embodiments of this application, which will not be repeated here.
[0065] In the embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the embodiments of the electronic devices described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some data may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0066] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0067] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0068] Based on the inventive concept of the above embodiments, this application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, performs the steps of the method described in any of the above embodiments. The following is in conjunction with... Figure 7 This describes the execution process of the above embodiments on a computer-readable storage medium.
[0069] like Figure 7As shown, it illustrates the computer-readable storage medium of this application. The integrated units described above, if implemented as software functional units and sold or used as independent products, can be stored in the computer-readable storage medium 200. Based on this understanding, the technical solution of this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions / computer programs to cause an Internet of Things device (which may be a personal computer, server, or network terminal, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, as well as electronic terminals such as computers, mobile phones, laptops, tablets, and cameras that have the aforementioned storage media.
[0070] The execution process of program data in a computer-readable storage medium can be described with reference to the above-described method embodiments of this application, and will not be repeated here.
[0071] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
[0072] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
Claims
1. A method for implementing dual Wi-Fi in a building intercom, characterized in that, The building intercom includes a first Wi-Fi module and a second Wi-Fi module, and the method includes: After the building intercom is started, the first driver file corresponding to the first Wi-Fi module and the second driver file corresponding to the second Wi-Fi module are loaded. Based on the first driver file, generate the first virtual network interface card; based on the second driver file, generate the second virtual network interface card. Configure the wireless network management service file, and set both the first virtual network interface and the second virtual network to site mode in the wireless network management service file; Create a first Wi-Fi state machine management object and a second Wi-Fi state machine management object. Bind the first Wi-Fi state machine management object to the first virtual network interface to construct the first Wi-Fi state machine. Bind the second Wi-Fi state machine management object to the second virtual network interface to construct the second Wi-Fi state machine. According to the Android 12 system settings application, the first Wi-Fi state machine and the second Wi-Fi state machine are called by the application to control the first Wi-Fi module to connect to the first network and to control the second Wi-Fi module to connect to the second network, respectively.
2. The method for implementing dual Wi-Fi in a building intercom based on the Android system according to claim 1, characterized in that, The step of loading the first driver file corresponding to the first Wi-Fi module and the second driver file corresponding to the second Wi-Fi module includes: adding instructions to load the first kernel object file and the second kernel object file in the initialization configuration file of the Android system kernel, wherein the first kernel object file corresponds to the first driver file and the second kernel object file corresponds to the second driver file, so that the instructions are automatically executed to load the first driver file and the second driver file when the building intercom is started.
3. The method for implementing dual Wi-Fi in a building intercom based on the Android system according to claim 1, characterized in that, The steps of configuring the wireless network management service file include: modifying the configuration file of the wpa_supplicant service in the Android system, and setting interface parameters for the first virtual network interface and the second virtual network interface in the configuration file, so that a single wpa_supplicant service process can manage the connection authentication of the two virtual network interfaces in site mode at the same time.
4. The method for implementing dual Wi-Fi in a building intercom based on an Android system according to any one of claims 1-3, characterized in that, The steps of creating the first Wi-Fi state machine management object and the second Wi-Fi state machine management object include: creating a first client mode manager object with the role ROLE_CLIENT_PRIMARY as the first Wi-Fi state machine management object; creating a second client mode manager object with the role ROLE_CLIENT_SECONDARY_LONG_LIVED as the second Wi-Fi state machine management object; wherein, the second client mode manager object and the first client mode manager object run independently of each other in the Android system framework layer.
5. The method for implementing dual Wi-Fi in a building intercom based on the Android system according to claim 4, characterized in that, The second client mode manager object is specifically an instance of the ConcreteClientModeManager class. It independently implements the connection state switching logic of the second Wi-Fi module by binding to the second virtual network card interface, and provides an independent application programming interface to the application layer in the Android system framework layer.
6. The method for implementing dual Wi-Fi in a building intercom based on an Android system according to claim 1 or 4, characterized in that, The step of using the settings application of the Android 12 system and calling the first Wi-Fi state machine and the second Wi-Fi state machine according to the application includes: generating an independent graphical user interface for the second Wi-Fi module in the settings application; receiving user operations through the graphical user interface and calling the application programming interface provided by the second Wi-Fi state machine management object to realize the switching, scanning and connection control of the second Wi-Fi module.
7. The method for implementing dual Wi-Fi in a building intercom based on the Android system according to claim 1, characterized in that, The first network is the park's public network, used to enable video intercom communication with the door station or management center; the second network is a home LAN, used to enable connection and control with smart home devices.
8. A building intercom system based on the dual Wi-Fi implementation method for building intercoms as described in any one of claims 1-7, characterized in that, The building intercom system includes: The driver layer includes a first Wi-Fi module and a second Wi-Fi module; The kernel layer is used to load the first driver file corresponding to the first Wi-Fi module and the second driver file corresponding to the second Wi-Fi module after the building intercom is started. The hardware abstraction layer is used to configure the wireless network management service file, and in the wireless network management service file, both the first virtual network interface and the second virtual network are set to site mode. The framework layer is used to create a first Wi-Fi state machine management object and a second Wi-Fi state machine management object, bind the first Wi-Fi state machine management object to the first virtual network interface to construct the first Wi-Fi state machine, and bind the second Wi-Fi state machine management object to the second virtual network interface to construct the second Wi-Fi state machine; The application layer is used to control the first Wi-Fi module to connect to the first network and the second Wi-Fi module to connect to the second network, respectively, by calling the first Wi-Fi state machine and the second Wi-Fi state machine according to the settings application of the Android system.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method as described in any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.