Communication method, electronic equipment, chip system and storage medium
By using two communication chips in electronic devices to carry STA services and P2P services, the problem of service quality decline caused by channel switching when the DBDC method is not supported, and the user experience and data transmission efficiency are improved.
Patent Information
- Application Number
- CN202311214357.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2025-03-28
AI Technical Summary
When electronic devices need to perform STA services and P2P services at the same time, if DBDC methods are not supported, DBAC methods will be used to switch channels, resulting in a decline in service quality and affecting user experience.
By using two communication chips in electronic devices, one for STA service and the other for P2P service, the channel switching is avoided using DBAC. The specific implementation method is that the first communication chip uses a 2.4GHz channel to carry STA services. If the DBDC method is not supported, the second communication chip uses a 5GHz channel to carry P2P services.
It effectively avoids the decline in service quality caused by channel switching, improves user experience, and improves the efficiency of P2P service data transmission.
Smart Images

Figure CN119728702A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent terminal technology, and in particular to a communication method, electronic equipment, chip system and storage medium. Background Art
[0002] Wi-Fi (wireless fidelity) is a wireless communication technology and an implementation of WLAN (Wireless Local Area Network). Electronic devices with Wi-Fi function can access Wi-Fi wireless AP (Access Point) and become a STA (Station) of Wi-Fi wireless AP.
[0003] Electronic devices can realize related functional services based on Wi-Fi peer-to-peer (P2P) connection, such as wireless screen projection service, wireless transmission service, smart home service, etc.
[0004] When an electronic device accesses a Wi-Fi wireless AP and becomes a STA, the electronic device also establishes a Wi-Fi P2P connection with other devices to perform related P2P services. Among them, the electronic device can access the Wi-Fi wireless AP based on the 2.4GHz channel, and establish a Wi-Fi P2P connection with other devices based on the 5GHz channel. In this scenario, if the electronic device does not support the DBDC (Dual Band Dual Concurrent) method, the electronic device will use the DBAC (Dual Band Adaptive Concurrent) method to switch back and forth between the 2.4GHz channel and the 5GHz channel, resulting in a decrease in the service quality of the electronic device. Summary of the invention
[0005] In order to solve the above technical problems, the present application provides a communication method, an electronic device, a chip system and a storage medium. When the electronic device needs to perform STA services and P2P services at the same time, the method can avoid the problem of the electronic device using DBAC to carry two services, thereby improving the user experience.
[0006] In a first aspect, an embodiment of the present application provides a communication method. The method is applied to an electronic device, the electronic device comprising a first communication chip and a second communication chip, both of which have Wi-Fi communication capabilities.
[0007] Among them, the method includes:
[0008] The first communication chip uses the first channel to carry the station STA service;
[0009] If the first communication chip does not support the dual-band dual-transmission mode, when the electronic device needs to perform a Wi-Fi P2P service with the target terminal, the second communication chip uses the second channel to carry the Wi-Fi P2P service.
[0010] Exemplarily, the target terminal may be a mobile phone or the like.
[0011] The STA service refers to the service performed by the electronic device as a STA of the wireless AP, such as Internet access service.
[0012] Wi-Fi P2P services refer to services performed after an electronic device establishes a Wi-Fi P2P connection with other terminal devices, such as wireless screen projection services and wireless transmission services.
[0013] Among them, the first communication chip can be understood as the main communication chip mentioned below, and the second communication chip can be understood as the auxiliary communication chip mentioned below.
[0014] In this way, when the electronic device performs STA services based on the first communication chip, the first communication chip does not support the DBDC method. When the electronic device also needs to perform Wi-Fi P2P services with other terminals, the Wi-Fi P2P services can be carried by the second communication chip. At this time, the first communication chip can be used alone to carry STA services, and the second communication chip can be used alone to carry Wi-Fi P2P services, thereby avoiding the problem that the PC affects the user experience due to the use of DBAC. Moreover, since both STA services and Wi-Fi P2P services fully use the frequency band, the service rate will not be affected, thereby improving the user experience.
[0015] According to the first aspect, the frequency band of the first channel is 2.4 GHz, and the frequency band of the second channel is 5 GHz.
[0016] In this way, the second communication chip can use the 5 GHz channel to carry the Wi-Fi P2P service, thereby improving the efficiency of Wi-Fi P2P service data transmission between the electronic device and the terminal.
[0017] According to the first aspect, or any implementation of the first aspect, the second communication chip uses the second channel to carry the Wi-Fi P2P service, including:
[0018] The electronic device determines a target bandwidth matching the Wi-Fi P2P service;
[0019] The second communication chip uses the second channel to carry the Wi-Fi P2P service, and the channel bandwidth of the second channel is the target bandwidth.
[0020] Exemplarily, if the service type of the Wi-Fi P2P service is type 1, the second communication chip can use a 5 GHz channel with a bandwidth of 80 MHz to carry the Wi-Fi P2P service. If the service type of the Wi-Fi P2P service is type 2, the second communication chip can use a 5 GHz channel with a bandwidth of 160 MHz to carry the Wi-Fi P2P service.
[0021] In this way, the channel bandwidth can be flexibly selected according to the type of Wi-Fi P2P service, which can meet the transmission requirements of Wi-Fi P2P service data and improve the user experience.
[0022] According to the first aspect, or any implementation of the first aspect above, before the electronic device determines whether the first communication chip supports the dual-frequency dual-transmission mode, the method further includes:
[0023] If the frequency band of the first channel is 5 GHz, when the electronic device needs to perform a Wi-Fi P2P service with the target terminal, the first communication chip uses the first channel to carry the Wi-Fi P2P service.
[0024] In this way, before considering whether the first communication chip supports the DBDC mode, the electronic device can first determine whether the first communication chip can use the same-frequency communication channel to simultaneously carry the STA service and the Wi-Fi P2P service.
[0025] If the channel frequency band of the first communication chip carrying the STA service is 5 GHz, the first communication chip can use the channel to simultaneously carry the STA service and the Wi-Fi P2P service in the form of a co-frequency communication channel, thereby avoiding the problem of affecting the data transmission rate due to time-consuming channel switching.
[0026] According to the first aspect, or any implementation of the first aspect, the first communication chip uses the first channel to carry the Wi-Fi P2P service, including:
[0027] The first communication chip creates a soft access point SAP on the first channel, so that the target terminal establishes a Wi-Fi connection with the soft access point; the first communication chip carries a Wi-Fi P2P service based on the Wi-Fi connection.
[0028] In this way, the SAP in the first auxiliary communication chip, as a Wi-Fi hotspot, is similar to a wireless router and can accept connections from other Wi-Fi client devices. Since the SAP is created by the first communication chip on the STA channel, the first communication chip can simultaneously carry STA services and Wi-Fi P2P services based on the channel.
[0029] According to the first aspect, or any implementation of the first aspect, the first communication chip uses the first channel to carry the Wi-Fi P2P service, including:
[0030] If the first channel is allowed to carry the Wi-Fi P2P service, the first communication chip uses the first channel to carry the Wi-Fi P2P service.
[0031] In this way, when the first channel is allowed to carry the Wi-Fi P2P service, the first communication chip uses the first channel to carry the STA service and the Wi-Fi P2P service at the same time in the same frequency and channel manner, avoiding violating the communication protocol.
[0032] If the 5 GHz channel of the first communication chip that carries the STA service cannot carry the Wi-Fi P2P service, the channel that carries the Wi-Fi P2P service can be selected according to other methods, or the first communication chip can carry the STA service and the Wi-Fi P2P service at the same time based on the existing DBAC method. This embodiment does not limit this.
[0033] According to the first aspect, or any implementation of the first aspect above, the method further includes:
[0034] If the first communication chip supports the dual-band dual-transmission mode, when the electronic device needs to perform a Wi-Fi P2P service with the target terminal, the first communication chip uses the third channel to carry the Wi-Fi P2P service.
[0035] According to the first aspect, or any implementation of the first aspect, the frequency band of the first channel is 2.4 GHz, and the frequency band of the third channel is 5 GHz.
[0036] According to the first aspect, or any implementation of the first aspect above, the power consumption of the second communication chip is lower than the power consumption of the first communication chip.
[0037] According to the first aspect, or any implementation of the first aspect above, the method further includes: before the electronic device establishes a Wi-Fi P2P connection with the target terminal, the electronic device establishes a Bluetooth connection with the target terminal; based on the Bluetooth connection, the electronic device and the target terminal perform information interaction to complete the establishment of the Wi-Fi P2P connection between the electronic device and the target terminal.
[0038] In an embodiment of the present application, whether the electronic device establishes a Wi-Fi P2P connection with the target terminal through the first communication chip using the first channel or the third channel, or the electronic device establishes a Wi-Fi P2P connection with the target terminal through the second communication chip using the second channel, before the electronic device establishes a Wi-Fi P2P connection with the target terminal, the electronic device establishes a Bluetooth connection with the target terminal. Among them, the Bluetooth connection process includes but is not limited to Bluetooth scanning and discovery processes, Bluetooth pairing and link establishment processes. Furthermore, the electronic device and the target terminal can exchange information based on the Bluetooth connection between the two, such as a GO negotiation process, etc., to complete the establishment of a Wi-Fi P2P connection between the two.
[0039] Compared with discovering peer devices based on Wi-Fi scanning between mobile phones and PCs, discovering peer devices based on Bluetooth scanning between mobile phones and PCs takes less time and is more efficient, which can improve the overall time required to establish a Wi-Fi P2P connection between mobile phones and PCs.
[0040] In a second aspect, an embodiment of the present application provides an electronic device. The electronic device includes: a first communication chip and a second communication chip; both the first communication chip and the second communication chip have Wi-Fi communication capabilities; wherein the electronic device executes the communication method of the first aspect and any one of the first aspects.
[0041] According to a second aspect, the electronic device is a personal computer PC.
[0042] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0043] In a third aspect, an embodiment of the present application provides an electronic device. The electronic device includes: one or more processors; a memory; a first communication chip and a second communication chip; the first communication chip and the second communication chip both have Wi-Fi communication capabilities. Among them, one or more computer programs are stored in the memory, and when the computer programs are executed by one or more processors, the electronic device executes the communication method of the first aspect and any one of the first aspects.
[0044] According to a third aspect, the electronic device is a PC.
[0045] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
[0046] In a fourth aspect, an embodiment of the present application provides a chip system, which is applied to an electronic device (such as a PC), and the chip system includes instructions and at least one processor, and the at least one processor executes the instructions so that the PC executes the communication method of the first aspect and any one of the first aspects. The chip system may include the above-mentioned first communication chip and second communication chip.
[0047] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.
[0048] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium includes a computer program, and when the computer program is executed on an electronic device, the electronic device executes the communication method of the first aspect and any one of the first aspects.
[0049] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 The following is an exemplary Wi-Fi P2P service application scenario;
[0051] Figure 2 This is an example of an application scenario in which an electronic device performs STA services and Wi-Fi P2P services simultaneously;
[0052] Figure 3 A schematic diagram showing an exemplary electronic device switching a communication channel in a time-sharing manner using a DBAC method;
[0053] Figure 4a is a schematic diagram of the hardware structure of an electronic device shown as an example;
[0054] Figure 4b A schematic diagram of the software structure of an electronic device is shown as an example;
[0055] Figure 5a This is a flow chart showing an exemplary process of establishing a Wi-Fi P2P connection with other terminals when an electronic device performs a STA service;
[0056] Figure 5b This is an example of an electronic device that carries STA services and Wi-Fi P2P services based on a primary communication chip and a secondary communication chip respectively;
[0057] Figure 6a This is a flow chart showing an exemplary process of establishing a Wi-Fi P2P connection with other terminals when an electronic device performs a STA service;
[0058] Figure 6b A schematic diagram of a mode combination of a main communication chip of an electronic device shown as an example;
[0059] Figure 6c This is an example of an electronic device carrying STA services and Wi-Fi P2P services based on the same frequency and channel of the main communication chip;
[0060] Figure 7a This is a flow chart showing an exemplary process of establishing a Wi-Fi P2P connection with other terminals when an electronic device performs a STA service;
[0061] Figure 7b This is an example of an application scenario in which the main communication chip of an electronic device uses a DBDC method to carry STA services and Wi-Fi P2P services;
[0062] Figure 8 A schematic diagram of a process of selecting a communication channel for carrying a Wi-Fi P2P service for an exemplified electronic device;
[0063] Fig. 9 The figure is a schematic diagram of the hardware structure of an electronic device shown as an example. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0065] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0066] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
[0067] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0068] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
[0069] Wi-Fi (wireless fidelity) is a wireless communication technology and an implementation of WLAN (Wireless Local Area Network). At present, Wi-Fi technology is mainly implemented in high frequency bands such as 2.4GHz and 5GHz. In Wi-Fi technology, AP is the creator of a Wi-Fi wireless network and the central node of a Wi-Fi wireless network. It is understandable that a wireless router is an AP. In Wi-Fi technology, STA is an electronic device connected to a Wi-Fi wireless network. It is understandable that each electronic device connected to a wireless router (such as a mobile phone, tablet computer, PC (Personal Computer, etc.) can be called a STA.
[0070] With the continuous development of science and technology, there are more and more interconnected applications between electronic devices, such as wireless screen projection, wireless transmission and smart home. These interconnected applications can realize device interconnection based on Wi-Fi Direct technology. Among them, Wi-Fi Direct technology is a point-to-point connection technology based on the IEEE 802.11 protocol. Wi-Fi Direct can also be called Wi-Fi P2P (Peer to Peer) connection. After establishing a Wi-Fi P2P connection, electronic devices can share data with each other. Taking the wireless screen projection scenario as an example, Figure 1 As shown, after the PC 100 and the mobile phone 200 establish a Wi-Fi P2P connection, the mobile phone 200 can share its screen to the PC 100.
[0071] In this way, when an electronic device accesses a Wi-Fi wireless AP and becomes a STA, the electronic device also establishes a Wi-Fi P2P connection with other terminal devices to perform P2P services, such as wireless screen projection services, wireless mutual transmission services, etc.
[0072] like Figure 2 As shown, when PC 100 accesses the wireless router 300 and becomes a STA, PC 100 can also establish a Wi-Fi P2P connection with the mobile phone 200 to perform wireless screen projection services. Among them, PC 100 can access the wireless router 300 based on the 2.4GHz channel and establish a Wi-Fi P2P connection with the mobile phone 200 based on the 5GHz channel. In this scenario, the user can use PC 100 to surf the Internet (such as watching videos, etc.), and can also project the screen of the mobile phone 200 to the PC 100 end, so as to view the screen of the mobile phone 200 on the display screen of PC 100 at the same time.
[0073] It can be understood that the 2.4 GHz channel mentioned in this article refers to the channel in the 2.4G frequency band, and the 5 GHz channel refers to the channel in the 5G frequency band.
[0074] Electronic devices with Wi-Fi functions can be divided into the following types according to the supported frequency bands and the concurrency mode of different frequency bands: SBSC (Single Band Single Concurrent), DBSC (Dual Band Single Concurrent), DBDC and DBAC. Among them, SBSC integrates a set of media access control layer / physical layer / radio frequency (MAC / PHY / RF for short), among which RF has only one set of channels and can only work in one frequency band, generally the 2.4GHz band; the DBSC method integrates a set of MAC / PHY / RF, among which RF has two sets of channels, one RF channel supports the 2.4GHz band, and the other RF channel supports the 5GHz band. When in use, it can switch to one of the 2.4GHz or 5GHz bands, but cannot support working in two bands at the same time; the DBDC method integrates two sets of MAC / PHY / RF, which work at 2.4GHz and 5GHz respectively, and can work in 2.4GHz and 5GHz bands at the same time, but the cost is relatively high; the DBAC method uses the DBSC method to dynamically switch back and forth between the 2.4GHz channel and the 5GHz channel to achieve the effect of time-division multiplexing communication in two frequency bands.
[0075] In the scenario where an electronic device accesses a Wi-Fi wireless AP to become a STA and also establishes a Wi-Fi P2P connection with other terminal devices, if the electronic device does not support the DBDC method, the electronic device will use the DBAC method. For example, if an electronic device accesses a Wi-Fi wireless AP based on a 2.4GHz channel and establishes a Wi-Fi P2P connection with other devices based on a 5GHz channel, the electronic device will use the DBAC method to switch back and forth between the 2.4GHz channel path and the 5GHz channel path.
[0076] like Figure 3 As shown, when the electronic device adopts the DBAC method, the electronic device needs to send data packets on the 2.4GHz channel (i.e., the Internet access channel) and the 5GHz channel (i.e., the screen projection channel) in time sharing. In this case, the channel where the STA service (such as the Internet access service) is located and the channel where the Wi-Fi P2P service (such as the screen projection service) is located form a relationship of different frequencies and channels. Among them, different frequencies and channels refer to that the electronic device runs the Wi-Fi STA mode and the Wi-Fi P2P mode in different frequency bands and different channels, and the electronic device needs to switch between the working channel of the Wi-Fi STA mode (referred to as the STA channel) and the working channel of the Wi-Fi P2P mode (referred to as the P2P channel) in time sharing. Taking 100ms / 100ms time sharing and the switching time of 20ms as an example, the electronic device will switch to the P2P channel after working on the STA channel for 100ms. The switching process takes 20ms. After switching to the P2P channel and working for 100ms, it will switch to the STA channel again. Therefore, in order to implement STA services and Wi-Fi P2P services, the RF front end needs to time-share multiplexing on different frequency bands, so that neither STA services nor Wi-Fi P2P services can fully use the frequency bands. The speeds of these two services will be sometimes fast and sometimes slow, resulting in a decrease in service quality, thus affecting the user experience.
[0077] In order to solve the above problems, an embodiment of the present application provides an electronic device. For example, the electronic device may be a PC. The following explanation is given by taking the electronic device as a PC as an example. Figure 4a As shown, the PC includes a main communication chip and an auxiliary communication chip. Among them, the main communication chip includes a Bluetooth module and a Wi-Fi module, and the auxiliary communication chip also includes a Bluetooth module and a Wi-Fi module. Regarding other components of the PC (such as a central processing unit, a display, etc.), please refer to the existing technology and will not be repeated here.
[0078] It should be pointed out that the Bluetooth module included in the main communication chip can be a Bluetooth chip (temporarily referred to as the main Bluetooth chip), and the Wi-Fi module included in the main communication chip can be a Wi-Fi chip (temporarily referred to as the main Wi-Fi chip). Specifically, the main Bluetooth chip and the main Wi-Fi chip can be integrated in the same chip, and this integrated chip is the main communication chip. Of course, the main Bluetooth chip and the main Wi-Fi chip may not be integrated in the same chip, and the combination of the main Bluetooth chip and the main Wi-Fi chip is called the main communication chip. Similarly, the Bluetooth module included in the auxiliary communication chip can be a Bluetooth chip (temporarily referred to as the auxiliary Bluetooth chip), and the Wi-Fi module included in the auxiliary communication chip can be a Wi-Fi chip (temporarily referred to as the auxiliary Wi-Fi chip). Specifically, the auxiliary Bluetooth chip and the auxiliary Wi-Fi chip can be integrated in the same chip, and this integrated chip is the auxiliary communication chip. Of course, the auxiliary Bluetooth chip and the auxiliary Wi-Fi chip may not be integrated in the same chip, and the combination of the auxiliary Bluetooth chip and the auxiliary Wi-Fi chip is called the auxiliary communication chip.
[0079] Among them, the main communication chip can be understood as the existing communication chip of the electronic device, and the auxiliary communication chip can be understood as a small communication chip added on the basis of the existing communication chip. That is, in the embodiment of the present application, in addition to the existing main communication chip, the PC also adds an auxiliary communication chip (or small communication chip). Among them, the main communication chip has Wi-Fi communication capability and Bluetooth communication capability, and the auxiliary communication chip also has Wi-Fi communication capability and Bluetooth communication capability.
[0080] In this embodiment, the auxiliary communication chip can independently carry Wi-Fi P2P services. That is, the electronic device can establish a Wi-Fi P2P connection with other terminal devices based on the auxiliary communication chip, so that the electronic device and other terminal devices can perform Wi-Fi P2P services.
[0081] In this embodiment, the performance of the auxiliary communication chip is lower than that of the main communication chip, for example, the auxiliary communication chip has lower power consumption and supports lower channel bandwidth. Exemplarily, the frequency band supported by the auxiliary communication chip is 5 GHz, or the frequency band supported by the auxiliary communication chip is 2.4 GHz and 5 GHz. Exemplarily, the channel bandwidth supported by the auxiliary communication chip includes but is not limited to 80 MHz and 160 MHz. In this way, the auxiliary communication chip can use the 5 GHz channel to establish a Wi-Fi P2P connection with other terminals, thereby improving the data transmission efficiency of the Wi-Fi P2P service.
[0082] Figure 4b The software structure of the electronic device is shown as an example. Figure 4bAs shown, the layered architecture of the electronic device divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the software structure of the electronic device can be divided into an application layer and an operating system (OS). In addition, the software structure of the electronic device also includes a software module of a main communication chip (or a network card of the electronic device) and a software module of an auxiliary communication chip.
[0083] like Figure 4b As shown, the application layer may include a business layer, middleware, Bluetooth connection tools, and Wi-Fi connection tools. Exemplarily, the business layer may include a series of application packages, such as wireless sharing, wireless screen projection, wireless companion, and other applications. Exemplarily, when these application packages establish a Wi-Fi P2P connection between the electronic device and other terminals, data can be transmitted between the other terminals based on the Wi-Fi P2P connection.
[0084] Middleware (or interconnected middleware) is an independent system software or service program that allows distributed application software to share resources between different technologies. Middleware is located on the operating system that operates the client / server and manages computer resources and network communications. Middleware is software that connects two independent applications or independent systems. Connected systems can still exchange information with each other through middleware, even if they have different interfaces. A key way to execute middleware is information transmission. Through middleware, applications can work on multiple platforms or OS environments.
[0085] The Bluetooth connection tool is used to implement functions related to Bluetooth connection, such as Bluetooth scanning, Bluetooth off / on / status monitoring / Bluetooth name reading / MAC address reading, Bluetooth broadcast sending, Bluetooth broadcast packet grouping, start / stop broadcasting, Bluetooth broadcast packet processing, etc. Among them, the Bluetooth connection tool can also be used to generate instructions corresponding to the Bluetooth chip, which are sent to the main communication chip through the main communication chip application API (Application Program Interface), or sent to the auxiliary communication chip through the auxiliary communication chip application API.
[0086] For example, the application of the business layer can query the Bluetooth status and control the Bluetooth chip to perform Bluetooth scanning and Bluetooth broadcasting through the middleware and Bluetooth connection tool.
[0087] Wi-Fi connection tool, used to implement functions related to Wi-Fi connection, including but not limited to STA management, SAP (Soft Access Point) management, channel selection during Wi-Fi connection, etc.
[0088] Among them, the management of SAP (or Soft-AP) can be used to manage the SAP in the Wi-Fi chip, such as creating SAP, deleting SAP, etc.
[0089] STA management is used to implement management related to Wi-Fi chip access to wireless AP.
[0090] The channel selection during Wi-Fi connection can be used to select the communication channel corresponding to the Wi-Fi P2P connection. In the embodiment of the present application, the Wi-Fi connection tool can select the communication channel corresponding to the Wi-Fi P2P connection based on the service status of the main communication chip, the channel status of the main communication chip executing the STA service, and whether the main communication chip supports the DBDC mode.
[0091] The Wi-Fi connection tool can also be used to generate instructions corresponding to the Wi-Fi chip, and send them to the main communication chip through the main communication chip application API, or send them to the auxiliary communication chip through the auxiliary communication chip application API.
[0092] Exemplarily, the application at the service layer may instruct to establish a Wi-Fi P2P connection and monitor the Wi-Fi link status through the middleware and the Wi-Fi connection tool.
[0093] OS is a large program system that is responsible for the allocation and scheduling of all software and hardware resources of the computer, controls and coordinates the activities of multiple tasks, and implements information access and protection. The operating system provides a user interface to give users a good working environment.
[0094] For example, Figure 4b As shown, the OS may include a primary communication chip application API, a secondary communication chip application API, a local Wi-Fi function module, a Bluetooth service module, a network service module, a local API, a system driver API, a Wi-Fi component, a Bluetooth protocol stack, and a network protocol stack.
[0095] The primary communication chip application API can be used to implement management and control of the primary communication chip, etc. The secondary communication chip application API can be used to implement management and control of the secondary communication chip, etc.
[0096] It can be understood that the local Wi-Fi function module is used to provide services related to the Wi-Fi function, the Bluetooth service module is used to provide services related to the Bluetooth function, and the network service module is used to provide services related to the network. Among them, the local API can be used to implement the management and control of local related functions, and the system driver API can be used to implement the management and control of system driver related functions.
[0097] Continue to refer to Figure 4b The software module of the main communication chip refers to the functional module corresponding to the main communication chip, including the Bluetooth mini port driver, the Wi-Fi mini port driver, the HAL (Hardware Abstraction Layer) corresponding to the main communication chip, and the firmware corresponding to the main communication chip.
[0098] Among them, HAL is an interface layer located between the operating system kernel and the hardware circuit. Its purpose is to abstract the hardware. It hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system.
[0099] Firmware is generally stored in EEPROM (Electrically Erasable Programmable ROM) or FLASH chip, and is a program that can be upgraded by the user through a specific refresh program. Firmware is the underlying code that connects the hardware and the operating system when the computer starts. Through firmware, the operating system can implement the operation of a specific machine according to the standard device driver.
[0100] The software module of the auxiliary communication chip refers to the functional module corresponding to the auxiliary communication chip, including USB (universal serial bus) driver, local area network (LAN) driver, Wi-Fi protocol stack, Bluetooth protocol stack, Wi-Fi component, HAL corresponding to the auxiliary communication chip, and firmware corresponding to the auxiliary communication chip.
[0101] Understandably, Figure 4b The layers in the software structure shown and the components contained in each layer do not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the present application.
[0102] It is understandable that, in order to implement the communication method in the embodiment of the present application, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.
[0103] In some examples, the main communication chip of the electronic device supports the DBDC mode, and in other examples, the main communication chip of the electronic device does not support the DBDC mode, which is not limited in this embodiment. For these two examples, the following explains various situations in which the electronic device performs STA services and Wi-Fi P2P services at the same time.
[0104] It can be understood that STA services refer to services performed by electronic devices as STAs of wireless APs, such as Internet access services, etc.; Wi-Fi P2P services refer to services performed by electronic devices based on Wi-Fi P2P connections after establishing Wi-Fi P2P connections with other terminal devices, such as wireless screen projection services, wireless mutual transmission services, etc. In the following scenarios, the electronic device is explained as a PC, in which when the PC performs STA services, it can also establish a Wi-Fi P2P connection with a mobile phone to perform Wi-Fi P2P services.
[0105] Scene 1
[0106] In this scenario, the main communication chip of the PC does not support the DBDC method. Therefore, when the PC performs STA services and Wi-Fi P2P services at the same time, the main communication chip can be used alone to carry STA services, and the auxiliary communication chip can be used alone to carry Wi-Fi P2P services, thereby avoiding the problem that the PC uses the DBAC method to affect the user experience. In addition, the auxiliary communication chip can use the 5GHz channel to carry Wi-Fi P2P services, thereby improving the transmission efficiency of Wi-Fi P2P service data.
[0107] Figure 5a The following is an exemplary diagram showing the interaction between a PC and a mobile phone. Figure 5a As shown, the communication method provided in the embodiment of the present application may include:
[0108] S201, the PC establishes a Wi-Fi connection with the wireless router through the main communication chip.
[0109] When the PC is connected to the wireless router through the main communication chip, the PC becomes a station of the wireless router. Therefore, the main communication chip of the PC works in the Wi-Fi Station mode and can perform STA services so that users can access the Internet through the PC.
[0110] S202, in response to the user's operation on the mobile phone screen projection application, a Bluetooth connection is established between the mobile phone and the PC.
[0111] The PC may establish a Bluetooth connection with the mobile phone based on the Bluetooth module of the primary communication chip, or may establish a Bluetooth connection with the mobile phone based on the Bluetooth module of the secondary communication chip, which is not limited in this embodiment.
[0112] Exemplarily, the process of establishing a Bluetooth connection between a PC and a mobile phone may include a Bluetooth scanning and discovery process, as well as a Bluetooth pairing and link establishment process, which may be implemented using a Bluetooth connection tool and a primary communication chip, or using a Bluetooth connection tool and a Bluetooth module of an auxiliary communication chip. This embodiment does not limit this.
[0113] Common scenarios for establishing a Wi-Fi P2P connection between a mobile phone and a PC include wireless screen projection, wireless transmission, etc. This embodiment is explained by taking the wireless screen projection scenario as an example.
[0114] It is understandable that the initial step for a mobile phone and a PC to establish a Wi-Fi P2P connection is device scanning and discovery. The mobile phone and the PC can complete device discovery by sending a request frame at one end (such as a mobile phone) and returning a response frame after receiving the request frame at the other end (such as a PC). In this way, the PC can be displayed in the list of available devices for mobile phone screen projection. In some embodiments, the request frame and the response frame may carry indication information to indicate that a Wi-Fi P2P connection needs to be established to complete wireless screen projection, etc.
[0115] In an embodiment of the present application, before the mobile phone and the PC establish a Wi-Fi P2P connection, the device scanning and discovery process is implemented based on the Bluetooth function, and then the Bluetooth pairing and link establishment process is performed between the mobile phone and the PC, so that the mobile phone and the PC can exchange device information based on the Bluetooth connection, preparing for the establishment of a Wi-Fi P2P connection between the mobile phone and the PC.
[0116] In an optional implementation, the user's operation in the mobile phone screen projection application can be, for example, an operation in which the user uses the code scanning function in the mobile phone screen projection application to scan a QR code. When the user wants to project the display screen of the mobile phone to the PC for display, the screen projection application can be started on the mobile phone, and the code scanning function of the screen projection application can be turned on. Based on the code scanning function, the relevant QR code of the PC can be scanned, so that the mobile phone can discover the PC based on the Bluetooth function, and perform Bluetooth pairing and link establishment with the PC. In this way, the PC can be used as a device that the mobile phone can project the screen, and then the mobile phone can establish a Wi-Fi P2P connection with the PC.
[0117] In another optional implementation, the user's operation in the mobile screen projection application may be, for example, the user's operation of opening the screen projection application, or the user's operation of holding the mobile phone close to the PC after opening the screen projection application. When the user wants to project the display screen of the mobile phone to the PC for display, the screen projection application can be started on the mobile phone, and the screen projection application automatically scans the surrounding devices based on the Bluetooth function of the mobile phone to find the devices to which it can project the screen.
[0118] For example, if a Bluetooth connection has been established between the mobile phone and one of the devices (such as a PC), when the mobile phone automatically scans and discovers the device based on the Bluetooth function, it automatically performs Bluetooth pairing and establishes a link with it. Optionally, after the mobile phone scans and discovers the PC, automatically performs Bluetooth pairing and establishes a link with it, if the user needs to project the mobile phone display screen to other devices, the relevant operations can also be performed to disconnect the Bluetooth connection (or Wi-Fi P2P connection) between the mobile phone and the PC, and to re-establish the Bluetooth connection between the mobile phone and the other device, which is not limited in this embodiment.
[0119] For example, if the mobile phone has not established Bluetooth interception with any surrounding device, when the mobile phone automatically scans the device based on the Bluetooth function, a Bluetooth device discovery list is displayed. Then, the user can select the PC in the Bluetooth device discovery list to perform Bluetooth pairing and link establishment between the mobile phone and the PC, and complete the establishment of the Bluetooth connection between the two.
[0120] It should be pointed out that in the embodiment of the present application, the Bluetooth function of the PC is set to the on state so that the mobile phone can establish a Bluetooth connection with the PC, and then device information is exchanged based on the Bluetooth connection to complete the process of establishing a Wi-Fi P2P connection between the mobile phone and the PC.
[0121] For example, the information exchanged between the PC and the mobile phone based on the Bluetooth connection may include, but is not limited to, the device name, device type, Wi-Fi P2P service type, etc., which is not limited in this embodiment. Among them, the Wi-Fi P2P service type can be used to determine the channel bandwidth matching the Wi-Fi P2P service.
[0122] It should be pointed out that the above-mentioned operations of triggering the establishment of a Bluetooth connection between the mobile phone and the PC are all illustrative examples, and this embodiment does not limit this. In the embodiment of the present application, the establishment of a Bluetooth connection between the mobile phone and the PC is to prepare for the establishment of a Wi-Fi P2P connection between the mobile phone and the PC. For example, the mobile phone and the PC can exchange information related to the Wi-Fi P2P connection based on the Bluetooth connection between the two. Moreover, compared with the discovery of the peer device based on Wi-Fi scanning between the mobile phone and the PC, the discovery of the peer device based on Bluetooth scanning between the mobile phone and the PC takes less time and is more efficient, which can improve the overall time consumed when establishing a Wi-Fi P2P connection between the mobile phone and the PC.
[0123] Among them, the implementation details of the above-mentioned Bluetooth scanning and device discovery process, Bluetooth device pairing and Bluetooth link establishment process can be referred to the existing technology and will not be repeated here.
[0124] This embodiment does not limit the sequence of S201 and S202.
[0125] S203: The mobile phone and the PC complete GO (Group Owner) negotiation based on the Bluetooth connection.
[0126] Since the Bluetooth connection between the mobile phone and the PC is established in order to establish a Wi-Fi P2P connection between the two, after the Bluetooth connection is established between the mobile phone and the PC, the two can perform GO negotiation based on the Bluetooth connection to negotiate which device is the GO node, which device is the GC (Group Client) node, and the characteristic information of the P2P group.
[0127] GO negotiation can finally determine which device is the GO node, which device is the GC node, and the characteristic information of the P2P group through three frame interactions. These three frame interactions include GO Negotiation Request, GO Negotiation Response, and GO Negotiation Confirmation. In the embodiment of the present application, the three frame interactions are performed between the mobile phone and the PC based on the direct Bluetooth connection between the two.
[0128] Among them, the GO negotiation request and GO negotiation response include GO Intent, which is an integer value from 0 to 15. The size of these two values determines which device is the GO node. If the GO Intent of two devices is not equal, the device with the larger GO Intent value will be the GO node; if the GO Intent of two devices is equal and less than 15, it can be determined based on the random number (Tie Breaker) in the GO negotiation request. If the Tie Breaker is 1, the local device will be the GO node, otherwise the remote device will be the GO node; if the GO Intent of two devices is equal and equal to 15, the GO negotiation fails.
[0129] In the embodiment of the present application, the result of the GO negotiation between the mobile phone and the PC based on the Bluetooth connection is that the PC is a GO node.
[0130] For matters not fully explained in detail about GO negotiation, please refer to the existing technology and will not be repeated here.
[0131] Before the mobile phone and PC establish a Wi-Fi P2P connection, you need to select the channel corresponding to the Wi-Fi P2P service, that is, you need to select the channel corresponding to the Wi-Fi P2P connection. After determining the channel corresponding to the Wi-Fi P2P service, the mobile phone can control the corresponding communication chip (primary communication chip or auxiliary communication chip) to establish a Wi-Fi P2P connection with the mobile phone based on the channel.
[0132] The following S204-S207 is a process for the PC to select a channel corresponding to the Wi-Fi P2P service. The present embodiment does not limit the execution order of S204-S207 and S203.
[0133] S204, the PC's Wi-Fi connection tool finds out that the main communication chip is executing the STA service.
[0134] When the PC's Wi-Fi connection tool selects a channel corresponding to the Wi-Fi P2P service, it first determines whether the main communication chip is executing the STA service, that is, it can determine whether the main communication chip is connected to the wireless router. In this scenario, the main communication chip has been connected to the wireless router to execute the STA service.
[0135] S205, the PC's Wi-Fi connection tool finds out that the main communication chip uses the 2.4 GHz channel to carry STA services.
[0136] When the Wi-Fi connection tool finds that the main communication chip is executing the STA service, it continues to determine whether the main communication chip uses the 2.4 GHz channel to carry the STA service. In this scenario, the main communication chip uses the 2.4 GHz channel to carry the STA service as an example for explanation.
[0137] S206, the PC's Wi-Fi connection tool finds out that the main communication chip does not support the DBDC mode.
[0138] After the Wi-Fi connection tool finds that the main communication chip uses the 2.4GHz channel to carry STA services, it continues to determine whether the main communication chip supports the DBDC method. In this scenario, taking the example of the main communication chip not supporting the DBDC method, if the main communication chip is still used to carry Wi-Fi P2P services, the main communication chip will use the DBAC method to carry both STA services and Wi-Fi P2P services.
[0139] Exemplarily, the Wi-Fi connection tool may query the configuration data of the PC whether the main communication chip supports the DBDC mode.
[0140] S207, the Wi-Fi connection tool of the PC selects the auxiliary communication chip to use a 5 GHz channel with a bandwidth of x MHz to carry the Wi-Fi P2P service according to the service type of the Wi-Fi P2P service, and sends a Wi-Fi chip control instruction to the auxiliary communication chip.
[0141] In order to prevent the main communication chip from using DBAC to carry both STA services and Wi-Fi P2P services, the Wi-Fi connection tool in this embodiment selects the auxiliary communication chip to carry Wi-Fi P2P services. In this way, when the PC implements STA services and Wi-Fi P2P services at the same time, the main communication chip is used to carry STA services, and the auxiliary communication chip is used to carry Wi-Fi P2P services, so that both STA services and Wi-Fi P2P services can fully use the frequency band, which can ensure the quality of the two services and avoid affecting the user experience.
[0142] Among them, the PC's Wi-Fi connection tool can select the auxiliary communication chip to use the 5GHz channel to carry the Wi-Fi P2P service, so as to improve the transmission rate of the Wi-Fi P2P service data. Moreover, the PC's Wi-Fi connection tool can also determine the bandwidth of the 5GHz channel carrying the Wi-Fi P2P service according to the service type of the Wi-Fi P2P service. Exemplarily, if the service type of the Wi-Fi P2P service is type 1, the Wi-Fi connection tool selects the auxiliary communication chip to use a 5GHz channel with a bandwidth of 80MHz to carry the Wi-Fi P2P service. If the service type of the Wi-Fi P2P service is type 2, the Wi-Fi connection tool selects the auxiliary communication chip to use a 5GHz channel with a bandwidth of 160MHz to carry the Wi-Fi P2P service.
[0143] After the Wi-Fi connection tool has selected the communication chip (i.e., the auxiliary communication chip) and the channel for carrying the Wi-Fi P2P service, the Wi-Fi connection tool can also send a Wi-Fi chip control instruction to the auxiliary communication chip according to its selection result. Among them, this Wi-Fi chip control instruction can be used to instruct the auxiliary communication chip to establish a Wi-Fi P2P connection with the mobile phone, as well as the channel information corresponding to the Wi-Fi P2P connection (such as channel frequency band, channel bandwidth, channel number, etc.).
[0144] S208, the auxiliary communication chip of the PC establishes a Wi-Fi P2P connection with the mobile phone based on the 5G channel with a bandwidth of x MHz.
[0145] After the Wi-Fi connection tool selects the communication chip (i.e., the auxiliary communication chip) and the channel for carrying the Wi-Fi P2P service, the PC can also send the channel information for carrying the Wi-Fi P2P service to the mobile phone based on the Bluetooth connection between the PC and the mobile phone. The channel information for carrying the Wi-Fi P2P service can also be sent from the PC to the mobile phone in other processes before establishing the Wi-Fi P2P connection (e.g., certain processes before exchanging link establishment information), which is not limited in this embodiment.
[0146] After the GO negotiation is completed between the PC and the mobile phone, and the PC selects the channel corresponding to the Wi-Fi P2P connection, the PC as the GO node can exchange link establishment information with the mobile phone as the GC node, and establish a Wi-Fi P2P connection with the mobile phone based on the link establishment information. For the GO node, the link establishment information may include but is not limited to channel information, password, SSID (Service Set Identifier) and MAC address of the GC node. For the GC node, the link establishment information may include but is not limited to channel information, password, SSID and MAC address of the GO node.
[0147] For details not explained in detail in the Wi-Fi P2P connection establishment process, please refer to the existing technology and will not be repeated here.
[0148] S209, based on the Wi-Fi P2P connection between the auxiliary communication chip and the mobile phone, the PC transmits data related to the wireless screen projection service with the mobile phone.
[0149] After the Wi-Fi P2P connection between the mobile phone and the PC auxiliary communication chip is established, the PC can transmit data related to the wireless screen projection service with the mobile phone based on the Wi-Fi P2P connection between the auxiliary communication chip and the mobile phone, so that the mobile phone can automatically project the mobile phone screen interface to the PC interface, and can also project the content selected by the user to the PC interface.
[0150] As described above, when the main communication chip of the PC 100 does not support the DBDC mode, Figure 5b As shown, PC 100 can implement STA services based on the main communication chip, and at the same time implement Wi-Fi P2P services based on the auxiliary communication chip. The main communication chip uses the 2.4GHz channel to carry STA services, and the auxiliary communication chip can use the 5GHz channel to carry Wi-Fi P2P services. Both services can fully use the frequency band, which can ensure the quality of both services and will not affect the user experience.
[0151] Scene 2
[0152] In this scenario, if the electronic device needs to perform STA services and Wi-Fi P2P services at the same time, consider whether the main communication chip uses the 5GHz channel to carry STA services. When the main communication chip uses the 5GHz channel to carry STA services, the main communication chip can also carry Wi-Fi P2P services based on the same frequency and channel at the same time.
[0153] Figure 6a The following is an exemplary diagram showing the interaction between a PC and a mobile phone. Figure 6a As shown, the communication method provided in the embodiment of the present application may include:
[0154] S301, the PC establishes a Wi-Fi connection with the wireless router through the main communication chip.
[0155] When the PC is connected to the wireless router through the main communication chip, the PC becomes a station of the wireless router. Therefore, the main communication chip of the PC works in the Wi-Fi Station mode and can perform STA services so that users can access the Internet through the PC.
[0156] S302, in response to the user's operation on the mobile phone screen projection application, a Bluetooth connection is established between the mobile phone and the PC.
[0157] The PC may establish a Bluetooth connection with the mobile phone based on the Bluetooth module of the primary communication chip, or may establish a Bluetooth connection with the mobile phone based on the Bluetooth module of the secondary communication chip, which is not limited in this embodiment.
[0158] Exemplarily, the process of establishing a Bluetooth connection between a PC and a mobile phone may include a Bluetooth scanning and discovery process, as well as a Bluetooth pairing and link establishment process, which may be implemented using a Bluetooth connection tool and a primary communication chip, or using a Bluetooth connection tool and a Bluetooth module of an auxiliary communication chip. This embodiment does not limit this.
[0159] Common scenarios for establishing a Wi-Fi P2P connection between a mobile phone and a PC include wireless screen projection, wireless transmission, etc. This embodiment is explained by taking the wireless screen projection scenario as an example.
[0160] In an embodiment of the present application, before the mobile phone and the PC establish a Wi-Fi P2P connection, the device scanning and discovery process is implemented based on the Bluetooth function, and then the Bluetooth pairing and link establishment process is performed between the mobile phone and the PC, so that the mobile phone and the PC can exchange device information based on the Bluetooth connection, preparing for the establishment of a Wi-Fi P2P connection between the mobile phone and the PC.
[0161] Exemplarily, the user's operation in the mobile phone screen projection application may be, for example, an operation in which the user uses the scanning function in the mobile phone screen projection application to scan a QR code.
[0162] Exemplarily, the user's operation in the mobile phone screen casting application may be, for example, the user opening the screen casting application, or the user opening the screen casting application and then holding the mobile phone close to the PC.
[0163] It should be pointed out that in the embodiment of the present application, the Bluetooth function of the PC is set to the on state so that the mobile phone can establish a Bluetooth connection with the PC, and then device information is exchanged based on the Bluetooth connection to complete the process of establishing a Wi-Fi P2P connection between the mobile phone and the PC.
[0164] For example, the information exchanged between the PC and the mobile phone based on the Bluetooth connection may include, but is not limited to, the device name, device type, Wi-Fi P2P service type, etc., which is not limited in this embodiment. Among them, the Wi-Fi P2P service type can be used to determine the channel bandwidth matching the Wi-Fi P2P service.
[0165] It should be pointed out that the above-mentioned operations of triggering the establishment of a Bluetooth connection between the mobile phone and the PC are all illustrative examples, and this embodiment does not limit this. In the embodiment of the present application, the establishment of a Bluetooth connection between the mobile phone and the PC is to prepare for the establishment of a Wi-Fi P2P connection between the mobile phone and the PC. For example, the mobile phone and the PC can exchange information related to the Wi-Fi P2P connection based on the Bluetooth connection between the two. Moreover, compared with the discovery of the peer device based on Wi-Fi scanning between the mobile phone and the PC, the discovery of the peer device based on Bluetooth scanning between the mobile phone and the PC takes less time and is more efficient, which can improve the overall time consumed when establishing a Wi-Fi P2P connection between the mobile phone and the PC.
[0166] Among them, the implementation details of the above-mentioned Bluetooth scanning and device discovery process, Bluetooth device pairing and Bluetooth link establishment process can be referred to the existing technology and will not be repeated here.
[0167] This embodiment does not limit the sequence of S301 and S302.
[0168] S303: The mobile phone and the PC complete GO negotiation based on the Bluetooth connection.
[0169] Since the Bluetooth connection between the mobile phone and the PC is established in order to establish a Wi-Fi P2P connection between the two, after the Bluetooth connection is established between the mobile phone and the PC, the two can perform GO negotiation based on the Bluetooth connection to negotiate which device is the GO node, which device is the GC node, and the characteristic information of the P2P group.
[0170] In the embodiment of the present application, the result of the GO negotiation between the mobile phone and the PC based on the Bluetooth connection is that the PC is a GO node.
[0171] Before the mobile phone and PC establish a Wi-Fi P2P connection, you need to select the channel corresponding to the Wi-Fi P2P service, that is, you need to select the channel corresponding to the Wi-Fi P2P connection. After determining the channel corresponding to the Wi-Fi P2P service, the mobile phone can control the corresponding communication chip (primary communication chip or auxiliary communication chip) to establish a Wi-Fi P2P connection with the mobile phone based on the channel.
[0172] The following S304-S306 is a process for the PC to select a channel corresponding to the Wi-Fi P2P service. The present embodiment does not limit the execution order of S304-S306 and S303.
[0173] S304, the PC's Wi-Fi connection tool finds out that the main communication chip is executing the STA service.
[0174] When the PC's Wi-Fi connection tool selects a channel corresponding to the Wi-Fi P2P service, it first determines whether the main communication chip is executing the STA service, that is, it can determine whether the main communication chip is connected to the wireless router. In this scenario, the main communication chip has been connected to the wireless router to execute the STA service.
[0175] S305, the PC's Wi-Fi connection tool finds out that the main communication chip uses a 5 GHz channel to carry STA services.
[0176] When the Wi-Fi connection tool finds that the main communication chip is executing the STA service, it continues to determine whether the main communication chip uses the 5GHz channel to carry the STA service. In this scenario, the main communication chip uses the 5GHz channel to carry the STA service as an example for explanation.
[0177] S306, the Wi-Fi connection tool of the PC finds out that the 5 GHz channel of the main communication chip that carries the STA service can carry the Wi-Fi P2P service, uses the 5 GHz channel as the channel that carries the Wi-Fi P2P service, and sends a Wi-Fi chip control instruction to the main communication chip.
[0178] After finding out that the main communication chip uses the 5 GHz channel to carry STA services, the Wi-Fi connection tool continues to determine whether the 5 GHz channel that carries STA services can also carry Wi-Fi P2P services.
[0179] According to relevant communication regulations, some 5GHz channels can carry Wi-Fi P2P services, while some 5GHz channels cannot carry Wi-Fi P2P services. Therefore, when the main communication chip uses the 5GHz channel to carry STA services, the Wi-Fi connection tool can query whether this 5GHz channel can be used to carry Wi-Fi P2P services. If this 5GHz channel can be used to carry Wi-Fi P2P services, the Wi-Fi connection tool will also select this 5GHz channel as the channel to carry Wi-Fi P2P services.
[0180] After the Wi-Fi connection tool selects the communication chip (i.e., the main communication chip) and channel for carrying the Wi-Fi P2P service, in order to carry the STA service and the Wi-Fi P2P service on the same frequency and channel, the Wi-Fi connection tool sends a Wi-Fi chip control instruction to the main communication chip. Among them, this Wi-Fi chip control instruction is used to instruct the main communication chip to establish a Wi-Fi P2P connection with the mobile phone based on its STA channel. This Wi-Fi chip control instruction can also include information about the main communication chip STA channel (such as channel frequency band, channel bandwidth, channel number, etc.).
[0181] In this way, the 5 GHz channel of the main communication chip that carries the STA service can also be used to carry the Wi-Fi P2P service. In other words, the main communication chip can carry the STA service and the Wi-Fi P2P service at the same time based on the same frequency and channel.
[0182] S307, the main communication chip of the PC creates SAP on the 5G channel.
[0183] That is, the main communication chip of the PC creates a SAP on its STA channel.
[0184] SAP, also known as Soft-AP, is a wireless network created by a Wi-Fi module, which allows other devices to connect to the network and communicate with it. Unlike traditional Wi-Fi networks, Soft-AP does not need to be connected to the Internet, so it is usually used in local area networks.
[0185] Regarding the SAP creation process, you can refer to the existing technology and will not go into details here.
[0186] like Figure 6b As shown in the figure, after the main communication chip of the PC creates SAP on the 5G channel it uses, the working modes of the Wi-Fi module in the main communication chip include Station mode and Soft-AP mode. Among them, Station mode is used to enable the main communication chip to implement STA services, and Soft-AP mode is used for the main communication chip to implement Wi-Fi P2P services. Since SAP is created on the STA service channel of the main communication chip, the main communication chip carries STA services and Wi-Fi P2P services based on the same frequency and channel.
[0187] S308, the mobile phone establishes a Wi-Fi P2P connection with the SAP in the main communication chip on the 5G channel.
[0188] The SAP in the main communication chip, as a Wi-Fi hotspot, is similar to a wireless router and can accept connections from other Wi-Fi client devices. Exemplarily, the SAP in the main communication chip broadcasts its access information, including but not limited to channel information, SSID, MAC address, etc., so that the mobile phone and the SAP in the main communication chip exchange link establishment information to complete the establishment of the Wi-Fi P2P connection.
[0189] Regarding the process of establishing a Wi-Fi P2P connection between the mobile phone and the SAP in the main communication chip, reference may be made to the existing technology and will not be repeated here.
[0190] S309, based on the Wi-Fi connection between the main communication chip and the mobile phone, the PC transmits data related to the wireless screen projection service with the mobile phone.
[0191] After the Wi-Fi connection between the mobile phone and the SAP in the PC's main communication chip is established, the PC can perform data transmission related to the wireless screen projection service based on the Wi-Fi P2P connection between the SAP in the main communication chip and the mobile phone, so that the mobile phone can automatically project the mobile phone screen interface to the PC interface, and can also project the content selected by the user to the PC interface.
[0192] For details not explained in this process, please refer to the previous text and will not be repeated here.
[0193] In this way, before considering whether the main communication chip of the PC supports the DBDC mode, it can be preferentially determined whether the main communication chip can use the same-frequency communication channel to simultaneously carry STA services and Wi-Fi P2P services.
[0194] like Figure 6c As shown, the main communication chip of PC 100 can use the same frequency and channel (5GHz channel) to carry STA services and P2P services at the same time. The main communication chip carries STA services based on its Wi-Fi connection with the wireless router 300, and carries P2P services based on its SAP and the Wi-Fi P2P connection with the mobile phone 200. Both services can fully use the frequency band, which can ensure the quality of both services and will not affect the user experience.
[0195] Scene 3
[0196] In this scenario, the main communication chip of the PC supports the DBDC mode. Therefore, the main communication chip of the PC can carry STA services and Wi-Fi P2P services at the same time based on the DBDC mode.
[0197] Figure 7a The following is an exemplary diagram showing the interaction between a PC and a mobile phone. Figure 7a As shown, the communication method provided in the embodiment of the present application may include:
[0198] S401, the PC establishes a Wi-Fi connection with the wireless router through the main communication chip.
[0199] When the PC is connected to the wireless router through the main communication chip, the PC becomes a station of the wireless router. Therefore, the main communication chip of the PC works in the Wi-Fi Station mode and can perform STA services so that users can access the Internet through the PC.
[0200] S402, in response to the user's operation on the mobile phone screen projection application, a Bluetooth connection is established between the mobile phone and the PC.
[0201] The PC may establish a Bluetooth connection with the mobile phone based on the Bluetooth module of the primary communication chip, or may establish a Bluetooth connection with the mobile phone based on the Bluetooth module of the secondary communication chip, which is not limited in this embodiment.
[0202] The process of establishing a Bluetooth connection between a PC and a mobile phone may include a Bluetooth scanning and discovery process, as well as a Bluetooth link establishment and pairing process, which may be implemented using a Bluetooth connection tool and a Bluetooth module of a primary communication chip or a secondary communication chip.
[0203] Exemplarily, the process of establishing a Bluetooth connection between a PC and a mobile phone may include a Bluetooth scanning and discovery process, as well as a Bluetooth pairing and link establishment process, which may be implemented using a Bluetooth connection tool and a primary communication chip, or using a Bluetooth connection tool and a Bluetooth module of an auxiliary communication chip. This embodiment does not limit this.
[0204] Common scenarios for establishing a Wi-Fi P2P connection between a mobile phone and a PC include wireless screen projection, wireless transmission, etc. This embodiment is explained by taking the wireless screen projection scenario as an example.
[0205] In an embodiment of the present application, before the mobile phone and the PC establish a Wi-Fi P2P connection, the device scanning and discovery process is implemented based on the Bluetooth function, and then the Bluetooth pairing and link establishment process is performed between the mobile phone and the PC, so that the mobile phone and the PC can exchange device information based on the Bluetooth connection, preparing for the establishment of a Wi-Fi P2P connection between the mobile phone and the PC.
[0206] Exemplarily, the user's operation in the mobile phone screen projection application may be, for example, an operation in which the user uses the scanning function in the mobile phone screen projection application to scan a QR code.
[0207] Exemplarily, the user's operation in the mobile phone screen casting application may be, for example, the user opening the screen casting application, or the user opening the screen casting application and then holding the mobile phone close to the PC.
[0208] It should be pointed out that in the embodiment of the present application, the Bluetooth function of the PC is set to the on state so that the mobile phone can establish a Bluetooth connection with the PC, and then device information is exchanged based on the Bluetooth connection to complete the process of establishing a Wi-Fi P2P connection between the mobile phone and the PC.
[0209] For example, the information exchanged between the PC and the mobile phone based on the Bluetooth connection may include, but is not limited to, the device name, device type, Wi-Fi P2P service type, etc., which is not limited in this embodiment. Among them, the Wi-Fi P2P service type can be used to determine the channel bandwidth matching the Wi-Fi P2P service.
[0210] It should be pointed out that the above-mentioned operations of triggering the establishment of a Bluetooth connection between the mobile phone and the PC are all illustrative examples, and this embodiment does not limit this. In the embodiment of the present application, the establishment of a Bluetooth connection between the mobile phone and the PC is to prepare for the establishment of a Wi-Fi P2P connection between the mobile phone and the PC. For example, the mobile phone and the PC can exchange information related to the Wi-Fi P2P connection based on the Bluetooth connection between the two. Moreover, compared with the discovery of the peer device based on Wi-Fi scanning between the mobile phone and the PC, the discovery of the peer device based on Bluetooth scanning between the mobile phone and the PC takes less time and is more efficient, which can improve the overall time consumed when establishing a Wi-Fi P2P connection between the mobile phone and the PC.
[0211] Among them, the implementation details of the above-mentioned Bluetooth scanning and device discovery process, Bluetooth device pairing and Bluetooth link establishment process can be referred to the existing technology and will not be repeated here.
[0212] This embodiment does not limit the sequence of S401 and S402.
[0213] S403: The mobile phone and the PC complete GO negotiation based on the Bluetooth connection.
[0214] Since the Bluetooth connection between the mobile phone and the PC is established in order to establish a Wi-Fi P2P connection between the two, after the Bluetooth connection is established between the mobile phone and the PC, the two can perform GO negotiation based on the Bluetooth connection to negotiate which device is the GO node, which device is the GC node, and the characteristic information of the P2P group.
[0215] In the embodiment of the present application, the result of the GO negotiation between the mobile phone and the PC based on the Bluetooth connection is that the PC is a GO node.
[0216] Before the mobile phone and PC establish a Wi-Fi P2P connection, you need to select the channel corresponding to the Wi-Fi P2P service, that is, you need to select the channel corresponding to the Wi-Fi P2P connection. After determining the channel corresponding to the Wi-Fi P2P service, the mobile phone can control the corresponding communication chip (primary communication chip or auxiliary communication chip) to establish a Wi-Fi P2P connection with the mobile phone based on the channel.
[0217] The following S404-S407 is a process for the PC to select a channel corresponding to the Wi-Fi P2P service. The present embodiment does not limit the execution order of S404-S407 and S403.
[0218] S404, the PC's Wi-Fi connection tool finds that the main communication chip is executing the STA service.
[0219] When the PC's Wi-Fi connection tool selects a channel corresponding to the Wi-Fi P2P service, it first determines whether the main communication chip is executing the STA service, that is, it can determine whether the main communication chip is connected to the wireless router. In this scenario, the main communication chip has been connected to the wireless router to execute the STA service.
[0220] S405, the PC's Wi-Fi connection tool finds out that the main communication chip uses the 2.4 GHz channel to carry STA services.
[0221] When the Wi-Fi connection tool finds that the main communication chip is executing the STA service, it continues to determine whether the main communication chip uses the 2.4 GHz channel to carry the STA service. In this scenario, the main communication chip uses the 2.4 GHz channel to carry the STA service as an example for explanation.
[0222] S406, the PC's Wi-Fi connection tool finds out that the main communication chip supports the DBDC mode.
[0223] After the Wi-Fi connection tool finds that the main communication chip uses the 2.4GHz channel to carry STA services, it continues to determine whether the main communication chip supports the DBDC method. In this scenario, taking the main communication chip supporting the DBDC method as an example, the main communication chip will use the DBDC method to carry both STA services and Wi-Fi P2P services.
[0224] S407, the Wi-Fi connection tool of the PC selects the main communication chip to use a 5 GHz channel with a bandwidth of x MHz to carry the Wi-Fi P2P service according to the service type of the Wi-Fi P2P service, and sends a Wi-Fi chip control instruction to the main communication chip.
[0225] Among them, the PC's Wi-Fi connection tool can select the main communication chip to use the 5GHz channel to carry the Wi-Fi P2P service, so as to improve the transmission rate of the Wi-Fi P2P service data. Moreover, the PC's Wi-Fi connection tool can also determine the bandwidth of the 5GHz channel carrying the Wi-Fi P2P service according to the service type of the Wi-Fi P2P service. Exemplarily, if the service type of the Wi-Fi P2P service is type 1, the Wi-Fi connection tool selects the main communication chip to use a 5GHz channel with a bandwidth of 80MHz to carry the Wi-Fi P2P service. If the service type of the Wi-Fi P2P service is type 2, the Wi-Fi connection tool selects the main communication chip to use a 5GHz channel with a bandwidth of 160MHz to carry the Wi-Fi P2P service.
[0226] After the Wi-Fi connection tool has selected the communication chip (i.e., the auxiliary communication chip) and the channel for carrying the Wi-Fi P2P service, the Wi-Fi connection tool can also send a Wi-Fi chip control instruction to the main communication chip according to its selection result. Among them, this Wi-Fi chip control instruction can be used to instruct the main communication chip to establish a Wi-Fi P2P connection with the mobile phone, as well as the channel information corresponding to the Wi-Fi P2P connection (such as channel frequency band, channel bandwidth, channel number, etc.).
[0227] S408, the main communication chip of the PC establishes a Wi-Fi P2P connection with the mobile phone based on a 5G channel with a bandwidth of x MHz.
[0228] After the Wi-Fi connection tool selects the communication chip (i.e., the main communication chip) and the channel for carrying the Wi-Fi P2P service, the PC can also send the channel information for carrying the Wi-Fi P2P service to the mobile phone based on the Bluetooth connection between the PC and the mobile phone. The channel information for carrying the Wi-Fi P2P service can also be sent from the PC to the mobile phone in other processes before establishing the Wi-Fi P2P connection (e.g., certain processes before exchanging link establishment information), which is not limited in this embodiment.
[0229] After the GO negotiation is completed between the PC and the mobile phone, and the PC selects the channel corresponding to the Wi-Fi P2P connection, the PC as the GO node can exchange link establishment information with the mobile phone as the GC node, and establish a Wi-Fi P2P connection with the mobile phone based on the link establishment information. For the GO node, the link establishment information may include but is not limited to channel information, Password, SSID, and MAC address of the GC node; for the GC node, the link establishment information may include but is not limited to channel information, Password, SSID, and MAC address of the GO node.
[0230] For details not explained in detail in the Wi-Fi P2P connection establishment process, please refer to the existing technology and will not be repeated here.
[0231] S409, based on the Wi-Fi P2P connection between the main communication chip and the mobile phone, the PC transmits data related to the wireless screen projection service with the mobile phone.
[0232] After the Wi-Fi P2P connection between the mobile phone and the PC main communication chip is established, the PC can transmit data related to the wireless screen projection service with the mobile phone based on the Wi-Fi P2P connection between the main communication chip and the mobile phone, so that the mobile phone can automatically project the mobile phone screen interface to the PC interface, and can also project the content selected by the user to the PC interface.
[0233] As described above, when the main communication chip of the PC 100 supports the DBDC mode, Figure 7b As shown, PC 100 can implement STA services and Wi-Fi P2P services simultaneously based on the DBDC mode of the main communication chip. The main communication chip uses the 2.4GHz channel to carry STA services, and can use the 5GHz channel to carry Wi-Fi P2P services. Both services can fully use the frequency band, which can ensure the quality of both services and will not affect the user experience.
[0234] Combining the above scenarios 1, 2 and 3, Figure 8 The following is an exemplary diagram showing the processing flow when the Wi-Fi connection tool selects the Wi-Fi P2P service channel in the communication method provided in the embodiment of the present application. Figure 8 As shown in the figure, the processing flow when the Wi-Fi connection tool selects the Wi-Fi P2P service channel includes:
[0235] S501, the Wi-Fi connection tool determines whether the main communication chip is executing the STA service, if so, execute S502, if not, execute other processing flows.
[0236] When the PC needs to perform Wi-Fi P2P services, the Wi-Fi connection tool first determines whether the main communication chip is currently performing STA services. If the main communication chip is not currently performing STA services, the Wi-Fi connection tool can select the main communication chip to use the 5GHz channel to carry the Wi-Fi P2P service according to the existing process.
[0237] S502, the Wi-Fi connection tool determines whether the main communication chip uses the 2.4 GHz channel to carry the STA service. If so, execute S503, if not, execute S507.
[0238] When the PC needs to execute P2P services, if the main communication chip is currently executing STA services, the Wi-Fi connection tool first determines the channel frequency band of the main communication chip carrying STA services, and determines how to select the channel carrying Wi-Fi P2P services based on the channel frequency band of the main communication chip carrying STA services.
[0239] S503, the Wi-Fi connection tool determines whether the main communication chip supports the DBDC mode, if not, execute S504, if yes, execute S506.
[0240] When the PC needs to perform P2P services, if the main communication chip currently uses the 2.4GHz channel to carry STA services, the Wi-Fi connection tool needs to further determine whether the main communication chip supports the DBDC mode, and select the main communication chip or the auxiliary communication chip to carry the Wi-Fi P2P service based on the determination result.
[0241] S504, the Wi-Fi connection tool selects the auxiliary communication chip to use the 5 GHz channel to carry the Wi-Fi P2P service.
[0242] When the PC needs to perform Wi-Fi P2P services, if the main communication chip currently uses the 2.4 GHz channel to carry STA services and the main communication chip does not support the DBDC mode, the Wi-Fi connection tool selects the auxiliary communication chip to use the 5 GHz channel to carry the Wi-Fi P2P services. At this time, you can refer to the situation shown in Scenario 1.
[0243] S505 , the Wi-Fi connection tool selects a bandwidth of a 5 GHz channel according to the Wi-Fi P2P service type.
[0244] Regardless of whether the primary communication chip uses the 5 GHz channel alone to carry the Wi-Fi P2P service or the secondary communication chip uses the 5 GHz channel alone to carry the Wi-Fi P2P service, the Wi-Fi connection tool can determine the bandwidth of the 5 GHz channel carrying the Wi-Fi P2P service according to the service type of the Wi-Fi P2P service.
[0245] Exemplarily, if the service type of the Wi-Fi P2P service is type 1, the Wi-Fi connection tool selects the auxiliary communication chip to use a 5GHz channel with a bandwidth of 80MHz to carry the Wi-Fi P2P service. If the service type of the Wi-Fi P2P service is type 2, the Wi-Fi connection tool selects the auxiliary communication chip to use a 5GHz channel with a bandwidth of 160MHz to carry the Wi-Fi P2P service.
[0246] S506: The Wi-Fi connection tool selects the main communication chip to use the 5 GHz channel to carry the Wi-Fi P2P service, and then executes S505.
[0247] When the PC needs to perform Wi-Fi P2P services, if the main communication chip currently uses the 2.4 GHz channel to carry STA services and the main communication chip supports the DBDC mode, the Wi-Fi connection tool selects the main communication chip to use the 5 GHz channel to carry the Wi-Fi P2P services. At this time, you can refer to the situation shown in scenario three.
[0248] That is, the main communication chip can carry STA services and Wi-Fi P2P services simultaneously based on the DBDC method, wherein the main communication chip uses a 2.4 GHz channel to carry STA services and uses a 5 GHz channel to carry Wi-Fi P2P services.
[0249] S507, the Wi-Fi connection tool determines whether the 5 GHz channel of the main communication chip carrying the STA service can carry the Wi-Fi P2P service, if so, execute S508, if not, execute other processing flows.
[0250] When the PC needs to perform P2P services, if the main communication chip currently uses the 5GHz channel to carry STA services, the Wi-Fi connection tool continues to determine whether the 5GHz channel of the main communication chip that carries STA services can carry Wi-Fi P2P services, thereby determining whether the main communication chip can simultaneously carry STA services and P2P services through the same frequency and channel.
[0251] According to communication regulations, if the 5 GHz channel of the main communication chip carrying STA services cannot carry Wi-Fi P2P services, the channel carrying Wi-Fi P2P services can be selected according to other methods, or the main communication chip can carry STA services and Wi-Fi P2P services at the same time based on the existing DBAC method. This embodiment does not limit this.
[0252] S508: The Wi-Fi connection tool selects the primary communication chip to use the 5 GHz channel to simultaneously carry the SAT service and the Wi-Fi P2P service.
[0253] When the PC needs to execute Wi-Fi P2P services, if the main communication chip currently uses the 5GHz channel to carry STA services, and the 5GHz channel that the main communication chip carries the STA services can carry Wi-Fi P2P services, the main communication chip can simultaneously carry STA services and Wi-Fi P2P services in a co-frequency and co-channel manner. At this time, refer to the situation shown in scenario 2.
[0254] The main communication chip needs to create SAP on the 5GHz channel that carries STA services, so that the mobile phone can access SAP and establish a Wi-Fi connection with the PC. Then, the main communication chip works in STA mode and SAP mode at the same time, so as to carry STA services and Wi-Fi P2P services at the same time through the same frequency and channel.
[0255] In one example, Fig. 91 shows a schematic diagram of the structure of an electronic device. Optionally, the electronic device is a PC, which is not limited in this application. It should be noted that the schematic diagram of the structure of the electronic device can be applied to the PC 100 in the accompanying drawings. It should be understood that Fig. 9 The electronic device shown is merely an example, and the electronic device may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. Fig. 9 The various components shown in the drawings may be implemented in hardware, including one or more signal processing and / or application specific integrated circuits, software, or a combination of hardware and software.
[0256] The electronic device may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, a main communication chip 150, an auxiliary communication chip 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a camera 193, a display screen 194, etc. The sensor module 180 may include a pressure sensor, an acceleration sensor, a temperature sensor, a magnetic sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a touch sensor, etc.
[0257] The processor 110 may include one or more processing units, for example, the processor 110 may include a CPU, a graphics processing unit (GPU), an image signal processor (ISP), a memory, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0258] The wireless communication function of the electronic device can be implemented by the main communication chip 150 or the auxiliary communication chip 160. The main communication chip 150 and the auxiliary communication chip 160 have Wi-Fi communication capability and Bluetooth communication capability.
[0259] The main communication chip 150 may support the DBDC mode or may not support the DBDC mode.
[0260] In the embodiment of the present application, the auxiliary communication chip 160 can be used alone to carry the Wi-Fi P2P service. Specifically, the auxiliary communication chip 160 can use a 5 GHz channel to carry the Wi-Fi P2P service.
[0261] It can be understood that the electronic device can realize the display function through the GPU, the display screen 194, and the CPU.
[0262] It is understandable that, in order to implement the communication method in the embodiment of the present application, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.
[0263] In another example, an embodiment of the present application further provides a device, which may include: a processor and a transceiver / transceiver pin, and optionally, a memory.
[0264] The various components of the device are coupled together through a bus, wherein the bus includes a power bus, a control bus and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are referred to as buses in the figure.
[0265] Optionally, the memory may be used to store instructions executed by the auxiliary communication chip in the above communication method. The processor may be used to execute the instructions in the memory, and control the receiving pin to receive a signal, and control the sending pin to send a signal.
[0266] The device may be the auxiliary communication chip in the above communication method embodiment.
[0267] Among them, all relevant contents of each step involved in any of the above embodiments can be referred to the functional description of the corresponding functional module, and will not be repeated here.
[0268] This embodiment further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the communication method in the above-mentioned embodiment.
[0269] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the communication method in the above-mentioned embodiment.
[0270] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes the communication method in the above-mentioned method embodiments.
[0271] An embodiment of the present application also provides a chip, which includes one or more interface circuits and one or more processors; the interface circuit is used to receive signals from the memory of the electronic device and send signals to the processor, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes the communication method in the above-mentioned method embodiments.
[0272] Among them, the electronic device (such as a PC, etc.), computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0273] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0274] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0275] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. 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 make equivalent replacements for some of the technical features therein. 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 communication method, characterized in that: Applied in an electronic device, the electronic device comprises a first communication chip and a second communication chip, the first communication chip and the second communication chip both have wireless fidelity Wi-Fi communication capability; The method comprises: The first communication chip uses the first channel to carry the station STA service; If the first communication chip does not support the dual-band dual-transmission mode, when the electronic device needs to perform a Wi-Fi point-to-point P2P service with the target terminal, the second communication chip uses the second channel to carry the Wi-Fi P2P service.
2. The method according to claim 1, characterized in that The frequency band of the first channel is 2.4 GHz, and the frequency band of the second channel is 5 GHz.
3. The method according to claim 2, characterized in that The second communication chip uses the second channel to carry the Wi-Fi P2P service, including: Determine a target bandwidth matching the Wi-Fi P2P service; The second communication chip uses a second channel to carry the Wi-Fi P2P service, and a channel bandwidth of the second channel is the target bandwidth.
4. The method according to any one of claims 1 to 3, characterized in that: Before determining whether the first communication chip supports the dual-frequency dual-transmission mode, the method further includes: If the frequency band of the first channel is 5 GHz, when the electronic device needs to perform a Wi-Fi P2P service with a target terminal, the first communication chip uses the first channel to carry the Wi-Fi P2P service.
5. The method according to claim 4, characterized in that The first communication chip uses the first channel to carry the Wi-Fi P2P service, including: The first communication chip creates a soft access point on the first channel so that the target terminal establishes a Wi-Fi P2P connection with the soft access point; The first communication chip carries the Wi-Fi P2P service based on the Wi-Fi P2P connection.
6. The method according to claim 4, characterized in that The first communication chip uses the first channel to carry the Wi-Fi P2P service, including: If the first channel is allowed to carry the Wi-Fi P2P service, the first communication chip uses the first channel to carry the Wi-Fi P2P service.
7. The method according to any one of claims 1 to 6, characterized in that: Also includes: If the first communication chip supports the dual-band dual-transmission mode, when the electronic device needs to perform a Wi-Fi P2P service with a target terminal, the first communication chip uses a third channel to carry the Wi-Fi P2P service.
8. The method according to claim 7, characterized in that The frequency band of the first channel is 2.4 GHz, and the frequency band of the third channel is 5 GHz.
9. The method according to any one of claims 1 to 8, characterized in that: Also includes: Before the electronic device establishes a Wi-Fi P2P connection with the target terminal, the electronic device establishes a Bluetooth connection with the target terminal; Based on the Bluetooth connection, the electronic device and the target terminal exchange information to complete the establishment of a Wi-Fi P2P connection between the electronic device and the target terminal.
10. The method according to any one of claims 1 to 8, characterized in that: The power consumption of the second communication chip is lower than the power consumption of the first communication chip.
11. An electronic device, characterized in that: It includes a first communication chip and a second communication chip; both the first communication chip and the second communication chip have Wi-Fi communication capability; The electronic device executes the communication method as described in any one of claims 1-10.
12. The electronic device according to claim 11, characterized in that: The electronic device is a personal computer PC.
13. An electronic device, characterized in that: include: One or more processors; a first communication chip and a second communication chip; both the first communication chip and the second communication chip have Wi-Fi communication capabilities; Memory; One or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device executes the communication method as described in any one of claims 1 to 10 through the first communication chip and the second communication chip.
14. The electronic device according to claim 13, characterized in that: The electronic device is a PC.
15. A chip system, characterized in that: Applied in an electronic device, the chip system includes instructions and at least one processor, and the at least one processor runs the instructions so that the electronic device executes the communication method as described in any one of claims 1-10.
16. A computer-readable storage medium comprising a computer program, characterized in that: When the computer program is executed on an electronic device, the electronic device is enabled to execute the communication method according to any one of claims 1 to 10.