Communication method, system and electronic device
By transmitting address information between electronic devices via the Bluetooth protocol, the Wi-Fi connectivity problem caused by role restrictions in the 802.11 protocol is solved, enabling a multi-point to multi-point Wi-Fi transmission and interaction mode, and improving connection efficiency and data exchange capabilities.
Patent Information
- Application Number
- CN202011568967.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-25
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2040-12-25
AI Technical Summary
Under the P2P protocol based on 802.11, devices may be unable to establish a Wi-Fi connection due to role restrictions, affecting the user experience.
Bluetooth enables electronic devices to discover each other and establish Wi-Fi connections, transmitting address information to provide the necessary information for pre-establishing Wi-Fi connections, thereby improving connection efficiency and enabling multi-point to multi-point Wi-Fi transmission and interaction modes.
It enables peer-to-peer communication between different devices, solves the connection problem caused by role restrictions, and improves the efficiency of Wi-Fi connection establishment and data exchange capabilities.
Smart Images

Figure CN114679708B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of communication, and in particular to a communication method, system and electronic device. BACKGROUND
[0002] With the rapid development of communication technology, the application scenarios of wireless fidelity (Wi-Fi) network are also more and more extensive. At present, the way of establishing Wi-Fi connection between multiple devices is usually based on the P2P (Peer-to-Peer) protocol in the 802.11 protocol. However, when establishing Wi-Fi connection based on the P2P protocol, the roles of the devices need to be negotiated. Correspondingly, due to the restrictions on different roles in the protocol, it may lead to that the devices with specific roles cannot establish Wi-Fi connection, affecting the user experience. SUMMARY
[0003] In order to solve the above technical problems, the present application provides a communication method, system and electronic device. In the method, the electronic devices can discover each other based on the Bluetooth protocol and establish Wi-Fi connection to perform data interaction through the Wi-Fi connection. Thus, a communication method suitable for the application scenario of multi-device connection is provided, so that Wi-Fi connection can be established between different devices and data interaction can be performed through the Wi-Fi connection, realizing a communication mode in which the roles of devices are mutually equal, and further realizing a multi-point-to-multi-point Wi-Fi transmission interaction mode.
[0004] In a first aspect, an embodiment of the present application provides a communication system. The system comprises a first electronic device, a second electronic device, and a third electronic device. The first electronic device is configured to receive a first operation when the first electronic device and the second electronic device interact with each other through a first Wi-Fi connection to exchange data of a first service. Then, the first electronic device establishes a first Bluetooth connection with the third electronic device in response to the first operation. The first electronic device sends address information of the first electronic device to the third electronic device through the first Bluetooth connection. Correspondingly, the third electronic device is configured to receive the address information of the first electronic device sent by the first electronic device. The third electronic device establishes a second Wi-Fi connection with the first electronic device according to the address information of the first electronic device. The third electronic device exchanges data of a second service with the first electronic device through the second Wi-Fi connection. In this way, the electronic devices can exchange the information required for establishing the Wi-Fi connection, such as the address information of the electronic devices, based on the Bluetooth connection, so as to improve the efficiency of establishing the Wi-Fi connection. In addition, the electronic devices can establish the Wi-Fi connection with any electronic device between the two electronic devices that are communicating, and exchange data through the Wi-Fi connection, so as to realize a communication mode in which the roles of the devices are equal to each other, and further realize a multi-point-to-multi-point Wi-Fi transmission mode.
[0005] For example, the first electronic device can be a mobile phone A, or a tablet, and the third electronic device can be a mobile phone B. That is, the mobile phone B can establish the Wi-Fi connection with any device between the mobile phone A and the tablet that are exchanging data through the Wi-Fi connection, so as to solve the problem that the mobile phone B can only communicate with a specific device due to the role limitation in the 802.11 protocol.
[0006] According to a second aspect, the third electronic device is further configured to receive a second operation when the third electronic device and the first electronic device exchange data of the second service through the second Wi-Fi connection. The third electronic device establishes a second Bluetooth connection with the second electronic device in response to the second operation. The third electronic device sends address information of the third electronic device to the second electronic device through the second Bluetooth connection. The second electronic device is configured to receive the address information of the third electronic device sent by the third electronic device when the second electronic device and the first electronic device exchange data of the first service through the first Wi-Fi connection. The second electronic device establishes a third Wi-Fi connection with the third electronic device according to the address information of the third electronic device. The second electronic device exchanges data of a third service with the third electronic device through the third Wi-Fi connection. In this way, the third electronic device can establish the Wi-Fi connection with the second electronic device and exchange data through the Wi-Fi connection while exchanging data with the first electronic device through the Wi-Fi connection, so as to realize the multi-point-to-multi-point Wi-Fi transmission mode.
[0007] According to the first aspect, or any one of the implementations of the above first aspect, the first electronic device is configured to send, in response to the first operation, first Bluetooth request information to the third electronic device, the first Bluetooth request information being used to instruct the third electronic device to establish a first Bluetooth connection. The third electronic device is configured to receive the first Bluetooth request information. The third electronic device is configured to establish the first Bluetooth connection with the first electronic device in response to the first Bluetooth request information. In this way, the electronic device in the embodiments of the present application can listen to or actively discover other electronic devices based on the Bluetooth protocol during the Wi-Fi communication of the other one or more electronic devices, and establish a Bluetooth connection with the other electronic devices to further establish a Wi-Fi connection.
[0008] According to the first aspect, or any one of the implementations of the above first aspect, the third electronic device is configured to send, in response to the second operation, second Bluetooth request information to the second electronic device, the second Bluetooth request information being used to instruct the second electronic device to establish a second Bluetooth connection. The second electronic device is configured to receive the second Bluetooth request information. The second electronic device is configured to establish the first Bluetooth connection with the first electronic device in response to the second Bluetooth request information. In this way, the electronic device in the embodiments of the present application can listen to or actively discover other electronic devices based on the Bluetooth protocol during the Wi-Fi communication of the other one or more electronic devices, and establish a Bluetooth connection with the other electronic devices to further establish a Wi-Fi connection.
[0009] According to the first aspect, or any one of the implementations of the above first aspect, the local forwarding table of the first electronic device includes a forwarding table entry of the second electronic device and a forwarding table entry of the third electronic device. The forwarding table entry of the second electronic device includes address information of the second electronic device, Wi-Fi capability information of the second electronic device, and a first encryption key. The forwarding table entry of the third electronic device includes address information of the third electronic device, Wi-Fi capability information of the third electronic device, and a second encryption key. In this way, the local forwarding table of the electronic device in the embodiments of the present application can record the forwarding table entries corresponding to the plurality of electronic devices in communication with the electronic device. That is, the electronic device in the embodiments of the present application can all realize the role of GO in the 802.11 protocol to perform Wi-Fi communication with the plurality of electronic devices.
[0010] According to a first aspect, or any possible implementation mode of the first aspect, the first electronic device is configured to send a first data packet to the second electronic device through the first Wi-Fi connection, wherein the first data packet comprises service data of a first service and address information of the second electronic device, and the first data packet is obtained by encrypting the first electronic device based on a first encryption key and modulating based on Wi-Fi capability information of the second electronic device. In this way, the local forwarding table of the electronic device in the embodiment of the present application can record the forwarding table entries corresponding to the plurality of electronic devices in communication. Correspondingly, the electronic device can perform Wi-Fi data interaction with the plurality of electronic devices based on the recorded forwarding table entries of the plurality of electronic devices.
[0011] According to a first aspect, or any possible implementation mode of the first aspect, the first electronic device is configured to send a second data packet to the third electronic device through the second Wi-Fi connection, wherein the second data packet comprises service data of a second service and address information of the third electronic device, and the second data packet is obtained by encrypting the first electronic device based on a second encryption key and modulating based on Wi-Fi capability information of the third electronic device. In this way, the local forwarding table of the electronic device in the embodiment of the present application can record the forwarding table entries corresponding to the plurality of electronic devices in communication. Correspondingly, the electronic device can perform Wi-Fi data interaction with the plurality of electronic devices based on the recorded forwarding table entries of the plurality of electronic devices.
[0012] For example, the first service and the second service can be the same service or different services.
[0013] According to a first aspect, or any possible implementation mode of the first aspect, the first service is any one of the following services: screen projection service, sharing service, and multi-screen collaboration service, and the second service is any one of the following services: screen projection service, sharing service, and multi-screen collaboration service.
[0014] According to a first aspect, or any possible implementation mode of the first aspect, the first electronic device is configured to receive a third operation, and in response to the third operation, send third Bluetooth request information to the second electronic device, wherein the third Bluetooth request information is used to instruct to establish a Bluetooth connection with the second electronic device. The second electronic device is configured to receive the third Bluetooth request information, and send third Bluetooth response information to the first electronic device, wherein the third Bluetooth response information is used to indicate that the second electronic device is a preset device. The first electronic device is configured to receive the third Bluetooth response information, and establish a third Bluetooth connection with the second electronic device according to the third Bluetooth response information. In this way, the electronic device can determine whether the opposite end is a preset device based on the Bluetooth protocol. After determining that the opposite end is a preset device, the electronic device can communicate with the opposite end based on the communication protocol in the embodiment of the present application.
[0015] According to a first aspect, or any possible implementation mode of the first aspect, the first electronic device is configured to receive a fourth operation, and in response to the fourth operation, send fourth Bluetooth request information to the second electronic device, the fourth Bluetooth request information being used to indicate to establish a Bluetooth connection with the second electronic device; the second electronic device is configured to receive the fourth Bluetooth request information, and send fourth Bluetooth response information to the first electronic device, the fourth Bluetooth response information being used to indicate that the second electronic device is a non-preconfigured device; the first electronic device is configured to receive the fourth Bluetooth response information, and according to the fourth Bluetooth response information, establish a first Wi-Fi connection with the second electronic device according to an 802.11 protocol. In this way, the electronic device can determine whether the opposite end is a preconfigured device based on the Bluetooth protocol. After determining that the opposite end is a non-preconfigured device, the electronic device can communicate with the opposite end according to an existing protocol, such as a flow in the 802.11 protocol.
[0016] According to a first aspect, or any possible implementation mode of the first aspect, the first electronic device is configured to receive a fifth operation, and in response to the fifth operation, send fifth Bluetooth request information to the second electronic device, the fifth Bluetooth request information being used to indicate to establish a Bluetooth connection with the second electronic device, and if no Bluetooth response information sent by the second electronic device is received within a set time length, establish a first Wi-Fi connection with the second electronic device according to an 802.11 protocol. In this way, the electronic device can determine whether the opposite end is a preconfigured device based on the Bluetooth protocol. After determining that the opposite end is a non-preconfigured device, the electronic device can communicate with the opposite end according to an existing protocol, such as a flow in the 802.11 protocol.
[0017] According to a first aspect, or any possible implementation mode of the first aspect, the first electronic device is configured to send address information of the first electronic device and channel information of the first electronic device to a third electronic device through a first Bluetooth connection; the third electronic device is configured to send first Wi-Fi connection request information to the first electronic device according to the address information of the first electronic device and the channel information of the first electronic device, the first Wi-Fi connection request information being used to indicate to establish a second Wi-Fi connection with the first electronic device, and the first Wi-Fi connection request information being information with a specific format; and the first electronic device is configured to establish the second Wi-Fi connection with the third electronic device in response to the received first Wi-Fi connection request information. In this way, the electronic device in the embodiment of the present application completes link negotiation through a self-defined protocol, without a GO / GC negotiation process, thereby avoiding the problem that the devices cannot communicate due to role limitation.
[0018] In a second aspect, the embodiments of the present application provide a communication method. The method comprises: when a first electronic device and a second electronic device interact with data of a first service through a first Wi-Fi connection, the first electronic device receives a first operation; the first electronic device establishes a first Bluetooth connection with a third electronic device in response to the first operation; the first electronic device sends address information of the first electronic device to the third electronic device through the first Bluetooth connection; the third electronic device receives the address information of the first electronic device sent by the first electronic device; the third electronic device establishes a second Wi-Fi connection with the first electronic device according to the address information of the first electronic device; and the third electronic device interacts with data of a second service with the first electronic device through the second Wi-Fi connection.
[0019] According to the second aspect, the method further comprises: when the third electronic device and the first electronic device interact with data of the second service through the second Wi-Fi connection, the third electronic device receives a second operation; the third electronic device establishes a second Bluetooth connection with the second electronic device in response to the second operation; the third electronic device sends address information of the third electronic device to the second electronic device through the second Bluetooth connection; when the second electronic device and the first electronic device interact with data of the first service through the first Wi-Fi connection, the second electronic device receives the address information of the third electronic device sent by the third electronic device; the second electronic device establishes a third Wi-Fi connection with the third electronic device according to the address information of the third electronic device; and the second electronic device interacts with data of a third service with the third electronic device through the third Wi-Fi connection.
[0020] According to the second aspect, or any one of the implementation forms of the second aspect, the first electronic device establishes the first Bluetooth connection with the third electronic device in response to the first operation, and the method comprises: the first electronic device sends first Bluetooth request information to the third electronic device in response to the first operation; the first Bluetooth request information is used to indicate that the first Bluetooth connection is established with the third electronic device; the third electronic device receives the first Bluetooth request information; and the third electronic device establishes the first Bluetooth connection with the first electronic device in response to the first Bluetooth request information.
[0021] According to the second aspect, or any one of the implementation forms of the second aspect, the third electronic device establishes the second Bluetooth connection with the second electronic device in response to the second operation, and the method comprises: the third electronic device sends second Bluetooth request information to the second electronic device in response to the second operation; the second Bluetooth request information is used to indicate that the second Bluetooth connection is established with the second electronic device; the second electronic device receives the second Bluetooth request information; and the second electronic device establishes the first Bluetooth connection with the first electronic device in response to the second Bluetooth request information.
[0022] According to a second aspect, or any possible implementation mode of the second aspect, the local forwarding table of the first electronic device comprises a forwarding table entry of the second electronic device and a forwarding table entry of the third electronic device; the forwarding table entry of the second electronic device comprises address information of the second electronic device, Wi-Fi capability information of the second electronic device, and the first encryption key; and the forwarding table entry of the third electronic device comprises address information of the third electronic device, Wi-Fi capability information of the third electronic device, and the second encryption key.
[0023] According to the second aspect, or any possible implementation mode of the second aspect, the method further comprises: sending, by the first electronic device, a first data packet to the second electronic device through the first Wi-Fi connection; wherein the first data packet comprises service data of the first service and address information of the second electronic device; and the first data packet is encrypted by the first electronic device based on the first encryption key and modulated based on the Wi-Fi capability information of the second electronic device.
[0024] According to the second aspect, or any possible implementation mode of the second aspect, the method further comprises: sending, by the first electronic device, a second data packet to the third electronic device through the second Wi-Fi connection; wherein the second data packet comprises service data of the second service and address information of the third electronic device; and the second data packet is encrypted by the first electronic device based on the second encryption key and modulated based on the Wi-Fi capability information of the third electronic device.
[0025] According to the second aspect, or any possible implementation mode of the second aspect, the first service is any one of the following services: a screen projection service, a sharing service, and a multi-screen collaboration service; and the second service is any one of the following services: a screen projection service, a sharing service, and a multi-screen collaboration service.
[0026] According to the second aspect, or any possible implementation mode of the second aspect, before the first electronic device and the second electronic device interact with data of the first service through the first Wi-Fi connection, the method further comprises: receiving, by the first electronic device, a third operation; sending, by the first electronic device, third Bluetooth request information to the second electronic device in response to the third operation; the third Bluetooth request information is used to instruct to establish a Bluetooth connection with the second electronic device; receiving, by the second electronic device, the third Bluetooth request information; sending, by the second electronic device, third Bluetooth response information to the first electronic device; the third Bluetooth response information is used to indicate that the second electronic device is a preset device; receiving, by the first electronic device, the third Bluetooth response information; and establishing, by the first electronic device, a third Bluetooth connection with the second electronic device according to the third Bluetooth response information.
[0027] According to a second aspect, or any possible implementation mode of the second aspect, before the first electronic device and the second electronic device interact data of the first service through the first Wi-Fi connection, the first electronic device further receives a fourth operation, and in response to the fourth operation, the first electronic device sends fourth Bluetooth request information to the second electronic device, the fourth Bluetooth request information is used to indicate to establish a Bluetooth connection with the second electronic device, the second electronic device receives the fourth Bluetooth request information, the second electronic device sends fourth Bluetooth response information to the first electronic device, the fourth Bluetooth response information is used to indicate that the second electronic device is a non-pre-set device, the first electronic device receives the fourth Bluetooth response information, and the first electronic device establishes the first Wi-Fi connection with the second electronic device according to the fourth Bluetooth response information and according to the 802.11 protocol.
[0028] According to a second aspect, or any possible implementation mode of the second aspect, before the first electronic device and the second electronic device interact data of the first service through the first Wi-Fi connection, the first electronic device further receives a fifth operation, and in response to the fifth operation, the first electronic device sends fifth Bluetooth request information to the second electronic device, the fifth Bluetooth request information is used to indicate to establish a Bluetooth connection with the second electronic device, and the first electronic device establishes the first Wi-Fi connection with the second electronic device according to the 802.11 protocol without receiving Bluetooth response information sent by the second electronic device within a set time length.
[0029] According to a second aspect, or any possible implementation mode of the second aspect, before the first electronic device and the second electronic device interact data of the first service through the first Wi-Fi connection, the first electronic device further sends address information of the first electronic device and channel information of the first electronic device to a third electronic device through the first Bluetooth connection, the third electronic device sends first Wi-Fi connection request information to the first electronic device according to the address information of the first electronic device and the channel information of the first electronic device, the first Wi-Fi connection request information is used to indicate to establish a second Wi-Fi connection with the first electronic device, the first Wi-Fi connection request information is information with a specific format, and the first electronic device establishes the second Wi-Fi connection with the third electronic device in response to the received first Wi-Fi connection request information.
[0030] The second aspect and any possible implementation mode of the second aspect correspond to the first aspect and any possible implementation mode of the first aspect respectively. The technical effects of the second aspect and any possible implementation mode of the second aspect can refer to the technical effects of the first aspect and any possible implementation mode of the first aspect, which will not be described here.
[0031] In a third aspect, an embodiment of the present application provides a communication method. The method comprises: when a first electronic device interacts with a second electronic device through a first Wi-Fi connection to exchange data of a first service, the first electronic device receives a first operation; the first electronic device establishes a first Bluetooth connection with a third electronic device in response to the first operation; the first electronic device sends address information of the first electronic device to the third electronic device through the first Bluetooth connection; and receives address information of the third electronic device sent by the third electronic device through the Bluetooth connection. The first electronic device establishes a second Wi-Fi connection with the third electronic device according to the address information of the third electronic device; and the first electronic device exchanges data of a second service with the third electronic device through the second Wi-Fi connection.
[0032] The third aspect and any possible implementation manner of the third aspect correspond to the first aspect and any possible implementation manner of the first aspect respectively. For details, refer to the technical effects of the first aspect and any possible implementation manner of the first aspect, which will not be described here.
[0033] In a fourth aspect, an embodiment of the present application provides an electronic device. The electronic device comprises a memory and a processor, the memory is coupled to the processor; the memory stores program instructions, when the program instructions are executed by the processor, the electronic device executes the communication method performed by the first electronic device, the second electronic device or the third electronic device in the second aspect or any possible implementation manner of the second aspect.
[0034] The fourth aspect and any possible implementation manner of the fourth aspect correspond to the first aspect and any possible implementation manner of the first aspect respectively. For details, refer to the technical effects of the first aspect and any possible implementation manner of the first aspect, which will not be described here.
[0035] In a fifth aspect, an embodiment of the present application provides a chip. The chip comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send a signal to the processor, the signal comprises computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes the communication method performed by the first electronic device, the second electronic device or the third electronic device in the second aspect or any possible implementation manner of the second aspect.
[0036] The fifth aspect and any possible implementation manner of the fifth aspect correspond to the first aspect and any possible implementation manner of the first aspect respectively. The technical effects of the fifth aspect and any possible implementation manner of the fifth aspect correspond to the technical effects of the first aspect and any possible implementation manner of the first aspect, which will not be described here.
[0037] In a sixth aspect, the embodiments of the present application provide a computer readable medium for storing a computer program, the computer program comprising instructions for executing the method in the second aspect or any possible implementation manner of the second aspect.
[0038] The sixth aspect and any possible implementation manner of the sixth aspect correspond to the first aspect and any possible implementation manner of the first aspect respectively. The technical effects of the sixth aspect and any possible implementation manner of the sixth aspect correspond to the technical effects of the first aspect and any possible implementation manner of the first aspect, which will not be described here.
[0039] In a seventh aspect, the embodiments of the present application provide a computer program, the computer program comprising instructions for executing the method in the second aspect or any possible implementation manner of the second aspect.
[0040] The seventh aspect and any possible implementation manner of the seventh aspect correspond to the first aspect and any possible implementation manner of the first aspect respectively. The technical effects of the seventh aspect and any possible implementation manner of the seventh aspect correspond to the technical effects of the first aspect and any possible implementation manner of the first aspect, which will not be described here. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1a Structure schematic diagram of an electronic device shown for example;
[0042] Figure 1b Software structure schematic diagram of an electronic device shown for example;
[0043] Figure 2 Communication flow schematic diagram of an 802.11 protocol shown for example;
[0044] Figure 3 Application scenario schematic diagram shown for example;
[0045] Figure 4 Schematic diagram of a user interface shown for example;
[0046] Figure 5 Schematic diagram of a user interface shown for example;
[0047] Figure 6a Bluetooth communication flow schematic diagram of a tablet and a mobile phone A shown for example;
[0048] Figure 6b The communication flow diagram of the tablet, the mobile phone A and the mobile phone B is shown as an example;
[0049] Figure 6c The data transmission flow diagram of the tablet and the mobile phone A is shown as an example;
[0050] Figure 7a The format diagram of the Bluetooth information is shown as an example;
[0051] Figure 7b The format diagram of the Wi-Fi information is shown as an example;
[0052] Figure 8 One of the user interface diagrams is shown as an example;
[0053] Figure 9 One of the user interface diagrams is shown as an example;
[0054] Figure 10 One of the user interface diagrams is shown as an example;
[0055] Figure 11 One of the user interface diagrams is shown as an example;
[0056] Figure 12 One of the user interface diagrams is shown as an example;
[0057] Figure 13 One of the user interface diagrams is shown as an example;
[0058] Figure 14 One of the user interface diagrams is shown as an example;
[0059] Figure 15a One of the user interface diagrams is shown as an example;
[0060] Figure 15b One of the user interface diagrams is shown as an example;
[0061] Figures 16a to 16c One of the application scenario diagrams is shown as an example. DETAILED DESCRIPTION
[0062] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0063] The term "and / or", merely describes an associated relationship, which means that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, and B exists alone.
[0064] The terms "first" and "second" and the like in the description and claims of the present application are used for distinguishing between similar objects and are not necessarily used to describe a specific sequence or order. For example, a first target object and a second target object are used for distinguishing between two different target objects, and are not necessarily used to describe a particular sequence or order of the target objects.
[0065] In the present application, the words "exemplary" and "for example" are used to help clarify the description of embodiments of the application. Any embodiment or design scheme described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or advantageous than other embodiments or design schemes. Rather, the use of "exemplary" or "for example" is intended to present concepts in a particular manner.
[0066] In the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified. For example, a plurality of processing units means two or more processing units; a plurality of systems means two or more systems.
[0067] Figure 1a A structural schematic diagram of an electronic device 100 is shown. It should be understood that, Figure 1a The electronic device 100 shown is only one example of an electronic device, and the electronic device 100 can have more or fewer components than shown in the figure, can combine two or more components, or can have a different configuration of components. Figure 1a The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0068] The electronic device 100 can 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, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0069] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors.
[0070] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.
[0071] The memory in the processor 110 can also be provided for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thus improving the efficiency of the system.
[0072] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0073] The USB interface 130 is an interface conforming to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect earphones to play audio through the earphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0074] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection methods or combinations of multiple interface connection methods in the above embodiments.
[0075] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input through the wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 while also supplying power to the electronic device through the power management module 141.
[0076] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 can also be configured to monitor parameters such as the battery capacity, the number of battery cycles, the battery health status (leakage, impedance), and the like. In some embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.
[0077] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, and the like.
[0078] The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be configured to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.
[0079] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G and the like applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter, amplify, and the like the received electromagnetic waves, and transmit the processed signals to the modem processor for demodulation. The mobile communication module 150 can also amplify signals modulated by the modem processor and radiate the signals as electromagnetic waves through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be disposed in the same device.
[0080] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a microphone 170B, etc.), or displays an image or a video through the display 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110 and disposed in the same device as the mobile communication module 150 or other functional modules.
[0081] The wireless communication module 160 can provide a wireless communication solution including a wireless local area network (WLAN) (such as a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, and the like, which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification thereon, and radiate the signal as an electromagnetic wave via the antenna 2.
[0082] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidu navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).
[0083] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.
[0084] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 100 can include 1 or N display screens 194, N being a positive integer greater than 1.
[0085] The electronic device 100 can implement the photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
[0086] The camera 193 is used to capture still images or videos. An object generates an optical image through a lens and projects the optical image to a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format such as RGB, YUV, etc. In some embodiments, the electronic device 100 can include 1 or N cameras 193, N being a positive integer greater than 1.
[0087] The digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0088] The video codec is used to compress or decompress digital videos. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0089] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to extend the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external memory card.
[0090] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like. The data storage area can store data created during use of the electronic device 100 (such as audio data, a phone book, etc.), and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
[0091] The electronic device 100 can implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, an application processor, and the like. For example, music playing, recording, and the like.
[0092] The audio module 170 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode an audio signal. In some embodiments, the audio module 170 can be disposed in the processor 110, or part of the function modules of the audio module 170 can be disposed in the processor 110.
[0093] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes an Android system with a layered architecture as an example to exemplarily illustrate the software structure of the electronic device 100.
[0094] Figure 1b is a software structure block diagram of the electronic device 100 of the embodiment of the present application.
[0095] The layered architecture of the electronic device 100 divides software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0096] The application layer can include a series of application packages.
[0097] As shown in Figure 1b , the application packages can include camera, gallery, calendar, call, navigation, WLAN, Bluetooth, music, video, Huawei Share, wireless projection, Nearby (Nearby Discovery) and the like.
[0098] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The application framework layer includes some pre-defined functions.
[0099] As shown in Figure 1b , the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager and the like.
[0100] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and take screenshots.
[0101] The content provider is used to store and obtain data, and makes the data accessible to the application. The data can include video, image, audio, dialed and received calls, browsing history and bookmarks, phonebook and the like.
[0102] The view system includes visual controls, such as controls that display text, controls that display pictures, and the like. The view system can be used to build an application. A display interface can be composed of one or more views. For example, a display interface that includes a short message notification control can include a view that displays text and a view that displays a picture.
[0103] The phone manager is used to provide the communication function of the electronic device 100. For example, management of call status (including call connection, call hangup, etc.).
[0104] The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
[0105] The notification manager enables applications to display notification information in the status bar, which can be used to convey a message of the notification type, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of the download, message reminders, etc. The notification manager can also be a notification that appears in the form of a chart or a scroll bar text in the top status bar of the system, such as a notification of an application running in the background, and can also be a notification that appears in the form of a dialog window on the screen. For example, the status bar prompts text information, issues a prompt sound, the electronic device vibrates, the indicator light flashes, etc.
[0106] The Android Runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and managing the Android system.
[0107] The core library contains two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.
[0108] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java file of the application layer and the application framework layer into a binary file. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.
[0109] The system library can include multiple functional modules. For example: surface manager, media library, three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
[0110] The surface manager is used to manage the display subsystem, and provides a fusion of 2D and 3D layers for multiple applications.
[0111] The media library supports multiple commonly used audio, video format playback and recording, and static image files, etc. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0112] The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc.
[0113] The 2D graphics engine is a drawing engine for 2D drawing.
[0114] Hardware Abstraction Layer (HAL) is a layer between hardware and software. HAL contains D2D (Device to Device) service, Supplicant (authentication service), etc. Optionally, the D2D service can also be referred to as Wi-Fi Direct service, which is used to manage and maintain the communication link between devices. The Supplicant is used to manage the D2D interface and Wi-Fi interface and key negotiation function. HAL is the foundation of the system. The final function implementation of the system is completed through HAL.
[0115] The kernel layer is a layer between hardware and software. The kernel layer at least contains display driver, camera driver, audio driver, sensor driver, D2D driver, etc.
[0116] It can be understood that, Figure 1b The components or modules contained in the system framework layer, the system library and runtime layer, the HAL layer and the kernel layer shown do not constitute a specific limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 can include more or fewer components than those shown, or combine certain components, or split certain components, or different arrangement of components.
[0117] At present, when different devices interact with each other, it is usually based on the P2P (peer-to-peer) protocol in the 802.11 protocol. Specifically, the P2P protocol provides a distributed network, so that the devices in the P2P network can share data through the P2P connection. With the development of P2P technology, P2P technology can provide a feasible device-to-device data transmission method for applications in electronic devices. For example, electronic devices installed with Huawei Share application, screen projection application, multi-screen collaboration application and other applications supporting P2P technology can establish P2P connection with other electronic devices installed with the same applications to transmit relevant service data. The following will be described in detail in combination with Figure 2 The communication flowchart shown by way of example briefly describes the P2P communication flow in the 802.11 protocol. As Figure 2 shown, specifically includes:
[0118] S101, the P2P device 1 sends a probe request message to the P2P device 2.
[0119] For example, the P2P device 1 broadcasts a probe request message. In this example, the P2P device 1 broadcasts the probe request message on all available channels (e.g., channel 1 to channel 13) in the 2.4 GHz frequency band and all available channels (e.g., channel 36 to channel 165) in the 5 GHz frequency band to detect devices operating on the corresponding channels.
[0120] For example, the P2P device 2 can receive the probe request message broadcasted by the P2P device 1 on the channel 40 in the 5 GHz frequency band.
[0121] In S102, the P2P device 2 sends a probe response message to the P2P device 1.
[0122] For example, the P2P device 2 receives the probe request message sent by the P2P device 1 and sends a probe response message to the P2P device on the channel 40.
[0123] In S103, the P2P device 1 sends a GO negotiation request message to the P2P device 2.
[0124] For example, after the P2P device 1 discovers the P2P device 2 supporting the P2P function around, the P2P device 1 can establish a P2P group with the P2P device 2 and negotiate who plays the role of GO (Group Owner) and who plays the role of Client (member, also referred to as group member).
[0125] For example, the role of the GO is similar to that of an AP (Access Point) in a BSS (Basic Service Set), which can also be referred to as a base station, and the role of the Client is similar to that of a station (STA) in the BSS. The station can support multiple WLAN (wireless local area network) standards of the 802.11 family, such as 802.11be, 802.11ax, 802.11ac, 802.11n, 802.11g, 802.11b, and 802.11a. The AP can also be a device supporting multiple WLAN standards of the 802.11 family, such as 802.11be, 802.11ax, 802.11ac, 802.11n, 802.11g, 802.11b, and 802.11a.
[0126] For example, in response to a probe response message received from P2P device 2, P2P device 1 sends a GO negotiation request message to P2P device 2 on channel 40 to negotiate the role of P2P Group with P2P device 2.
[0127] S104, P2P device 2 sends a GO negotiation response message to P2P device 1.
[0128] For example, in response to receiving a GO negotiation request message from P2P device 1, P2P device 2 sends a GO negotiation response message to P2P device 1 on channel 40.
[0129] S105, P2P device 1 sends a GO confirm message to P2P device 2.
[0130] It should be noted that the three frame exchanges from S103 to S105 are used to exchange information to identify the GO and the Client. The information exchanged in the three frame exchanges includes, but is not limited to, the GO's MAC address, Group ID, etc. For a detailed description of the negotiation process, please refer to the 802.11 protocol; it will not be repeated here.
[0131] In the description of the embodiments of this application, P2P device 2 is referred to as GO and P2P device 1 as Client, as an example. For example, P2P device 2 records itself as GO and P2P device 1 records itself as GC.
[0132] S106, P2P device 2 sends a Beacon message to P2P device 1.
[0133] For example, after P2P device 2 and P2P device 1 complete the group establishment, P2P device 2, as the GO end, can send Beacon messages (broadcast messages) (also known as Beacon frames) to establish a Wi-Fi connection with other devices on the 5GHz band, or a P2P connection.
[0134] S107, P2P device 1 and P2P device 2 perform link authentication association.
[0135] For example, after P2P device 1 listens to the Beacon message sent by P2P device 2 on channel 40, P2P device 1 performs a link authentication and association process with P2P device 2. In the link authentication and association process, multiple frame exchanges are needed to exchange information required for establishing a Wi-Fi connection. For example, the information required for establishing a Wi-Fi connection includes a pre-encryption key and Wi-Fi capability information, which includes but is not limited to MAC address information, a set of supported channels, modulation modes, and the like. Details will be described below.
[0136] In S108, P2P device 1 performs a 4-way handshake with P2P device 2.
[0137] For example, after the 4-way handshake, P2P device 1 and P2P device 2 successfully establish a Wi-Fi connection on channel 40, i.e., P2P device 1 and P2P device 2 can perform data interaction based on the Wi-Fi connection.
[0138] For example, in the 4-way handshake, P2P device 1 and P2P device 2 can negotiate an encryption key for data transmission.
[0139] It should be noted that the P2P connection establishment process in Figure 2 is only an example, and the process of P2P device 1 and P2P device 2 performing Wi-Fi communication can include more frame interaction processes than Figure 2 , and the information, format, and role of each frame can refer to the description in the existing standard, and will not be described here.
[0140] In S109a, P2P device 1 writes the encryption key and the Wi-Fi capability information of P2P GO (i.e., P2P device 2) into the local forwarding table.
[0141] In S109b, P2P device 2 writes the encryption key and the Wi-Fi capability information of P2P GC (i.e., P2P device 1) into the local forwarding table.
[0142] For example, P2P device 1, as a GC in a P2P group, writes the Wi-Fi capability information of a GO (i.e., P2P device 2) in the P2P group and the encryption key obtained in S108 into the local forwarding table.
[0143] P2P device 2, as a GO in a P2P group, writes the Wi-Fi capability information of a GC (i.e., P2P device 1) in the P2P group and the encryption key obtained in S108 into the local forwarding table.
[0144] S110, the P2P device 1 performs data transmission with the P2P device 2.
[0145] For example, the P2P device 1 and the P2P device 2 can perform data interaction through the established Wi-Fi connection (i.e. P2P connection).
[0146] For example, the P2P device 1 can encrypt the data packet based on the encryption key corresponding to the P2P device 2 recorded in the local forwarding table, and modulate the data packet based on the Wi-Fi capability information of the P2P device 2, and then send the data packet to the P2P device 2 through the Wi-Fi connection.
[0147] Please continue to refer to Figure 2 For example, the P2P device 2 as the GO in the P2P Group can invite other P2P devices to join the P2P Group to which the P2P device 2 belongs. For example, the P2P device 2 invites the P2P device 3 to join the P2P Group, which includes the following steps.
[0148] S201, the P2P device 3 sends a probe request message to the P2P device 2.
[0149] For example, the P2P device 3 broadcasts the probe request message on the full frequency band to discover the P2P device 2. For details, please refer to S101, which will not be repeated here.
[0150] S202, the P2P device 2 sends a probe response message to the P2P device 3.
[0151] For example, after the P2P device 2 receives the probe request message sent by the P2P device 3, the P2P device 2 sends a probe response message to the P2P device 3.
[0152] It should be noted that in the P2P Group, the P2P device 2 as the GO has the function of monitoring and replying the probe response message, that is, only when the other device sends the probe request message and the P2P device 2 receives the probe request message sent by the other device, the P2P device 2 will invite the other device to join the P2P Group. It should be noted that the GC in the P2P Group does not have the monitoring function, that is, it will not receive the probe request message sent by the P2P device 3.
[0153] S203, the P2P device 3 joins the P2P Group to which the P2P device 2 belongs.
[0154] S204a, the P2P device 3 writes the encryption key and the Wi-Fi capability information of the P2P GO (i.e. the P2P device 2) into the local forwarding table.
[0155] S204b, the P2P device 2 writes the encryption key and the Wi-Fi capability information of the P2P GC (i.e. the P2P device 3) into the local forwarding table.
[0156] For example, the P2P device 3 performs the action similar to 109a performed by the P2P device 1, which will not be described herein.
[0157] For example, the P2P device 2, as a GO, can record in the local forwarding table a forwarding entry corresponding to each of the GCs, each of which includes the corresponding encryption key and the Wi-Fi capability of the GC.
[0158] For example, the P2P Group to which the P2P device 2 belongs currently includes two GCs, i.e. the P2P device 1 and the P2P device 3. As shown in Table 1, the local forwarding table of the P2P device 2 records the forwarding entry corresponding to the P2P device 1 (including the encryption key 1, the Wi-Fi capability information of the P2P device 1 and the MAC address information of the P2P device 1) and the forwarding entry corresponding to the P2P device 3 (including the encryption key 2, the Wi-Fi capability information of the P2P device 3 and the MAC address information of the P2P device 3).
[0159] Table 1
[0160] Identification information of the device Wi-Fi capability information of the device Encryption key MAC address information of P2P device 1 Wi-Fi capability information of P2P device 1 Encryption key 1 MAC address information of P2P device 3 Wi-Fi capability information of P2P device 3 Encryption key 2 ……
[0161] S205, the P2P device 2 performs data transmission with the P2P device 3.
[0162] For example, based on the forwarding entry of the P2P device 1 recorded in the local forwarding table, the P2P device 2 can perform data interaction with the P2P device 1 through the P2P connection between the P2P device 2 and the P2P device 1. Meanwhile, based on the forwarding entry of the P2P device 3 recorded in the local forwarding table, the P2P device 2 can perform data interaction with the P2P device 3 through the P2P connection between the P2P device 2 and the P2P device 3. The specific interaction process can refer to the description in S110, which will not be described herein.
[0163] It should be noted that, as described above, in the P2P Group, the GO can listen to the probe request message sent by other P2P devices and respond. The GC cannot listen to the probe request message and will not respond, so only the GO (for example, P2P device 2) has the ability to invite other P2P devices to join the P2P Group, and it can also be understood that other P2P devices that want to join the P2P Group can only find the GO in the P2P Group, and cannot find the GC in the P2P Group. Therefore, other P2P devices can only interact with the GO in the P2P Group, and cannot interact with the GC in the P2P Group.
[0164] Correspondingly, since the GC can only interact with the GO, and there can be only one GO in a P2P Group, the local forwarding table of the GC only records the forwarding item corresponding to the GO. There can be multiple GCs in a P2P Group, and correspondingly, the local forwarding table of the GO can record multiple forwarding items corresponding to the GCs, as shown in Table 1.
[0165] In summary, since the GC is limited to single-link, that is, it can only communicate with the GO in the P2P Group to which it belongs, if a user wants to use the GC (for example, P2P device 1) to communicate with other P2P devices except P2P device 2, the P2P communication process in the existing 802.11 protocol cannot realize this scenario.
[0166] In addition, Figure 2 P2P device 3 shown in FIG. 3 is a device that has not joined any P2P Group. For example, if P2P device 3 is a GO in another P2P Group, as described above, since the GO is used to listen to the probe request message sent by other devices to invite other devices to join the P2P Group to which it belongs. Therefore, P2P device 2 and P2P device 3 as GO will not send a probe request message, but only listen to the probe request message sent by other devices, so P2P device 2 and P2P device 3 as GO in their respective groups will not be able to find each other. Therefore, the GOs in different P2P Groups in the 802.11 protocol cannot communicate with each other. Correspondingly, in the scenario where P2P device 3 is a GO in another P2P Group, if a user wants to use P2P device 3 to communicate with P2P device 2, the P2P communication process in the existing 802.11 protocol cannot realize this scenario.
[0167] This application provides a communication method. Based on a predefined protocol flow, this method enables any two devices among multiple devices to interact via Wi-Fi without requiring negotiation between GO and GC. This breaks the restrictions imposed by GO and GC on Wi-Fi connection establishment, allowing any two devices among multiple devices to freely establish Wi-Fi connections and interact based on these connections.
[0168] The communication methods in the embodiments of this application will be described in detail below with reference to specific examples.
[0169] like Figure 3 This is an illustrative diagram of an application scenario; please refer to it. Figure 3 For example, this application scenario includes mobile phone A, mobile phone B, and a tablet. It should be noted that the scenarios involved in the embodiments of this application, for example... Figure 3 The number and types of devices included in the scenarios shown are merely illustrative examples and are not intended to limit the scope of this application.
[0170] In the embodiments of this application, using Figure 3 In the application scenario described, mobile phone A and tablet perform multi-screen collaboration, while mobile phone A and mobile phone B share images via the Huawei Share application. It should be noted that this application embodiment only illustrates the scenario where electronic devices (including mobile phone A, tablet, and mobile phone B) interact with the multi-screen collaboration application via the Huawei Share application. In other embodiments, electronic devices may also use other applications or services that support the communication process (also referred to as communication protocol or proprietary protocol) in this application embodiment for data interaction, and this application does not limit this.
[0171] The following specific examples illustrate... Figure 3 The implementation of the application scenarios will be explained in detail.
[0172] Please refer to Figure 4 For example, the tablet display interface 402 may include multiple controls, including but not limited to: application controls, battery controls, network controls, etc. For example, a user can invoke the tablet's pull-down notification bar; for instance, when a user swipes down from the edge of the tablet screen, the tablet can respond to the received user operation and display the pull-down notification bar 404 on the display interface 402. For example, the pull-down notification bar 404 includes multiple controls, including but not limited to: WLAN controls, Bluetooth controls, mobile data controls, mute controls, auto-rotate controls, multi-screen collaboration controls 406, and brightness adjustment controls, etc. Optionally, each control in the pull-down notification bar 404 can be used to indicate whether a corresponding function or application is turned on or off, and can also be used to indicate the current status (on or off) of each function or application.
[0173] It should be noted that, in the embodiments of the present application, the phone A and the tablet are taken as examples to illustrate that the WLAN function and the Bluetooth function are enabled. Correspondingly, the network control on the display interface of the phone A and the tablet includes the WLAN control and the Bluetooth control, which are used to indicate that the WLAN function and the Bluetooth function are enabled.
[0174] Please continue to refer to Figure 4 For example, the phone A can currently display a main page. It should be noted that, in the embodiments of the present application, only the current display interface of the phone A and the tablet is taken as the main page, and the multi-screen cooperation service is executed when the phone A and the tablet display the main page. In other embodiments, the current display interface of the phone A and the tablet can also be other interfaces, which are not limited in the present application.
[0175] Still refer to Figure 4 For example, the user can click the multi-screen cooperation control 406 in the pull-down notification bar 404.
[0176] Please refer to Figure 5 For example, the tablet displays a multi-screen cooperation prompt box 502 in the display interface 402 in response to the received operation of the user clicking the multi-screen cooperation control 406. Optionally, the prompt box 502 includes a cancel control 504, an agree control 506 and prompt information, wherein the prompt information is used to indicate that the multi-screen cooperation application is currently being used. For example, if the user clicks the cancel control 504, the tablet can cancel the multi-screen cooperation prompt box 502 in response to the user operation. For example, in the embodiments of the present application, the user can click the agree control 506 to start the multi-screen cooperation process.
[0177] It should be noted that, in the embodiments of the present application, when the user operates the tablet, the current display interface of the phone A is still the main interface, and in other embodiments, the user can also perform other operations on the phone A, which are not limited in the present application.
[0178] It should be further noted that, in the embodiments of the present application, the tablet and the phone A are taken as examples to illustrate that the WLAN function and the Bluetooth function are enabled, for example, the network control displayed on the current display interface of the tablet and the phone A includes the WLAN control and the Bluetooth control, which are used to indicate that the WLAN function and the Bluetooth function are enabled. Optionally, in other embodiments, the tablet is taken as an example, if at least one of the WLAN function and the Bluetooth function of the tablet is not enabled, for example, the WLAN function is enabled and the Bluetooth function is not enabled. In one example, the user can enable the Bluetooth function from the setting application or the pull-down notification bar. In another example, the user clicks the agree control 506. Correspondingly, the tablet enables the Bluetooth function in response to the received operation of the user clicking the Bluetooth control in the setting application, the Bluetooth control in the pull-down notification bar or the agree control 506.
[0179] It is further needed to be explained that in addition to the way of starting the multi-screen cooperation function through the pull-down notification bar shown in Figure 4 In addition to the way of starting the multi-screen cooperation function through the pull-down notification bar shown in
[0180] For example, the tablet can determine to start the multi-screen cooperation application and display the prompt box 502 after the tablet and the mobile phone A are tapped. The application does not limit the way of starting the multi-screen cooperation. Figure 6a Figure 6a For example, the tablet can determine to start the multi-screen cooperation application and display the prompt box 502 after the tablet and the mobile phone A are tapped. The application does not limit the way of starting the multi-screen cooperation.
[0181] S301, the tablet starts the multi-screen cooperation function.
[0182] For example, in the embodiment of the application, after the tablet is started or initialized, the multi-screen cooperation application can be registered to the Nearby service. The application registered to the Nearby service can be understood as that the application expects the Nearby service to provide the corresponding service for the application during the use of the application. For example, as described above, the use of the multi-screen cooperation application needs to start the WLAN function and the Bluetooth function. It can also be understood that the business capability supported by the multi-screen cooperation includes the WLAN function and the Bluetooth function. The multi-screen cooperation service can be registered to the Nearby service and request to call the WLAN function and the Bluetooth function during the use.
[0183] For example, after the user starts the multi-screen cooperation application, for example, after the user clicks the consent control 506, the Nearby service (also referred to as the Nearby application) detects that the multi-screen cooperation application is started. For example, the Nearby service can detect that the multi-screen cooperation application is started through an interface. The multi-screen cooperation application can also send a request message to the Nearby service after being started. The application does not limit this.
[0184] S302, the tablet sends a Discovery Request (discovery request) message.
[0185] Exemplarily, the Nearby service determines that the multi-screen collaboration application is started, and a scanning stage can be performed. Optionally, the Nearby service can call an underlying module or a chip. For example, the Nearby service can call the D2D service to initiate a Bluetooth connection establishment process. Optionally, the D2D service can further call the D2D driver to control the Bluetooth chip to broadcast a Discovery Request message in real time or periodically.
[0186] It should be noted that, in the embodiments of the present application, the Bluetooth communication between devices, for example, the Bluetooth communication between the tablet and the mobile phone A, can be maintained through Bluetooth Low Energy (BLE), or can be maintained through classic Bluetooth, which is not limited in the present application.
[0187] Exemplarily, the Discovery Request message carries the device information of the tablet. Optionally, the device information includes but is not limited to the identification information of the tablet (such as device name, device model, Bluetooth address information, etc.), and the like, which is not limited in the present application.
[0188] Please refer to Figure 8 Exemplarily, the tablet determines that the multi-screen collaboration application is started, and optionally displays a multi-screen collaboration prompt box 802 on the display interface 402. Optionally, the size and position of the multi-screen collaboration prompt box 802 can be the same as or different from those of the multi-screen collaboration prompt box 502, which is not limited in the present application. Exemplarily, the prompt box 802 can include a cancel control 804. Optionally, if the user clicks the cancel control 804, the tablet cancels the display of the prompt box 802 and stops broadcasting the Discovery Request message in response to the operation of the user clicking the cancel control 804.
[0189] Optionally, the prompt box 802 further includes first prompt information and second prompt information. The first prompt information is used to indicate that another electronic device is being connected. The second prompt information is used to indicate that the connection with the other electronic device can be established through the scanning code. For example, the second prompt information can display the words "Can't find your mobile phone? You can also scan the code to connect". Optionally, the user can click "scan code to connect" to start the camera and obtain the device information of the mobile phone A through the scanning code, so as to perform Bluetooth communication with the mobile phone A based on the device information of the mobile phone A and perform subsequent multi-screen collaboration steps.
[0190] S303, the mobile phone A displays a prompt box and receives the operation behavior of the user clicking the connection control.
[0191] Exemplarily, the multi-screen collaboration application in the mobile phone A is also pre-registered to the Nearby service, and the specific description can refer to the related description on the tablet side, which is not described herein again.
[0192] For example, after receiving the Discovery Request message sent by the tablet, the mobile phone A can obtain the device information of the tablet. It should be noted that the sending and receiving of the Bluetooth signaling (or message) in the embodiments of the present application are both completed by the Bluetooth chip and the Nearby service. For example, after receiving the Bluetooth message, the Bluetooth chip can output the information carried in the message to the Nearby service, and the Nearby service sends corresponding instructions and data to the application (for example, the multi-screen collaboration application). The multi-screen collaboration application can perform response processing based on the received instructions and data. The interaction of the Bluetooth chip, the Nearby service and the multi-screen collaboration application is realized by the interfaces between layers, which will not be repeated hereinafter.
[0193] For example, the display interface of the mobile phone A can display a prompt box 806, and the prompt box 806 includes but is not limited to the identification information 808 of the tablet. Optionally, the identification information 808 of the tablet can be an icon of the tablet, or a device name of the tablet, or a model of the tablet, and the present application does not make any limitation. Optionally, the mobile phone A can pre-store a corresponding relationship between the device icon and the device information. For example, the mobile phone A stores a corresponding relationship between the icon of the tablet and the device type (i.e., indicating that the device is a tablet) of the tablet. After receiving the BLE Discovery Request message, the mobile phone A obtains the device type of the sending end as a tablet, and the mobile phone A can obtain the device icon corresponding to the device type of the tablet stored locally, and display in the prompt box 806.
[0194] For example, the prompt box 806 further includes a cancel control 810 and a connection control 812. For example, the cancel control 810 is used to cancel the display of the prompt box 806, which can also be understood as refusing to perform multi-screen collaboration with the tablet.
[0195] For example, in the embodiments of the present application, the user clicks the connection control 812, and correspondingly, the mobile phone A receives the operation of the user clicking the connection control 812, and the mobile phone A determines to perform multi-screen collaboration with the tablet.
[0196] S304, the mobile phone A sends a Discovery Response message to the tablet.
[0197] For example, in response to the operation of the user clicking the connection control 812, the mobile phone A can send a Discovery Response message to the tablet based on the Bluetooth protocol and the Bluetooth address information of the tablet obtained from the Discovery Request message, to indicate to perform multi-screen collaboration with the tablet.
[0198] Optionally, the Discovery Response message sent by the mobile phone A carries the device information of the mobile phone A, which includes but is not limited to the Bluetooth address information of the mobile phone A, the identification information (such as the device name, the device model, etc.) of the mobile phone A, etc., which are not limited in the present application.
[0199] It should be noted that the present application only shows the communication mode between the mobile phone A and the tablet, in other embodiments, if there are other devices which can receive the Discovery Request message broadcasted by the tablet and have the multi-screen cooperation function and the display function in the vicinity of the tablet, the devices will also display the prompt box 806. However, the devices which do not have the multi-screen cooperation function, even if they receive the Discovery Request message, will not reply the Discovery Response message to the tablet. In addition, the electronic devices which have installed the multi-screen cooperation application but do not support the communication process in the embodiments of the present application will also not reply the Discovery Response message to the tablet. In the embodiments of the present application, the Discovery Response message received by the mobile phone A corresponds to the preset device. The preset device is optionally the device which has installed the specified application and supports the communication protocol in the embodiments of the present application. For example, if the mobile phone A does not receive any Discovery Response message returned by the devices within a set time (for example, within 2s), the mobile phone A can initiate the Wi-Fi connection establishment process to the electronic devices in the vicinity, i.e. the non-preset devices, according to the process in the 802.11 protocol (for example, the process in the 802.11 protocol). Figure 2 It should be noted that, assuming that the mobile phone A and the tablet establish the Wi-Fi connection based on the process in the 802.11 protocol, the mobile phone A and the other devices can still establish the Wi-Fi connection based on the communication process in the embodiments of the present application.
[0200] In a possible implementation, if the user uses the mobile phone A to perform a multi-screen cooperation service with the tablet, the mobile phone A is a preset device in the embodiment of the present application, and the tablet is installed with a multi-screen cooperation application, but the tablet does not support the communication protocol in the embodiment of the present application, that is, the tablet is a non-pre-set device. Alternatively, the mobile phone A can establish a Wi-Fi connection with the tablet based on a P2P connection process in the 802.11 protocol, or can establish a Wi-Fi connection based on other standards or private processes, and perform data interaction. For example, if the non-pre-set device can receive a Discovery Request message, and sends a Discovery Response message to the mobile phone A. Alternatively, the Discovery Response message carries device information of the non-pre-set device, such as a device model, identification information of whether the non-pre-set device supports the communication protocol in the embodiment of the present application, and the like. The mobile phone A can determine that the opposite device is a non-pre-set device based on the Discovery Response message sent by the non-pre-set device. Then, the mobile phone A can establish a Wi-Fi connection with the non-pre-set device according to a process in the existing protocol.
[0201] It should be further explained that if the mobile phone A has started the Bluetooth function and has not started the WLAN function, after the user clicks the connection control 812, the mobile phone A can automatically start the WLAN function in response to the received user operation, for example, the WLAN control in the pull-down notification bar of the mobile phone A is lighted, indicating that the WLAN function has been started.
[0202] It should be further explained that compared with the process in the 802.11 protocol shown in FIG. 8, the electronic devices (such as the tablet, the mobile phone A and the mobile phone B in the following) in the embodiment of the present application can discover other devices based on the Bluetooth protocol, thereby avoiding the problem that the GO and the GC cannot discover the opposite device due to the role limitation of the GO and the GC in the 802.11 protocol. Figure 2
[0203] For example, the GC in the P2P Group in the 802.11 protocol cannot send a discovery message in the process of communicating with the GO, that is, it cannot communicate with other electronic devices (whether GO or GC) again. The communication method in the embodiment of the present application can discover other electronic devices based on the Bluetooth protocol. Since the Bluetooth communication is not affected by the Wi-Fi communication, that is, the electronic device can discover other electronic devices based on the Bluetooth protocol in the process of performing Wi-Fi communication with multiple electronic devices.
[0204] S305, the tablet sends a Bluetooth connection request message to the mobile phone A.
[0205] For example, the tablet receives the Discovery Response message sent by the mobile phone A, and the tablet can send a Bluetooth connection request message to the mobile phone A based on the Bluetooth address information of the mobile phone A carried in the Discovery Response message, to indicate that the Bluetooth connection is established with the mobile phone A. Alternatively, the Bluetooth address information of the mobile phone A and the Bluetooth address information of the tablet are carried in the connection request message, and the application is not limited in this regard.
[0206] In S306, the mobile phone A establishes the Bluetooth connection with the tablet.
[0207] For example, after receiving the Bluetooth connection request message sent by the tablet, the mobile phone A establishes the Bluetooth connection with the tablet.
[0208] It should be noted that in S306, the mobile phone A and the tablet can perform multiple Bluetooth signaling interactions to transmit information required for establishing the Bluetooth connection. The specific interaction process can refer to the content in the Bluetooth protocol, and the application will not be repeated here.
[0209] It should be further noted that the application only takes S306 as an example to illustrate the Bluetooth connection, and in other embodiments, S302 can also be understood as the start of the Bluetooth connection establishment, and any interaction process in S302-S306 can also be understood as the start time of the Bluetooth connection establishment, and the application is not limited in this regard.
[0210] In S107, the mobile phone A and the tablet interact with each other through the Bluetooth connection to transmit Wi-Fi connection establishment information.
[0211] For example, after the mobile phone A and the tablet establish the Bluetooth connection, the mobile phone A and the tablet can interact with each other based on the Bluetooth connection. For example, in the embodiment of the application, the mobile phone A and the tablet can interact with each other through the Bluetooth connection to transmit Wi-Fi connection establishment information, which is used for the subsequent Wi-Fi connection establishment process.
[0212] For example, the Wi-Fi connection establishment information in the embodiment of the application includes a pre-encryption key and all or part of Wi-Fi capability information.
[0213] For example, the pre-encryption key is encryption information required for establishing a Wi-Fi connection. For example, in the case of WPA-PSK (Wi-Fi Protected Access-Preshared Key), the PSK is shared between the two communication parties, and the pre-shared key is only used for the authentication process during the establishment of the Wi-Fi connection, but is not used for the data encryption process. The PTK (Pairwise Transient Key) is a pairwise transient key, that is, a pair of encryption keys. When the sending end (for example, the mobile phone A) and the receiving end (for example, the tablet) perform data interaction, the sending end can encrypt data based on one of the pair of keys, and the receiving end can decrypt data based on the other of the pair of keys. The PTK can be generated based on the PSK and a four-way handshake process, and is used to encrypt data during data transmission.
[0214] For example, the full set of Wi-Fi capability information can include, but is not limited to, channel information, MAC address information, protocol field information, MIMO information (for example, the number of MIMO antennas), and the like. For example, in the embodiment of the present application, the mobile phone A and the tablet transmit partial Wi-Fi capability information during Bluetooth communication. Optionally, the partial Wi-Fi capability information includes the MAC address information and the channel information of the device.
[0215] For example, the channel information is used to indicate the channel on which the device operates. Optionally, the channel information can be the frequency corresponding to the channel on which the device operates, and / or the channel number corresponding to the channel on which the device operates. For example, the tablet optionally operates on channel 40, and the mobile phone A optionally operates on channel 40 and channel 44.
[0216] For example, the mobile phone A sends the pre-encryption key, the MAC address information of the mobile phone A, and the channel information (for example, channel 40 and channel 44) of the mobile phone A to the tablet based on the Bluetooth connection between the mobile phone A and the tablet. The tablet sends the pre-encryption key, the MAC address information of the tablet, and the channel information (for example, channel 40) of the tablet to the mobile phone A based on the Bluetooth connection between the mobile phone A and the tablet.
[0217] For example, as described above, the Wi-Fi capability information includes, in addition to the MAC address information and the channel information, other information such as MIMO information, protocol fields, and the like used for data transmission. Optionally, this type of information can be exchanged between the two communication parties based on the Wi-Fi connection after the establishment of the Wi-Fi connection, so as to reduce the Bluetooth transmission power consumption and shorten the Wi-Fi connection establishment time.
[0218] For example, the mobile phone A receives the channel number sent by the tablet, and saves the channel number corresponding to the Bluetooth address of the tablet, the device information of the tablet, etc. in the memory. Correspondingly, the tablet can obtain the channel number (i.e. channel 40 and channel 44) sent by the mobile phone A, and saves the channel number of the mobile phone A corresponding to the Bluetooth address of the mobile phone A, the device information of the mobile phone A, etc. in the memory.
[0219] For example, as Figure 7a For example, the format of the Bluetooth information (which can also be referred to as a packet, a message or signaling) is shown in the schematic diagram Figure 7a For example, the Bluetooth information includes but is not limited to: a preamble field, an access address field, a header sub-bullet, a data field and a check field. Optionally, the header field includes a channel information field, a MAC address field and a pre-encryption key field. For example, the mobile phone A sends the Bluetooth information to the tablet during the Wi-Fi capability negotiation process, and the format of the Bluetooth information is shown in Figure 7a , wherein the channel information field carries the channel number (e.g. channel 40) corresponding to the channel supported by the mobile phone A. The MAC address field is used to carry the MAC address information of the mobile phone A, and the pre-encryption key field is used to carry the pre-encryption key.
[0220] Optionally, after the mobile phone A and the tablet complete the interaction of the Wi-Fi capability information, the mobile phone A can disconnect the Bluetooth connection with the tablet to reduce power consumption.
[0221] For example, after the mobile phone A and the tablet interact with each other's Wi-Fi capability, the Wi-Fi capability information of the opposite end is saved, which can be saved in the memory.
[0222] For example, the mobile phone A and the tablet interact with each other through the Bluetooth connection, and obtain the Wi-Fi capability of the opposite end respectively. Based on the obtained Wi-Fi capability, the Wi-Fi connection can be established, and the data interaction can be performed based on the Wi-Fi connection.
[0223] For example, the Wi-Fi communication process between the mobile phone A and the tablet includes: Figure 6b
[0224] S401, the tablet sends a D2D Association Request Action (D2D Association Request command) message to the mobile phone A.
[0225] For example, the tablet sends a D2D Association Request Action message to the mobile phone A to initiate a Wi-Fi connection establishment procedure with the tablet A. It should be noted that in the embodiment of the present application, S401 is the starting time of the Wi-Fi connection establishment, and in other embodiments, other interactive procedures, such as the four-way handshake procedure described below, can be the starting time of the Wi-Fi connection establishment, which is not limited in the present application.
[0226] Please continue to refer to Figure 6b For example, as described above, the tablet has stored the pre-encryption key and part of the Wi-Fi capability information of the mobile phone A in the process of Bluetooth communication with the mobile phone A, wherein the part of the Wi-Fi capability information includes but is not limited to the channel information of the mobile phone A and the MAC address information of the mobile phone A. Correspondingly, the mobile phone A has stored the pre-encryption key and the Wi-Fi capability information of the tablet, wherein the part of the Wi-Fi capability of the tablet includes but is not limited to the channel information of the tablet and the MAC address information of the tablet. For example, the tablet and the mobile phone A can implement the Wi-Fi link establishment procedure based on the stored pre-encryption key and the Wi-Fi capability information. For example, the tablet can send a D2D Association Request Action message to the mobile phone A on the channel supported by the mobile phone A (for example, channel 40, it should be noted that the channel is also supported by the tablet), wherein the D2D Association Request Action message carries the MAC address information of the mobile phone A. That is, compared with the Wi-Fi connection establishment procedure between devices in the 802.11 protocol which needs to scan the full frequency band, for example, in the 802.11 protocol, the tablet needs to send a discovery (probe) message on all available channels in the 4GHz frequency band and all available channels in the 5GHz frequency band to detect the devices that can perform Wi-Fi communication nearby, in the embodiment of the present application, since the tablet has obtained the channel information of the mobile phone A through Bluetooth communication, the tablet only needs to send the D2D Association Request Action message on one or more channels supported by the mobile phone A, thereby reducing resource occupation and improving Wi-Fi connection efficiency. Moreover, the D2D Association Request Action message sent by the tablet carries the MAC address information of the mobile phone A, that is, the tablet can send the D2D Association Request Action message to the specified device, i.e., the mobile phone A, by directional sending, compared with the way of broadcasting the discovery message in the 802.11 protocol, which can further reduce resource occupation and improve Wi-Fi connection efficiency.
[0227] For example, the D2D Association Request Action message includes, but is not limited to, the tablet's Wi-Fi capability information. It should be noted that, as described above, the set (i.e., the full set) of the Wi-Fi capability information includes, but is not limited to, channel information, MAC address information, protocol field information, MIMO information, etc. During the Bluetooth communication stage between the phone A and the tablet, the phone A and the tablet exchange part of the Wi-Fi capability information. Accordingly, the D2D Association Request Action message can carry part of the tablet's Wi-Fi capability information that is not transmitted during the Bluetooth communication, which can include, but is not limited to, modulation mode (e.g., MCS (Modulation and Coding Scheme), MIMO antenna number, etc.) and protocol field information (e.g., CP (Cyclic Prefix), etc.).
[0228] Optionally, in the embodiment of the present application, the tablet is a multi-screen cooperation initiator, i.e., the user triggers the multi-screen cooperation function on the tablet. Accordingly, the tablet is the initiator of the multi-screen cooperation, and during the Wi-Fi connection establishment process, it is also the initiator of the Wi-Fi connection establishment, and sends the D2D Association Request Action message to the receiver (i.e., the phone A). Optionally, in other embodiments, the user can also operate the phone A to start the multi-screen cooperation application, for example, the user can slide from the bottom to the top on the left edge of the phone A to start the multi-screen cooperation application (function) in the phone A. Then, the phone A will be the initiator of the multi-screen cooperation, and perform the steps performed by the tablet described above. The tablet will be the acceptor (or receiver) of the multi-screen cooperation, and perform the steps performed by the phone A described above. Moreover, the phone A as the initiator can send the D2D Association Request Action message to the tablet to request to establish the Wi-Fi connection with the tablet during the Wi-Fi connection establishment process.
[0229] S402, the phone A sends the D2D Association Response Action message to the tablet.
[0230] For example, after the phone A receives the D2D Association Request Action message sent by the tablet, the phone A acquires and saves the information carried by the D2D Association Request Action message, such as the modulation mode, the protocol field, etc.
[0231] For example, the mobile phone A sends a D2D Association Response Action message to the tablet, and the D2D Association Response Action message carries Wi-Fi capability information of the mobile phone A, such as a modulation mode supported by the mobile phone A.
[0232] Optionally, during the interaction of the mobile phone A and the tablet, the mobile phone A and the tablet reply to an ACK (Acknowledge) message after receiving a message sent by the opposite end each time, so that the opposite end determines that the message is successfully sent (i.e., the receiving end successfully receives the message). For example, the tablet sends a D2D Association Request Action message to the mobile phone A, and the mobile phone A replies to the tablet with an ACK message in response to the received D2D Association Request Action message. After receiving the ACK message, the tablet determines that the mobile phone A successfully receives the D2D Association Request Action message. For example, if the tablet does not receive the ACK message returned by the mobile phone A within a set time period, the tablet repeatedly sends the D2D Association Request Action message to the mobile phone A. For example, if the tablet still does not receive the ACK message returned by the mobile phone A after repeatedly sending the D2D Association Request Action message for a plurality of times (for example, 3 times), the tablet cancels the Wi-Fi communication process, i.e., cancels the multi-screen cooperation process. Optionally, the reason why the tablet does not receive the ACK message returned by the mobile phone A can be that the mobile phone A turns off the WLAN function, which is not limited in the present application.
[0233] For example, as shown in FIG. 6, the mobile phone A sends a D2D Association Request Action message to the tablet, and the D2D Association Request Action message carries Wi-Fi capability information of the mobile phone A, such as a modulation mode supported by the mobile phone A. Figure 7b For example, the Wi-Fi information, such as the format of the D2D Association Request Action message and the D2D Association Response Action message, is shown in FIG. 5, and the Bluetooth information is shown in FIG. 6. Figure 7b For example, the Bluetooth information includes but is not limited to a frame control field, a frame body field, a check field, etc. Optionally, the frame body field includes an Action Field (command field) field, etc. The Action Field field optionally includes a type field and an Action Details (command information) field, etc. The Action Details field optionally includes a Wi-Fi capability information field, etc. For example, the Wi-Fi capability information field can include Wi-Fi capability information to be transmitted, such as a modulation mode, a number of MIMO antennas, and protocol field information, etc.
[0234] The electronic devices (including the tablet, the mobile phone A, and the mobile phone B below) in the embodiments of the present application perform information interaction through specific signaling to establish a Wi-Fi connection, without the negotiation process of GO and GC, so as to avoid the role limitation of GO and GC on the establishment of the Wi-Fi connection.
[0235] S403, the mobile phone A performs four-way handshake with the tablet.
[0236] For example, the mobile phone A performs four-way handshake with the tablet to negotiate the encryption key. It should be noted that the encryption key negotiated in the four-way handshake process is information for data transmission encryption, for example, the PSK mentioned above can be the encryption key in the embodiments of the present application. It should be further noted that, as described above, the PSK is a temporary key, that is, the encryption key negotiated by the mobile phone A and the tablet is only applicable to the data transmission process of this Wi-Fi communication, that is, if the mobile phone A and the tablet disconnect the Wi-Fi connection and reestablish the Wi-Fi connection, the key negotiated by the mobile phone A and the tablet again is different from the key negotiated this time.
[0237] It should be noted that the four-way handshake process includes four signaling interactions, and the specific process can refer to the four-way handshake process in the 802.11 protocol, which will not be repeated in the present application.
[0238] For example, after the mobile phone A and the tablet negotiate the key, the encryption key negotiated is configured in the Wi-Fi chip, for example, in the register of the Wi-Fi chip, which is not limited in the present application.
[0239] Optionally, the encryption key can be generated by the mobile phone A and sent to the tablet, and after the tablet accepts the encryption key, the tablet can send a confirmation message to the mobile phone A. Alternatively, the encryption key can also be generated by the tablet and sent to the mobile phone A, and after the mobile phone A accepts the encryption key, the mobile phone A can send a confirmation message to the tablet.
[0240] S404a, the mobile phone A writes the encryption key 1 and the Wi-Fi capability information of the tablet into the local forwarding table.
[0241] S404b, the tablet writes the encryption key 1 and the Wi-Fi capability information of the mobile phone A into the local forwarding table.
[0242] For example, after the 4 handshakes between the mobile phone A and the tablet, the tablet and the mobile phone A can be considered to have successfully established a Wi-Fi connection. The mobile phone A writes the Wi-Fi capability information of the tablet and the key negotiated in S403 into the local forwarding table. Alternatively, the local forwarding table can also be referred to as a local routing table, which is configured in the Wi-Fi chip. It should be noted that, taking the mobile phone A as an example, the Wi-Fi capability information recorded in the local routing table of the mobile phone A is the full set of the Wi-Fi capability information of the tablet, that is, the Wi-Fi capability information exchanged during the Bluetooth communication (such as MAC address information, channel information) and the Wi-Fi capability information exchanged during the Wi-Fi communication (such as CP length, MIMO antenna number, etc.).
[0243] For example, as shown in Table 2, the local forwarding table of the mobile phone A records the corresponding relationship of the MAC address information of the tablet, the encryption key (such as encryption key 1), the modulation mode and other information. The tablet is similar to the mobile phone A, which will not be described here.
[0244] Table 2
[0245]
[0246]
[0247] For example, the local forwarding table is used for the Wi-Fi chip of the device (such as the mobile phone A and the tablet) to receive and send data packets according to the entries in the local forwarding table. The specific details will be described in detail in the data transmission process below.
[0248] S405, the mobile phone A and the tablet perform data transmission through the Wi-Fi connection.
[0249] The data transmission process between the mobile phone A and the tablet will be described in detail below. Figure 6c The data transmission process between the mobile phone A and the tablet will be described in detail below. Figure 6c , specifically including:
[0250] S601, the multi-screen collaboration application in the mobile phone A generates a data packet containing an image of a display interface.
[0251] For example, referring to Figure 9 , the multi-screen collaboration application can generate a data packet based on the current display interface of the mobile phone A. For example, the process of generating a data packet by the multi-screen collaboration application can optionally include: the multi-screen collaboration application encodes the image corresponding to the display interface, generates a corresponding image frame, and encapsulates the image frame to generate a data packet. In addition to the image frame, the data packet also includes, but is not limited to: destination MAC address information (such as the MAC address of the tablet) and source MAC address information (such as the MAC address information of the mobile phone A).
[0252] S602, the WiFi chip of the mobile phone A matches the destination MAC address information of the data packet with the MAC address information in the local forwarding table.
[0253] For example, the multi-screen cooperation application can output the generated data packet to the WiFi chip, and the WiFi chip matches the destination MAC address (i.e. the MAC address of the tablet) in the data packet with the MAC address information in the local forwarding table (e.g. the local forwarding table shown in Table 2).
[0254] In one example, if the destination MAC address in the data packet fails to match the MAC address in the local forwarding table, it can be determined that the mobile phone A has not established a Wi-Fi connection with the device corresponding to the MAC address, and the WiFi chip discards the data packet.
[0255] In another example, if the destination MAC address in the data packet matches the MAC address in the local forwarding table, the process proceeds to S603.
[0256] S603, the WiFi chip of the mobile phone A obtains the encryption key and the Wi-Fi capability information corresponding to the matched MAC address information.
[0257] For example, the mobile phone A obtains the encryption key and the Wi-Fi capability information corresponding to the matched MAC address in the local forwarding table, e.g. the encryption key and the Wi-Fi capability information corresponding to the matched MAC address (i.e. the MAC address of the tablet), and the Wi-Fi capability information includes the modulation mode, the number of MIMO antennas and other information of the tablet.
[0258] S604, the WiFi chip of the mobile phone A encrypts the data packet based on the encryption key and modulates the data based on the Wi-Fi capability information.
[0259] For example, the mobile phone A can encrypt the data packet based on the encryption key and modulate the data based on the modulation mode (e.g. CP length, MCS and the number of MIMO antennas) in the Wi-Fi capability information.
[0260] S605, the WiFi chip of the mobile phone A sends the data packet to the tablet.
[0261] For example, the mobile phone A sends the encrypted and modulated data packet to the tablet through the Wi-Fi connection between the mobile phone A and the tablet.
[0262] S606, the WiFi chip of the tablet matches the source MAC address of the data packet with the MAC address information in the local forwarding table.
[0263] Exemplarily, the Wi-Fi chip of the tablet receives the data packet sent by the mobile phone A, and matches the source MAC address carried in the data packet with the MAC address in the local forwarding table.
[0264] In one example, if the matching of the source MAC address in the data packet with the MAC address in the local forwarding table fails, the Wi-Fi chip discards the data packet.
[0265] In another example, if the matching of the source MAC address in the data packet with the MAC address in the local forwarding table succeeds, the process proceeds to S407.
[0266] S607, the Wi-Fi chip of the tablet acquires the encryption key and the Wi-Fi capability information corresponding to the MAC address matched successfully.
[0267] The content of this step is similar to S603 performed by the mobile phone A, and will not be repeated here.
[0268] S608, the Wi-Fi chip of the tablet performs data demodulation based on the Wi-Fi capability information, and performs decryption based on the encryption key.
[0269] Exemplarily, the tablet can demodulate the data packet based on the acquired Wi-Fi capability information, and decrypt the data packet based on the acquired encryption key, to acquire the image frame carried in the data packet.
[0270] S609, the multi-screen collaboration application of the tablet displays the image.
[0271] Exemplarily, the Wi-Fi chip of the tablet can output the acquired image frame to an upper layer, for example, the multi-screen collaboration application. Alternatively, the multi-screen collaboration application can decode the image frame to acquire the corresponding image (i.e., the display interface of the mobile phone A). Exemplarily, please refer to Figure 9 The tablet displays the acquired image, i.e., the current display interface of the mobile phone A, in the multi-screen collaboration application window 902.
[0272] It should be noted that Figure 6c only shows the process in which the mobile phone A sends data to the tablet. The process in which the tablet sends data to the mobile phone A is similar to that in Figure 6c , and will not be repeated here.
[0273] Exemplarily, in the embodiment of the present application, during the process of multi-screen collaboration between the mobile phone A and the tablet, the mobile phone A can also interact with the mobile phone B based on the Wi-Fi connection. Exemplarily, in the embodiment of the present application, the mobile phone A performs a Huawei Share service with the mobile phone B while performing a multi-screen collaboration service with the tablet, for example, the mobile phone A shares pictures with the mobile phone B through the Huawei Share application, which is used to illustrate the application scenario in Figure 3 .
[0274] Please refer to Figure 6b , the specific process of sending the image from the mobile phone A to the mobile phone B through the Huawei Share can include:
[0275] S501, the mobile phone B starts the Huawei Share function.
[0276] Exemplarily, please refer to Figure 10 (1), the display interface 1002 of the mobile phone B currently displays the home page of the mobile phone B, and the display interface 1002 includes a plurality of controls, including but not limited to: application controls, network controls, and the like. Exemplarily, the user can slide from the top edge of the mobile phone B downwards to call out the drop-down notification bar of the mobile phone B, and the mobile phone B displays the drop-down notification bar 1004 on the display interface 1002 in response to the received user operation. It should be noted that, in the embodiments of the present application, the display interface 1002 of the mobile phone B displays the home page as an example, and in other embodiments, the display interface 1002 can also display the application interface of any application of the mobile phone B, which is not limited in the present application.
[0277] Please continue to refer to Figure 8 Exemplarily, the drop-down notification bar 1004 optionally includes a plurality of controls, including but not limited to: WLAN controls, Bluetooth controls, mobile data controls, Huawei Share controls 1006, and the like. It should be noted that Figure 8 the number and names of the controls in are only exemplary examples, which are not limited in the present application.
[0278] Exemplarily, in the embodiments of the present application, the user can click the Huawei Share control 1006 in the drop-down notification bar 1004. Please refer to Figure 10 (2), exemplarily, the mobile phone B displays a prompt box 1008 on the display interface 1002 in response to the received user operation of clicking the Huawei Share control 1006. Optionally, the prompt box 1008 includes but is not limited to prompt information for indicating that after the Huawei Share function is started, the nearby devices can be automatically searched when sharing files, and the function needs to start the WLAN and Bluetooth.
[0279] Exemplarily, the prompt box 1008 also includes a cancel control 1010 and an open control 1012. Optionally, if the user clicks the cancel control 1010, the mobile phone B cancels the prompt box 1008 in response to the user's clicking operation, that is, the Huawei Share function is not started. In the embodiments of the present application, the user clicks the open control 1012 to start the Huawei Share function of the mobile phone B. It should be noted that, in the embodiments of the present application, the WLAN function and the Bluetooth function of the mobile phone B are started as an example, and in other embodiments, if the WLAN function and / or the Bluetooth function is not started, the mobile phone B automatically starts the WLAN function and the Bluetooth function after receiving the user's operation of clicking the open control 1012.
[0280] S502, the mobile phone A receives the operation of the user clicking the Huawei sharing control.
[0281] For example, refer to Figure 11 (1), the display interface 1102 of the mobile phone A includes a plurality of controls, including but not limited to application controls, network controls, etc. For example, the user clicks the gallery control 1104. Refer to Figure 11 (2), for example, the mobile phone A displays the gallery interface 1106 in response to the received operation of the user clicking the gallery control 1104. For example, the gallery interface 1106 includes, but is not limited to, thumbnails corresponding to part or all of the images stored in the mobile phone A. Optionally, the gallery interface 1106 can also include other controls, Figure 11 The number and layout of the pictures and controls shown in (2) are only illustrative examples, and the present application is not limited thereto.
[0282] Continue to refer to Figure 11 (2), for example, the user clicks the picture thumbnail 1108, and the mobile phone A displays the picture preview interface 1110 in response to the received user operation. Optionally, the picture preview interface includes the preview picture 1112 and can also include a plurality of controls, including but not limited to: the sharing control 1114, the editing control, the deletion control, etc., and the present application is not limited thereto. For example, the user clicks the sharing control 1114. Refer to Figure 11 (4), for example, the mobile phone A displays the picture sharing interface 1116 in response to the received operation of the user clicking the sharing control 1114. For example, the picture sharing interface 1116 includes a plurality of controls, including but not limited to: the picture 1118 and the picture 1120, wherein the picture 1118 and the picture 1120 also include selection controls, for example, the selection control 1122 included in the picture 1118. Optionally, the selection control 1122 is used to indicate that the picture (i.e., the picture 1118) has been selected as a picture to be shared. Optionally, the user can also click the selection control in 1120 to share multiple pictures at the same time. In the present embodiment, only the sharing of the picture 1118 from the mobile phone A to the mobile phone B is taken as an example for description. For example, the picture sharing interface 1116 also includes the Huawei sharing control 1124. Optionally, the Huawei sharing control 1124 can include a prompt message, which is used to indicate that clicking here will transfer files to nearby devices at high speed without traffic, and this function will turn on the WLAN and Bluetooth. That is, similar to the description in Figure 10 , after the mobile phone A receives the operation of the user clicking the Huawei sharing control 1124, the mobile phone A will automatically turn on the WLAN function and the Bluetooth function if it detects that any of the WLAN function or the Bluetooth function is not turned on.
[0283] Exemplarily, before or during the multi-screen cooperation between the mobile phone A and the tablet, the mobile phone A has enabled the WLAN function and the Bluetooth function.
[0284] Optionally, the picture sharing interface 1116 further includes a control corresponding to another sharing approach, for example, the picture sharing interface 1116 can include a Bluetooth sharing control, an information sharing control, a music sharing control, a WLAN direct connection sharing control, and the like.
[0285] It should be noted that during the operation of the mobile phone A by the user, the mobile phone A and the tablet are still performing the multi-screen cooperation service. Exemplarily, in the case of Figure 11 (3), the mobile phone A sends the picture preview interface 1110 corresponding to the image in the Figure 11 (3) to the tablet, and the tablet can display the picture preview interface 1110 in the multi-screen cooperation window 1102.
[0286] It should be further noted that in the embodiments of the present application, only the operation of the user on the mobile phone A is exemplarily described, and in other embodiments, during the multi-screen cooperation service between the mobile phone A and the tablet, the user can operate the control in the multi-screen cooperation window 702 of the tablet, and the steps shown in Figure 11 may also be implemented, for example, refer to Figure 9 , the user can click the gallery control in the multi-screen cooperation window 902, the tablet receives the click operation of the user, and sends indication information to the mobile phone A, to indicate that the user clicks the gallery control corresponding to the mobile phone A, and the mobile phone A can display the gallery interface 1106 shown in Figure 11 (2) based on the received indication information, and send the image corresponding to the gallery interface 1106 to the tablet, so that the multi-screen cooperation window 902 of the tablet displays the gallery interface 1106. Optionally, during the multi-screen cooperation, the mobile phone A can also be in a screen-off state, and the user can only operate in the multi-screen cooperation window of the tablet, and the steps performed by the mobile phone A in the embodiments of the present application can also be implemented, and the present application will not be repeated.
[0287] It should be further noted that the method of starting Huawei Share shown in Figure 11 (4) is applicable to the initiating end of the Huawei Share function, that is, the end of sharing pictures or data to other devices. Optionally, in other embodiments, the mobile phone A as the initiating end of the Huawei Share function can also start the Huawei Share function by the method shown in Figure 10 , and correspondingly, in Figure 11 (3), after the user clicks the sharing control 1114, the mobile phone A responds to the click operation of the user, skips the steps shown in Figure 11 (4), and directly executes S503.
[0288] S503, the mobile phone A sends a Discovery Request message to the mobile phone B.
[0289] Please refer to Figure 12 For example, the mobile phone A determines that the Huawei Share function of the mobile phone A is turned on in response to the received user click on the Huawei Share control 1124, and the mobile phone A can search for devices that have turned on the Huawei Share function based on the Bluetooth protocol. For example, the mobile phone A can periodically broadcast a Discovery Request message to search for devices that have turned on the Huawei Share function.
[0290] For example, the Bluetooth communication between the mobile phone A and the mobile phone B in the embodiments of the present application can be maintained through BLE or can be maintained through classic Bluetooth, which is not limited in the present application.
[0291] S504, the mobile phone B sends a Discovery Response message to the mobile phone A.
[0292] For example, the mobile phone B has turned on the Huawei Share function (as shown in Figure 10 After the mobile phone B receives the Discovery Request message sent by the mobile phone A, the mobile phone B returns a Discovery Response message to the mobile phone A. It should be noted that in the embodiments of the present application, devices that have turned on the Bluetooth function and are in the vicinity of the mobile phone A can receive the Discovery Request message sent by the mobile phone A. Optionally, devices that have turned on the Huawei Share function, such as the mobile phone B, send a Discovery Response message to the mobile phone A after receiving the Discovery Request message, and other devices that have not turned on the Huawei Share function do not process the Discovery Request message.
[0293] It should be noted that the Huawei Share service between the mobile phone A and the mobile phone B is only taken as an example for description in the embodiments of the present application. In other embodiments, the mobile phone B can also perform the Huawei Share service with the tablet. Moreover, any device among the mobile phone A, the mobile phone B and the tablet can be taken as an initiation end of connection establishment to discover other devices. Compared with the prior art, Figure 2In the P2P connection procedure in the 802.11 protocol shown in the figure, the P2P device 3 can only discover the GO (i.e., the P2P device 2) in the P2P Group and interact with the GO. In the embodiments of the present application, the devices perform the device discovery procedure through the Bluetooth protocol. Therefore, any one of the devices (e.g., the mobile phone A and the tablet) that are interacting with each other can discover the other device based on the Bluetooth protocol, establish a Wi-Fi connection with the other device, and interact with the other device. Similarly, a new device (e.g., the mobile phone B) can discover any one of the devices that are interacting with each other based on the Bluetooth protocol, and establish a Wi-Fi connection with the device.
[0294] Details not described in S503-S504 can refer to the related content of S302 and S304, which will not be described here.
[0295] S505, the mobile phone A displays a device list.
[0296] Please continue to refer to Figure 12 In the embodiments of the present application, the mobile phone A receives the DiscoveryResponse message returned by the mobile phone B. For example, the mobile phone A displays the searched device in the picture sharing interface 1116, i.e., replies to the DiscoveryResponse message.
[0297] Still referring to Figure 12 For example, the mobile phone A displays the identification information 1202 of the mobile phone B in the picture sharing interface 1116. Optionally, the identification information 1202 of the mobile phone B can include but is not limited to at least one of the following: an icon of the mobile phone B, a user account of the mobile phone B, a device name of the mobile phone B, a device model of the mobile phone B, and the like. For example, in the embodiments of the present application, the identification information 1202 of the mobile phone B includes the user account (Jane) of the mobile phone B and the device model (HUAWEI nova 3) of the mobile phone B.
[0298] For example, the mobile phone A sends the currently displayed picture sharing interface 1116 to the tablet, and the tablet displays the current interface (i.e., the picture sharing interface 1116) of the mobile phone A in the multi-screen collaboration window 902.
[0299] It should be noted that, in the embodiments of the present application, only the Huawei sharing between the mobile phone B and the mobile phone A is taken as an example. In other embodiments, if there is another device that has enabled the Huawei sharing function in the vicinity (e.g., within 2 meters) of the mobile phone A, the mobile phone B can also perform the related steps, which will not be described here.
[0300] S506, the mobile phone A receives the operation of selecting the mobile phone B by the user.
[0301] For example, please continue to refer to Figure 12The user can click the identification information 1202 of the mobile phone B to share the picture 1118 with the mobile phone B.
[0302] For example, the mobile phone A determines that the picture 1118 needs to be shared with the device indicated by the identification information 1202 of the mobile phone B in response to the operation of the user clicking the identification information 1202 of the mobile phone B.
[0303] S507. The mobile phone A sends a Bluetooth connection request to the mobile phone B.
[0304] For example, the mobile phone A receives the Discovery Response message sent by the mobile phone B, and the mobile phone A can send a Bluetooth connection request message to the mobile phone B based on the Bluetooth address information of the mobile phone B carried in the Discovery Response message, to indicate that the Bluetooth connection is established with the mobile phone B.
[0305] Optionally, the Bluetooth connection request message can carry the picture information of the picture (for example, the picture 1119) to be shared. For example, the picture information includes but is not limited to at least one of the following: picture size, picture name, number of shared files, and the like. It should be noted that the sharing of the picture is only used as an example in the embodiments of the present application, and in other embodiments, if the mobile phone A shares other types of data, for example, an e-book, a video, or a folder, the Bluetooth connection request carries corresponding data information.
[0306] Optionally, the Bluetooth connection request message further carries the Bluetooth address information of the mobile phone A and the mobile phone B, the user account information of the mobile phone B, and other information, which is not limited in the present application.
[0307] S508. The mobile phone B displays a prompt box and receives the operation behavior of the user clicking an accept control.
[0308] For example, the mobile phone B receives the Bluetooth connection request message sent by the mobile phone A, and obtains the picture information and other information (for example, user account information) carried in the connection request. It should be noted that the sending and receiving of the Bluetooth signaling (or message) in the embodiments of the present application are completed by the cooperation of the Bluetooth chip and the Nearby service. For example, the Bluetooth chip receives the Bluetooth message, outputs the information carried in the message to the Nearby service, and sends corresponding instructions and data to the application (for example, the Huawei Share application) by the Nearby service. The multi-screen cooperation application can respond based on the received instructions and data. The interaction of the Bluetooth chip, the Nearby service, and the Huawei Share application is realized by the interfaces between layers.
[0309] For example, please refer to Figure 13In response to the received Bluetooth connection request message, the mobile phone B can display a prompt box 1302 on the display interface 1002, where the prompt box 1302 includes but is not limited to: file sharing information 1304, a rejection control 1306, and an acceptance control 1308.
[0310] For example, the file sharing information 1304 can include but is not limited to: the number of files to be received (i.e., the files to be shared by the mobile phone A), the file size, the file name, and the user account of the device to be shared (i.e., the user account of the mobile phone A), and the like. For example, in the embodiment of the present application, the file sharing information 1304 includes: the number of files (1 file), the file size (2M), the file name (IMG_20201004.jpg), and the user account (189*02). Optionally, the file sharing information 1304 also includes the prompt information “ready to send”, which indicates that the device corresponding to the user account is about to send 1 file to the mobile phone B (i.e., the device of the mobile phone B) through Huawei Share, the file size is 2M, and the file name is IMG_20201004.jpg.
[0311] For example, the rejection control 1306 is used to indicate the rejection of receiving the files to be shared by the mobile phone A. For example, if the user clicks the rejection control 1306, the mobile phone B cancels the display of the prompt box 1302 and disconnects the Bluetooth communication with the mobile phone A in response to the received user operation.
[0312] For example, the acceptance control 1308 is used to indicate the agreement to receive the files to be shared by the mobile phone A. For example, if the user clicks the acceptance control 1308, the mobile phone B establishes a Bluetooth connection with the mobile phone A in response to the received user operation, i.e., the flow proceeds to S509.
[0313] S509: The mobile phone B establishes a Bluetooth connection with the mobile phone A.
[0314] In this step, the related description in S306 can be referred to, and details are not described herein.
[0315] S510: The mobile phone B and the mobile phone A interact Wi-Fi capability information through the Bluetooth connection.
[0316] For example, after the mobile phone A establishes a Bluetooth connection with the tablet, the mobile phone A and the tablet can interact data based on the Bluetooth connection. For example, in the embodiment of the present application, the mobile phone A and the tablet can transmit the pre-encryption key and the respective partial or complete Wi-Fi capability information through the Bluetooth connection.
[0317] Exemplarily, after the interaction between the mobile phone A and the mobile phone B through the Bluetooth connection, the mobile phone A can obtain the pre-encryption key, the MAC address information of the mobile phone B and the channel information of the mobile phone B. Correspondingly, the mobile phone B can obtain the pre-encryption key, the MAC address information of the mobile phone A and the channel information of the mobile phone A. It should be noted that the pre-encryption key negotiated between the mobile phone A and the mobile phone B and the pre-encryption key negotiated between the mobile phone A and the tablet in S307 can be the same or different, which is not limited in the present application.
[0318] The other parts not described can refer to the related content of S307, which will not be described here.
[0319] S511, the mobile phone A sends a D2D Association Request Action message to the mobile phone B.
[0320] Please continue to refer to Figure 6b Exemplarily, as described above, in the process of Bluetooth communication between the mobile phone A and the mobile phone B, the mobile phone A has stored the pre-encryption key and the channel information (such as channel 40), MAC address information, etc. of the mobile phone B. Correspondingly, the mobile phone A can send a D2D Association Request Action message to the mobile phone B on the channel (such as channel 40) supported by the mobile phone A and the mobile phone B.
[0321] It should be noted that in the embodiments of the present application, the mobile phone A, the mobile phone B and the tablet all work on the channel 40, that is, the Wi-Fi connection between the mobile phone A and the mobile phone B and the Wi-Fi connection between the mobile phone A and the tablet are all established on the channel 40. That is to say, in the embodiments of the present application, the two Wi-Fi connections of the mobile phone A (including the Wi-Fi connection between the mobile phone A and the tablet and the Wi-Fi connection between the mobile phone A and the mobile phone B) are same frequency and same channel connections. Alternatively, the Wi-Fi connection between the mobile phone A and the tablet and the Wi-Fi connection between the mobile phone A and the mobile phone B can also be same frequency and different channel connections, or different frequency connections, which is not limited in the present application. For example, the Wi-Fi connection between the mobile phone A and the tablet works on the 5GHz channel 40. If the mobile phone A and the mobile phone B both support the 5GHz channel 44, the Wi-Fi connection between the mobile phone A and the mobile phone B can work on the 5GHz channel 44. That is to say, the mobile phone A sends a D2D Association Request Action message to the mobile phone B on the channel 44, and the subsequent Wi-Fi signaling of the mobile phone A and the mobile phone B is also sent on the channel 44. Alternatively, if the mobile phone A and the mobile phone B both support the 2.4GHz channel 6, the Wi-Fi connection between the mobile phone A and the mobile phone B can work on the 2.4GHz channel 6.
[0322] The other undescribed parts can refer to the related content of S401, which will not be repeated here.
[0323] S512, the mobile phone B sends a D2D Association Response Action message to the mobile phone A.
[0324] For example, the mobile phone B acquires and saves the pre-encryption key and the partial Wi-Fi capability information of the mobile phone A carried in the received D2D Association Request Action message.
[0325] For example, the mobile phone B sends a D2D Association Response Action message to the mobile phone A, which carries the pre-encryption key and the partial Wi-Fi capability of the mobile phone B, such as the modulation mode supported by the mobile phone B.
[0326] The other undescribed parts can refer to the related content of S402, which will not be repeated here.
[0327] S513, the mobile phone B performs four-way handshake with the mobile phone A.
[0328] For example, the mobile phone B performs four-way handshake with the mobile phone A to negotiate the encryption key.
[0329] Optionally, the encryption key negotiated by the mobile phone B and the mobile phone A is different from the encryption key between the mobile phone A and the tablet.
[0330] The other undescribed parts can refer to the related content of S403, which will not be repeated here.
[0331] S514a, the mobile phone B writes the encryption key and the Wi-Fi capability information of the mobile phone A into the local forwarding table.
[0332] S514b, the mobile phone A writes the encryption key and the Wi-Fi capability information of the mobile phone B into the local forwarding table.
[0333] For example, after the mobile phone A performs four-way handshake with the mobile phone B, it is considered that the Wi-Fi connection between the mobile phone B and the mobile phone A is successfully established. The mobile phone B writes the Wi-Fi capability information of the mobile phone A and the negotiated encryption key into the local forwarding table.
[0334] For example, as shown in Table 3, the local forwarding table of the mobile phone A records the correspondence between the MAC address information of the tablet, the encryption key, the modulation mode and the like, and the MAC address information of the mobile phone B, the encryption key (such as encryption key 2), the modulation mode and the like.
[0335] Table 3
[0336] Identification information of the device Wi-Fi capability information of the device Encryption key MAC address information of the tablet Wi-Fi capability information of the tablet Encryption key 1 MAC address information of phone B Wi-Fi capability information of phone B Encryption key 2
[0337] For example, the local forwarding table of the mobile phone B records the correspondence between the MAC address information of the mobile phone A, the encryption key, the modulation mode and other information. The tablet records the correspondence between the MAC address information of the mobile phone A, the encryption key, the modulation mode and other information.
[0338] Since the communication process in the embodiment of the present application does not require the role negotiation process of the GO and the GC, the electronic device is no longer limited by the roles of the GO and the GC. Any of the two devices that are currently performing data interaction can perform in a manner similar to the GO in the P2P protocol, that is, the local forwarding table in any of the devices can record the forwarding entries corresponding to multiple devices connected thereto, thereby realizing data interaction with the multiple devices. That is, in the embodiment of the present application, the roles of the electronic devices are similar to the GO in the 802.11 protocol, or can be considered as similar to the AP in the BSS, that is, the electronic devices can adopt a one-to-many connection manner to establish Wi-Fi connection with other multiple electronic devices and perform data interaction. Correspondingly, for the electronic device, the roles of the other multiple electronic devices connected thereto are similar to the GC in the 802.11 protocol, or can be considered as similar to the STA in the BSS. It can be understood that the electronic devices in the embodiment of the present application regard themselves as APs and regard the other electronic devices as STAs. Correspondingly, the electronic devices can record the forwarding entries corresponding to the other multiple electronic devices and perform data interaction with the multiple electronic devices based on the recorded forwarding entries.
[0339] In the embodiment of the present application, only the Huawei sharing between the mobile phone B and the mobile phone A is taken as an example for description. In other embodiments, the mobile phone B can also perform Huawei sharing with the tablet, or the mobile phone B can perform Huawei sharing with the mobile phone A and the tablet at the same time. The present application is not limited in this regard.
[0340] S515, the mobile phone A and the mobile phone B perform data transmission through Wi-Fi connection.
[0341] For example, the mobile phone A can perform data interaction with the mobile phone B through the Wi-Fi connection therebetween to send the picture 1118 to the mobile phone B. The specific interaction process can refer to the data transmission process between the mobile phone A and the tablet in S601, which will not be described herein again.
[0342] Please refer to Figure 14For example, the identification information 1202 of the mobile phone B in the picture sharing interface 1116 of the mobile phone A can display a prompt information of "preparing to send" to indicate that the mobile phone A is sharing the picture 1118 to the mobile phone B before the mobile phone A receives the D2D Association Response Action message returned by the mobile phone B.
[0343] Optionally, the display interface 1002 of the mobile phone B can display a prompt box 1402, which can optionally include a prompt information to indicate that the picture is being received, and can also include a cancel control and a hide control. For example, if the user clicks the cancel control, the mobile phone B rejects to receive the picture 1118, cancels the display of the prompt box 1402, deletes the part of the picture that has been received, and disconnects the Wi-Fi connection with the mobile phone A. For example, if the user clicks the hide control, the mobile phone B hides the prompt box 1402.
[0344] It should be noted that during the picture sharing process between the mobile phone A and the mobile phone B, the mobile phone A can also interact with the tablet through the Wi-Fi connection between the mobile phone A and the tablet, for example, send the picture sharing interface 1116 currently displayed by the mobile phone A to the tablet. That is, the mobile phone A can send and receive data packets with the mobile phone B and the tablet through the forwarding table entry related to the mobile phone B (including the MAC address of the mobile phone B, the modulation mode and the like) and the forwarding table entry related to the tablet (including the MAC address of the tablet, the modulation mode and the like) recorded in the local forwarding table.
[0345] Please refer to Figure 15a For example, after the mobile phone A successfully sends the picture to the mobile phone B, the identification information 1202 of the mobile phone B in the picture sharing interface 1116 of the mobile phone A can display a prompt information of "sending success" to indicate that the picture has been successfully sent.
[0346] Still referring to Figure 15a For example, after the mobile phone A successfully receives the picture 1118, a prompt box 1502 is displayed, which can optionally include a prompt information 1504 and a click to view control 1506. For example, the prompt information 1502 includes the name of the picture, which is used to indicate that the picture with the name of "IMG_20201004.jpg" has been successfully received.
[0347] For example, the user can click the click to view control 1506. Please refer to Figure 15bIn response to the received user operation, the mobile phone B displays the Huawei Share interface 1508. For example, the Huawei Share interface 1508 includes a plurality of controls, including but not limited to: a file type control (including a picture, a video, an other control, etc.), and a received file list 1510. For example, in the embodiment of the present application, the received file list 1510 includes a thumbnail corresponding to a received picture, a picture name, and picture size information, etc.
[0348] For example, in the process of the Huawei Share service between the mobile phone A and the mobile phone B, and the multi-screen collaboration service between the mobile phone A and the tablet, the mobile phone B can also initiate the Huawei Share to the tablet, or the tablet can initiate the Huawei Share to the mobile phone B. Correspondingly, while the mobile phone A and the mobile phone B maintain the Wi-Fi connection, and the mobile phone A and the tablet maintain the Wi-Fi connection, the mobile phone B can also establish a Wi-Fi connection with the tablet and perform data interaction. The connection process can refer to the foregoing, and details are not described herein.
[0349] It should be noted that the communication system composed of the mobile phone A, the tablet, and the mobile phone B is only taken as an example for description in the embodiment of the present application, and the communication method in the embodiment of the present application can also be applied to data interaction between devices with more or less devices.
[0350] For example: in one example, referring to Figure 16a The mobile phone A and the tablet A establish a Wi-Fi connection based on the method described in the embodiment of the present application, and perform multi-screen collaboration data interaction based on the established Wi-Fi connection. During the data interaction, the mobile phone A records the forwarding table item of the tablet A in the local forwarding list (the concept can refer to the foregoing), as shown in Table 4.
[0351] Table 4
[0352] Identification information of the device Wi-Fi capability information of the device Encryption key MAC address information of tablet A Wi-Fi capability information of tablet A Encryption key 1
[0353] The tablet A records the forwarding table item of the mobile phone A in the local forwarding list to achieve data interaction between the mobile phone A and the tablet A. The mobile phone B and the tablet B establish a Wi-Fi connection based on the method described in the embodiment of the present application, and perform multi-screen collaboration data interaction based on the established Wi-Fi connection. During the data interaction, the mobile phone B records the forwarding table item of the tablet B in the local forwarding list (the concept can refer to the foregoing), as shown in Table 5.
[0354] Table 5
[0355] Identification information of the device Wi-Fi capability information of the device Encryption key MAC address information of tablet B Wi-Fi capability information of tablet B Encryption key 2
[0356] The tablet B implements data interaction between the tablet B and the mobile phone B based on the forwarding table item of the mobile phone B recorded in the local forwarding list. In this scenario, the mobile phone B and the mobile phone A can perform data interaction based on the communication method described in the embodiments of the present application. The mobile phone B can perform data interaction with the mobile phone A based on the established Wi-Fi connection, for example, share files in the mobile phone B with the mobile phone A. During the process of sharing files, the mobile phone A can simultaneously perform data interaction with the tablet A based on the recorded forwarding table item of the tablet A, and perform data interaction with the mobile phone B based on the recorded forwarding table item of the mobile phone B. For example, the current local forwarding table of the mobile phone A is shown in Table 6.
[0357] Table 6
[0358] Identification information of the device Wi-Fi capability information of the device Encryption key MAC address information of tablet A Wi-Fi capability information of tablet A Encryption key 1 MAC address information of phone B Wi-Fi capability information of phone B Encryption key 3
[0359] Correspondingly, the mobile phone B can simultaneously perform data interaction with the tablet B based on the recorded forwarding table item of the tablet B, and perform data interaction with the mobile phone A based on the recorded forwarding table item of the mobile phone A. For example, the current local forwarding table of the mobile phone A is shown in Table 6.
[0360] Table 7
[0361] Identification information of the device Wi-Fi capability information of the device Encryption key MAC address information of tablet B Wi-Fi capability information of tablet B Encryption key 2 MAC address information of phone A Wi-Fi capability information of phone A Encryption key 3
[0362] The specific communication connection establishment process and data transmission process can refer to the above, which will not be described here.
[0363] In summary, in the process of establishing a Wi-Fi connection, the electronic device in the embodiments of the present application does not need a GO / GC negotiation process. Therefore, any electronic device (which can be the tablet B and / or the mobile phone B) in the communication system composed of the mobile phone B and the tablet B can establish a Wi-Fi connection with any electronic device (which can be the tablet A and / or the mobile phone A) in the communication system composed of the mobile phone A and the tablet A, and perform data interaction.
[0364] In another example, please refer to Figure 16b, the mobile phone A and the television establish Wi-Fi connection based on the method described in the embodiments of the present application, and data interaction based on the established Wi-Fi connection, for example, the mobile phone A projects part of the interface in the mobile phone A to the television. During the data interaction, the mobile phone A implements data interaction with the television based on the forwarding table item of the television recorded in the local forwarding list, and the television implements data interaction with the mobile phone A based on the forwarding table item of the mobile phone A recorded in the local forwarding list. During the data interaction between the mobile phone A and the television, i.e. the process of the mobile phone A projecting to the television, the mobile phone A can establish Wi-Fi connection with the notebook computer and the tablet computer respectively based on the communication method described in the embodiments of the present application, and can implement the shared gallery function between the mobile phone A and the notebook computer and between the mobile phone A and the tablet computer based on the established Wi-Fi connection, for example, the notebook computer can share part or all of the gallery in the notebook computer to the mobile phone A, and simultaneously, the tablet computer can share part or all of the gallery in the tablet computer to the mobile phone A. During the data interaction, the mobile phone A can simultaneously implement data interaction with the tablet computer based on the forwarding table item of the tablet computer recorded in the local forwarding list, and implement data interaction with the notebook computer based on the forwarding table item of the notebook computer recorded in the local forwarding list, and simultaneously, implement data interaction with the television based on the forwarding table item of the television recorded in the local forwarding list. The television, the notebook computer and the tablet computer can respectively implement data interaction with the mobile phone A based on the forwarding table item of the mobile phone A recorded in the local forwarding list.
[0365] Table 8
[0366]
[0367] In yet another example, please refer to Figure 16cThe tablet and laptop establish a Wi-Fi connection based on the method described in the embodiments of this application, and interact with each other based on the established Wi-Fi connection. For example, the tablet projects part of its interface onto the laptop. During the data interaction between the laptop and tablet, i.e., the tablet projects its interface onto the laptop, the laptop and TV establish a Wi-Fi connection based on the method described in the embodiments of this application, and interact with each other based on the established Wi-Fi connection. For example, the laptop projects part of its interface onto the TV to achieve the effect of extending the screen. In this scenario, the mobile phone and laptop establish a Wi-Fi connection and realize multi-screen collaboration between the mobile phone and laptop. Optionally, during the multi-screen collaboration between the mobile phone and laptop, the screen projection between the tablet and laptop, and the screen projection between the laptop and TV, the mobile phone can also share pictures with the tablet. In this scenario, the laptop can interact with the tablet, mobile phone, and TV respectively based on the forwarding entries of the tablet, mobile phone, and TV recorded in the local forwarding list. Correspondingly, the television can interact with the corresponding electronic device based on the forwarding entries of the laptop recorded in the local forwarding table, the tablet can interact based on the forwarding entries of the mobile phone and laptop recorded in the local forwarding table, and the mobile phone can interact based on the forwarding entries of the tablet and laptop recorded in the local forwarding table. Figures 16a to 16c All undescribed content can be found in the text above. Figure 3 The descriptions of the scene shown will not be repeated here.
[0368] It is understood that, in order to achieve the above-mentioned functions, electronic devices include hardware and / or software modules that perform the respective functions. Based on the algorithmic steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by 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 conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.
[0369] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the communication method in the above embodiment.
[0370] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the communication method described in the above embodiment.
[0371] In addition, the embodiment of the present application further provides an apparatus, which can be a chip, a component or a module, and the apparatus can include a processor and a memory connected to each other; the memory is used to store computer-executable instructions; when the apparatus is running, the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the communication method in the above method embodiments.
[0372] The electronic device, the computer storage medium, the computer program product or the chip provided by the embodiment can achieve the beneficial effects of the corresponding method provided above, and details are not described herein.
[0373] Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and brevity, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above.
[0374] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other ways. For example, the apparatus embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another apparatus, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.
[0375] The units described as separate components can or can not be physically separate, and the components shown as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0376] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0377] Any content of each embodiment of the present application, and any content of the same embodiment, can be freely combined. Any combination of the above is within the scope of the present application.
[0378] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, including a number of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the various embodiments of the method of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0379] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-described specific embodiments, and the above-described specific embodiments are only illustrative, not limiting. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope of protection of the claims.
Claims
1. A communication system, characterized by The system comprises a first electronic device, a second electronic device and a third electronic device; The first electronic device is configured to: receive a first operation when the first electronic device interacts with the second electronic device through a first Wi-Fi connection to exchange data of a first service; establish a first Bluetooth connection with the third electronic device in response to the first operation; send address information of the first electronic device to the third electronic device through the first Bluetooth connection; The third electronic device is configured to: receive the address information of the first electronic device sent by the first electronic device; establish a second Wi-Fi connection with the first electronic device according to the address information of the first electronic device; exchange data of a second service with the first electronic device through the second Wi-Fi connection; The first electronic device is configured to: send first Bluetooth request information to the third electronic device in response to the first operation; the first Bluetooth request information is used to instruct to establish the first Bluetooth connection with the third electronic device; The third electronic device is configured to: receive the first Bluetooth request information; establish the first Bluetooth connection with the first electronic device in response to the first Bluetooth request information.
2. The system of claim 1, wherein The third electronic device is further configured to: receive a second operation when the third electronic device exchanges data of a second service with the first electronic device through the second Wi-Fi connection; establish a second Bluetooth connection with the second electronic device in response to the second operation; send address information of the third electronic device to the second electronic device through the second Bluetooth connection; The second electronic device is configured to: receive the address information of the third electronic device sent by the third electronic device when the second electronic device exchanges data of the first service with the first electronic device through the first Wi-Fi connection; establish a third Wi-Fi connection with the third electronic device according to the address information of the third electronic device; exchange data of a third service with the third electronic device through the third Wi-Fi connection.
3. The system of claim 2, wherein The third electronic device is configured to: send second Bluetooth request information to the second electronic device in response to the second operation; the second Bluetooth request information is used to instruct to establish the second Bluetooth connection with the second electronic device; The second electronic device is configured to: receive the second Bluetooth request information; establish the first Bluetooth connection with the first electronic device in response to the second Bluetooth request information.
4. The system of claim 1, wherein, The first electronic device comprises a forwarding table item of the second electronic device and a forwarding table item of the third electronic device in a local forwarding table of the first electronic device; The forwarding table item of the second electronic device comprises: address information of the second electronic device, Wi-Fi capability information of the second electronic device and a first encryption key; The forwarding table item of the third electronic device comprises: address information of the third electronic device, Wi-Fi capability information of the third electronic device and a second encryption key.
5. The system of claim 4, wherein the first electronic device is configured to: send, to the second electronic device, a first data packet via the first Wi-Fi connection; wherein the first data packet comprises service data of the first service, address information of the second electronic device, and is encrypted by the first electronic device based on the first encryption key and modulated based on Wi-Fi capability information of the second electronic device.
6. The system of claim 4, wherein the first electronic device is configured to: send, to the third electronic device, a second data packet via the second Wi-Fi connection; wherein the second data packet comprises service data of the second service, address information of the third electronic device, and is encrypted by the first electronic device based on the second encryption key and modulated based on Wi-Fi capability information of the third electronic device.
7. The system of claim 1, wherein the first service is any one of: a screen projection service, a sharing service, and a multi-screen collaboration service; and the second service is any one of: a screen projection service, a sharing service, and a multi-screen collaboration service.
8. The system of claim 1, wherein the first electronic device is configured to: receive a third operation; and in response to the third operation, send, to the second electronic device, third Bluetooth request information indicating to establish a Bluetooth connection with the second electronic device; and the second electronic device is configured to: receive the third Bluetooth request information; and send, to the first electronic device, third Bluetooth response information indicating that the second electronic device is a preset device; and the first electronic device is configured to: receive the third Bluetooth response information; and establish a third Bluetooth connection with the second electronic device according to the third Bluetooth response information.
9. The system of claim 1, wherein the first electronic device is configured to: receive a fourth operation; and in response to the fourth operation, send, to the second electronic device, fourth Bluetooth request information indicating to establish a Bluetooth connection with the second electronic device; and the second electronic device is configured to: receive the fourth Bluetooth request information; and send, to the first electronic device, fourth Bluetooth response information indicating that the second electronic device is a non-preset device; and the first electronic device is configured to: receive the fourth Bluetooth response information; and establish the first Wi-Fi connection with the second electronic device according to the fourth Bluetooth response information and an 802.11 protocol.
10. The system of claim 1, wherein the first electronic device is configured to: receive a fifth operation; and in response to the fifth operation, send, to the second electronic device, fifth Bluetooth request information indicating to establish a Bluetooth connection with the second electronic device. The first electronic device receives no Bluetooth response information sent by the second electronic device within a set time length, and establishes the first Wi-Fi connection with the second electronic device according to the 802.11 protocol.
11. The system of claim 1, wherein, The first electronic device is configured to: send, to the third electronic device via the first Bluetooth connection, address information of the first electronic device and channel information of the first electronic device; The third electronic device is configured to: send, to the first electronic device, first Wi-Fi connection request information according to the address information of the first electronic device and the channel information of the first electronic device, the first Wi-Fi connection request information being used to instruct to establish the second Wi-Fi connection with the first electronic device, and the first Wi-Fi connection request information being information in a specific format; The first electronic device is configured to: establish the second Wi-Fi connection with the third electronic device in response to the received first Wi-Fi connection request information.
12. A communication method characterized by comprising: comprises: When the first electronic device interacts with the second electronic device via the first Wi-Fi connection to exchange data of a first service, the first electronic device receives a first operation; The first electronic device establishes a first Bluetooth connection with the third electronic device in response to the first operation; The first electronic device sends, to the third electronic device via the first Bluetooth connection, address information of the first electronic device; The third electronic device receives the address information of the first electronic device sent by the first electronic device; The third electronic device establishes a second Wi-Fi connection with the first electronic device according to the address information of the first electronic device; The third electronic device exchanges data of a second service with the first electronic device via the second Wi-Fi connection; The first electronic device establishes a first Bluetooth connection with the third electronic device in response to the first operation, comprising: The first electronic device sends, to the third electronic device, first Bluetooth request information in response to the first operation; The first Bluetooth request information is used to instruct to establish the first Bluetooth connection with the third electronic device; The third electronic device receives the first Bluetooth request information; The third electronic device establishes the first Bluetooth connection with the first electronic device in response to the first Bluetooth request information.
13. The method of claim 12, wherein, The method further comprises: When the third electronic device exchanges data of a second service with the first electronic device via the second Wi-Fi connection, the third electronic device receives a second operation; The third electronic device establishes a second Bluetooth connection with the second electronic device in response to the second operation; The third electronic device sends, to the second electronic device via the second Bluetooth connection, address information of the third electronic device; When the second electronic device exchanges data of a first service with the first electronic device via the first Wi-Fi connection, the second electronic device receives the address information of the third electronic device sent by the third electronic device; The second electronic device establishes a third Wi-Fi connection with the third electronic device according to address information of the third electronic device; The second electronic device interacts with the third electronic device through the third Wi-Fi connection to exchange data of a third service.
14. The method of claim 12, wherein, The third electronic device establishes a second Bluetooth connection with the second electronic device in response to the second operation, including: The third electronic device sends second Bluetooth request information to the second electronic device in response to the second operation; the second Bluetooth request information is used to instruct to establish the second Bluetooth connection with the second electronic device; The second electronic device receives the second Bluetooth request information; The second electronic device establishes the first Bluetooth connection with the first electronic device in response to the second Bluetooth request information.
15. The method of claim 12, wherein, The first electronic device includes a forwarding table item of the second electronic device and a forwarding table item of the third electronic device in a local forwarding table of the first electronic device; The forwarding table item of the second electronic device includes: Address information of the second electronic device, Wi-Fi capability information of the second electronic device, and a first encryption key; The forwarding table item of the third electronic device includes: Address information of the third electronic device, Wi-Fi capability information of the third electronic device, and a second encryption key.
16. The method of claim 15, wherein, The method further includes: The first electronic device sends a first data packet to the second electronic device through the first Wi-Fi connection; The first data packet includes service data of the first service, address information of the second electronic device, and is encrypted by the first electronic device based on the first encryption key and modulated based on the Wi-Fi capability information of the second electronic device.
17. The method of claim 15, wherein, The method further includes: The first electronic device sends a second data packet to the third electronic device through the second Wi-Fi connection; The second data packet includes service data of the second service, address information of the third electronic device, and is encrypted by the first electronic device based on the second encryption key and modulated based on the Wi-Fi capability information of the third electronic device.
18. The method of claim 12, wherein: The first service is any one of the following services: Screen projection service, sharing service, and multi-screen collaboration service; The second service is any one of the following services: Screen projection service, sharing service, and multi-screen collaboration service.
19. The method of claim 12, wherein, Before the first electronic device and the second electronic device exchange data of a first service through a first Wi-Fi connection, the method further includes: The first electronic device receives a third operation; The first electronic device sends third Bluetooth request information to the second electronic device in response to the third operation; the third Bluetooth request information is used to instruct to establish a Bluetooth connection with the second electronic device; The second electronic device receives the third Bluetooth request information; The second electronic device sends third Bluetooth response information to the first electronic device; the third Bluetooth response information is used to indicate that the second electronic device is a preset device; The first electronic device receives the third Bluetooth response information; The first electronic device establishes a third Bluetooth connection with the second electronic device according to the third Bluetooth response information.
20. The method of claim 12, wherein, Before the first electronic device and the second electronic device interact with first service data through the first Wi-Fi connection, the method further includes: The first electronic device receives a fourth operation; The first electronic device sends fourth Bluetooth request information to the second electronic device in response to the fourth operation; the fourth Bluetooth request information is used to indicate that a Bluetooth connection is established with the second electronic device; The second electronic device receives the fourth Bluetooth request information; The second electronic device sends fourth Bluetooth response information to the first electronic device; the fourth Bluetooth response information is used to indicate that the second electronic device is a non-pre-set device; The first electronic device receives the fourth Bluetooth response information; The first electronic device establishes the first Wi-Fi connection with the second electronic device according to the fourth Bluetooth response information and according to the 802.11 protocol.
21. The method of claim 12, wherein, Before the first electronic device and the second electronic device interact with first service data through the first Wi-Fi connection, the method further includes: The first electronic device receives a fifth operation; The first electronic device sends fifth Bluetooth request information to the second electronic device in response to the fifth operation; the fifth Bluetooth request information is used to indicate that a Bluetooth connection is established with the second electronic device; If the first electronic device does not receive Bluetooth response information sent by the second electronic device within a set time period, the first electronic device establishes the first Wi-Fi connection with the second electronic device according to the 802.11 protocol.
22. The method of claim 12, wherein, Before the first electronic device and the second electronic device interact with first service data through the first Wi-Fi connection, the method further includes: The first electronic device sends address information of the first electronic device and channel information of the first electronic device to the third electronic device through the first Bluetooth connection; The third electronic device sends first Wi-Fi connection request information to the first electronic device according to the address information of the first electronic device and the channel information of the first electronic device, the first Wi-Fi connection request information being used to indicate that the second Wi-Fi connection is established with the first electronic device; wherein the first Wi-Fi connection request information is information with a specific format; The first electronic device establishes the second Wi-Fi connection with the third electronic device in response to the received first Wi-Fi connection request information.
23. An electronic device, comprising: It includes: a memory and a processor, the memory being coupled with the processor; The memory stores program instructions, when the program instructions are executed by the processor, the electronic device executes the communication method performed by the first electronic device, the second electronic device or the third electronic device in claims 12 to 22.
24. A chip, characterized by comprise one or more interface circuits and one or more processors; the interface circuit is configured to receive a signal from a memory of the electronic device, and send the signal to the processor, the signal comprising computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device is caused to perform the communication method performed by the first electronic device, the second electronic device or the third electronic device in claims 12 to 22.
Citation Information
Patent Citations
Establishment method of direct connected link, station device and communication system
CN101594578A
Multi-terminal multimedia data communication method and system
WO2020253754A1