CN117425227A - Method and device for establishing session based on WiFi direct connection - Google Patents

Method and device for establishing session based on WiFi direct connection Download PDF

Info

Publication number
CN117425227A
CN117425227A CN202211600127.8A CN202211600127A CN117425227A CN 117425227 A CN117425227 A CN 117425227A CN 202211600127 A CN202211600127 A CN 202211600127A CN 117425227 A CN117425227 A CN 117425227A
Authority
CN
China
Prior art keywords
wifi direct
direct connection
reply message
request
connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211600127.8A
Other languages
Chinese (zh)
Inventor
邱利松
张梦龙
陈英涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211600127.8A priority Critical patent/CN117425227A/en
Publication of CN117425227A publication Critical patent/CN117425227A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/50Secure pairing of devices
    • H04W12/55Secure pairing of devices involving three or more devices, e.g. group pairing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/40Connection management for selective distribution or broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a method and a device for establishing a session based on WiFi direct connection, wherein the method comprises the following steps: the WiFi direct connection module receives a session request from a service APP, and the session request requests to establish a session based on WiFi direct connection; the WiFi direct connection module determines whether a WLAN channel and/or a Bluetooth channel exists between the first equipment and the second equipment according to the session request; when the WLAN channel and/or the Bluetooth channel do not exist, the WiFi direct connection module sends a first connection request to the second equipment through Bluetooth broadcasting, and the first connection request requests to establish WiFi direct connection of the service APP; the WiFi direct connection module receives a reply message of the first connection request from the second equipment; when the WiFi direct connection module receives the reply message of the first connection request, the WiFi direct connection module establishes a session based on WiFi direct connection according to the reply message of the first connection request. The method and the device can reduce the time required for establishing the session based on the WiFi direct connection.

Description

Method and device for establishing session based on WiFi direct connection
The present application is a divisional application of chinese patent application filed on 18 months 2022, 07, with application number 202210841500.2, entitled "method and apparatus for establishing a WiFi direct connection based session".
Technical Field
The present application relates to the field of communications, and in particular, to a method and apparatus for establishing a session based on WiFi direct connection.
Background
Wireless fidelity (wireless fidelity, wiFi) is a wireless local area network technology based on the institute of electrical and electronics engineers (institute of electricaland electronics engineers, IEEE) 802.11 standard. WiFi direct may also be referred to as a WiFi peer-to-peer (P2P) connection, which enables easy connection between terminal devices to each other without the need for a wireless Access Point (AP) as an intermediary.
WiFi directly links and has extensive application in the terminal equipment field, for example, the super terminal function of cell-phone can establish the WiFi directly between cell-phone and the intelligent audio amplifier and connect and the WiFi directly between cell-phone and the projecting apparatus to be connected for the user can shift the conversation to on the intelligent audio amplifier, can also make the user play the video on the cell-phone on the projecting apparatus.
The mobile phone needs to be scanned, group role negotiated, dynamic internet protocol (internet protocol, IP) address allocation and other stages to establish the WiFi direct connection, and the steps are multiple, so that the session based on the WiFi direct connection needs a long time to be established.
Disclosure of Invention
The embodiment of the application provides a method and a device for establishing a session based on WiFi direct connection, which can reduce the time required for establishing the session based on WiFi direct connection.
In a first aspect, there is provided a method of transmitting over a WiFi direct connection, the method being applied to a first device, the first device including a WiFi direct module, the method comprising:
the WiFi direct connection module receives a session request from a service APP, wherein the session request requests to establish a session based on WiFi direct connection;
the WiFi direct connection module determines whether a wireless local area network (wireless local area networks, WLAN) channel and/or a Bluetooth channel exists between the first device and the second device according to the session request;
when the WLAN channel and/or the Bluetooth channel do not exist, the WiFi direct connection module sends a first connection request to second equipment through Bluetooth broadcasting, and the first connection request requests to establish WiFi direct connection of the service APP;
the WiFi direct connection module receives a reply message of the first connection request from the second equipment;
when the WiFi direct connection module receives the reply message of the first connection request, the WiFi direct connection module establishes the session based on WiFi direct connection according to the reply message of the first connection request.
In the prior art, the first device wants to send the first connection request, and needs to wait for the WLAN channel or the bluetooth channel to be established, but the WLAN channel or the bluetooth channel needs to wait for a long time, so that the first connection request needs to wait for a long time in the prior art. In this embodiment, before the first connection request is sent, the WiFi direct connection module first determines whether a WLAN channel and/or a bluetooth channel exists, if the WLAN channel and/or the bluetooth channel does not exist, the first connection request is sent through bluetooth broadcast, and the bluetooth broadcast can be used without waiting for a second device to respond, thereby reducing the time required for establishing a session based on WiFi direct connection.
Optionally, the first device further includes a bluetooth module, and the method further includes:
the Bluetooth module establishes the Bluetooth channel;
the WiFi direct connection module sends a second connection request to the second device through the Bluetooth channel, and the second connection request requests to establish WiFi direct connection of the service APP.
Because the reliability of bluetooth broadcast is poor, after the first device sends the first connection request through bluetooth broadcast, the first device can send a connection request (second connection request) through the bluetooth channel after the bluetooth channel is established, so that the success rate of establishing the session based on the WiFi direct connection can be improved.
Optionally, the method further comprises:
the WiFi direct connection module receives a reply message of the second connection request from the second equipment;
when the WiFi direct connection module does not receive the reply message of the first connection request, the WiFi direct connection module establishes the session based on WiFi direct connection according to the reply message of the second connection request;
and when the WiFi direct connection module receives the reply message of the first connection request, the WiFi direct connection module discards the reply message of the second connection request.
If the WiFi direct connection module does not receive the reply message of the first connection request, the fact that the first connection request is sent through the Bluetooth channel fails is indicated, and the WiFi direct connection module can establish a session based on WiFi direct connection according to the reply message of the second connection request, so that the success rate of establishing the session based on WiFi direct connection can be improved. If the WiFi direct connection module receives the reply message of the first connection request, the fact that the first connection request is sent successfully through the Bluetooth channel is indicated, the WiFi direct connection module establishes WiFi direct connection based on the reply message of the first connection request, and the reply message of the second connection request is not required to be processed, so that the power consumption of the first device can be reduced.
Optionally, the method further comprises:
when the WLAN channel and the Bluetooth channel exist, the WiFi direct connection module sends a third connection request to the second equipment through the WLAN channel, and the third connection request requests to establish WiFi direct connection of the service APP;
the WiFi direct connection module receives a reply message of the third connection request from the second equipment;
and the WiFi direct connection module establishes the session based on the WiFi direct connection according to the reply message of the third connection request.
When the WLAN channel and the Bluetooth channel exist, the WLAN channel and the Bluetooth channel are successfully established before the WiFi direct connection module receives the session request, the WiFi direct connection module can select one channel to transmit the connection request, bluetooth broadcasting is not used any more, and therefore the success rate of session establishment can be improved. The reliability of the WLAN channel is higher, and when the WLAN channel and the bluetooth channel exist, the WLAN channel is selected to transmit the third connection request, so that the success rate of session establishment can be further improved.
Optionally, the method further comprises:
when the WLAN channel does not exist and when the Bluetooth channel exists, the WiFi direct connection module sends a fourth connection request to the second equipment through the Bluetooth channel, wherein the fourth connection request requests to establish WiFi direct connection of the service APP;
The WiFi direct connection module receives a reply message of the fourth connection request from the second equipment;
and the WiFi direct connection module establishes the session based on the WiFi direct connection according to the reply message of the fourth connection request.
When the WLAN channel does not exist and when the bluetooth channel exists, the reliability of the bluetooth channel is higher than that of bluetooth broadcast, and the success rate of session establishment can be improved by using the bluetooth channel to transmit a connection request.
Optionally, the first device further includes a device discovery authentication module, and before the WiFi direct module receives the session request from the service APP, the method further includes:
the device discovery authentication module sends a device authentication request to the second device, wherein the device authentication request is used for the second device to authenticate the identity of the first device, and the device authentication request comprises parameters required for establishing WiFi direct connection;
the device discovery authentication module receives a reply message of the device authentication request from the second device, wherein the reply message of the device authentication request is used for the first device to authenticate the identity of the second device, and the reply message of the device authentication request comprises parameters required for establishing WiFi direct connection;
The device discovery authentication module stores parameters required for establishing the WiFi direct connection in a reply message of the device authentication request.
The first device can perform negotiation of the WiFi direct connection in the device discovery authentication phase, and compared with the negotiation of the WiFi direct connection after waiting for discovery authentication to complete, the embodiment can reduce the time for establishing the WiFi direct connection.
Optionally, the method further comprises:
the WiFi direct connection module monitors the state change of a first WiFi direct connection network, wherein the first WiFi direct connection network is the WiFi direct connection network of the first device;
when the state of the first WiFi direct connection network changes, the WiFi direct connection module sends synchronous information to the second equipment, wherein the synchronous information is used for updating the state of the first WiFi direct connection network by the second equipment, and the synchronous information comprises group roles of the first equipment;
the WiFi direct connection module receives a reply message of the synchronous information from the second equipment, wherein the reply message of the synchronous information comprises a group role of the second equipment;
and the WiFi direct connection module updates the group role of the second equipment according to the reply message of the synchronous information.
When the state of the first WiFi direct network changes, the first device needs to inform the second device of the new state of the first WiFi direct network through the synchronization information. At this time, the first device may implement negotiation of the group role using the synchronization information and the reply message of the synchronization information. Compared with the negotiation of the group role after waiting for the synchronization to be completed, the embodiment can reduce the time for establishing the WiFi direct connection.
In a second aspect, there is provided a method of establishing a session based on a WiFi direct connection, the method being applied to a second device, the second device comprising a WiFi direct module, the method comprising:
the WiFi direct connection module determines whether a WLAN channel and/or a Bluetooth channel exists between a first device and the second device;
when the WLAN channel and/or the Bluetooth channel do not exist, the WiFi direct connection module receives Bluetooth broadcasting, wherein the Bluetooth broadcasting comprises a first connection request, and the first connection request requests to establish WiFi direct connection of a service APP of the first equipment;
the WiFi direct connection module establishes WiFi direct connection of the service APP according to the first connection request;
the WiFi direct connection module sends a reply message of the first connection request to the first device, and the reply message of the first connection request indicates that the second device has established WiFi direct connection of the service APP.
In the prior art, the second device wants to receive the first connection request, and needs to wait for the WLAN channel or the bluetooth channel to be established, but the WLAN channel or the bluetooth channel needs to wait for a long time to be established, so that the first connection request needs to wait for a long time in the prior art. In this embodiment, the WiFi direct connection module may monitor bluetooth broadcast when determining that the WLAN channel and/or the bluetooth channel does not exist, receive the first connection request through bluetooth broadcast, and use the bluetooth broadcast without waiting for the second device to respond, thereby reducing the time required for establishing a session based on WiFi direct connection.
Optionally, the second device further includes a bluetooth module, and the method further includes:
the Bluetooth module establishes a Bluetooth channel between the second device and the first device;
the WiFi direct connection module receives a second connection request through the Bluetooth channel, and the second connection request requests to establish WiFi direct connection of the service APP;
and the WiFi direct connection module sends a reply message of the second connection request to the first equipment through the Bluetooth channel, and the reply message of the second connection request indicates that the second equipment has established WiFi direct connection of the service APP.
Because the reliability of bluetooth broadcast is poor, after the second device receives the first connection request through bluetooth broadcast, the second device can receive a connection request (second connection request) through the bluetooth channel after the bluetooth channel is established, so that the success rate of establishing the session based on the WiFi direct connection can be improved.
Optionally, the second device further includes a device discovery authentication module, and before the WiFi direct module receives the bluetooth broadcast, the method further includes:
the device discovery authentication module receives a device authentication request from the first device, the device authentication request being used for the second device to authenticate the identity of the first device, the device authentication request including parameters required for establishing a WiFi direct connection;
the device discovery authentication module stores parameters required for establishing WiFi direct connection in the device authentication request;
the device discovery authentication module sends a reply message of the device authentication request to the first device, wherein the reply message of the device authentication request is used for the first device to authenticate the identity of the second device, and the reply message of the device authentication request comprises parameters required for establishing WiFi direct connection.
The second device can perform negotiation of the WiFi direct connection in the device discovery authentication phase, and compared with the negotiation of the WiFi direct connection after waiting for discovery authentication to complete, the embodiment can reduce the time for establishing the WiFi direct connection.
Optionally, the method further comprises:
the WiFi direct connection module receives synchronization information from the first device, wherein the synchronization information is used for updating the state of a first WiFi direct connection network by the second device, the synchronization information comprises a group role of the first device, and the first WiFi direct connection network is the WiFi direct connection network of the first device;
the WiFi direct connection module updates the state of the first WiFi direct connection network according to the synchronous information;
and the WiFi direct connection module sends a reply message of the synchronous information to the second equipment, wherein the reply message of the synchronous information comprises a group role of the second equipment.
When the state of the first WiFi direct network changes, the first device needs to inform the second device of the new state of the first WiFi direct network through the synchronization information. At this time, the second device may implement negotiation of the group role using the synchronization information and the reply message of the synchronization information. Compared with the negotiation of the group role after waiting for the synchronization to be completed, the embodiment can reduce the time for establishing the WiFi direct connection.
In a third aspect, there is provided an apparatus for establishing a WiFi direct connection based session, comprising means for performing any one of the methods of the first or second aspects. The device can be a terminal device or a chip in the terminal device. The apparatus may include an input unit and a processing unit.
When the apparatus is a terminal device, the processing unit may be a processor, and the input unit may be a communication interface; the terminal device may further comprise a memory for storing computer program code which, when executed by the processor, causes the terminal device to perform any of the methods of the first or second aspects.
When the device is a chip in the terminal equipment, the processing unit may be a logic processing unit inside the chip, and the input unit may be an output interface, a pin, a circuit, or the like; the chip may also include memory, which may be memory within the chip (e.g., registers, caches, etc.), or memory external to the chip (e.g., read-only memory, random access memory, etc.); the memory is for storing computer program code which, when executed by the processor, causes the chip to perform any one of the methods of the first or second aspects.
In a fourth aspect, there is provided a computer readable storage medium storing computer program code which, when run by an apparatus establishing a WiFi direct connection based session, causes the apparatus to perform any one of the methods of the first or second aspects.
In a fifth aspect, there is provided a computer program product comprising: computer program code which, when run by an apparatus establishing a WiFi direct connection based session, causes the apparatus to perform any of the methods of the first or second aspects.
Drawings
FIG. 1 is a schematic illustration of an application scenario suitable for use in the present application;
fig. 2 is a schematic diagram of a WiFi direct connection interface provided in the present application;
FIG. 3 is a schematic diagram of a hardware configuration of an apparatus suitable for use in the present application;
FIG. 4 is a schematic diagram of a software architecture suitable for use with the apparatus of the present application;
fig. 5 is a schematic diagram of a WiFi direct connection establishment and a data transmission flow after the WiFi direct connection establishment provided in the present application;
FIG. 6 is a schematic diagram of one provided herein for establishing a WiFi-based direct connection session;
FIG. 7 is a schematic diagram of another provided herein for establishing a WiFi direct connection-based session;
fig. 8 is a schematic diagram of a flow of pre-establishing a WiFi direct connection provided in the present application;
fig. 9 is a schematic diagram of another flow of pre-establishing a WiFi direct connection provided herein;
fig. 10 is a schematic diagram of a session establishment procedure after pre-establishing a WiFi direct connection provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an application scenario suitable for use in the present application. The mobile phone, the intelligent sound box, the projector and the tablet computer respectively have WiFi functions, and a user can open WiFi switches of the mobile phone, the intelligent sound box, the projector and the tablet computer, so that the mobile phone, the intelligent sound box, the projector and the tablet computer can find surrounding electronic equipment.
The user can use the mobile phone as a main device to establish a WiFi direct connection between the mobile phone and other terminal devices, as shown in fig. 2, the mobile phone can start a super terminal function, and data of a service Application (APP) is transmitted through the WiFi direct connection, and the WiFi direct connection is shown by a double-headed arrow in fig. 1.
For example, after the WiFi direct connection is established between the mobile phone and the intelligent sound box, the mobile phone can transmit voice data to the intelligent sound box through the WiFi direct connection, and answer an incoming call through the intelligent sound box; after the WiFi direct connection is established between the mobile phone and the projector, the mobile phone can transmit video data to the projector through the WiFi direct connection, and video is played through the projector; after the WiFi direct connection is established between the mobile phone and the tablet personal computer, the mobile phone can transmit the document to the tablet personal computer through the WiFi direct connection, the tablet personal computer is used for editing the document, and after the document editing is completed, a user can also transmit the edited document to the mobile phone through the WiFi direct connection.
The above application scenario is exemplary, and application scenarios applicable to the present application are not limited thereto.
Before the mobile phone realizes the functions of call transfer, screen throwing, file sharing and the like, a session based on WiFi direct connection needs to be established. And establishing the WiFi direct connection requires a negotiation channel, wherein the negotiation channel is used for performing group role negotiation and the like at two ends of the WiFi direct connection. The negotiation channel can be a WLAN channel or a Bluetooth channel, and is limited by a WLAN protocol and a Bluetooth protocol, and the WLAN channel and the Bluetooth channel can be established through multiple information interaction, so that a session based on WiFi direct connection needs to be established for a long time.
The method and the device for establishing the session based on the WiFi direct connection are provided in the embodiment of the application.
Fig. 3 is a schematic diagram of a hardware architecture of an apparatus suitable for use in the present application, the apparatus 100 may be any of a cell phone, a foldable electronic device, a tablet, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (personaldigital assistant, PDA), an augmented reality (augmented reality, AR) device, a Virtual Reality (VR) device, an artificial intelligence (artificial intelligence, AI) device, a wearable device, a vehicle-mounted device, a smart home device, or a smart city device. The embodiments of the present application do not impose any limitation on the specific type of device 100.
The apparatus 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge 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, an earphone interface 170D, a sensor module 180, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The configuration shown in fig. 1 does not constitute a specific limitation on the apparatus 100. In other embodiments of the present application, apparatus 100 may include more or fewer components than those shown in FIG. 1, or apparatus 100 may include a combination of some of the components shown in FIG. 1, or apparatus 100 may include sub-components of some of the components shown in FIG. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: application processors (application processor, AP), modem processors, graphics processors (graphicsprocessing unit, GPU), image signal processors (image signal processor, ISP), controllers, video codecs, digital signal processors (digital signal processor, DSP), baseband processors, neural-Network Processors (NPU). The different processing units may be separate devices or integrated devices.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. For example, the processor 110 may include at least one of the following interfaces: inter-integrated circuit, I2C) interfaces, inter-integrated circuit audio (inter-integrated circuit sound, I2S) interfaces, pulse code modulation (pulse code modulation, PCM) interfaces, universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interfaces, mobile industry processor interfaces (mobile industry processor interface, MIPI), general-purpose input/output (GPIO) interfaces, SIM interfaces, USB interfaces.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may couple the touch sensor 180K through an I2C interface, causing the processor 110 to communicate with the touch sensor 180K through an I2C bus interface, implementing the touch functionality of the device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 with peripheral devices such as the display 194 and camera 193. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing function of apparatus 100. Processor 110 and display 194 communicate via a DSI interface to implement the display functions of apparatus 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal interface as well as a data signal interface. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, and the sensor module 180. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, or a MIPI interface.
The USB interface 130 is an interface conforming to the USB standard specification, and may be, for example, a Mini (Mini) USB interface, a Micro (Micro) USB interface, or a C-type USB (USB Type C) interface. The USB interface 130 may be used to connect a charger to charge the device 100, to transfer data between the device 100 and a peripheral device, and to connect a headset to play audio through the headset. USB interface 130 may also be used to connect other devices 100, such as AR equipment.
The connection relationships between the modules shown in fig. 1 are merely illustrative, and do not constitute a limitation on the connection relationships between the modules of the apparatus 100. Alternatively, the modules of the apparatus 100 may be combined by using a plurality of connection manners in the foregoing embodiments.
The charge management module 140 is used to receive power from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive the current of the wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive electromagnetic waves (current path shown in dashed lines) through the wireless charging coil of the device 100. The charging management module 140 may also provide power to the device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle times, and battery state of health (e.g., leakage, impedance). Alternatively, the power management module 141 may be provided in the processor 110, or the power management module 141 and the charge management module 140 may be provided in the same device.
The wireless communication function of the apparatus 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the apparatus 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication applied on the device 100, such as at least one of the following: second generation (2) th generation, 2G) mobile communication solutions, third generation (3 th generation, 3G) mobile communication solution, fourth generation (4 th generation, 5G) mobile communication solution, fifth generation (5 th generation, 5G) mobile communication solution. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering and amplifying the received electromagnetic waves, and then transmit the electromagnetic waves to a modem processor for demodulation. The mobile communication module 150 may further amplify the signal modulated by the modem processor, and the amplified signal is converted into electromagnetic waves by the antenna 1 and radiated. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the 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 is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through audio devices (e.g., speaker 170A, receiver 170B) or displays images or video through display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
Similar to the mobile communication module 150, the wireless communication module 160 may also provide wireless communication solutions applied on the device 100, such as at least one of the following: wireless local area network (wireless local area networks, WLAN), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication (near field communication, NFC), infrared (IR). The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate and amplify it, and convert the signal into electromagnetic waves to radiate via the antenna 2.
In some embodiments, the antenna 1 of the apparatus 100 is coupled to the mobile communication module 150 and the antenna 2 of the apparatus 100 is coupled to the wireless communication module 160 so that the apparatus 100 can communicate with a network and other devices through wireless communication technology. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multipleaccess, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long termevolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigationsatellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite basedaugmentation systems, SBAS).
The device 100 may implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 may be used to display images or video. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini light-emitting diode (Mini LED), a Micro light-emitting diode (Micro LED), a Micro OLED (Micro OLED), or a quantum dot LED (quantum dot light emitting diodes, QLED). In some embodiments, the apparatus 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The apparatus 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. The ISP can carry out algorithm optimization on noise, brightness and color of the image, and can optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted 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 a standard Red Green Blue (RGB), YUV, etc. format image signal. In some embodiments, the apparatus 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the apparatus 100 selects a frequency bin, a digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The apparatus 100 may support one or more video codecs. In this way, the apparatus 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (movingpicture experts group, MPEG) 1, MPEG2, MPEG3, and MPEG4.
The NPU is a processor which refers to the biological neural network structure, for example, refers to the transmission mode among human brain neurons to rapidly process input information, and can also be continuously self-learned. Intelligent awareness and other functions of the device 100 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, and text understanding.
The external memory interface 120 may be used to connect an external memory card, such as a Secure Digital (SD) card, to implement the memory capability of the expansion device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. Wherein the storage program area may store application programs required for at least one function (e.g., a sound playing function and an image playing function) of the operating system. The storage data area may store data (e.g., audio data and phonebooks) created during use of the device 100. Further, the internal memory 121 may include a high-speed random access memory, and may also include a nonvolatile memory such as: at least one disk storage device, a flash memory device, and a universal flash memory (universal flash storage, UFS), etc. The processor 110 performs various processing methods of the apparatus 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The device 100 may implement audio functions, such as music playing and recording, through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like.
The audio module 170 is used to convert digital audio information into an analog audio signal output, and may also be used to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a horn, is used to convert audio electrical signals into sound signals. The device 100 may listen to music or hands-free conversation through the speaker 170A.
A receiver 170B, also referred to as an earpiece, converts the audio electrical signal into a sound signal. When a user uses the device 100 to answer a telephone call or voice message, the user can answer the voice by placing the receiver 170B close to the ear.
Microphone 170C, also known as a microphone or microphone, is used to convert sound signals into electrical signals. When a user makes a call or transmits voice information, a sound signal may be input to the microphone 170C by sounding near the microphone 170C. The apparatus 100 may be provided with at least one microphone 170C. In other embodiments, the apparatus 100 may be provided with two microphones 170C to achieve a noise reduction function. In other embodiments, the device 100 may also be provided with three, four or more microphones 170C to perform the functions of identifying the source of sound and directing the recording. The processor 110 may process the electrical signal output by the microphone 170C, for example, the audio module 170 and the wireless communication module 160 may be coupled through a PCM interface, and after the microphone 170C converts the environmental sound into an electrical signal (such as a PCM signal), the electrical signal is transmitted to the processor 110 through the PCM interface; the electrical signal is subjected to volume analysis and frequency analysis from the processor 110 to determine the volume and frequency of the ambient sound.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile device 100 platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A may be of various types, such as a resistive pressure sensor, an inductive pressure sensor, or a capacitive pressure sensor. The capacitive pressure sensor may be a device comprising at least two parallel plates with conductive material, and when a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes, and the device 100 determines the strength of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the apparatus 100 detects the touch operation according to the pressure sensor 180A. The device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon; and executing the instruction of newly creating the short message when the touch operation with the touch operation intensity being larger than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the apparatus 100. In some embodiments, the angular velocity of device 100 about three axes (i.e., the x-axis, the y-axis, and the z-axis) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the shake of the apparatus 100, calculates the distance to be compensated for by the lens module according to the angle, and allows the lens to counteract the shake of the apparatus 100 by the reverse motion, thereby realizing anti-shake. The gyro sensor 180B can also be used for scenes such as navigation and motion sensing games.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the device 100 calculates altitude from barometric pressure values measured by the barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the device 100 is a flip-top machine, the device 100 may detect the opening and closing of the flip-top according to the magnetic sensor 180D. The device 100 can set the characteristics of automatic unlocking of the flip cover according to the detected opening and closing state of the leather sheath or the detected opening and closing state of the flip cover.
The acceleration sensor 180E can detect the magnitude of acceleration of the device 100 in various directions (typically the x-axis, y-axis, and z-axis). The magnitude and direction of gravity can be detected when the device 100 is stationary. The acceleration sensor 180E may also be used to recognize the gesture of the apparatus 100 as an input parameter for applications such as landscape switching and pedometer.
The distance sensor 180F is used to measure a distance. The device 100 may measure distance by infrared or laser. In some embodiments, for example, in a shooting scene, the apparatus 100 may range using the distance sensor 180F to achieve fast focusing.
The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, for example, a photodiode. The LED may be an infrared LED. The device 100 emits infrared light outwards through the LED. The device 100 uses a photodiode to detect infrared reflected light from nearby objects. When reflected light is detected, the apparatus 100 may determine that an object is present nearby. When no reflected light is detected, the apparatus 100 may determine that there is no object nearby. The device 100 can use the proximity light sensor 180G to detect whether the user is holding the device 100 close to the ear for talking, so as to automatically extinguish the screen for power saving. The proximity light sensor 180G may also be used for automatic unlocking and automatic screen locking in holster mode or pocket mode.
The ambient light sensor 180L is used to sense ambient light level. The device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The device 100 can utilize the collected fingerprint characteristics to realize the functions of unlocking, accessing an application lock, photographing, answering an incoming call and the like.
The temperature sensor 180J is for detecting temperature. In some embodiments, the apparatus 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, apparatus 100 performs a reduction in performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the device 100 heats the battery 142 to avoid low temperatures causing the device 100 to shut down abnormally. In other embodiments, when the temperature is below a further threshold, the device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a touch device. The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a touch screen. The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor 180K may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the device 100 and at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key and an volume key. The keys 190 may be mechanical keys or touch keys. The device 100 may receive a key input signal and implement a function associated with the case input signal.
The motor 191 may generate vibration. The motor 191 may be used for incoming call alerting as well as for touch feedback. The motor 191 may generate different vibration feedback effects for touch operations acting on different applications. The motor 191 may also produce different vibration feedback effects for touch operations acting on different areas of the display screen 194. Different application scenarios (e.g., time alert, receipt message, alarm clock, and game) may correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, which may be used to indicate a change in state of charge and charge, or may be used to indicate a message, missed call, and notification.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195 to make contact with the apparatus 100, or may be removed from the SIM card interface 195 to make separation from the apparatus 100. The device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The same SIM card interface 195 may simultaneously insert multiple cards, which may be of the same type or of different types. The SIM card interface 195 may also be compatible with external memory cards. The device 100 interacts with the network through the SIM card to perform functions such as talking and data communication. In some embodiments, the device 100 employs an embedded SIM (eSIM) card, which may be embedded in the device 100 and not separable from the device 100.
The hardware system of the apparatus 100 is described in detail above, and the software system of the apparatus 100 is described below. The software system may employ a layered architecture, an event driven architecture, a microkernel architecture, a micro-service architecture, or a cloud architecture, and the embodiments of the present application illustratively describe the software system of the apparatus 100.
As shown in fig. 4, the software system using the hierarchical architecture is divided into several layers, each of which has a clear role and division. The layers communicate with each other through a software interface. In some embodiments, the software system may be divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include business APP and superterminal services.
The service APP is used for providing services required by the user, for example, the service APP can provide super-call services for the user, and call is transferred from the mobile phone to the intelligent sound box.
The super terminal service is used for creating and managing the WiFi direct connection.
The application framework layer provides an application programming interface (applicationprogramming interface, API) and programming framework for application programs of the application layer. The application framework layer may include some predefined functions. The application framework layer may include a resource manager and a notification manager.
The resource manager provides various resources, such as localization strings, icons, pictures, layout files, and video files, to the application program, and may facilitate the generation of a User Interface (UI).
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as a notification manager, is used for download completion notification and message alerting. The notification manager may also manage notifications that appear in the system top status bar in the form of charts or scroll bar text, such as notifications for applications running in the background. The notification manager may also manage notifications that appear on the screen in the form of dialog windows, such as prompting text messages in status bars, sounding prompts, vibrating electronic devices, and flashing lights.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing functions such as management of object life cycle, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules, such as: surface manager (surface manager), media library (MediaLibraries), three-dimensional graphics processing library (e.g., openGL ES), and 2D graphics engine (e.g., SGL).
The surface manager is used to manage the display subsystem and provides a fusion of the 2D and 3D layers for the plurality of applications.
The media library supports playback and recording of multiple audio formats, playback and recording of multiple video formats, and still image files. The media library may support a variety of audio and video coding formats such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
Three-dimensional graphics processing libraries may be used to implement three-dimensional graphics drawing, image rendering, compositing, and layer processing.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The kernel layer may include a system frame WiFi direct connection port, a network service interface, a display driver, and a modem driver, where the system frame WiFi direct connection port is a physical layer interface of WiFi direct connection, and the network service interface is a transport layer interface of WiFi direct connection.
It should be understood that the hardware structures and software architectures illustrated in fig. 3 and 4 are merely exemplary illustrations of the apparatus 100, and are not limiting on the hardware and software of the apparatus 100, and that the apparatus 100 may be implemented by other types of hardware structures and software architectures.
The workflow of the software system and hardware system of the apparatus 100 is illustrated below in connection with the scenario of establishing a WiFi direct connection.
In some cases, the apparatus 100 may display an interface including prompt information (e.g., information prompting the discovery device) on the display screen 194 through a display driver, so that the user instructs the apparatus 100 to perform the next process based on the prompt information. When a user needs to operate on the interface of the device 100, the touch sensor 180K generates a hardware interrupt, and the hardware interrupt is sent to the kernel layer, where the kernel layer processes the touch operation into an interaction event, where the interaction event includes information such as touch coordinates and a timestamp of the touch operation; subsequently, the kernel layer identifies the control corresponding to the interaction event and notifies an Application (APP) corresponding to the control. When the touch operation is an operation of establishing WiFi direct connection, the service APP calls the WiFi direct connection module through the API according to the interaction event, and the WiFi direct connection is established.
Fig. 5 shows a data transmission flow after a WiFi direct connection is established.
The mobile phone can discover terminal equipment with wireless communication functions (such as WiFi function and Bluetooth function) on the periphery of the mobile phone through the equipment discovery authentication module, and after the peripheral terminal equipment is discovered, the discovery authentication module can inform the service APP of discovering new equipment.
After the service APP of the mobile phone generates a service requirement (for example, the service requirement is a requirement triggered after a user clicks a screen-throwing button), the service APP can request the WiFi direct connection module to create a session through the session management interface, and the WiFi direct connection module can send a WiFi direct connection request through a WiFi direct connection interface of a system frame, and after the WiFi direct connection request is transmitted to a modem driver, the WiFi direct connection request is modulated in a wireless signal and transmitted.
And after receiving the wireless signal, the projector performs demodulation processing to obtain a WiFi direct connection request. If the number of WiFi direct connections of the projector does not reach a maximum value, the projector may send a reply message carrying that the WiFi direct connection may be established.
After receiving the wireless signal carrying the reply message, the mobile phone demodulates the wireless signal through the drive of the modem to obtain the reply message, and the reply message is transmitted to the WiFi direct connection module through the WiFi direct connection port of the system framework. The WiFi direct connection module executes a flow of establishing WiFi direct connection, and after the WiFi direct connection is established, the WiFi direct connection module can inform a service APP of the established message through a session management interface. The WiFi directly links the module and can also send the parameter that the WiFi directly links the connection to transmission module to the transmission module is based on the parameter transmission service APP's that the WiFi directly links the connection business data, and the parameter that the WiFi directly links the connection includes for example: service set identification (service set identifier, SSID), basic service set identification (basicservice set identifier, BSSID), pre-shared keys, and channel list.
After receiving the message of finishing the establishment of the WiFi direct connection, the service APP transmits service data (such as video data) to the transmission module through the data transmission interface, the transmission module transmits the service data to the modem driver through the network service interface, and the modem driver modulates the service data in a wireless signal and transmits the service data. The modem driver can also demodulate a received wireless signal containing service data (such as a shared document), transfer the service data to the transmission module, and the transmission module transmits the service data to the service APP through the data transmission interface, so that the function of transmitting the service data through WiFi direct connection is realized.
The super terminal service also comprises a device information synchronization module which is used for sending the WiFi direct connection information updated by the mobile phone to the opposite terminal device.
The method for establishing the session based on the WiFi direct connection provided in the embodiments of the present application will be described in detail below. As shown in fig. 6, the method is applied to a first device including a WiFi direct connection module, where the first device may be a mobile phone or other terminal devices. The method includes the following.
S610, the WiFi direct connection module receives a session request from the service APP, wherein the session request requests to establish a session based on WiFi direct connection.
The service APP can be a screen throwing service APP, a file sharing service APP, or other APPs which need to transmit data through WiFi direct connection. The service APP may invoke the session management interface to send a session request to the WiFi direct module.
S620, the WiFi direct connection module determines whether a WLAN channel and/or a Bluetooth channel exists between the first equipment and the second equipment according to the session request.
After receiving the session request, the WiFi direct connection module first checks whether there is a WLAN channel and/or a bluetooth channel between the first device and the second device, if there is a WLAN channel and a bluetooth channel, the existing WLAN channel or bluetooth channel may be selected as a negotiation channel, and parameters required for establishing WiFi direct connection are transmitted through the negotiation channel. If there is no WLAN channel and/or Bluetooth channel, the WiFi direct connection module can execute the following steps.
S630, when the WLAN channel and/or the Bluetooth channel does not exist, the WiFi direct connection module sends a first connection request to the second device through Bluetooth broadcasting, and the first connection request requests to establish WiFi direct connection of the service APP.
S640, the WiFi direct connection module receives a reply message of the first connection request from the second device.
S650, when the WiFi direct connection module receives the reply message of the first connection request, the WiFi direct connection module establishes the session based on the WiFi direct connection according to the reply message of the first connection request.
In the prior art, the first device wants to send the first connection request, and needs to wait for the WLAN channel or the bluetooth channel to be established, but the WLAN channel or the bluetooth channel needs to wait for a long time, so that the first connection request needs to wait for a long time in the prior art. In this embodiment, before the first connection request is sent, the WiFi direct connection module first determines whether a WLAN channel and/or a bluetooth channel exists, if the WLAN channel and/or the bluetooth channel does not exist, the first connection request is sent through bluetooth broadcast, and the bluetooth broadcast can be used without waiting for a second device to respond, thereby reducing the time required for establishing a session based on WiFi direct connection.
An example of setting up a session provided herein is described below in connection with fig. 7.
S701, the service APP requests to establish a session to the second device.
The service APP may request the WiFi direct module to establish a session with a second device (e.g., projector) based on the user's service requirements (e.g., the service requirements triggered by the user clicking the screen-cast button).
S702, the WiFi direct connection module judges whether a WLAN channel is available.
If the determination result of S702 is yes, S707 is executed. If the determination result of S702 is no, S703 is executed.
S703, the WiFi direct connection module judges whether a Bluetooth channel is available.
The bluetooth channel may be a Basic Rate (BR) bluetooth channel, an enhanced data rate (enhanced data rate, EDR) bluetooth channel, or a transmission channel using bluetooth technology other than a bluetooth broadcast channel.
Because the reliability of the WiFi channel is generally higher than that of the Bluetooth channel, if the WLAN channel exists, the WLAN channel can be directly selected as negotiation access, and the Bluetooth channel is not considered any more, so that the success rate of establishing the WiFi direct connection can be improved.
If the determination result of S703 is yes, S708 is executed. If the determination result in S703 is negative, S704 is executed.
S704, the WiFi direct connection module selects a Bluetooth broadcasting channel as a negotiation channel.
S705, the WiFi direct connection module establishes a Bluetooth channel concurrently.
The WiFi direct connection module can establish a Bluetooth channel through the Bluetooth module while selecting the Bluetooth broadcast channel as a negotiation channel. Because the first device sends the bluetooth broadcast message carrying the connection request after selecting the bluetooth broadcast channel, the bluetooth broadcast message also carries parameters required for establishing the bluetooth channel, so that if the second device opens the bluetooth function, the first device and the second device can establish the bluetooth channel as soon as possible.
S706, after the Bluetooth channel is established successfully, the WiFi direct connection module selects the Bluetooth channel as a negotiation channel.
S707, the WiFi direct module selects the WLAN channel as the negotiation channel.
S708, the WiFi direct connection module selects a Bluetooth channel as a negotiation channel.
S709, the WiFi direct connection module sends a connection request to the second device through the negotiation channel.
If the WiFi direct connection module executes S704, the WiFi direct connection module actually sends two connection requests when executing S709, the two connection requests are a first connection request sent through a bluetooth broadcast channel and a second connection request sent through a bluetooth channel, the two connection requests have the same function, the reason for sending the second connection request is that the reliability of bluetooth broadcast is poor, and after the bluetooth channel is established, the connection request (the second connection request) is sent once through the bluetooth channel, so that the success rate of establishing the WiFi direct connection can be improved.
If the WiFi direct module performs S707, the WiFi direct module sends a connection request, which may be referred to as a third connection request, when performing S709.
If the WiFi direct module performs S708, the WiFi direct module sends a connection request, which may be referred to as a fourth connection request, when performing S709.
S710, the second device processes the connection request.
If the second device receives the third connection request or the fourth connection request, the second device executes a flow of establishing WiFi direct connection based on the third connection request or the fourth connection request, and the flow of establishing WiFi direct connection will be described below.
If the second device only receives the first connection request, the second device only needs to execute the flow of establishing the WiFi direct connection based on the first connection request, which indicates that the transmission of the second connection request fails.
If the second device only receives the second connection request, the second device only needs to execute the flow of establishing the WiFi direct connection based on the second connection request, which indicates that the transmission of the first connection request fails.
If the second device receives the first connection request and the second connection request, the second device may execute a procedure of establishing the WiFi direct connection based on the first connection request, and send a reply message to the first device after the WiFi direct connection is established, to indicate that the WiFi direct connection is established successfully. The second device may discard the second connection request after receiving the second connection request (i.e., no WiFi direct connection is established based on the second connection request), so as to prevent the first device from failing to receive the reply message of the first connection request, and the second device may send the reply message of the second connection request to the first device, thereby improving the success rate of establishing the WiFi direct connection.
Accordingly, if the first device only receives the reply message of the first connection request or the second connection request, the first device may establish the session based on the WiFi direct connection according to the reply message of the first connection request or the second connection request. If the first device receives the reply messages of the first connection request and the second connection request, the first device does not need to process the reply message of the second connection request any more because the time of receiving the reply message of the second connection request is later, so that the power consumption of the first device can be reduced.
Alternatively, the first device may be ready to establish the WiFi direct connection in advance before the service APP requests to establish the session.
A flow for pre-establishing a WiFi direct connection is shown in fig. 8.
S801, the device discovery authentication module of the first device discovers a terminal device, such as a second device, around the first device.
The second device may be discovered by bluetooth broadcast, wiFi link broadcast, or other discovery methods.
S802, a device discovery authentication module of a first device starts a device authentication process.
S803, the device discovery authentication module of the first device sends an authentication request carrying the first device information.
The first device information includes information required for establishing a WiFi direct connection, such as information of a WiFi direct role, an SSID, a BSSID, a pre-shared key, a channel list, and the like, in addition to information required for a device authentication process.
S804, the second device processes the authentication request and stores the first device information carried in the authentication request to the local.
S805, the second device sends an authentication reply to the first device, carrying second device information.
The second device information includes information required for establishing a WiFi direct connection, such as information of a WiFi direct connection role, in addition to information required for a device authentication process.
S806, the first device processes the authentication reply and stores the second device information locally.
Through steps S801 to S806, the first device and the second device both store information required for establishing the WiFi direct connection. When the service APP of the first device requests to establish a session based on the WiFi direct connection, the first device may directly send a connection request (for example, including a static IP address allocated to the second device) to the second device based on the pre-stored second device information, without performing role negotiation and dynamic IP address allocation, thereby reducing the time required for session establishment.
Fig. 9 is an example of another pre-established WiFi direct connection provided herein.
S901, a WiFi direct connection module of the first device analyzes the broadcast message to obtain the connection state of the first WiFi direct connection network.
The WiFi direct module may register a broadcast receiver in the operating system during the initialization process (e.g., when the first device is started), where the broadcast receiver is configured to monitor for a change event (broadcast message) of the WiFi direct connection. When the WiFi direct connection module receives the broadcast message, the broadcast message needs to be analyzed, and the current state of the first WiFi direct connection network is determined according to the content of the broadcast message.
S902, the WiFi direct connection module judges whether the WiFi direct connection network is in a connected state.
If the judgment result of S902 is no, S903 is executed; if the determination result of S902 is yes, S904 is executed.
S903, the WiFi direct connection module clears the connection list, and updates the local direct connection role to be in a role-free state.
And S904, the WiFi direct connection module updates roles between the local areas into group controllers (GO) or Group Clients (GC) according to the WiFi direct connection group information in the broadcast message.
S905, the WiFi direct connection module executes a capacity change synchronization process.
S906, the WiFi direct connection module sends a synchronous request and carries local WiFi direct connection information (WiFi direct connection information updated by the first WiFi direct connection network).
The local WiFi direct information includes, for example: the first device updated WiFi direct role (GO, GC or no role), SSID, BSSID, pre-shared key and channel list.
S907, the second device processes the synchronization request, and updates the opposite WiFi direct information (the WiFi direct information updated by the first WiFi direct network) to the database.
S908, the second device returns a synchronization reply, which carries the local WiFi direct information (updated WiFi direct information of the second WiFi direct network), where the second WiFi direct network is a WiFi direct network of the second device.
S909, the first device processes the synchronization reply, and updates the opposite WiFi direct information (the WiFi direct information updated by the second WiFi direct network) to the database.
When the state of the first WiFi direct network changes, the first device needs to inform the second device of the new state of the first WiFi direct network through the synchronization information. At this time, the first device may implement negotiation of the group role using the synchronization information and the reply message of the synchronization information. Compared with the negotiation of the group role after waiting for the synchronization to be completed, the embodiment can reduce the time for establishing the WiFi direct connection.
The session establishment procedure after pre-establishing the WiFi direct connection is described below. As shown in fig. 10.
S1001, the service APP requests to establish a session to the second device.
The service APP may request the WiFi direct module to establish a session with a second device (e.g., projector) based on the user's service requirements (e.g., the service requirements triggered by the user clicking the screen-cast button).
S1002, the WiFi direct connection module executes a WiFi direct connection establishment flow.
S1003, the WiFi direct connection module executes a negotiation channel selection strategy to select a negotiation channel.
The specific flow of performing the negotiation channel selection policy may be referred to in fig. 7, and will not be described herein.
S1004, the WiFi direct connection module executes role decision and channel decision.
For example, if the second device is a role-free device (a device that does not establish any WiFi direct connection), the first device may decide to become a GO device; the first device may select, according to the channel lists supported by the two parties (the first device and the second device), a channel commonly supported by the first two parties in the channel list as a WiFi direct channel.
S1005, the WiFi direct connection module creates a WiFi direct connection group.
When the first device is the GO device, the first device can send the connection request through the negotiation channel in parallel without waiting for the establishment of the WiFi direct connection group to finish while establishing the WiFi direct connection group.
S1006, the WiFi direct connection module sends a connection request to the second device through the negotiation channel and carries information of the WiFi direct connection group.
The information of the WiFi direct group includes, for example: the first device's WiFi direct role, SSID, BSSID, pre-shared key, channel list, and static IP address assigned to the second device, where the static IP address is uniformly managed and assigned by the GO device.
And S1007, the second device receives the connection request and starts to connect the WiFi direct connection group.
After the second device receives the connection request, whether the WiFi direct connection role of the first device and the WiFi direct connection role of the second device meet the requirements or not can be judged. If the first device is a GO device and the second device is in a non-role state (i.e., the second device has not established a WiFi direct connection), the second device may skip the scanning process (scanning surrounding potential SSID) and the role negotiation process, and initiate connection off-hook according to the WiFi direct connection information (SSID, BSSDI, pre-shared key, and channel) negotiated in advance.
After the second device receives the WiFi direct connection status change information of the system and indicates that the GO device (the first device) is connected successfully, the static IP address allocated by the first device may be set to the local WiFi direct network card, and then S1008 is executed.
S1008, after the connection is successful, a reply message is sent to indicate that the connection is successful.
S1009, after the WiFi direct module of the first device receives the reply message indicating that the connection is successful, a session based on the WiFi direct connection is created.
The session is established, that is, a transmission channel of the transmission layer is established, for example, parameters of the WiFi direct connection are sent to the transmission module, so that the transmission module can transmit service data of the service APP based on the parameters of the WiFi direct connection.
S1010, after the session is established, the WiFi direct connection module reports the service APP to indicate that the session is established.
And after receiving the message of completing the session creation, the service APP calls a data transmission interface to transmit service data through the session.
The present application also provides a computer program product which, when executed by a processor, implements the method of any of the method embodiments of the present application.
The computer program product may be stored in a memory and eventually converted to an executable object file that can be executed by a processor through preprocessing, compiling, assembling, and linking.
The computer program product may also cure code in the chip. The present application is not limited to the specific form of computer program product.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a computer, implements a method according to any of the method embodiments of the present application. The computer program may be a high-level language program or an executable object program.
The computer readable storage medium may be volatile memory or nonvolatile memory, or may include both volatile memory and nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an erasable programmable ROM (erasablePROM, EPROM), an electrically erasable programmable EPROM (EEPROM), or a flash memory. The volatile memory may be random access memory (random access memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous DRAM (SLDRAM), and direct memory bus RAM (DR RAM).
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working processes and technical effects of the apparatus and device described above may refer to corresponding processes and technical effects in the foregoing method embodiments, which are not described in detail herein.
In several embodiments provided in the present application, the disclosed systems, apparatuses, and methods may be implemented in other manners. For example, some features of the method embodiments described above may be omitted, or not performed. The above-described apparatus embodiments are merely illustrative, the division of units is merely a logical function division, and there may be additional divisions in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the elements or the coupling between the elements may be direct or indirect, including electrical, mechanical, or other forms of connection.
It should be understood that, in various embodiments of the present application, the size of the sequence number of each process does not mean that the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
In addition, the terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is merely one association relationship describing the associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
In summary, the foregoing description is only a preferred embodiment of the technical solution of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (23)

1. A method of establishing a WiFi direct connection based session, the method comprising:
the method comprises the steps that a first device generates a session request of a service APP, wherein the session request is used for requesting to establish a session based on WiFi direct connection;
the first device determines whether a WLAN channel and/or a Bluetooth channel exists between the first device and the second device according to the session request;
when the WLAN channel and/or the Bluetooth channel do not exist, the first equipment sends a first connection request to the second equipment through Bluetooth broadcasting, wherein the first connection request is used for requesting to establish WiFi direct connection of the service APP;
When the first device receives the reply message of the first connection request, the first device establishes the session based on the WiFi direct connection according to the reply message of the first connection request.
2. The method according to claim 1, wherein the method further comprises:
the first device establishes the Bluetooth channel;
the first device sends a second connection request to the second device through the Bluetooth channel, wherein the second connection request is used for requesting to establish WiFi direct connection of the service APP.
3. The method according to claim 2, wherein the method further comprises:
when the first device does not receive the reply message of the first connection request and receives the reply message of the second connection request, the first device establishes the session based on the WiFi direct connection according to the reply message of the second connection request.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
when the first device receives the reply message of the first connection request and receives the reply message of the second connection request, the first device discards the reply message of the second connection request.
5. The method according to claim 1, wherein the method further comprises:
when the WLAN channel and the Bluetooth channel exist, the first device sends a third connection request to the second device through the WLAN channel, wherein the third connection request is used for requesting to establish WiFi direct connection of the service APP;
the first device receives a reply message of the third connection request from the second device;
and the first equipment establishes the session based on the WiFi direct connection according to the reply message of the third connection request.
6. The method according to claim 1, wherein the method further comprises:
when the WLAN channel does not exist and the Bluetooth channel exists, the first device sends a fourth connection request to the second device through the Bluetooth channel, wherein the fourth connection request is used for requesting to establish WiFi direct connection of the service APP;
the first device receives a reply message of the fourth connection request from the second device;
and the first equipment establishes the session based on the WiFi direct connection according to the reply message of the fourth connection request.
7. The method according to any of claims 1 to 6, characterized in that before the first device generates a session request for a service APP, the method further comprises:
The first device sends a device authentication request to the second device, wherein the device authentication request is used for the second device to authenticate the identity of the first device, and the device authentication request comprises parameters required for establishing WiFi direct connection;
the first device receives a reply message of the device authentication request from the second device, wherein the reply message of the device authentication request is used for the first device to authenticate the identity of the second device, and the reply message of the device authentication request comprises parameters required for establishing WiFi direct connection;
and the first equipment stores parameters required for establishing the WiFi direct connection in a reply message of the equipment authentication request.
8. The method according to any one of claims 1 to 6, further comprising:
the first device monitors the state change of a first WiFi direct network, wherein the first WiFi direct network is the WiFi direct network of the first device;
when the state of the first WiFi direct connection network changes, the first equipment sends synchronous information to the second equipment, wherein the synchronous information is used for updating the state of the first WiFi direct connection network by the second equipment, and the synchronous information comprises group roles of the first equipment;
The first device receives a reply message of the synchronous information from the second device, wherein the reply message of the synchronous information comprises a group role of the second device;
and the first equipment updates the group role of the second equipment according to the reply message of the synchronous information.
9. A method of establishing a WiFi direct connection based session, the method comprising:
the second device determines whether a WLAN channel and/or a Bluetooth channel exists between the first device and the second device;
when the WLAN channel and/or the Bluetooth channel do not exist, the second equipment receives Bluetooth broadcasting, wherein the Bluetooth broadcasting comprises a first connection request, and the first connection request is used for requesting to establish WiFi direct connection of a service APP of the first equipment;
the second equipment establishes WiFi direct connection of the service APP according to the first connection request;
the second device sends a reply message of the first connection request to the first device, wherein the reply message of the first connection request is used for indicating that the second device has established the WiFi direct connection of the service APP.
10. The method according to claim 9, wherein the method further comprises:
The second device establishes the Bluetooth channel;
the second device receives a second connection request through the Bluetooth channel, wherein the second connection request is used for requesting to establish WiFi direct connection of the service APP;
and the second device sends a reply message of the second connection request to the first device through the Bluetooth channel, wherein the reply message of the second connection request is used for indicating that the second device has established the WiFi direct connection of the service APP.
11. The method of claim 9 or 10, wherein prior to the second device receiving a bluetooth broadcast, the method further comprises:
the second device receives a device authentication request from the first device, the device authentication request being used by the second device to authenticate the identity of the first device, the device authentication request including parameters required to establish a WiFi direct connection;
the second device stores parameters required for establishing WiFi direct connection in the device authentication request;
the second device sends a reply message of the device authentication request to the first device, wherein the reply message of the device authentication request is used for the first device to authenticate the identity of the second device, and the reply message of the device authentication request comprises parameters required for establishing WiFi direct connection.
12. The method according to claim 9 or 10, characterized in that the method further comprises:
the second device receives synchronization information from the first device, wherein the synchronization information is used for updating the state of a first WiFi direct-connection network by the second device, the synchronization information comprises a group role of the first device, and the first WiFi direct-connection network is the WiFi direct-connection network of the first device;
the second device updates the state of the first WiFi direct connection network according to the synchronous information;
and the second equipment sends a reply message of the synchronous information to the first equipment, wherein the reply message of the synchronous information comprises a group role of the second equipment.
13. A method of establishing a WiFi direct connection based session, the method comprising:
the method comprises the steps that a first device generates a session request of a service APP, wherein the session request is used for requesting to establish a session based on WiFi direct connection;
when the WLAN channel and/or the Bluetooth channel do not exist, the first equipment sends a first connection request to the second equipment through Bluetooth broadcasting, wherein the first connection request is used for requesting to establish WiFi direct connection of the service APP;
The first device establishes the Bluetooth channel;
after the Bluetooth channel is successfully established, the first device sends a second connection request to the second device through the Bluetooth channel, wherein the second connection request is used for requesting to establish WiFi direct connection of the service APP.
14. The method of claim 13, wherein the method further comprises:
when the first device receives the reply message of the first connection request, the first device establishes the session based on the WiFi direct connection according to the reply message of the first connection request.
15. The method according to claim 13 or 14, characterized in that the method further comprises:
when the first device does not receive the reply message of the first connection request and receives the reply message of the second connection request, the first device establishes the session based on the WiFi direct connection according to the reply message of the second connection request.
16. The method according to any one of claims 13 to 15, further comprising:
when the first device receives the reply message of the first connection request and receives the reply message of the second connection request, the first device discards the reply message of the second connection request.
17. The method of claim 13, wherein the method further comprises:
when the WLAN channel and the Bluetooth channel exist, the first device sends a third connection request to the second device through the WLAN channel, wherein the third connection request is used for requesting to establish WiFi direct connection of the service APP;
the first device receives a reply message of the third connection request from the second device;
and the first equipment establishes the session based on the WiFi direct connection according to the reply message of the third connection request.
18. The method of claim 13, wherein the method further comprises:
when the WLAN channel does not exist and the Bluetooth channel exists, the first device sends a fourth connection request to the second device through the Bluetooth channel, wherein the fourth connection request is used for requesting to establish WiFi direct connection of the service APP;
the first device receives a reply message of the fourth connection request from the second device;
and the first equipment establishes the session based on the WiFi direct connection according to the reply message of the fourth connection request.
19. The method according to any of claims 13 to 18, characterized in that before the first device generates a session request for a service APP, the method further comprises:
The first device sends a device authentication request to the second device, wherein the device authentication request is used for the second device to authenticate the identity of the first device, and the device authentication request comprises parameters required for establishing WiFi direct connection;
the first device receives a reply message of the device authentication request from the second device, wherein the reply message of the device authentication request is used for the first device to authenticate the identity of the second device, and the reply message of the device authentication request comprises parameters required for establishing WiFi direct connection;
and the first equipment stores parameters required for establishing the WiFi direct connection in a reply message of the equipment authentication request.
20. The method according to any one of claims 13 to 18, further comprising:
the first device monitors the state change of a first WiFi direct network, wherein the first WiFi direct network is the WiFi direct network of the first device;
when the state of the first WiFi direct connection network changes, the first equipment sends synchronous information to the second equipment, wherein the synchronous information is used for updating the state of the first WiFi direct connection network by the second equipment, and the synchronous information comprises group roles of the first equipment;
The first device receives a reply message of the synchronous information from the second device, wherein the reply message of the synchronous information comprises a group role of the second device;
and the first equipment updates the group role of the second equipment according to the reply message of the synchronous information.
21. A method of establishing a WiFi direct connection based session, the method comprising:
the second device determines whether a WLAN channel and/or a Bluetooth channel exists between the first device and the second device;
when the WLAN channel and/or the Bluetooth channel do not exist, the second equipment receives a first connection request through Bluetooth broadcasting, wherein the first connection request is used for requesting to establish WiFi direct connection of a service APP of the first equipment;
the second device establishes the Bluetooth channel;
when the second device does not receive the first connection request through the Bluetooth broadcast and receives a second connection request through the Bluetooth channel, the second device sends a reply message of the second connection request to the first device through the Bluetooth channel, the second connection request is used for requesting to establish the WiFi direct connection of the service APP, and the reply message of the second connection request is used for indicating that the second device has established the WiFi direct connection of the service APP.
22. An apparatus for establishing a WiFi direct connection based session, comprising a processor and a memory, the processor and the memory coupled, the memory for storing a computer program that, when executed by the processor, causes the apparatus to perform the method of any of claims 1 to 8, 9 to 12, 13 to 20, or 21.
23. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which when executed by a processor causes an apparatus comprising the processor to perform the method of any one of claims 1 to 8, 9 to 12, 13 to 20, or 21.
CN202211600127.8A 2022-07-18 2022-07-18 Method and device for establishing session based on WiFi direct connection Pending CN117425227A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211600127.8A CN117425227A (en) 2022-07-18 2022-07-18 Method and device for establishing session based on WiFi direct connection

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210841500.2A CN114928898B (en) 2022-07-18 2022-07-18 Method and device for establishing session based on WiFi direct connection
CN202211600127.8A CN117425227A (en) 2022-07-18 2022-07-18 Method and device for establishing session based on WiFi direct connection

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202210841500.2A Division CN114928898B (en) 2022-07-18 2022-07-18 Method and device for establishing session based on WiFi direct connection

Publications (1)

Publication Number Publication Date
CN117425227A true CN117425227A (en) 2024-01-19

Family

ID=82815776

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202211600127.8A Pending CN117425227A (en) 2022-07-18 2022-07-18 Method and device for establishing session based on WiFi direct connection
CN202210841500.2A Active CN114928898B (en) 2022-07-18 2022-07-18 Method and device for establishing session based on WiFi direct connection

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202210841500.2A Active CN114928898B (en) 2022-07-18 2022-07-18 Method and device for establishing session based on WiFi direct connection

Country Status (1)

Country Link
CN (2) CN117425227A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116743413B (en) * 2022-10-26 2024-04-12 荣耀终端有限公司 Internet of things equipment authentication method and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10701545B2 (en) * 2016-09-09 2020-06-30 Huawei Technologies Co., Ltd. File sending method and terminal, and file receiving method and terminal
CN106413128B (en) * 2016-09-29 2020-07-07 努比亚技术有限公司 Projection method and mobile terminal
CN111866824A (en) * 2019-04-30 2020-10-30 青岛海信移动通信技术股份有限公司 Method and equipment for establishing communication connection and data transmission
CN111372325B (en) * 2020-02-21 2022-04-26 华为技术有限公司 Method and device for establishing Wi-Fi point-to-point connection
CN114079893B (en) * 2020-08-13 2023-10-13 华为技术有限公司 Bluetooth communication method, terminal device and computer readable storage medium
CN114679708A (en) * 2020-12-25 2022-06-28 华为技术有限公司 Communication method, system and electronic equipment

Also Published As

Publication number Publication date
CN114928898A (en) 2022-08-19
CN114928898B (en) 2022-10-28

Similar Documents

Publication Publication Date Title
CN111666119B (en) UI component display method and electronic device
CN114615423B (en) Callback flow processing method and device
CN113438354B (en) Data transmission method and device, electronic equipment and storage medium
CN114079893B (en) Bluetooth communication method, terminal device and computer readable storage medium
US20220159453A1 (en) Method for Using Remote SIM Module and Electronic Device
US20230422154A1 (en) Method for using cellular communication function, and related apparatus and system
CN114125130B (en) Method for controlling communication service state, terminal device and readable storage medium
CN116361255A (en) Data synchronization method, electronic device, and computer-readable storage medium
CN117014859A (en) Address book-based device discovery method, audio and video communication method and electronic device
WO2021197071A1 (en) Wireless communication system and method
CN113973398B (en) Wireless network connection method, electronic equipment and chip system
CN113645571A (en) Data transmission method and electronic equipment
CN111343326A (en) Method and related device for acquiring test log
CN113810451B (en) Method and device for establishing point-to-point link, first terminal equipment and storage medium
CN114928898B (en) Method and device for establishing session based on WiFi direct connection
CN113703894A (en) Display method and display device of notification message
CN114928900B (en) Method and apparatus for transmission over a WiFi direct connection
CN113676902B (en) System, method and electronic equipment for providing wireless internet surfing
CN114567871A (en) File sharing method and device, electronic equipment and readable storage medium
CN115002939B (en) Method and device for joining WiFi group
CN115460445B (en) Screen projection method of electronic equipment and electronic equipment
CN116668586B (en) Control method, terminal, server and storage medium for private color ring back tone service state
CN114173317B (en) Method for transmitting data and electronic equipment
WO2024093703A1 (en) Instance management method and apparatus, and electronic device and storage medium
CN111801931B (en) Method for switching on and hanging up telephone when call occurs SRVCC switch

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination