CN111867148A - Method and equipment for establishing equipment connection and data transmission - Google Patents

Method and equipment for establishing equipment connection and data transmission Download PDF

Info

Publication number
CN111867148A
CN111867148A CN201910362853.2A CN201910362853A CN111867148A CN 111867148 A CN111867148 A CN 111867148A CN 201910362853 A CN201910362853 A CN 201910362853A CN 111867148 A CN111867148 A CN 111867148A
Authority
CN
China
Prior art keywords
terminal
bluetooth
connection
opposite
preset
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
CN201910362853.2A
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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201910362853.2A priority Critical patent/CN111867148A/en
Publication of CN111867148A publication Critical patent/CN111867148A/en
Pending legal-status Critical Current

Links

Images

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
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention relates to the technical field of terminals, in particular to a method and equipment for establishing equipment connection and data transmission, which are used for solving the problem that Bluetooth and Wi-Fi cannot be used for transmission if one party between two terminals does not have the function of Bluetooth and Wi-Fi combined transmission in the prior art. According to the embodiment of the invention, the first terminal configures a Bluetooth and Wi-Fi P2P combined transmission function for the second terminal selected from the devices scanned by the user through Bluetooth, and the second terminal interactively uses the first terminal to establish the preset BLE broadcast message connected with Wi-Fi P2P according to the combined transmission function configured by the opposite terminal device, and performs data transmission through the established Wi-Fi P2P connection, so that the problem that the terminal without the Bluetooth and Wi-Fi P2P combined transmission function and other terminals with the function perform data transmission in a Bluetooth and Wi-Fi combined transmission mode is solved.

Description

Method and equipment for establishing equipment connection and data transmission
Technical Field
The present invention relates to the field of terminals, and in particular, to a method and an apparatus for establishing an apparatus connection and data transmission.
Background
With the continuous development of communication technology, the applications of bluetooth transmission and Wi-Fi (Wireless Fidelity) transmission in the data transmission field of intelligent devices are relatively wide, wherein:
(1) Bluetooth is a wireless technology standard, and can implement short-distance data exchange between fixed equipment, mobile equipment and building personal area networks (using 2.4-2.485GHz of UHF radio waves in ISM (Industrial Scientific Medical) band);
(2) Wi-Fi is a technology that allows an electronic device to connect to a Wireless Local Area Network (WLAN), typically using the 2.4G UHF or 5G SHF ISM radio frequency bands. Connecting to a wireless local area network is typically password protected; but may be open, allowing any device within range of the WLAN to connect, in order to improve interoperability between wireless networking products based on the IEEE 802.11 standard.
At present, data files with capacity of dozens of MB to GB levels cannot be downloaded at high speed through a Bluetooth technology, so that inconvenience is brought to users; Wi-Fi is used as a data transmission mode in public places, the security is poor in the connection establishing process, and then a Bluetooth and Wi-Fi combined transmission mode is provided, but if one of the two terminals does not have the Bluetooth and Wi-Fi combined transmission function, Bluetooth and Wi-Fi combined transmission cannot be performed.
In summary, in the prior art, if one of the two terminals does not have the function of bluetooth and Wi-Fi joint transmission, the two terminals cannot use bluetooth and Wi-Fi joint transmission.
Disclosure of Invention
The invention provides a method and equipment for establishing equipment connection and data transmission, which are used for solving the problem that Bluetooth and Wi-Fi cannot be jointly transmitted if one party between two terminals does not have the function of joint transmission of the Bluetooth and the Wi-Fi in the prior art.
In a first aspect, a method for establishing device connection and data transmission provided in an embodiment of the present invention includes:
the first terminal determines the opposite terminal equipment selected by the user from the equipment scanned by the Bluetooth; the first terminal configures a joint transmission function for opposite terminal equipment selected by a user; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P; the first terminal establishes Wi-Fi P2P connection with the opposite terminal device after receiving a preset BLE (Bluetooth Low Energy) broadcast message sent by the opposite terminal device configured with the joint transmission function; and the first terminal performs data transmission with the opposite terminal equipment through the established Wi-Fi P2P connection.
According to the method, the first terminal configures a Bluetooth and Wi-Fi P2P combined transmission function for the second terminal selected from the devices scanned by the user through Bluetooth, and the second terminal interactively uses the first terminal to establish the preset BLE broadcast message connected with Wi-Fi P2P according to the combined transmission function configured by the opposite terminal device, and performs data transmission through the established Wi-Fi P2P connection, so that the problem that the terminal without the Bluetooth and Wi-Fi P2P combined transmission function performs data transmission with other terminals with the function in a Bluetooth and Wi-Fi combined transmission mode is solved. In an optional implementation manner, before the configuring, by the first terminal, a joint transmission function for the peer device selected by the user, the method further includes:
The first terminal does not receive a preset BLE broadcast message within a preset time after receiving a combined transmission instruction triggered by a user, and displays equipment information scanned through Bluetooth; or
And the first terminal displays the equipment information scanned through the Bluetooth after receiving an equipment information display instruction triggered by a user and scanned through the Bluetooth.
In an alternative embodiment, the preset BLE broadcast includes preset UUID (Universally unique identifier) information;
wherein the type of the preset BLE broadcast message is a scannable non-directional type.
According to the method, the first terminal can screen the received BLE broadcast message according to the preset UUID information, if the BLE broadcast message does not contain the preset UUID information, the fact that the opposite terminal device does not support the Bluetooth and Wi-Fi P2P combined transmission function is determined, the mode of customizing the UUID information is more flexible, and the operation is simple. Further, because the BLE broadcast packet is of a scannable non-directional type, when the BLE broadcast packet is exchanged between the first terminal and the second terminal, only data can be obtained through the data packet, but bluetooth connection cannot be initiated. Therefore, the embodiment of the invention does not need to establish Bluetooth pairing connection, and in the broadcasting stage, the Wi-Fi P2P connection is established according to the received BLE broadcasting message, so that the time consumed by Bluetooth pairing is avoided, and the process of establishing the Wi-Fi P2P connection is simplified.
After receiving a preset BLE broadcast message sent by an opposite terminal device configured with the joint transmission function, the first terminal establishes Wi-Fi P2P connection with the opposite terminal device, including:
if the received preset BLE broadcast message does not contain information for determining a Wi-Fi P2PMAC address of the opposite-end device, the first terminal sends request information for obtaining a Wi-Fi P2P MAC address to the opposite-end device, and determines the Wi-Fi P2P MAC address of the opposite-end device according to the received feedback information sent by the opposite-end device aiming at the request information; or if the received preset BLE broadcast message contains information for determining a Wi-Fi P2P MAC address of the peer device, the first terminal determines the Wi-Fi P2P MAC address of the peer device according to the preset BLE broadcast message;
the first terminal sends a request for establishing Wi-Fi P2P connection to the opposite terminal equipment according to the determined Wi-Fi P2P MAC address, and receives response information which is sent by the opposite terminal equipment and agrees to establish Wi-Fi P2P connection.
In a second aspect, a method for establishing device connection and data transmission provided in an embodiment of the present invention includes:
the second terminal sends a preset BLE broadcast message according to the joint transmission function configured by the opposite terminal equipment; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P;
The second terminal establishes Wi-Fi P2P connection with the opposite terminal equipment;
and the second terminal performs data transmission with the opposite terminal equipment through the Wi-Fi P2P connection.
In an optional implementation manner, the preset BLE broadcast packet includes preset UUID information;
wherein the type of the preset BLE broadcast message is a scannable non-directional type.
In an optional implementation manner, the establishing, by the second terminal, a Wi-Fi P2P connection with the peer device through the preset BLE broadcast packet includes:
after receiving a request which is sent by the opposite terminal equipment and contains information used for obtaining a Wi-Fi P2P MAC address, the second terminal sends feedback information containing information used for determining a Wi-Fi P2P MAC address to the opposite terminal equipment;
and after receiving the request for establishing the Wi-Fi P2P connection sent by the opposite terminal equipment, the second terminal sends response information agreeing to establish the Wi-Fi P2P connection to the opposite terminal equipment.
In a third aspect, an embodiment of the present invention further provides a first terminal for establishing device connection and data transmission, where the first terminal includes: a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the terminal to perform the following:
Determining opposite-end equipment selected by a user from the equipment scanned by the Bluetooth; configuring a joint transmission function for opposite terminal equipment selected by a user; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P; after receiving a preset BLE broadcast message sent by opposite terminal equipment configured with the joint transmission function, establishing Wi-FiP2P connection with the opposite terminal equipment; and carrying out data transmission with the opposite terminal equipment through the established Wi-Fi P2P connection.
In one possible implementation, the processor is further configured to:
the method comprises the steps that a preset BLE broadcast message is not received within preset time after a combined transmission instruction triggered by a user is received, and equipment information scanned through Bluetooth is displayed; or
And after receiving a device information display instruction triggered by a user and scanned through Bluetooth, displaying the device information scanned through the Bluetooth.
In one possible implementation, the preset BLE broadcast includes preset UUID information;
wherein the type of the preset BLE broadcast message is a scannable non-directional type.
In one possible implementation, the processor is specifically configured to:
if the received preset BLE broadcast message does not contain information for determining a Wi-Fi P2PMAC address of the opposite-end equipment, sending request information for obtaining a Wi-Fi P2P MAC address to the opposite-end equipment, and determining the Wi-Fi P2P MAC address of the opposite-end equipment according to the received feedback information sent by the opposite-end equipment aiming at the request information; or if the received preset BLE broadcast message contains information for determining a Wi-Fi P2P MAC address of the opposite-end device, determining a Wi-Fi P2P MAC address of the opposite-end device according to the preset BLE broadcast message;
Sending a request for establishing Wi-Fi P2P connection to the opposite terminal equipment according to the determined Wi-Fi P2P MAC address, and receiving response information which is sent by the opposite terminal equipment and agrees to establish Wi-Fi P2P connection.
In a fourth aspect, an embodiment of the present invention further provides a second terminal for establishing device connection and data transmission, where the second terminal includes: a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the terminal to perform the following:
sending a preset BLE broadcast message according to a joint transmission function configured by opposite-end equipment; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P; establishing Wi-Fi P2P connection with the opposite terminal equipment; and carrying out data transmission with the opposite terminal equipment through the Wi-Fi P2P connection.
In a possible implementation manner, the preset BLE broadcast message includes preset UUID information; wherein the type of the preset BLE broadcast message is a scannable non-directional type.
In one possible implementation, the processor is specifically configured to:
after receiving a request which is sent by the opposite terminal equipment and contains information for acquiring a Wi-Fi P2P MAC address, sending feedback information containing information for determining the Wi-Fi P2P MAC address to the opposite terminal equipment;
After receiving the request for establishing the Wi-Fi P2P connection sent by the opposite terminal equipment, sending response information agreeing to establish the Wi-Fi P2P connection to the opposite terminal equipment.
In a fifth aspect, an embodiment of the present invention further provides another first terminal for establishing device connection and data transmission, where the first terminal includes:
a determination module: the device comprises a peer device used for determining user selection from devices scanned through Bluetooth;
a configuration module: configuring a joint transmission function for the opposite terminal equipment selected by the user; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P;
a first processing module: the device is used for establishing Wi-Fi P2P connection with the opposite terminal equipment after receiving a preset BLE broadcast message sent by the opposite terminal equipment configured with the joint transmission function;
a first transmission module: the terminal equipment is used for carrying out data transmission with the peer equipment through the established Wi-Fi P2P connection.
In a sixth aspect, an embodiment of the present invention further provides another second terminal for establishing device connection and data transmission, where the second terminal includes:
a sending module: the BLE broadcast message sending unit is used for sending a preset BLE broadcast message according to a joint transmission function configured by opposite-end equipment; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P;
A second processing module: the terminal equipment is used for establishing Wi-Fi P2P connection with the opposite terminal equipment;
a second transmission module: for data transmission with the peer device over the Wi-Fi P2P connection.
In a seventh aspect, the present application further provides a computer storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of the method of the first or second aspect.
In addition, for technical effects brought by any one implementation manner of the second aspect to the sixth aspect, reference may be made to technical effects brought by different implementation manners of the first aspect, and details are not described here.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic diagram of an interactive system for establishing device connection and data transmission according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a functional interface of a terminal according to an embodiment of the present invention;
FIG. 3 is a schematic interface diagram of a terminal Bluetooth and Wi-Fi P2P joint transmission function according to an embodiment of the present invention;
fig. 4 is a schematic interface diagram of a terminal bluetooth according to an embodiment of the present invention;
fig. 5 is a schematic interface diagram of a terminal for displaying a shortcut icon in a pull-up manner according to an embodiment of the present invention;
fig. 6A is a schematic interface diagram of a terminal regarding a file sharing manner according to an embodiment of the present invention;
fig. 6B is a schematic diagram of a terminal pop-up window interface according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a preset BLE broadcast message format according to an embodiment of the present invention;
fig. 8A is a schematic structural diagram of a PDU (Protocol Data Unit) in a preset BLE broadcast packet according to an embodiment of the present invention;
fig. 8B is a schematic structural diagram of a PDU Header in the preset BLE broadcast packet according to an embodiment of the present invention;
fig. 8C is a schematic structural diagram of a PDU Payload (basic necessary data) in a preset BLE broadcast message according to an embodiment of the present invention;
fig. 9 is a flowchart illustrating a method for establishing a device connection and a first terminal side for data transmission according to an embodiment of the present invention;
fig. 10 is a flowchart illustrating a method for establishing a device connection and a second terminal side for data transmission according to an embodiment of the present invention;
Fig. 11 is a flowchart illustrating another method for establishing a device connection and a first terminal side for data transmission according to an embodiment of the present invention;
fig. 12 is a flowchart illustrating another method for establishing a device connection and a second terminal side for data transmission according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a first terminal for establishing device connection and data transmission according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of another first terminal for establishing device connection and data transmission according to an embodiment of the present invention;
fig. 15 is a schematic structural diagram of a third terminal for establishing device connection and data transmission according to an embodiment of the present invention;
fig. 16 is a schematic structural diagram of a second terminal for establishing device connection and data transmission according to an embodiment of the present invention;
fig. 17 is a schematic structural diagram of another second terminal for establishing device connection and data transmission according to an embodiment of the present invention;
fig. 18 is a schematic structural diagram of a third terminal for establishing device connection and data transmission according to an embodiment of the present invention;
fig. 19 is a schematic structural diagram of a first terminal for establishing device connection and data transmission according to an embodiment of the present invention;
Fig. 20 is a flowchart illustrating a method for establishing a device connection and a second terminal for data transmission according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
1. The term "and/or" in the embodiments of the present invention describes an association relationship of associated objects, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
2. In the embodiment of the invention, the term "Wi-Fi P2P", also called as WLAN direct, can realize interconnection and high-speed data transmission between terminals without a Wi-Fi hotspot and a cellular network, wherein the WLAN function includes a Wi-Fi hotspot connection and a Wi-Fi P2P connection.
3. The terms "first terminal" and "second terminal" in the embodiments of the present invention refer to smart devices with Wi-Fi and bluetooth functions, such as a mobile phone, a tablet, a smart camera, a smart printer, and the like.
4. In the embodiment of the present invention, the term "packet" refers to a data unit, i.e. a data block, exchanged and transmitted in a network, and includes complete data information to be transmitted, where a "BLE broadcast packet" may also be a GATT broadcast packet.
The application scenario described in the embodiment of the present invention is for more clearly illustrating the technical solution of the embodiment of the present invention, and does not form a limitation on the technical solution provided in the embodiment of the present invention, and it can be known by a person skilled in the art that with the occurrence of a new application scenario, the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems. In the description of the present invention, the term "plurality" means two or more unless otherwise specified.
For a terminal with a Bluetooth connection function, Bluetooth and Wi-Fi P2P can be used for combined transmission during data transmission, so that the data transmission safety can be improved, high-speed data transmission can be realized, and the problems of low data transmission speed and small data transmission quantity caused by single use of Bluetooth and low safety during connection establishment during data transmission caused by single use of Wi-Fi P2P connection are solved. However, if one of the two terminals performing data transmission does not have the combined transmission function of bluetooth and Wi-Fi P2P, the two terminals cannot use the combined transmission function of bluetooth and Wi-Fi P2P, for example, the first terminal has the combined transmission function of bluetooth and Wi-Fi P2P, but the second terminal does not have the combined transmission function of bluetooth and Wi-Fi P2P, or the two terminals have different combined transmission functions of bluetooth and Wi-Fi P2P and cannot be compatible with each other.
Assuming that the first terminal has a Bluetooth and Wi-Fi P2P joint transmission function, after receiving a Bluetooth and Wi-Fi P2P joint transmission instruction, the first terminal scans a broadcast message containing preset UUID information supporting Bluetooth and Wi-Fi P2P joint, and performs a subsequent Wi-Fi P2P connection establishment process with an opposite terminal according to a scanned BLE broadcast message containing the preset UUID information; the first terminal scans the preset BLE broadcast message, and can understand that the preset BLE broadcast message sent by other equipment is not received in a non-directional manner.
And the second terminal does not have the combined transmission function of bluetooth and Wi-Fi P2P, that is, the second terminal does not have the capability of sending the preset BLE broadcast message and reading the preset BLE broadcast message, so that the first terminal cannot share data with the opposite terminal device by using bluetooth and Wi-Fi P2P combined transmission.
Therefore, an embodiment of the present invention provides a method for establishing a Wi-Fi P2P connection, where after a first terminal determines that an opposite-end device does not have a bluetooth and Wi-Fi P2P joint transmission function, the method returns to a display interface of a connectable device scanned by bluetooth, and configures a bluetooth and Wi-Fi P2P joint transmission function for the opposite-end device selected by a user from the display interface, so that the opposite-end device has a bluetooth and Wi-Fi P2P joint transmission function according to configuration information, thereby performing bluetooth and Wi-Fi P2P joint transmission.
The embodiments of the present invention will be described in further detail with reference to the drawings attached hereto.
As shown in fig. 1, an interactive system for data transmission according to an embodiment of the present invention specifically includes a first terminal 10 and a second terminal 20.
A first terminal 10 for determining a peer device selected by a user from the devices scanned by bluetooth; configuring a joint transmission function for opposite terminal equipment selected by a user; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P; after receiving a preset BLE broadcast message sent by opposite terminal equipment configured with the joint transmission function, establishing Wi-Fi P2P connection with the opposite terminal equipment; and carrying out data transmission with the opposite terminal equipment through the established Wi-Fi P2P connection.
The second terminal 20 is configured to send a preset BLE broadcast message according to a joint transmission function configured by the peer device; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P; establishing Wi-FiP2P connection with the opposite terminal equipment; and carrying out data transmission with the opposite terminal equipment through the Wi-Fi P2P connection.
Through the scheme, the first terminal configures a Bluetooth and Wi-Fi P2P combined transmission function for the second terminal selected from the devices scanned by the user through Bluetooth, the second terminal interactively uses the first terminal to establish the preset BLE broadcast message connected with the Wi-Fi P2P according to the combined transmission function configured by the opposite terminal device, and performs data transmission through the established Wi-Fi P2P connection, so that the problem that the terminal without the Bluetooth and Wi-Fi P2P combined transmission function performs data transmission with other terminals with the function in a Bluetooth and Wi-Fi combined transmission mode is solved.
In the following, an interaction procedure for establishing device connection and data transmission provided by the present invention is described by taking an example that a first terminal has a bluetooth and Wi-Fi P2P joint transmission function, and a second terminal does not have a bluetooth and Wi-Fi P2P joint transmission function or is incompatible with the bluetooth and Wi-Fi P2P joint transmission function of the first terminal:
if the user a shares a file named "work" with a second terminal owned by the user B through a first terminal owned by the user a, if the user a needs to use bluetooth and Wi-Fi P2P of the first terminal to jointly transmit the "work" file to the second terminal, the second terminal also needs to have a bluetooth and Wi-Fi P2P joint transmission function. Therefore, the a user needs to determine that the second terminal has the bluetooth and Wi-Fi P2P joint transmission function, and the following specific determination method is exemplified:
step 1: the user a clicks a bluetooth and Wi-Fi P2P joint transmission function button of the first terminal through the function interface shown in fig. 2, bluetooth and Wi-Fi P2P joint transmission of the first terminal is started, and the first terminal scans a preset BLE broadcast message after receiving the started bluetooth and Wi-Fi P2P joint transmission function triggered by the user a. The preset BLE broadcast message is a message containing UUID information which supports combined transmission of Bluetooth and Wi-Fi P2P.
It should be noted that after the bluetooth and Wi-Fi P2P joint transmission function switch is turned on, the bluetooth and WLAN direct connection functions are also turned on at the same time.
Step 2: the first terminal starts a bluetooth and Wi-Fi P2P joint transmission function, jumps to a display interface corresponding to the function and shown in fig. 3, displays connectable devices scanned in the function mode, determines the device name of an opposite terminal device sending a preset BLE broadcast message according to the scanned preset BLE broadcast message, and adds a third terminal to a device list of connectable devices searched by me shown in fig. 3 if a terminal with the device name of the third terminal searched by the first terminal sends the preset BLE broadcast message.
And step 3: the user A can select opposite-end equipment connected with the Wi-Fi P2P through the equipment list, if the equipment list does not have a terminal which the user A wants to share files, namely a second terminal, the second terminal is considered to be not provided with a Bluetooth and Wi-Fi P2P combined transmission function, the user A operates the first terminal to return to a Bluetooth scanning interface through a return key, the first terminal jumps to a connectable equipment list display interface which is scanned by Bluetooth after receiving an equipment information display instruction which is triggered by the user A and displayed through the Bluetooth, the user A is connected with the second terminal in a Bluetooth pairing mode after selecting the second terminal, and the Bluetooth and Wi-Fi P2P combined transmission function which is configured for the second terminal is transmitted through the Bluetooth.
It should be noted that the foregoing manner is only an example, and another possible case is that after the first terminal starts the bluetooth and Wi-Fi P2P joint transmission function, if no preset BLE broadcast message is scanned within a preset time, the first terminal may automatically jump to a bluetooth scanning interface, or remind the user a through a popup window, and if no device capable of performing Wi-Fi P2P connection is scanned, whether a bluetooth and Wi-Fi P2P joint transmission function needs to be configured for the opposite terminal through bluetooth.
In the embodiment of the present invention, there are various ways for the first terminal to configure the bluetooth and Wi-Fi P2P joint transmission function for the second terminal, which are illustrated below:
the first configuration mode is as follows: sending an APP (application) installation package integrated with a Bluetooth and Wi-Fi P2P joint transmission function to a second terminal;
the APP for establishing bluetooth and Wi-Fi P2P joint transmission in the embodiment of the present invention includes read-write rule information for determining a preset BLE broadcast message, and the APP has an effect of analyzing a scanned BLE broadcast message, sending the preset BLE broadcast message, and establishing a GATT connection channel with another terminal through the BLE broadcast message, where the BLE broadcast message may also be a GATT broadcast message.
After the user A selects the second terminal from the device list scanned by the Bluetooth, the first terminal acquires the installation package of the APP used for establishing the Bluetooth and Wi-Fi P2P combined transmission according to a preset path, and sends the installation package of the APP to the second terminal through the Bluetooth transmission, wherein the Bluetooth transmission can be based on a Bluetooth OPP protocol.
After the second terminal receives the installation package, application installation is carried out according to the installation package, and after the installation is completed, the second terminal has a Bluetooth and Wi-Fi P2P combined transmission function, namely a preset BLE broadcast message can be sent, and the scanned BLE broadcast message can be analyzed.
The second configuration mode: sending the download information integrated with the APP for establishing Bluetooth and Wi-Fi P2P joint transmission to the second terminal;
after the user A selects the second terminal from the devices scanned by the first terminal through the Bluetooth, the first terminal sends the download information of the APP used for establishing the Bluetooth and Wi-Fi P2P combined transmission to the second terminal through the Bluetooth.
Wherein, the download information may be: the information such as the complete name of this APP's download link or this APP, this APP is downloaded according to this APP's download information to this APP is installed to the second terminal, and after the installation was accomplished, this second terminal has just possessed bluetooth and Wi-Fi P2P joint transmission function, can send promptly and predetermine the broadcast message, and can parse the BLE broadcast message that scans.
It should be noted that the above configuration manner is only an example, and may also be a plug-in, an applet, or a protocol rule for determining read-write rule information of a preset BLE broadcast packet, and any integrated form or content of the bluetooth and Wi-Fi P2P joint transmission function is applicable to the embodiment of the present invention.
In the embodiment of the invention, when the function is configured for a terminal without the combined transmission function of Bluetooth and Wi-Fi P2P, because the function needs to be transmitted through Bluetooth when being configured, in the stage of configuring the function, Bluetooth connection is established between two terminals, if the terminal has the combined transmission function of Bluetooth and Wi-Fi P2P or file sharing is performed between two terminals configured with the combined transmission function of Bluetooth and Wi-Fi P2P, the connection of the Bluetooth is not needed, and the Wi-Fi P2P can be established with opposite terminal equipment directly through scanning non-directional BLE broadcasting, so that the time consumed by performing Bluetooth pairing connection between the two terminals is saved, and the process of establishing WIFI P2P connection is simplified.
The following illustrates the main flow of the first terminal and the second terminal configured with the bluetooth and Wi-Fi P2P joint transmission function to share files by using the bluetooth and Wi-Fi P2P joint transmission again:
With reference to fig. 2, turning on the first terminal triggers the first terminal to scan a BLE broadcast packet containing preset UUID information, and correspondingly, turning on a bluetooth and Wi-Fi P2P joint transmission function switch on the second terminal, and triggering the second terminal to send a BLE broadcast containing the preset UUID information;
in the embodiments of the present invention, there are various ways for triggering the first terminal to scan the BLE broadcast packet containing the preset UUID information or triggering the second terminal to send the BLE broadcast containing the preset UUID information, and the following examples are specifically described below:
the first triggering mode is as follows: triggering by identifying a function switch supporting combined transmission of Bluetooth and Wi-Fi P2P;
the terminal is integrated with a function switch with an identifier supporting combined transmission of Bluetooth and Wi-Fi P2P, after the function switch is turned on, a control instruction of combined transmission of Bluetooth and Wi-Fi P2P is triggered, after the terminal receives the control instruction, the Bluetooth function and the WLAN direct connection function are started, and Bluetooth scanning and Wi-Fi P2P direct connection scanning are started.
And if the BLE broadcast message containing the preset UUID information is scanned through Bluetooth, determining the Wi-Fi P2P MAC address of the opposite terminal equipment according to the information in the BLE broadcast message, and establishing Wi-Fi P2P connection.
The function switch for identifying the combined transmission supporting the bluetooth and the Wi-Fi P2P has various display forms, such as:
The display mode is as follows: see fig. 2;
a switch with a Bluetooth and Wi-Fi P2P combined transmission function is arranged on a certain relevant display interface of the terminal;
and a second display mode: see fig. 5;
in the pull-down menu shown in fig. 5, a function switch for quickly turning on the Wi-Fi P2P joint transmission is provided, and clicking on the icon triggers a control command for bluetooth and Wi-Fi P2P joint transmission.
And a second triggering mode: selecting a Bluetooth and Wi-Fi P2P combined transmission mode to trigger during data sharing;
when the file sharing is carried out, the mode of jointly transmitting through Bluetooth and Wi-Fi P2P in the file sharing mode is selected to start the Bluetooth and Wi-Fi P2P joint transmission.
For example, the following steps are carried out: if the user a holds the first terminal and the user B holds the second terminal, the user a shares the file named "work" with the user B through the first terminal, and the specific operation flow is as follows:
the user A selects a file named 'work' on the first terminal, selects a sharing button of the file or presses the file package for a long time to trigger the first terminal to display a sharing interface shown in fig. 6A, wherein the file sharing mode comprises modes of Bluetooth and Wi-FiP2P combined transmission, mails, information, WeChat and the like. After the user A selects the combined transmission of the Bluetooth and the Wi-Fi P2P, the first terminal informs the user A whether to use the combined transmission of the Bluetooth and the Wi-Fi P2P through a popup window as shown in FIG. 6B, and after the user A clicks 'OK', the first terminal is triggered to start the combined transmission function of the Bluetooth and the Wi-Fi P2P.
Correspondingly, if the second terminal is to receive the work file in a bluetooth and Wi-Fi P2P joint transmission manner, the second terminal also needs to start a bluetooth and Wi-Fi P2P joint transmission function, and the starting manner may refer to specific operation steps of the first terminal, which is not described herein again.
And starting a Bluetooth and Wi-Fi P2P joint transmission function, and establishing Wi-Fi P2P connection by the first terminal and the second terminal through a preset BLE broadcast message.
Embodiments of the present invention are based on BLE applications, wherein BLE applications rely on BLE broadcasts, the party that sends BLE broadcasts is called Broadcaster, and the party that listens to BLE broadcasts is called Observer. The preset BLE broadcast message in the interaction flow related to establishing the device connection and data transmission provided by the invention is introduced by taking a first terminal and a second terminal configured with a bluetooth and Wi-Fi P2P joint transmission function as examples, wherein the first terminal is taken as an Observer, and the second terminal is taken as a Broadcaster:
the following describes a method for determining BLE broadcast message content:
as shown in fig. 7, a schematic structural diagram of a BLE broadcast message format according to an embodiment of the present invention is provided.
The BLE broadcast message includes the following four parts (see bluetooth protocol specification Core _ v4.2 for details):
preamble (Preamble): the broadcast channel is fixed to 10101010b, the data channel is 10101010bor01010101 b;
access Address: the broadcast channel is fixed to 0x8E89BED6, the data channel is a random value, different connections have different values, and the data channel is used between two devices after the connection is established;
CRC: CRC checking;
PDU: as shown in FIG. 8A, the PDU includes a PDU Header and PDU Payload data;
as shown in fig. 8B, the PDU Header includes a PDU Type (Type) for representing the Type of the BLE broadcast packet, and the PDU Type is described in detail below:
as shown in table 1 below, the PDU Type includes four Advertising types, two Scanning types, and one initializing Type, which are distinguished by 1byte data.
Figure BDA0002047367150000161
TABLE 1 BLE broadcast message-PDU Type in PDU Header
Wherein, the adapting type comprises: ADV _ IND is connectable non-directional broadcast, ADV _ DIRECT _ IND is connectable directional broadcast, ADV _ non _ IND is non-connectable non-directional broadcast, and ADV _ SCAN _ IND is scannable non-directional broadcast;
Scanning types include: SCAN _ REQ indicating that a broadcaster can be requested to broadcast more information through the PDU when receiving broadcast data of ADV _ IND or ADV _ SCAN _ IND type; SCAN _ RSP, which means that after the broadcaster receives the SCAN _ REQ request, more data is transmitted to the opposite terminal equipment through the PDU response;
the initialization type is CONNECT _ REQ, which indicates that when receiving broadcast data of ADV _ IND or ADV _ DIRECT _ IND type, connection with the other party can be requested through the PDU;
the embodiment of the present invention uses a scannable non-directional ADV _ SCAN _ IND Type PDU Payload, the flag bit of PDU Type is 0110, and as shown in table 2, it is a structural schematic diagram of an ADV _ SCAN _ IND Type pdupayoad, where the maximum length of this Type of PDU Payload data packet is 37 bytes, where AdvA is a broadcast device address part, which includes a broadcast sender's bluetooth MAC address, and is 6 bytes, and AdvData is a PDU data part, which includes two parts, namely, significant (valid data) and non-significant (invalid data), and 31 bytes in total.
Figure BDA0002047367150000171
TABLE 2 BLE BROADCAST MESSAGE-PDU Payload of ADV _ SCAN _ IND type
AdvData is described in detail below, and includes, but is not limited to, the following:
1, a valid data portion;
the valid Data part contains several broadcast Data units called AD Structure, which contains Length and Data. As shown in fig. 8C, the composition of the AD Structure includes, but is not limited to, the following:
1) the Length indicates the Length of Data included after the Length in the AD Structure, that is, the Length of Data.
2) AD Type, which indicates the Type of content represented by AD Data, such as device name, UUID, etc.;
3) AD Data, specific Data content.
For example, the content 020106 of an AD Structure is 02 for Len (indicating that the next 2 bytes of content all belong to AD Structure 1), 01 for AD Type, and 06 for AD Data.
2, invalid data portion;
the length of AdvData in PDU Payload must be 31 bytes, if the valid data part is less than 31 bytes, then it is complemented with 0, and the data in this part is invalid.
The AD types involved in the embodiments of the present invention include, but are not limited to, the following types, which are described below:
type 1: incomplete 16-bit UUID information;
an important concept in BLE applications is UUID, which identifies bluetooth services and communication feature access attributes, with different access methods being used for different bluetooth services and attributes.
Three definitions of the service UUID format in the bluetooth broadcast are 16-bit UUID, 32-bit UUID and 128-bit UUID. The difference between complete and incomplete is that the device supports various service UUIDs, but only broadcasting a part of the services is called incomplete, and the embodiment of the invention adds a self-defined service in a broadcast data packet, so that the monitoring broadcaster Observer can determine an available device supporting combined transmission of bluetooth and Wi-Fi P2P by judging whether a scanned BLE broadcast message carries UUID information corresponding to the self-defined service.
In the embodiment of the invention, 0x02 represents incomplete 16-bit UUID information, and if the AD Type is 02, the content of ADData is incomplete UUID information.
Such as: the Service name defined by the invention is My _ Service _ UUID, and if the My _ Service _ UUID generated by using the UUID random generator is E953, when the UUID obtained by analyzing the received BLE broadcast message contains E953, the terminal broadcasting the BLE broadcast message is a valid terminal, namely a terminal supporting Bluetooth and Wi-Fi P2P combined transmission control.
For example, the following steps are carried out: the AD Structure 1 in the BLE broadcast message received by the first terminal is 030253E 9, where length is 03, 3 bytes after length belong to the AD Structure 1, AD Type is 02, the content of AD Data is UUID information, and the corresponding UUID information is E953, that is, My _ Service _ UUID, then the first terminal determines that the terminal broadcasting the BLE broadcast message is a terminal supporting bluetooth to Wi-Fi connection.
It should be noted that the My _ Service _ UUID E953 is only an example, any value representing meaning or type is not limited to a fixed real number, and any value or length combination meeting the requirement of the condition is suitable for the present invention.
Type 2: a device name;
in the embodiment of the invention, 0x08 represents equipment abbreviation, 0x09 represents equipment full name, correspondingly, AD Data is a character string of names, and if AD Type is 08, the AD Data is the abbreviation of the names of the equipment; if the AD Type is 09, the AD Data device is called fully, and the added part is to enable the broadcast monitor Observer to obtain the device name of the Broadcaster, so as to display the device name, which is convenient for the user to view.
For example, the content of an AD Structure is 0E 09454 d 393330342046696E 646 d65, where Len is 0E (indicating that the contents of the next 14 bytes all belong to the AD Structure 3), AD Type is 09 for the device generic name, AD Data is 454 d 393330342046696E 646 d65 for 'E "M" 9 "3" 0 "4" space "F" i "n" d "M" E' (see ASCII code hexadecimal).
Type 3: customizing data;
in the embodiment of the invention, 0xFF represents vendor self-defined data, the first two bytes represent vendor ID, the default is 6F4D, and the rest are added according to requirements, so that the data content in the data can be self-defined.
The embodiment of the invention can represent the Wi-Fi P2PMAC address or the difference item of the Bluetooth MAC address and the Wi-Fi P2P MAC address of the broadcast sender Broadcaster through the custom data. That is, there are various ways for determining the MAC address of Wi-Fi P2P included in the custom data, which are illustrated below:
the first method is as follows: the user-defined data comprises a difference item of a Bluetooth MAC address and a Wi-Fi P2P MAC address;
assuming that the WLAN MAC address of the terminal A is EC: D0:9F: C6:50:8B, the Bluetooth address of the terminal A is EC: D0:9F: C6:50:8A, and the difference item is 8A, the self-defined data part is the difference item 8A, and the content of the AdvData in the PDU payload is 04FF 4D 6F 8A;
assuming that the WLAN MAC address of the terminal B is 10:44:00: A5: DE: CD, the Bluetooth MAC address of the terminal B is 10:44:00: A5: CF:65, and the difference item is DE CD, the customized data part is the difference item DE CD, and the content of AdvData in the PDU payload is 05 FF 4D 6F DE CD;
correspondingly, the broadcast receiver Observer analyzes the received BLE broadcast message, determines the Bluetooth MAC address of the broadcast sender Broadcaster through the AdvA in the PDUpayload, determines the difference item between the Bluetooth MAC address of the broadcast sender Broadcaster and the WLAN MAC address through the AdvData in the PDU payload, and determines the WLAN MAC address of the broadcast sender Broadcaster according to the analyzed Bluetooth MAC address and the difference item between the Bluetooth MAC address and the WLAN MAC address.
It should be noted that, here, the WLAN MAC address is merely used as an example, and in the BLE broadcast message in the embodiment of the present invention, information capable of determining the Wi-Fi P2P MAC address is placed.
For example, the content of the PDU payload in the BLE broadcast message received by the broadcast receiver Observer is 104400 a5 CF 6505 FF 4D 6F DE CD, the first 6 bytes are AdvA, that is, the bluetooth MAC address 104400 a5 CF65, and the next content is 05 FF 4D 6F DE CD whose bytes are AdvData, so that part of the content can know that the difference item between the bluetooth MAC address and the Wi-Fi P2P MAC address is DE CD, and the Wi-Fi P2P MAC address 10:44:00: a5: DE CD of the broadcast sender Broadcaster is determined according to the analyzed bluetooth MAC address and the difference item between the two.
The second method comprises the following steps: the self-defining data comprises a Wi-Fi P2P MAC address;
if the BLE broadcast message contains a complete Wi-Fi P2P MAC address, the broadcast receiver Observer determines the Wi-Fi P2P MAC address of the broadcast sender according to the Wi-Fi P2P MAC address obtained by analyzing the BLE broadcast message.
For example, the content of the PDU payload in the BLE broadcast message received by the broadcast receiver Observer is 104400 a5 CF 6509 FF 4D 6F 104400 a5 DE CD, and the Wi-Fi P2P MAC address 104400 a5 DE CD of the broadcast sender Broadcaster can be determined according to the content of the AdvData.
The embodiment of the invention can also define the Wi-Fi P2P MAC address request information in the custom data, for example, a bit value corresponding to an ASCII code of 'Query device address' is placed in the custom data to represent that the BLE broadcast message is a BLE broadcast message of the Wi-Fi P2P MAC address request information.
In the embodiment of the present invention, the first terminal analyzes the scanned BLE broadcast packet in the above manner, determines that the BLE broadcast includes preset UUID information, obtains the device name of the peer device and the Wi-Fi P2P MAC address of the peer device, and displays the device name of the peer device in the connectable device list, and after the user clicks and selects the terminal, it is assumed that the terminal selected by the user is the second terminal, and there are various interaction manners for the first terminal and the second terminal to establish Wi-Fi P2P connection, for example:
a feasible method is provided, if a preset BLE broadcast message sent by a second terminal scanned by a first terminal includes information for determining a Wi-Fi P2P MAC address of the second terminal, the first terminal sends a request for establishing Wi-Fi P2P connection to the second terminal according to the Wi-Fi P2P MAC address, the second terminal sends response information agreeing to establish Wi-Fi P2P connection to the first terminal after receiving the request for establishing Wi-Fi P2P connection of the first terminal, and the connection establishment between the first terminal and the second terminal is completed; wherein, see fig. 9 for a specific method flow of the first terminal side, and see fig. 10 for a specific method flow of the second terminal side;
In another feasible way, if the preset BLE broadcast message sent by the second terminal and scanned by the first terminal does not contain information for determining the Wi-Fi P2P MAC address of the second terminal, the first terminal sends request information for acquiring the Wi-Fi P2P MAC address of the second terminal to the second terminal, and after receiving the request information of the Wi-Fi P2PMAC address sent by the first terminal, feeding back information containing a Wi-Fi P2P MAC address to the first terminal, sending a request for establishing Wi-Fi P2P connection to the second terminal according to the Wi-Fi P2P MAC address, after receiving the request for establishing Wi-Fi P2P connection from the first terminal, sending response information agreeing to establish Wi-Fi P2P connection to the first terminal, and completing establishment of Wi-Fi P2P connection between the first terminal and the second terminal; wherein, see fig. 11 for a specific method flow of the first terminal side, and see fig. 12 for a specific method flow of the second terminal side.
It should be noted that the above flow is only an example, and the second terminal may also scan the preset BLE broadcast message sent by other devices while sending the preset BLE broadcast message, and initiate the specific flow shown by the first terminal according to the scanned preset BLE broadcast message. Correspondingly, the first terminal may also send the preset BLE broadcast message to other devices when scanning the preset BLE broadcast message sent by other devices. That is to say, the first terminal also has the function of the second terminal, and the second terminal also has the function of the first terminal, it can be understood that the above-mentioned process is that the user controls the first terminal to establish the Wi-Fi P2P connection with the second terminal, and actually in the process of establishing the Wi-Fi P2P connection, the user may also control the second terminal to establish the Wi-Fi P2P connection with the first terminal, any party capable of scanning the peer device may initiate the establishment of the Wi-Fi P2P connection, and execute a corresponding process according to the user operation, and specific processes refer to the above-mentioned examples, and are not described herein again.
As shown in fig. 9, a flowchart of a method for establishing a device connection and a first terminal side for data transmission provided in an embodiment of the present invention is shown, including the following steps:
step 900, opening a Bluetooth and Wi-Fi P2P combined transmission function;
step 901, a first terminal scans BLE broadcast messages sent by other devices;
step 902, a first terminal determines whether a user selects an opposite terminal for establishing Wi-Fi P2P connection from a sending terminal scanning a preset BLE broadcast message; if yes, go to step 903, otherwise, go to step 907;
step 903, sending a BLE broadcast message of Wi-Fi P2P MAC address request information to an opposite terminal selected by a user;
step 904, receiving a BLE broadcast message fed back by the opposite terminal and including information for determining an MAC address of Wi-Fi P2P of the opposite terminal;
step 905, analyzing the received preset BLE broadcast message, initiating a request for establishing Wi-Fi P2P connection to the opposite terminal according to the analyzed Wi-Fi P2PMAC address of the opposite terminal, and receiving response information fed back by the opposite terminal equipment and agreeing to establish Wi-Fi P2P connection by the first terminal;
step 906, the first terminal and the opposite terminal equipment are connected through Wi-Fi P2P to perform high-speed data transmission;
step 907, the first terminal jumps to a bluetooth scanning interface;
Step 908, the first terminal configures the combined transmission function of bluetooth and Wi-Fi P2P for the peer device selected by the user from the devices scanned by bluetooth; and returns to perform step 902.
It should be noted that after step 908, the user may turn back on the bluetooth and Wi-Fi P2P joint transmission function of the first terminal, i.e. scan again the connectable devices supporting bluetooth and Wi-Fi P2P joint transmission.
For a simple overview, after peer devices to be subjected to file sharing are not scanned within a preset time after a bluetooth and Wi-Fi P2P joint transmission function is started and preset BLE broadcast messages are sent, the peer devices are automatically jumped to the bluetooth scanning interface; or jump to the Bluetooth scanning interface by receiving an instruction input by a user.
As shown in fig. 10, a flowchart of a method for establishing a device connection and a second terminal side for data transmission provided in an embodiment of the present invention includes the following steps:
step 1000, opening a Bluetooth function, and waiting for a Bluetooth connection request initiated by opposite-end equipment;
1001, a second terminal receives a combined transmission function of Bluetooth and Wi-Fi P2P configured by an opposite terminal device through Bluetooth;
Step 1002, starting a bluetooth and Wi-Fi P2P joint transmission function of a second terminal, and sending a preset BLE broadcast message to an opposite terminal device;
step 1003, after receiving request information for establishing a Wi-Fi P2P MAC address initiated by the peer device, the second terminal sends feedback information containing the Wi-Fi P2P MAC address for determining itself to the peer device;
step 1004, the second terminal performs data transmission with the opposite terminal device through Wi-Fi P2P connection;
step 1005, after receiving the request information for establishing Wi-Fi P2P connection initiated by the opposite terminal device, the second terminal sends a response message agreeing to establish Wi-Fi P2P connection to the opposite terminal device;
and step 1006, the second terminal performs data transmission with the peer device through the Wi-Fi P2P connection.
It should be noted that the above-mentioned process is only an example, and if the second terminal has the bluetooth and Wi-Fi P2P joint transmission function, the process directly skips to step 1002.
As shown in fig. 11, a flowchart of another method for establishing a device connection and a first terminal side for data transmission according to an embodiment of the present invention is shown, where the method includes the following steps:
step 1100, opening a Bluetooth and Wi-Fi P2P joint transmission function;
step 1101, the first terminal scans BLE broadcast messages sent by other devices;
Step 1102, a first terminal judges whether a user selects an opposite terminal for establishing Wi-Fi P2P connection in a sending terminal scanning a preset BLE broadcast message; if so, go to step 1103, otherwise, go to step 1107;
step 1103, determining a Wi-Fi P2P MAC address of the peer device selected by the user according to the preset BLE broadcast message, and initiating request information for establishing Wi-Fi P2P connection to the peer device according to the Wi-Fi P2P MAC address;
step 1104, response information sent by the peer device agreeing to establish Wi-Fi P2P connection;
step 1105, the first terminal and the opposite terminal device are connected through Wi-Fi P2P to perform high speed data transmission;
step 1106, the first terminal jumps to a Bluetooth scanning interface;
step 1107, the first terminal configures the combined transmission function of bluetooth and Wi-Fi P2P for the peer device selected by the user from the devices scanned by bluetooth; and returns to perform step 1102.
It should be noted that after step 1107, the user may restart the function of the joint transmission of bluetooth and Wi-Fi P2P of the first terminal, i.e. rescan the connectable devices supporting the joint transmission of bluetooth and Wi-Fi P2P.
As shown in fig. 12, a flowchart of a method for establishing a device connection and a second terminal side for data transmission according to an embodiment of the present invention is shown, where the method includes the following steps:
Step 1200, a bluetooth function is opened, and a bluetooth connection request initiated by an opposite terminal device is waited;
step 1201, the second terminal receives the combined transmission function of Bluetooth and Wi-Fi P2P configured by the opposite terminal device through Bluetooth;
step 1202, starting a combined transmission function of the Bluetooth and Wi-Fi P2P of the second terminal, and sending a preset BLE broadcast message to the opposite terminal equipment;
step 1203, after receiving the request information for establishing Wi-Fi P2P connection initiated by the peer device, the second terminal sends response information agreeing to establish Wi-Fi P2P connection to the peer device;
and step 1204, the second terminal performs data transmission with the peer device through Wi-Fi P2P connection.
It should be noted that the BLE broadcast message including the preset UUID information and the BLE broadcast message including the address used for determining the Wi-Fi P2PMAC may be the same BLE broadcast message, may be different BLE broadcast messages, or any BLE broadcast message at least includes the preset UUID information, which is only an example, and the present invention is not limited to BLE broadcast messages with fixed content combinations.
The second terminal may periodically send the preset BLE broadcast message, and if the sent preset BLE broadcast message is monitored by other terminals that also support the bluetooth and Wi-Fi P2P joint transmission function, the device name of the second terminal may be displayed on the device list interface of the peer device. If the peer device initiates a Wi-Fi P2P connection request, the second terminal can receive the request dialog box, click "ok" to accept the connection request, and click "cancel" to reject the connection request. If the connection request is accepted, a Wi-Fi P2P connection confirmation response is fed back to the opposite terminal device, and then the opposite terminal device can be connected with the Wi-Fi P2P to transmit data.
The above is an introduction description of the BLE broadcast message according to the embodiment of the present invention, where the first terminal is used as a file sending end, and the second terminal is used as a file receiving end, and actually, in an interaction process between the first terminal and the second terminal, the first terminal and the second terminal are both used as a broadcast sender Broadcaster to send the BLE broadcast message and a broadcast receiver Observer to monitor the BLE broadcast message sent by the other party, that is, a bidirectional broadcast, and after receiving the BLE broadcast message (i.e., the BLE broadcast message including My _ Service _ UUID), a Wi-Fi P2PMAC address of the peer device is obtained through analysis, and then a Wi-Fi P2P connection is established with the peer device according to the Wi-Fi P2P MAC address, so as to implement high-speed data transmission through Socket communication.
Based on the same concept, as shown in fig. 13, an embodiment of the present invention provides a first terminal for establishing device connection and data transmission, where the first terminal includes: a processor 1300 and a memory 1301, wherein the memory 1301 stores program code, and when one or more computer programs stored in the memory 1301 are executed by the processor 1300, the terminal is caused to perform the following processes:
Determining opposite-end equipment selected by a user from the equipment scanned by the Bluetooth; configuring a joint transmission function for opposite terminal equipment selected by a user; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P; after receiving a preset BLE broadcast message sent by opposite terminal equipment configured with the joint transmission function, establishing Wi-FiP2P connection with the opposite terminal equipment; and carrying out data transmission with the opposite terminal equipment through the established Wi-Fi P2P connection.
Optionally, the processor 1300 is further configured to:
the method comprises the steps that a preset BLE broadcast message is not received within preset time after a combined transmission instruction triggered by a user is received, and equipment information scanned through Bluetooth is displayed; or
And after receiving a device information display instruction triggered by a user and scanned through Bluetooth, displaying the device information scanned through the Bluetooth.
Optionally, the preset BLE broadcast includes preset UUID information;
wherein the type of the preset BLE broadcast message is a scannable non-directional type.
Optionally, the processor 1300 is specifically configured to:
if the received preset BLE broadcast message does not contain information for determining a Wi-Fi P2PMAC address of the opposite-end equipment, sending request information for obtaining a Wi-Fi P2P MAC address to the opposite-end equipment, and determining the Wi-Fi P2P MAC address of the opposite-end equipment according to the received feedback information sent by the opposite-end equipment aiming at the request information; or if the received preset BLE broadcast message contains information for determining a Wi-Fi P2P MAC address of the opposite-end device, determining a Wi-Fi P2P MAC address of the opposite-end device according to the preset BLE broadcast message;
Sending a request for establishing Wi-Fi P2P connection to the opposite terminal equipment according to the determined Wi-Fi P2P MAC address, and receiving response information which is sent by the opposite terminal equipment and agrees to establish Wi-Fi P2P connection.
As shown in fig. 14, an embodiment of the present invention provides another first terminal for establishing a device connection and data transmission, including:
the determination module 1400: the device comprises a peer device used for determining user selection from devices scanned through Bluetooth;
configuration module 1401: configuring a joint transmission function for the opposite terminal equipment selected by the user; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P;
the first processing module 1402: the device is used for establishing Wi-Fi P2P connection with the opposite terminal equipment after receiving a preset BLE broadcast message sent by the opposite terminal equipment configured with the joint transmission function;
the first transmission module 1403: the terminal equipment is used for carrying out data transmission with the peer equipment through the established Wi-Fi P2P connection.
Optionally, the first processing module 1402 is further configured to:
the method comprises the steps that a preset BLE broadcast message is not received within preset time after a combined transmission instruction triggered by a user is received, and equipment information scanned through Bluetooth is displayed; or
And after receiving a device information display instruction triggered by a user and scanned through Bluetooth, displaying the device information scanned through the Bluetooth.
Optionally, the preset BLE broadcast includes preset UUID information;
optionally, the first processing module 1402 is specifically configured to:
if the received preset BLE broadcast message does not contain information for determining a Wi-Fi P2PMAC address of the opposite-end equipment, sending request information for obtaining a Wi-Fi P2P MAC address to the opposite-end equipment, and determining the Wi-Fi P2P MAC address of the opposite-end equipment according to the received feedback information sent by the opposite-end equipment aiming at the request information; or if the received preset BLE broadcast message contains information for determining a Wi-Fi P2P MAC address of the opposite-end device, determining a Wi-Fi P2P MAC address of the opposite-end device according to the preset BLE broadcast message;
sending a request for establishing Wi-Fi P2P connection to the opposite terminal equipment according to the determined Wi-Fi P2P MAC address, and receiving response information which is sent by the opposite terminal equipment and agrees to establish Wi-Fi P2P connection.
As shown in fig. 15, a third terminal 1500 for establishing device connection and data transmission according to the embodiment of the present invention includes: radio Frequency (RF) circuitry 1510, a power source 1520, a processor 1530, a memory 1540, an input unit 1550, a display unit 1560, a camera 1570, a communication interface 1580, and a Wireless Fidelity (Wi-Fi) module 1590. Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 15 is not intended to be limiting, and that the terminal provided by the embodiments of the present application may include more or less components than those shown, or some components may be combined, or a different arrangement of components may be provided.
The following describes the components of the first terminal 1500 in detail with reference to fig. 15:
the RF circuitry 1510 may be used for receiving and transmitting data during a communication or conversation. Specifically, the RF circuit 1510 sends downlink data of a base station to the processor 1530 for processing after receiving the downlink data; and in addition, sending the uplink data to be sent to the base station. In general, the RF circuitry 1510 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
Further, the RF circuit 1510 may also communicate with a network and other terminals through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The Wi-Fi technology belongs to a short-distance wireless transmission technology, and the first terminal 1500 may connect to an Access Point (AP) through a Wi-Fi module 1590, thereby implementing Access to a data network. The Wi-Fi module 1590 can be used for receiving and sending data during communication.
The first terminal 1500 can be physically connected to other terminals through the communication interface 1580. Optionally, the communication interface 1580 is connected to the communication interfaces of the other terminals through a cable, so as to implement data transmission between the first terminal 1500 and the other terminals.
In this embodiment of the application, the first terminal 1500 can implement a communication service to send information to other contacts, so that the first terminal 1500 needs to have a data transmission function, that is, the first terminal 1500 needs to include a communication module inside. Although fig. 15 shows communication modules such as the RF circuit 1510, the Wi-Fi module 1590, and the communication interface 1580, it is to be understood that at least one of the above-described components or other communication modules (e.g., a bluetooth module) for enabling communication exists in the first terminal 1500 for data transmission.
For example, when the first terminal 1500 is a mobile phone, the first terminal 1500 may include the RF circuit 1510 and may further include the Wi-Fi module 1590; when the first terminal 1500 is a computer, the first terminal 1500 may include the communication interface 1580 and may further include the Wi-Fi module 1590; when the first terminal 1500 is a tablet computer, the first terminal 1500 may include the Wi-Fi module.
The memory 1540 can be used to store software programs and modules. The processor 1530 executes various functional applications and data processing of the first terminal 1500 by executing the software programs and modules stored in the memory 1540, and after the processor 1530 executes the program codes in the memory 1540, part or all of the processes in fig. 2 according to the embodiment of the present invention can be implemented.
Alternatively, the memory 1540 may mainly include a program storage area and a data storage area. The storage program area can store an operating system, various application programs (such as communication application), a face recognition module and the like; the storage data area may store data (such as various multimedia files like pictures, video files, etc., and face information templates) created according to the use of the terminal, etc.
Further, the memory 1540 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 1550 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the first terminal 1500.
Optionally, the input unit 1550 may include a touch panel 1551 and other input terminals 1552.
The touch panel 1551, also referred to as a touch screen, can collect touch operations of a user (for example, operations of the user on or near the touch panel 1551 by using any suitable object or accessory such as a finger, a stylus pen, etc.) and drive the corresponding connection device according to a preset program. Optionally, the touch panel 1551 may include two parts, namely a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 1530, and can receive and execute commands sent by the processor 1530. In addition, the touch panel 1551 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, a surface acoustic wave, and the like.
Optionally, the other input terminals 1552 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1560 may be used to display information input by a user or information provided to the user and various menus of the first terminal 1500. The display unit 1560 is a display system of the first terminal 1500, and is configured to present an interface to implement human-computer interaction.
The display unit 1560 may include a display panel 1561. Alternatively, the Display panel 1561 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-emitting diode (OLED), or the like.
Further, the touch panel 1551 may cover the display panel 1561, and when the touch panel 1551 detects a touch operation on or near the touch panel 1551, the touch operation is transmitted to the processor 1530 to determine the type of the touch event, and then the processor 1530 provides a corresponding visual output on the display panel 1561 according to the type of the touch event.
Although the touch panel 1551 and the display panel 1561 are shown in fig. 15 as two separate components to implement the input and output functions of the first terminal 1500, in some embodiments, the touch panel 1551 and the display panel 1561 can be integrated to implement the input and output functions of the first terminal 1500.
The processor 1530 is a control center of the first terminal 1500, connects each component using various interfaces and lines, and executes various functions and processes data of the first terminal 1500 by operating or executing software programs and/or modules stored in the memory 1540 and calling data stored in the memory 1540, thereby implementing various services based on the terminal.
Optionally, the processor 1530 may include one or more processing units. Optionally, the processor 1530 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 1530.
The camera 1570 is configured to implement a shooting function of the first terminal 1500, and shoot a picture or a video. The camera 1570 may also be configured to implement a scanning function of the first terminal 1500, and scan a scanned object (two-dimensional code/barcode).
The first terminal 1500 also includes a power source 1520 (e.g., a battery) for powering the various components. Optionally, the power source 1520 may be logically connected to the processor 1530 through a power management system, so as to manage charging, discharging, and power consumption functions through the power management system.
It is to be noted that, according to the embodiment of the present invention, the processor 1530 may execute the functions of the processor 1300 in fig. 13, and the memory 1540 stores the contents of the processor 1301.
Based on the same concept, as shown in fig. 16, an embodiment of the present invention provides a second terminal for establishing device connection and data transmission, where the second terminal includes: a processor 1600 and a memory 1601, wherein the memory 1601 stores program code, and when the one or more computer programs stored in the memory 1601 are executed by the processor 1600, the terminal is caused to perform the following processes:
sending a preset BLE broadcast message according to a joint transmission function configured by opposite-end equipment; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P; establishing Wi-Fi P2P connection with the opposite terminal equipment; and carrying out data transmission with the opposite terminal equipment through the Wi-Fi P2P connection.
Optionally, the preset BLE broadcast message includes preset UUID information;
wherein the type of the preset BLE broadcast message is a scannable non-directional type.
Optionally, the processor 1600 is specifically configured to:
after receiving a request which is sent by the opposite terminal equipment and contains information for acquiring a Wi-Fi P2P MAC address, sending feedback information containing information for determining the Wi-Fi P2P MAC address to the opposite terminal equipment;
After receiving the request for establishing the Wi-Fi P2P connection sent by the opposite terminal equipment, sending response information agreeing to establish the Wi-Fi P2P connection to the opposite terminal equipment.
As shown in fig. 17, an embodiment of the present invention provides another first terminal for establishing a device connection and data transmission, including:
the sending module 1700: the BLE broadcast message sending unit is used for sending a preset BLE broadcast message according to a joint transmission function configured by opposite-end equipment; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P;
the second processing module 1701: the terminal equipment is used for establishing Wi-Fi P2P connection with the opposite terminal equipment;
the second transmission module 1702: for data transmission with the peer device over the Wi-Fi P2P connection.
Optionally, the preset BLE broadcast message includes preset UUID information;
wherein the type of the preset BLE broadcast message is a scannable non-directional type.
Optionally, the second processing module 1701 is specifically configured to:
after receiving a request which is sent by the opposite terminal equipment and contains information for acquiring a Wi-Fi P2P MAC address, sending feedback information containing information for determining the Wi-Fi P2P MAC address to the opposite terminal equipment;
after receiving the request for establishing the Wi-Fi P2P connection sent by the opposite terminal equipment, sending response information agreeing to establish the Wi-Fi P2P connection to the opposite terminal equipment.
As shown in fig. 18, a third terminal 1800 for establishing device connection and data transmission according to the embodiment of the present invention includes: a Radio Frequency (RF) circuit 1810, a power supply 1820, a processor 1830, a memory 1840, an input unit 1850, a display unit 1860, a camera 1870, a communication interface 1880, and a Wireless Fidelity (Wi-Fi) module 1890. Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 18 is not intended to be limiting, and that the terminal provided by the embodiments of the present application may include more or less components than those shown, or some components may be combined, or a different arrangement of components may be provided.
The following describes the components of the second terminal 1800 in detail with reference to fig. 18:
the RF circuit 1810 can be used for receiving and transmitting data during communication or conversation. In particular, the RF circuit 1810 sends the downlink data of the base station to the processor 1830 for processing; and in addition, sending the uplink data to be sent to the base station. Generally, the RF circuit 1810 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuit 1810 may also communicate with a network and other terminals through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The Wi-Fi technology belongs to a short-distance wireless transmission technology, and the second terminal 1800 may connect to an Access Point (AP) through a Wi-Fi module 1890, thereby implementing Access to a data network. The Wi-Fi module 1890 may be used for receiving and transmitting data during communication.
The second terminal 1800 may be physically connected to other terminals through the communication interface 1880. Optionally, the communication interface 1880 is connected to a communication interface of the other terminal through a cable, so as to implement data transmission between the second terminal 1800 and the other terminal.
In this embodiment of the application, the second terminal 1800 is capable of implementing a communication service and sending information to other contacts, so that the second terminal 1800 needs to have a data transmission function, that is, the second terminal 1800 needs to include a communication module inside. Although fig. 18 shows communication modules such as the RF circuit 1810, the Wi-Fi module 1890 and the communication interface 1880, it is to be understood that at least one of the above-described components or other communication modules (e.g., bluetooth module) for enabling communication exist in the second terminal 1800 for data transmission.
For example, when the second terminal 1800 is a mobile phone, the second terminal 1800 may include the RF circuit 1810 and may further include the Wi-Fi module 1890; when the second terminal 1800 is a computer, the second terminal 1800 may include the communication interface 1880 and may further include the Wi-Fi module 1890; when the second terminal 1800 is a tablet computer, the second terminal 1800 may include the Wi-Fi module.
The memory 1840 may be used to store software programs and modules. The processor 1830 executes software programs and modules stored in the memory 1840 to perform various functional applications and data processing of the second terminal 1800, and when the processor 1830 executes the program codes in the memory 1840, part or all of the processes in fig. 2 according to the embodiments of the present invention can be implemented.
Alternatively, the memory 1840 may mainly include a program storage area and a data storage area. The storage program area can store an operating system, various application programs (such as communication application), a face recognition module and the like; the storage data area may store data (such as various multimedia files like pictures, video files, etc., and face information templates) created according to the use of the terminal, etc.
In addition, the memory 1840 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 1850 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the second terminal 1800.
Optionally, the input unit 1850 may include a touch panel 1851 and other input terminals 1852.
The touch panel 1851, also referred to as a touch screen, may collect touch operations of a user on or near the touch panel 1851 (e.g., operations of a user on or near the touch panel 1851 using any suitable object or accessory such as a finger or a stylus), and drive a corresponding connection device according to a preset program. Alternatively, the touch panel 1851 may include two portions, i.e., a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1830, and can receive and execute commands sent by the processor 1830. In addition, the touch panel 1851 may be implemented by various types, such as resistive, capacitive, infrared, and surface acoustic wave.
Optionally, the other input terminals 1852 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1860 may be used to display information input by or provided to the user and various menus of the second terminal 1800. The display unit 1860 is a display system of the second terminal 1800, and is used for presenting an interface and realizing human-computer interaction.
The display unit 1860 may include a display panel 1861. Alternatively, the Display panel 1861 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-emitting diode (OLED), or the like.
Further, the touch panel 1851 can overlay the display panel 1861, and when the touch panel 1851 detects a touch operation thereon or nearby, the touch panel 1851 transmits the touch operation to the processor 1830 to determine the type of the touch event, and then the processor 1830 provides a corresponding visual output on the display panel 1861 according to the type of the touch event.
Although the touch panel 1851 and the display panel 1861 are shown in fig. 18 as two separate components to implement the input and output functions of the second terminal 1800, in some embodiments, the touch panel 1851 and the display panel 1861 may be integrated to implement the input and output functions of the second terminal 1800.
The processor 1830 is a control center of the second terminal 1800, connects various components using various interfaces and lines, performs various functions of the second terminal 1800 and processes data by operating or executing software programs and/or modules stored in the memory 1840 and calling data stored in the memory 1840, thereby implementing various services based on the terminal.
Optionally, the processor 1830 may include one or more processing units. Optionally, the processor 1830 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1830.
The camera 1870 is configured to implement a shooting function of the second terminal 1800 to shoot a picture or a video. The camera 1870 may also be used to implement a scanning function of the second terminal 1800 to scan a scanned object (two-dimensional code/barcode).
The second terminal 1800 further includes a power supply 1820 (e.g., a battery) for powering the various components. Optionally, the power supply 1820 may be logically connected to the processor 1830 through a power management system, so as to implement functions of managing charging, discharging, power consumption, and the like through the power management system.
It is to be appreciated that the processor 1830 can perform the functions of the processor 1600 in fig. 16, and the memory 1840 can store the contents of the processor 1601 according to an embodiment of the present invention.
Based on the same inventive concept, the embodiment of the present invention further provides a method for establishing device connection and data transmission, and since the device corresponding to the method is a method corresponding to the first terminal for establishing device connection and data transmission in the embodiment of the present invention, and the principle of the method for solving the problem is similar to that of the terminal, the implementation of the method can refer to the implementation of the first terminal in the interactive process for establishing device connection and data transmission, and repeated parts are not described again.
As shown in fig. 19, a method for establishing device connection and data transmission provided in the embodiment of the present invention includes:
step 1900, the first terminal determines the peer device selected by the user from the devices scanned by bluetooth;
1901, the first terminal configures a joint transmission function for the peer device selected by the user; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P;
step 1902, after receiving a preset BLE broadcast message sent by an opposite terminal device configured with the joint transmission function, the first terminal establishes a Wi-Fi P2P connection with the opposite terminal device;
Step 1903, the first terminal performs data transmission with the peer device through the established Wi-Fi P2P connection.
Before configuring, by the optional first terminal, a joint transmission function for an opposite-end device selected by a user, the method further includes:
the first terminal does not receive a preset BLE broadcast message within a preset time after receiving a combined transmission instruction triggered by a user, and displays equipment information scanned through Bluetooth; or
And the first terminal displays the equipment information scanned through the Bluetooth after receiving an equipment information display instruction triggered by a user and scanned through the Bluetooth.
Optionally, the preset BLE broadcast includes preset UUID information;
wherein the type of the preset BLE broadcast message is a scannable non-directional type.
Optionally, after receiving a preset BLE broadcast packet sent by an opposite end device configured with the joint transmission function, the first terminal establishes a Wi-Fi P2P connection with the opposite end device, including:
if the received preset BLE broadcast message does not contain information for determining a Wi-Fi P2PMAC address of the opposite-end device, the first terminal sends request information for obtaining a Wi-Fi P2P MAC address to the opposite-end device, and determines the Wi-Fi P2P MAC address of the opposite-end device according to the received feedback information sent by the opposite-end device aiming at the request information; or if the received preset BLE broadcast message contains information for determining a Wi-Fi P2P MAC address of the peer device, the first terminal determines the Wi-Fi P2P MAC address of the peer device according to the preset BLE broadcast message;
The first terminal sends a request for establishing Wi-Fi P2P connection to the opposite terminal equipment according to the determined Wi-Fi P2P MAC address, and receives response information which is sent by the opposite terminal equipment and agrees to establish Wi-Fi P2P connection.
Based on the same inventive concept, another method for establishing device connection and data transmission is also provided in the embodiments of the present invention, and since the device corresponding to the method is a method corresponding to the second terminal for establishing device connection and data transmission in the embodiments of the present invention, and the principle of the method for solving the problem is similar to that of the terminal, the implementation of the method can refer to the implementation of the second terminal in the interactive flow for establishing device connection and data transmission, and repeated details are not repeated.
As shown in fig. 20, a method for establishing device connection and data transmission provided in the embodiment of the present invention includes:
step 2000, the second terminal sends a preset BLE broadcast message according to the joint transmission function configured by the peer device; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P;
step 2001, the second terminal establishes a Wi-Fi P2P connection with the peer device;
and step 2002, the second terminal performs data transmission with the peer device through the Wi-Fi P2P connection.
Optionally, the preset BLE broadcast message includes preset UUID information;
wherein the type of the preset BLE broadcast message is a scannable non-directional type.
Optionally, the establishing, by the second terminal, a Wi-Fi P2P connection with the peer device through the preset BLE broadcast packet includes:
after receiving a request which is sent by the opposite terminal equipment and contains information used for obtaining a Wi-Fi P2P MAC address, the second terminal sends feedback information containing information used for determining a Wi-Fi P2P MAC address to the opposite terminal equipment;
and after receiving the request for establishing the Wi-Fi P2P connection sent by the opposite terminal equipment, the second terminal sends response information agreeing to establish the Wi-Fi P2P connection to the opposite terminal equipment.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the application. It will be understood that one block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the subject application may also be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of this application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for establishing device connectivity and data transmission, the method comprising:
The first terminal determines the opposite terminal equipment selected by the user from the equipment scanned by the Bluetooth;
the first terminal configures a joint transmission function for opposite terminal equipment selected by a user; wherein the joint transmission is a joint transmission using Bluetooth and wireless fidelity point-to-point Wi-Fi P2P;
the first terminal establishes Wi-Fi P2P connection with the opposite terminal equipment after receiving a preset low-power Bluetooth BLE broadcast message sent by the opposite terminal equipment which is configured with the joint transmission function;
and the first terminal performs data transmission with the opposite terminal equipment through the established Wi-Fi P2P connection.
2. The method of claim 1, wherein before the first terminal configures the joint transmission function for the peer device selected by the user, the method further comprises:
the first terminal does not receive a preset BLE broadcast message within a preset time after receiving a combined transmission instruction triggered by a user, and displays equipment information scanned through Bluetooth; or
And the first terminal displays the equipment information scanned through the Bluetooth after receiving an equipment information display instruction triggered by a user and scanned through the Bluetooth.
3. The method of claim 1, wherein the preset BLE broadcast includes preset Universally Unique Identifier (UUID) information;
Wherein the type of the preset BLE broadcast message is a scannable non-directional type.
4. The method according to claim 1, wherein the establishing, by the first terminal, a Wi-Fi P2P connection with the peer device after receiving a preset BLE broadcast packet sent by the peer device configured with the joint transmission function includes:
if the received preset BLE broadcast message does not contain information for determining a Wi-Fi P2P MAC address of the opposite-end device, the first terminal sends request information for obtaining the Wi-Fi P2P MAC address to the opposite-end device, and determines the Wi-FiP2P MAC address of the opposite-end device according to the received feedback information sent by the opposite-end device aiming at the request information; or if the received preset BLE broadcast message contains information for determining a Wi-Fi P2P MAC address of the peer device, the first terminal determines the Wi-Fi P2P MAC address of the peer device according to the preset BLE broadcast message;
the first terminal sends a request for establishing Wi-FiP2P connection to the opposite terminal equipment according to the determined Wi-Fi P2P MAC address, and receives response information which is sent by the opposite terminal equipment and agrees to establish Wi-Fi P2P connection.
5. A method for establishing device connectivity and data transmission, the method comprising:
the second terminal sends a preset BLE broadcast message according to the joint transmission function configured by the opposite terminal equipment; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P;
the second terminal establishes Wi-Fi P2P connection with the opposite terminal equipment;
and the second terminal performs data transmission with the opposite terminal equipment through the Wi-Fi P2P connection.
6. The method according to claim 5, wherein the preset BLE broadcast message includes preset UUID information;
wherein the type of the preset BLE broadcast message is a scannable non-directional type.
7. The method according to claim 5, wherein the establishing, by the second terminal, a Wi-Fi P2P connection with the peer device through the preset BLE broadcast packet includes:
after receiving a request which is sent by the opposite terminal equipment and contains information used for obtaining a Wi-Fi P2P MAC address, the second terminal sends feedback information containing information used for determining a Wi-Fi P2P MAC address to the opposite terminal equipment;
and after receiving the request for establishing the Wi-Fi P2P connection sent by the opposite terminal equipment, the second terminal sends response information agreeing to establish the Wi-Fi P2P connection to the opposite terminal equipment.
8. A first terminal for establishing device connectivity and data transmission, the terminal comprising: a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the terminal to perform the following:
determining opposite-end equipment selected by a user from the equipment scanned by the Bluetooth;
configuring a joint transmission function for opposite terminal equipment selected by a user; wherein the joint transmission is a joint transmission using Bluetooth and Wi-FiP 2P;
after receiving a preset BLE broadcast message sent by opposite terminal equipment configured with the joint transmission function, establishing Wi-Fi P2P connection with the opposite terminal equipment;
and carrying out data transmission with the opposite terminal equipment through the established Wi-Fi P2P connection.
9. The first terminal of claim 8, wherein the processor is further configured to:
the method comprises the steps that a preset BLE broadcast message is not received within preset time after a combined transmission instruction triggered by a user is received, and equipment information scanned through Bluetooth is displayed; or
And after receiving a device information instruction triggered by a user and scanned through Bluetooth, displaying the device information scanned through the Bluetooth.
10. A second terminal for establishing device connectivity and data transmission, the terminal comprising: a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the terminal to perform the following:
sending a preset BLE broadcast message according to a joint transmission function configured by opposite-end equipment; wherein the joint transmission is a joint transmission using Bluetooth and Wi-Fi P2P;
establishing Wi-Fi P2P connection with the opposite terminal equipment;
and carrying out data transmission with the opposite terminal equipment through the Wi-Fi P2P connection.
CN201910362853.2A 2019-04-30 2019-04-30 Method and equipment for establishing equipment connection and data transmission Pending CN111867148A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910362853.2A CN111867148A (en) 2019-04-30 2019-04-30 Method and equipment for establishing equipment connection and data transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910362853.2A CN111867148A (en) 2019-04-30 2019-04-30 Method and equipment for establishing equipment connection and data transmission

Publications (1)

Publication Number Publication Date
CN111867148A true CN111867148A (en) 2020-10-30

Family

ID=72965681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910362853.2A Pending CN111867148A (en) 2019-04-30 2019-04-30 Method and equipment for establishing equipment connection and data transmission

Country Status (1)

Country Link
CN (1) CN111867148A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113473386A (en) * 2021-06-02 2021-10-01 Tcl通讯(宁波)有限公司 Method and device for acquiring low-power-consumption Bluetooth information, mobile terminal and storage medium
CN113518408A (en) * 2021-04-19 2021-10-19 Tcl通讯(宁波)有限公司 WiFi single-channel scanning method and device, terminal equipment and storage medium
CN113572823A (en) * 2021-07-07 2021-10-29 维沃移动通信有限公司 File transmission system and transmission method and electronic equipment
CN113873447A (en) * 2021-09-26 2021-12-31 展讯通信(天津)有限公司 Fast transmission method and device, electronic equipment and storage medium
CN114364026A (en) * 2021-08-27 2022-04-15 华为技术有限公司 Communication method and electronic device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103249085A (en) * 2012-02-07 2013-08-14 中兴通讯股份有限公司 WiFi data transmission method and terminal
US20140141723A1 (en) * 2012-11-16 2014-05-22 Huawei Device Co., Ltd. Method for Establishing Bluetooth Connection, Mobile Terminal, Bluetooth Device, and System
CN105516896A (en) * 2015-12-02 2016-04-20 惠州Tcl移动通信有限公司 Bluetooth interconnection method and system for wearable device and mobile terminal
US20160234301A1 (en) * 2015-02-11 2016-08-11 Emily H. Qi Methods, Systems, and Devices for Bluetooth Low Energy Discovery
US20170026791A1 (en) * 2013-12-27 2017-01-26 Raz Weizman Apparatus, system and method of bluetooth communication
CN106604205A (en) * 2016-11-18 2017-04-26 重庆零度智控智能科技有限公司 Terminal communication method, and unmanned plane communication method and device
CN106850723A (en) * 2015-12-07 2017-06-13 展讯通信(上海)有限公司 Communication means and device, terminal device that bluetooth and P2P coexist
US20170223579A1 (en) * 2014-07-31 2017-08-03 Lg Electronics Inc. Method and apparatus for controlling electronic device in wireless communication system supporting bluetooth communication
CN107018554A (en) * 2017-03-07 2017-08-04 广东欧珀移动通信有限公司 A kind of data transmission method, device and intelligent terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103249085A (en) * 2012-02-07 2013-08-14 中兴通讯股份有限公司 WiFi data transmission method and terminal
US20140141723A1 (en) * 2012-11-16 2014-05-22 Huawei Device Co., Ltd. Method for Establishing Bluetooth Connection, Mobile Terminal, Bluetooth Device, and System
US20170026791A1 (en) * 2013-12-27 2017-01-26 Raz Weizman Apparatus, system and method of bluetooth communication
US20170223579A1 (en) * 2014-07-31 2017-08-03 Lg Electronics Inc. Method and apparatus for controlling electronic device in wireless communication system supporting bluetooth communication
US20160234301A1 (en) * 2015-02-11 2016-08-11 Emily H. Qi Methods, Systems, and Devices for Bluetooth Low Energy Discovery
CN105516896A (en) * 2015-12-02 2016-04-20 惠州Tcl移动通信有限公司 Bluetooth interconnection method and system for wearable device and mobile terminal
CN106850723A (en) * 2015-12-07 2017-06-13 展讯通信(上海)有限公司 Communication means and device, terminal device that bluetooth and P2P coexist
CN106604205A (en) * 2016-11-18 2017-04-26 重庆零度智控智能科技有限公司 Terminal communication method, and unmanned plane communication method and device
CN107018554A (en) * 2017-03-07 2017-08-04 广东欧珀移动通信有限公司 A kind of data transmission method, device and intelligent terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张晓燕;: "一种基于蓝牙的复合通道传输控制协议", 中国西部科技, no. 19, 15 December 2007 (2007-12-15) *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518408A (en) * 2021-04-19 2021-10-19 Tcl通讯(宁波)有限公司 WiFi single-channel scanning method and device, terminal equipment and storage medium
CN113473386A (en) * 2021-06-02 2021-10-01 Tcl通讯(宁波)有限公司 Method and device for acquiring low-power-consumption Bluetooth information, mobile terminal and storage medium
CN113572823A (en) * 2021-07-07 2021-10-29 维沃移动通信有限公司 File transmission system and transmission method and electronic equipment
CN114364026A (en) * 2021-08-27 2022-04-15 华为技术有限公司 Communication method and electronic device
CN114364026B (en) * 2021-08-27 2023-05-12 华为技术有限公司 Communication method and electronic equipment
CN113873447A (en) * 2021-09-26 2021-12-31 展讯通信(天津)有限公司 Fast transmission method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112118539B (en) Method and device for device information interaction between terminals
CN111867148A (en) Method and equipment for establishing equipment connection and data transmission
US20180368058A1 (en) Method for controlling device access, and related device and system
CN108476060B (en) Method for establishing classic Bluetooth connection between dual-mode Bluetooth devices and dual-mode Bluetooth device
CN111741513A (en) Network distribution method of Internet of things equipment and related equipment
CN110113739B (en) Information processing method and electronic equipment
CN110121902B (en) Communication establishment method and terminal
CN108040091B (en) Data processing method, device and storage medium
CN111818669B (en) Mobile terminal and data transmission method thereof
CN111866824A (en) Method and equipment for establishing communication connection and data transmission
EP3627777B1 (en) Message transmission method and device, terminal and storage medium
JP7477589B2 (en) Method and terminal device for establishing a hotspot connection - Patents.com
CN106936676B (en) Household equipment control method and device
CN113366439A (en) Method and device for connecting Bluetooth device
CN107147549B (en) Intelligent household equipment networking method and device
CN104581993B (en) It is wirelessly connected the method and terminal of the method established, data transmission
CN111356209B (en) Multi-frequency WiFi hotspot opening method and device, storage medium and electronic equipment
CN106028266B (en) Information transmission method, device and system
CN113055864A (en) Bluetooth connection method, device, storage medium and electronic equipment
CN110622571A (en) Network connection method, device and terminal
CN112492569A (en) Intelligent device control method and terminal
CN112118538A (en) Method and device for device information interaction between terminals
CN109217995A (en) A kind of data processing method, terminal and base station
CN113489630A (en) Network distribution method, device, storage medium and electronic terminal
CN112691363A (en) Cross-terminal switching method and related device for cloud games

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