Single-module multi-type WiFi connection switching method and system and related equipment
By enabling multiple protocols in a single WiFi module and adopting time-sharing multiplexing listening technology, the protocol incompatibility problem during WiFi devices is solved, automatic protocol matching and efficient data transmission are achieved, and user experience and connection efficiency are improved.
Patent Information
- Application Number
- CN202411350340.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-09-26
AI Technical Summary
The protocols of existing WiFi network devices are incompatible when connected, and are inconvenient to use, making it difficult to use different connection methods such as WiFi P2P and WiFi direct connection at the same time.
By enabling data connections of WiFi P2P, WiFi direct connection and WiFi SoftAP protocols in a single WiFi module, the connection request is monitored in a time-sharing multiplexing method and data transmission is carried out according to the request type, so as to realize adaptive switching and automatic matching of the protocol.
Improves the compatibility of the device on different WiFi connection types, simplifies the user experience, reduces the connection process, and improves transmission efficiency.
Smart Images

Figure CN119110433A_ABST
Abstract
Description
Technical Field
[0001] The present invention is applicable to the field of wireless network technology, and in particular relates to a single-module multi-type WiFi connection switching method, system and related equipment. Background Art
[0002] WiFi P2P (Peer-to-Peer) is a protocol released by the WiFi Alliance. This protocol allows devices in a WiFi wireless network to connect to each other without going through a wireless router, and directly realizes point-to-point communication between two devices through the WiFi wireless network. The principle of this technology is similar to the communication method based on AP (access point). Devices that support WiFi P2P can transfer data to each other within the same group.
[0003] However, the WiFi P2P protocol is a complex and time-consuming process, which includes the basic steps of discovery, negotiation, and configuration. Different devices are prone to negotiation and configuration failures, or connection problems due to protocol compatibility. Related technologies have proposed a WiFi direct connection method to optimize the traditional WiFi device connection method, and implemented a device direct connection method that is different from the WiFi P2P protocol. Compared with WiFi P2P, WiFi direct connection can reduce the connection process and thus optimize the connection efficiency.
[0004] In addition, the prior art also has a method of using WiFi Softap to achieve data transmission within WiFi. WiFi Softap is a technology that implements AP functions through software. It can replace the AP in a wireless network, thereby reducing the cost of wireless networking. The wireless device finds the SSID of WiFi Softap and achieves direct device connection by entering PSK, thereby achieving data transmission.
[0005] Obviously, the WiFi P2P, WiFi Softap and WiFi direct connection methods in the above methods are different network protocols. Therefore, the network connections implemented using the above methods are not compatible with each other. It is difficult for the same device to use two connection methods for data transmission at the same time, which is inconvenient for users. Summary of the invention
[0006] The present invention provides a single-module multi-type WiFi connection switching method, system and related equipment, aiming to solve the technical problems of protocol incompatibility and inconvenience in use when connecting devices within the existing WiFi network.
[0007] In order to solve the above technical problems, in a first aspect, the present invention provides a single-module multi-type WiFi connection switching method, comprising the following steps:
[0008] S101, initializing a WiFi module of a device and enabling the WiFi module;
[0009] S102, according to the WiFi module, enabling a first data connection based on the WiFi P2P protocol based on the first WiFi channel, and at the same time, enabling a second data connection based on the WiFi direct protocol based on the second WiFi channel, and enabling a third data connection based on the WiFi SoftAP based on the third WiFi channel;
[0010] S103: Based on a time-division multiplexing method, monitor the connection request on the first WiFi channel using the first data connection, monitor the connection request on the second WiFi channel using the second data connection, and monitor the connection request on the third WiFi channel using the third data connection;
[0011] S104, performing data transmission according to the result of the connection request monitoring of the first WiFi channel, the result of the connection request monitoring of the second WiFi channel, and the result of the connection request monitoring of the third WiFi channel, wherein:
[0012] 1041. When the first data connection monitors a connection request on the first WiFi channel, suspend the second data connection and the third data connection, and perform data transmission based on the first data connection with the device sending the connection request based on the WiFi module;
[0013] 1042. When the second data connection monitors a connection request on the second WiFi channel, suspend the first data connection and the third data connection, and perform data transmission based on the second data connection with the device sending the connection request based on the WiFi module;
[0014] 1043. When the third data connection monitors a connection request on the third WiFi channel, suspend the first data connection and the second data connection, and perform data transmission based on the third data connection with the device that sends the connection request based on the WiFi module.
[0015] Furthermore, the single-module multi-type WiFi connection switching method further includes the following steps:
[0016] S105: After completing the data transmission of the first data connection, or completing the data transmission of the second data connection, or completing the data transmission of the third data connection based on the WiFi module, return to step S103.
[0017] Furthermore, in step S103, when the second data connection is used to request monitoring on the second WiFi channel, the monitored data is preset action frame data, and the preset action frame data is based on the IEEE 802.11 format frame, wherein:
[0018] The packet header of the preset action frame data includes an organizational unique identifier for identifying a direct connection between the WiFi module and the device sending the connection request, and the data of the preset action frame data includes an action frame creation time, a length of data to be received, and a queuing time for transmission delay synchronization.
[0019] Furthermore, in step 1042, when data transmission based on the second data connection is performed based on the WiFi module, the transmitted data is preset data frame data, and the preset data frame data is based on an IEEE 802.11 format frame, wherein:
[0020] The To DS and From DS field flags of the preset data frame data are set to 0, the packet header of the preset data frame data includes an organizational unique identifier for identifying a direct connection between the WiFi module and the device sending the connection request, and the data of the preset data frame data includes a transmission number and communication data corresponding to the transmission number.
[0021] Furthermore, the first WiFi channel includes one WiFi channel, and the second WiFi channel includes at least one WiFi channel.
[0022] In a second aspect, the present invention further provides a single-module multi-type WiFi connection switching system, comprising:
[0023] An initialization module, used to initialize the WiFi module of the device and enable the WiFi module;
[0024] A waiting module is used to enable a first data connection based on a WiFi P2P protocol based on a first WiFi channel according to the WiFi module, and at the same time, enable a second data connection based on a WiFi direct protocol based on a second WiFi channel, and enable a third data connection based on a WiFi SoftAP based on a third WiFi channel;
[0025] a monitoring module, configured to monitor a connection request on the first WiFi channel using the first data connection based on a time-division multiplexing method, and at the same time, monitor a connection request on the second WiFi channel using the second data connection, and monitor a connection request on the third WiFi channel using the third data connection;
[0026] A transmission module, configured to transmit data according to a result of monitoring a connection request of the first WiFi channel, a result of monitoring a connection request of the second WiFi channel, and a result of monitoring a connection request of the third WiFi channel, wherein:
[0027] When the first data connection monitors a connection request on the first WiFi channel, suspending the second data connection and the third data connection, and performing data transmission based on the first data connection with the device sending the connection request based on the WiFi module;
[0028] When the second data connection monitors a connection request on the second WiFi channel, suspending the first data connection and the third data connection, and performing data transmission based on the second data connection with the device sending the connection request based on the WiFi module;
[0029] When the third data connection detects a connection request on the third WiFi channel, the first data connection and the second data connection are suspended, and data transmission based on the third data connection is performed with the device sending the connection request based on the WiFi module.
[0030] Furthermore, the single-module multi-type WiFi connection switching system further includes:
[0031] The self-switching module is used to return to the monitoring module after completing the data transmission of the first data connection, completing the data transmission of the second data connection, or completing the data transmission of the third data connection based on the WiFi module.
[0032] In a third aspect, the present invention also provides a computer device, comprising: a memory, a processor, and a single-module multi-type WiFi connection switching program stored in the memory and executable on the processor, wherein when the processor executes the single-module multi-type WiFi connection switching program, the processor implements the steps in the single-module multi-type WiFi connection switching method as described in any one of the above embodiments.
[0033] In a fourth aspect, the present invention also provides a computer-readable storage medium, on which a single-module multi-type WiFi connection switching program is stored. When the single-module multi-type WiFi connection switching program is executed by a processor, the steps in the single-module multi-type WiFi connection switching method described in any one of the above embodiments are implemented.
[0034] The beneficial effect achieved by the present invention is that a method capable of adaptively switching between WiFi direct connection, WiFi Softap and WiFiP2P connection is proposed. The method realizes multiple WiFi connection modes in different channels based on a single WiFi module, monitors external device connection requests in a time-division multiplexing manner, and realizes corresponding WiFi data direct connection, WiFi Softap, WiFiP2P data transmission according to the request type, and active switching after the transmission is completed. The device realized based on the method has better compatibility in WiFi connection type, realizes automatic protocol matching connection, and improves user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a schematic diagram of the steps of the method for switching multiple types of WiFi connections in a single module provided by an embodiment of the present invention;
[0036] Figure 2 It is a structural schematic diagram of a single-module multi-type WiFi connection switching system provided by an embodiment of the present invention;
[0037] Figure 3 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0039] Please refer to Figure 1 , Figure 1 1 is a schematic diagram of the steps of a method for switching multiple types of WiFi connections in a single module provided by an embodiment of the present invention. The method for switching multiple types of WiFi connections in a single module includes the following steps:
[0040] S101, initializing a WiFi module of a device and enabling the WiFi module;
[0041] S102, according to the WiFi module, enabling a first data connection based on the WiFi P2P protocol based on the first WiFi channel, and at the same time, enabling a second data connection based on the WiFi direct protocol based on the second WiFi channel, and enabling a third data connection based on the WiFi Softap based on the third WiFi channel;
[0042] S103: Based on a time-division multiplexing method, monitor the connection request on the first WiFi channel using the first data connection, monitor the connection request on the second WiFi channel using the second data connection, and monitor the connection request on the third WiFi channel using the third data connection;
[0043] S104, performing data transmission according to the result of the connection request monitoring of the first WiFi channel, the result of the connection request monitoring of the second WiFi channel, and the result of the connection request monitoring of the third WiFi channel, wherein:
[0044] 1041. When the first data connection monitors a connection request on the first WiFi channel, suspend the second data connection and the third data connection, and perform data transmission based on the first data connection with the device sending the connection request based on the WiFi module;
[0045] 1042. When the second data connection monitors a connection request on the second WiFi channel, suspend the first data connection and the third data connection, and perform data transmission based on the second data connection with the device sending the connection request based on the WiFi module;
[0046] 1043. When the third data connection monitors a connection request on the third WiFi channel, suspend the first data connection and the second data connection, and perform data transmission based on the third data connection with the device that sends the connection request based on the WiFi module.
[0047] After the above step S104, the single-module multi-type WiFi connection switching method further includes the following steps:
[0048] S105: After completing the data transmission of the first data connection, or completing the data transmission of the second data connection, or completing the data transmission of the third data connection based on the WiFi module, return to step S103.
[0049] Specifically, in step S103, when the second data connection is used to request monitoring on the second WiFi channel, the monitored data is preset action frame data, and the preset action frame data is based on the IEEE 802.11 format frame, wherein:
[0050] The packet header of the preset action frame data includes an organizational unique identifier for identifying a direct connection between the WiFi module and the device sending the connection request, and the data of the preset action frame data includes an action frame creation time, a length of data to be received, and a queuing time for transmission delay synchronization.
[0051] Correspondingly, in step 1042, when data transmission based on the second data connection is performed based on the WiFi module, the transmitted data is preset data frame data, and the preset data frame data is based on the IEEE 802.11 format frame, wherein:
[0052] The To DS and From DS field flags of the preset data frame data are set to 0, the packet header of the preset data frame data includes an organizational unique identifier (OUI) for identifying a direct connection between the WiFi module and the device sending the connection request, and the data of the preset data frame data includes a transmission number and communication data corresponding to the transmission number.
[0053] Specifically, please refer to Table 1 and Table 2, which are respectively the data packet fields of the preset action frame data and the preset data frame data provided in the embodiments of the present invention, and the preset action frame data and the preset data frame data are both implemented based on the IEEE802.11 format frame.
[0054] Table 1 Preset action frame data packet fields
[0055]
[0056] As shown in Table 1 above, the preset action frame data in the embodiment of the present invention uses a custom IEEE 802.11 action frame. Based on the protocol, an organizational unique identifier can be used to implement an IEEE802.11 frame with any payload during implementation. The action frame data implemented based on IEEE 802.11 in the embodiment of the present invention can extend a fixed-size header and multiple IE fields. The fixed header mainly includes static values, such as a specific BSSID, OUI, version and type; the IE consists of a 1-byte type field and a 2-byte length field, and the length field indicates the length of the subsequent data frame (the length of the data to be received). The two timestamps represent the creation time of the action frame. According to the timestamp, it can be determined whether the information contained in the action frame data is the latest (TTx, Target), as well as the actual transmission delay synchronization queuing time (TTx, PHY). The difference between the creation time and the queuing time is close to the transmission delay of the sending device, which can be used to achieve data synchronization during implementation.
[0057] Table 2 Preset data frame data packet fields
[0058]
[0059]
[0060] Similarly, the embodiment of the present invention uses IEEE 802.11 data frames for data transmission. Among them, the To DS and From DS flags in Framecontrol are set to 0, which means that in actual data transmission, these data frames will be directly addressed, and the three address fields are used for the destination, source and destination, and BSSID respectively. As shown in Table 2 above, the BSSID in the data frame data is always a fixed address, which is used to assign the WiFi module or the corresponding connected device with OUI; the LLC header contains different OUIs and protocol IDs in the SNAP part, and these IEs are part of the IEEE 802.11 standard; the data header mainly consists of a sequence of transmission protocol numbers and EtherType. It can be seen that, excluding the part of the protocol standard, the data header and the communication data (Data) actually transmitted constitute the data frame data in the embodiment of the present invention.
[0061] In the embodiment of the present invention, the device including the WiFi module serves as a receiving device, and after receiving the preset action frame data, establishes a data connection with a corresponding device that has sent the preset action frame data, thereby completing a direct connection interaction based on WiFi.
[0062] The sub-protocol matching transmission based on different types of WiFi transmission protocols (WiFi direct connection, WiFi Softap and P2P protocol) enables the device based on this method to be compatible with different types of WiFi connection requests. For the screen projection receiving device, the method of the embodiment of the present invention provides a variety of connection methods for screen projection. At the same time, different connection methods can be switched arbitrarily during use, which improves the convenience of users using screen projection. At the same time, the WiFi direct connection method in the above method reduces the discovery and negotiation process compared to the P2P protocol transmission, and improves the transmission efficiency of screen projection.
[0063] In the embodiment of the present invention, the first WiFi channel includes one WiFi channel, and the second WiFi channel includes at least one WiFi channel. It can be understood that in the embodiment of the present invention, the request data monitoring is performed in a time-division multiplexing manner, so the monitoring of the first WiFi channel and the second WiFi channel is performed by the WiFi module simultaneously on different channels. Such a design ensures that WiFi P2P, WiFi Softap or WiFi direct connection also have high real-time performance in a mutually compatible scenario (at the level of the same device completing different types of WiFi data transmission).
[0064] The beneficial effect achieved by the present invention is that a method capable of adaptively switching between WiFi direct connection, WiFi Softap and WiFiP2P connection is proposed. The method realizes multiple WiFi connection modes in different channels based on a single WiFi module, monitors external device connection requests in a time-division multiplexing manner, and realizes corresponding WiFi data direct connection, WiFi Softap, WiFiP2P data transmission according to the request type, and active switching after the transmission is completed. The device realized based on the method has better compatibility in WiFi connection type, realizes automatic protocol matching connection, and improves user experience.
[0065] The embodiment of the present invention also provides a single-module multi-type WiFi connection switching system 200, please refer to Figure 2 , Figure 2 : is a schematic diagram of the structure of a single-module multi-type WiFi connection switching system provided in an embodiment of the present invention. The single-module multi-type WiFi connection switching system 200 includes:
[0066] Initialization module 201, used to initialize the WiFi module of the device and enable the WiFi module;
[0067] A waiting module 202 is used for enabling, according to the WiFi module, a first data connection based on a WiFi P2P protocol based on a first WiFi channel, and at the same time, enabling a second data connection based on a WiFi direct protocol based on a second WiFi channel, and enabling a third data connection based on a WiFi Softap based on a third WiFi channel;
[0068] A monitoring module 203 is used to monitor the connection request on the first WiFi channel using the first data connection based on a time-division multiplexing method, and at the same time, monitor the connection request on the second WiFi channel using the second data connection, and monitor the connection request on the third WiFi channel using the third data connection;
[0069] The transmission module 204 is used to transmit data according to the result of the connection request monitoring of the first WiFi channel, the result of the connection request monitoring of the second WiFi channel, and the result of the connection request monitoring of the third WiFi channel, wherein:
[0070] When the first data connection monitors a connection request on the first WiFi channel, suspending the second data connection and the third data connection, and performing data transmission based on the first data connection with the device sending the connection request based on the WiFi module;
[0071] When the second data connection monitors a connection request on the second WiFi channel, suspending the first data connection and the third data connection, and performing data transmission based on the second data connection with the device sending the connection request based on the WiFi module;
[0072] When the third data connection detects a connection request on the third WiFi channel, the first data connection and the second data connection are suspended, and data transmission based on the third data connection is performed with the device sending the connection request based on the WiFi module.
[0073] Furthermore, the single-module multi-type WiFi connection switching system further includes:
[0074] The self-switching module 205 is configured to return to the monitoring module 203 after completing the data transmission of the first data connection, the data transmission of the second data connection, or the data transmission of the third data connection based on the WiFi module.
[0075] The single-module multi-type WiFi connection switching system 200 can implement the steps in the single-module multi-type WiFi connection switching method in the above embodiment, and can achieve the same technical effects. Please refer to the description in the above embodiment and will not be repeated here.
[0076] The embodiment of the present invention also provides a computer device, please refer to Figure 3 , Figure 3 300 is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. The computer device 300 includes: a memory 302, a processor 301, and a single-module multi-type WiFi connection switching program stored in the memory 302 and executable on the processor 301.
[0077] The processor 301 calls the single-module multi-type WiFi connection switching program stored in the memory 302 to execute the steps of the single-module multi-type WiFi connection switching method provided in the embodiment of the present invention. Figure 1 , specifically including the following steps:
[0078] S101, initializing a WiFi module of a device and enabling the WiFi module;
[0079] S102, according to the WiFi module, enabling a first data connection based on the WiFi P2P protocol based on the first WiFi channel, and at the same time, enabling a second data connection based on the WiFi direct protocol based on the second WiFi channel, and enabling a third data connection based on the WiFi Softap based on the third WiFi channel;
[0080] S103: Based on a time-division multiplexing method, monitor the connection request on the first WiFi channel using the first data connection, monitor the connection request on the second WiFi channel using the second data connection, and monitor the connection request on the third WiFi channel using the third data connection;
[0081] S104, performing data transmission according to the result of the connection request monitoring of the first WiFi channel, the result of the connection request monitoring of the second WiFi channel, and the result of the connection request monitoring of the third WiFi channel, wherein:
[0082] 1041. When the first data connection monitors a connection request on the first WiFi channel, suspend the second data connection and the third data connection, and perform data transmission based on the first data connection with the device sending the connection request based on the WiFi module;
[0083] 1042. When the second data connection monitors a connection request on the second WiFi channel, suspend the first data connection and the third data connection, and perform data transmission based on the second data connection with the device sending the connection request based on the WiFi module;
[0084] 1043. When the third data connection monitors a connection request on the third WiFi channel, suspend the first data connection and the second data connection, and perform data transmission based on the third data connection with the device that sends the connection request based on the WiFi module.
[0085] After the above step S104, the single-module multi-type WiFi connection switching method further includes the following steps:
[0086] S105: After completing the data transmission of the first data connection, or completing the data transmission of the second data connection, or completing the data transmission of the third data connection based on the WiFi module, return to step S103.
[0087] Specifically, in step S103, when the second data connection is used to request monitoring on the second WiFi channel, the monitored data is preset action frame data, and the preset action frame data is based on the IEEE 802.11 format frame, wherein:
[0088] The packet header of the preset action frame data includes an organizational unique identifier for identifying a direct connection between the WiFi module and the device sending the connection request, and the data of the preset action frame data includes an action frame creation time, a length of data to be received, and a queuing time for transmission delay synchronization.
[0089] Correspondingly, in step 1042, when data transmission based on the second data connection is performed based on the WiFi module, the transmitted data is preset data frame data, and the preset data frame data is based on the IEEE 802.11 format frame, wherein:
[0090] The To DS and From DS field flags of the preset data frame data are set to 0, the packet header of the preset data frame data includes an organizational unique identifier for identifying a direct connection between the WiFi module and the device sending the connection request, and the data of the preset data frame data includes a transmission number and communication data corresponding to the transmission number.
[0091] In the embodiment of the present invention, the first WiFi channel includes one WiFi channel, and the second WiFi channel includes at least one WiFi channel.
[0092] The computer device 300 provided in the embodiment of the present invention can implement the steps in the single-module multi-type WiFi connection switching method in the above embodiment, and can achieve the same technical effect. Please refer to the description in the above embodiment and will not be repeated here.
[0093] An embodiment of the present invention further provides a computer-readable storage medium, on which a single-module multi-type WiFi connection switching program is stored. When the single-module multi-type WiFi connection switching program is executed by a processor, the single-module multi-type WiFi connection switching program implements the various processes and steps in the single-module multi-type WiFi connection switching method provided in an embodiment of the present invention, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0094] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be realized by instructing related hardware (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) through a single-module multi-type WiFi connection switching program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0095] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0096] The embodiments of the present invention are described above in conjunction with the accompanying drawings. What is disclosed is only the preferred embodiment of the present invention. However, the present invention is not limited to the above-mentioned specific implementation manner. The above-mentioned specific implementation manner is only illustrative rather than restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms and equivalent changes without departing from the scope of protection of the purpose of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A single-module multi-type WiFi connection switching method, It is characterized in that The following steps are involved: S101, initializing a WiFi module of a device and enabling the WiFi module; S102, according to the WiFi module, enabling a first data connection based on the WiFi P2P protocol based on the first WiFi channel, and at the same time, enabling a second data connection based on the WiFi direct protocol based on the second WiFi channel, and enabling a third data connection based on the WiFi Softap based on the third WiFi channel; S103: Based on a time-division multiplexing method, monitor the connection request on the first WiFi channel using the first data connection, monitor the connection request on the second WiFi channel using the second data connection, and monitor the connection request on the third WiFi channel using the third data connection; S104, performing data transmission according to the result of the connection request monitoring of the first WiFi channel, the result of the connection request monitoring of the second WiFi channel, and the result of the connection request monitoring of the third WiFi channel, wherein: 1041. When the first data connection monitors a connection request on the first WiFi channel, suspend the second data connection and the third data connection, and perform data transmission based on the first data connection with the device sending the connection request based on the WiFi module; 1042. When the second data connection monitors a connection request on the second WiFi channel, suspend the first data connection and the third data connection, and perform data transmission based on the second data connection with the device sending the connection request based on the WiFi module; 1043. When the third data connection monitors a connection request on the third WiFi channel, suspend the first data connection and the second data connection, and perform data transmission based on the third data connection with the device that sends the connection request based on the WiFi module.
2. The single-module multi-type WiFi connection switching method as claimed in claim 1, It is characterized in that The single-module multi-type WiFi connection switching method further includes the following steps: S105: After completing the data transmission of the first data connection, or completing the data transmission of the second data connection, or completing the data transmission of the third data connection based on the WiFi module, return to step S103.
3. The single-module multi-type WiFi connection switching method as claimed in claim 1, It is characterized in that In step S103, when requesting monitoring on the second WiFi channel using the second data connection, the monitored data is preset action frame data, and the preset action frame data is based on an IEEE 802.11 format frame, wherein: The packet header of the preset action frame data includes an organizational unique identifier for identifying a direct connection between the WiFi module and the device sending the connection request, and the data of the preset action frame data includes an action frame creation time, a length of data to be received, and a queuing time for transmission delay synchronization.
4. The single-module multi-type WiFi connection switching method as claimed in claim 3, It is characterized in that In step 1042, when data transmission based on the second data connection is performed based on the WiFi module, the transmitted data is preset data frame data, and the preset data frame data is based on the IEEE 802.11 format frame, wherein: The To DS and From DS field flags of the preset data frame data are set to 0, the packet header of the preset data frame data includes an organizational unique identifier for identifying a direct connection between the WiFi module and the device sending the connection request, and the data of the preset data frame data includes a transmission number and communication data corresponding to the transmission number.
5. The single-module multi-type WiFi connection switching method as claimed in claim 1, It is characterized in that The first WiFi channel includes one WiFi channel, and the second WiFi channel includes at least one WiFi channel.
6. A single-module multi-type WiFi connection switching system, It is characterized in that include: An initialization module, used to initialize the WiFi module of the device and enable the WiFi module; A waiting module is used to enable a first data connection based on a WiFi P2P protocol based on a first WiFi channel according to the WiFi module, and at the same time, enable a second data connection based on a WiFi direct protocol based on a second WiFi channel, and enable a third data connection based on a WiFi Softap based on a third WiFi channel; a monitoring module, configured to monitor a connection request on the first WiFi channel using the first data connection based on a time-division multiplexing method, and at the same time, monitor a connection request on the second WiFi channel using the second data connection, and monitor a connection request on the third WiFi channel using the third data connection; A transmission module, configured to transmit data according to a result of monitoring a connection request of the first WiFi channel, a result of monitoring a connection request of the second WiFi channel, and a result of monitoring a connection request of the third WiFi channel, wherein: When the first data connection monitors a connection request on the first WiFi channel, suspending the second data connection and the third data connection, and performing data transmission based on the first data connection with the device sending the connection request based on the WiFi module; When the second data connection monitors a connection request on the second WiFi channel, suspending the first data connection and the third data connection, and performing data transmission based on the second data connection with the device sending the connection request based on the WiFi module; When the third data connection detects a connection request on the third WiFi channel, the first data connection and the second data connection are suspended, and data transmission based on the third data connection is performed with the device sending the connection request based on the WiFi module.
7. The single-module multi-type WiFi connection switching system as claimed in claim 6, It is characterized in that The single-module multi-type WiFi connection switching system also includes: The self-switching module is used to return to the monitoring module after completing the data transmission of the first data connection, completing the data transmission of the second data connection, or completing the data transmission of the third data connection based on the WiFi module.
8. A computer device, It is characterized in that include: A memory, a processor, and a single-module multi-type WiFi connection switching program stored in the memory and executable on the processor, wherein when the processor executes the single-module multi-type WiFi connection switching program, the steps in the single-module multi-type WiFi connection switching method as described in any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a single-module multi-type WiFi connection switching program, and when the single-module multi-type WiFi connection switching program is executed by the processor, the steps in the single-module multi-type WiFi connection switching method as described in any one of claims 1-5 are implemented.
Citation Information
Patent Citations
Infrared data transmission method, device and system and related equipment
CN113299056A
Multiple pairing
US20220191954A1
