Nothing Special   »   [go: up one dir, main page]

CN112291757B - Data transmission method and device, storage medium and electronic equipment - Google Patents

Data transmission method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112291757B
CN112291757B CN202011077344.4A CN202011077344A CN112291757B CN 112291757 B CN112291757 B CN 112291757B CN 202011077344 A CN202011077344 A CN 202011077344A CN 112291757 B CN112291757 B CN 112291757B
Authority
CN
China
Prior art keywords
bluetooth
state
receiving end
address information
bluetooth address
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.)
Active
Application number
CN202011077344.4A
Other languages
Chinese (zh)
Other versions
CN112291757A (en
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.)
Realme Mobile Telecommunications Shenzhen Co Ltd
Original Assignee
Realme Mobile Telecommunications Shenzhen 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 Realme Mobile Telecommunications Shenzhen Co Ltd filed Critical Realme Mobile Telecommunications Shenzhen Co Ltd
Priority to CN202011077344.4A priority Critical patent/CN112291757B/en
Publication of CN112291757A publication Critical patent/CN112291757A/en
Application granted granted Critical
Publication of CN112291757B publication Critical patent/CN112291757B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • 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

Landscapes

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

Abstract

The embodiment of the application discloses a data transmission method, a device, a storage medium and electronic equipment, wherein the method comprises the following steps: determining that the Bluetooth state of a receiving end is an unopened state, and exchanging Bluetooth state and Bluetooth address information with the receiving end through a P2P mode of NFC; determining that the Bluetooth state of the receiving end is changed into an open state, and establishing a first Bluetooth connection based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end; data is transmitted based on the first bluetooth connection. Therefore, by adopting the embodiment of the application, even if the Bluetooth of the receiving end is not opened, the transmitting end directly establishes Bluetooth connection with the receiving end to perform data transmission by monitoring the Bluetooth state of the receiving end and determining to change to the opened state without waiting for the preset time, and in most cases, the connection is not overtime, so that the waiting time of data transmission can be saved, and the data transmission speed of NFC P2P can be further improved.

Description

Data transmission method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data transmission method, a data transmission device, a storage medium, and an electronic device.
Background
The P2P mode is one of three operation modes of Near Field Communication (NFC), mainly completes data transfer between two NFC devices, and a transmitting party can receive data at the same time. Because of the small data transfer rate of NFC, large amounts of data are not typically transferred directly over the NFC link. When a large amount of data needs to be transmitted, then the Handover mode in the P2P mode is required.
The Handover mode is specifically as follows: through NFC exchange bluetooth state and bluetooth address information, under the condition that bluetooth of receiving terminal does not open, the transmitting terminal need delay 5S just can begin to carry out bluetooth connection and data transmission flow, and here wait 5S is in order to ensure that receiver bluetooth is opened and is accomplished to prevent sending failure. In reality, however, the bluetooth is turned on for a period of time substantially within 2S, which reduces the data transfer speed of the NFC P2P.
Disclosure of Invention
The embodiment of the application provides a data transmission method, a device, a storage medium and electronic equipment, which can save the waiting time of data transmission and further can improve the data transmission speed of NFC P2P. The technical scheme is as follows:
In a first aspect, an embodiment of the present application provides a data transmission method, applied to a transmitting end, where the method includes:
determining that the Bluetooth state of a receiving end is an unopened state, and exchanging Bluetooth state and Bluetooth address information with the receiving end through a P2P mode of NFC;
Determining that the Bluetooth state of the receiving end is changed into an open state, and establishing a first Bluetooth connection based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end;
data is transmitted based on the first bluetooth connection.
In a second aspect, an embodiment of the present application provides a data transmission device, applied to a transmitting end, where the device includes:
The information interaction module is used for determining that the Bluetooth state of the receiving end is an unopened state, and exchanging the Bluetooth state and Bluetooth address information with the receiving end through a P2P mode of NFC;
The first connection establishment module is used for determining that the Bluetooth state of the receiving end is changed into an open state, and establishing a first Bluetooth connection based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end;
and the data transmission module is used for transmitting data based on the first Bluetooth connection.
In a third aspect, an embodiment of the present application provides a data transmission method, applied to a receiving end, where the method includes:
determining that the Bluetooth state of a receiving end is an unopened state, opening Bluetooth of the receiving end, and exchanging the Bluetooth state and Bluetooth address information with a transmitting end through a P2P mode of NFC;
establishing a first Bluetooth connection based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end;
And receiving the data transmitted by the transmitting end based on the first Bluetooth connection.
In a fourth aspect, an embodiment of the present application provides a data transmission device, applied to a receiving end, where the device includes:
the information interaction module is used for determining that the Bluetooth state of the receiving end is an unopened state, opening Bluetooth of the receiving end, and exchanging Bluetooth state and Bluetooth address information with the sending end through a P2P mode of NFC;
The first connection establishment module is used for establishing a first Bluetooth connection based on the Bluetooth address information of the sending end and the Bluetooth address information of the receiving end;
and the data receiving module is used for receiving the data transmitted by the transmitting end based on the first Bluetooth connection.
In a fifth aspect, embodiments of the present application provide a non-transitory computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-described method steps.
In a sixth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by the embodiments of the application has the beneficial effects that at least:
In the embodiment of the application, when the Bluetooth state of the receiving end is determined to be on, the Bluetooth state and the Bluetooth address information are exchanged with the receiving end through the P2P mode of NFC to monitor the Bluetooth state of the receiving end, and after the Bluetooth state of the receiving end is changed to the on state, a first Bluetooth connection is established based on the Bluetooth address information of the sending end and the receiving end, and data is transmitted based on the first Bluetooth connection. In the process, even if the Bluetooth of the receiving end is not opened, the sending end directly establishes Bluetooth connection with the receiving end to perform data transmission by monitoring the Bluetooth state of the receiving end and determining to change to the opened state without waiting for a preset time period, and in most cases, the connection is not overtime, so that the waiting time period of the data transmission can be saved, and the data transmission speed of NFC P2P can be improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present application;
Fig. 3 is a schematic structural diagram of bluetooth address classification according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a packet according to an embodiment of the present application;
fig. 5 is a flow chart of another data transmission method according to an embodiment of the present application;
fig. 6 is a flow chart of another data transmission method according to an embodiment of the present application;
Fig. 7 is a schematic structural diagram of a data transmission device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of another data transmission device according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of yet another data transmission device according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a computer-readable storage medium provided by an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application as detailed in the accompanying claims.
In the description of the present application, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art. Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The data transmission method provided by the embodiment of the application will be described in detail with reference to fig. 1 to 6. The method may be implemented in dependence on a computer program, and may be run on a data transmission device based on von neumann systems. The computer program may be integrated in the application or may run as a stand-alone tool class application.
As shown in fig. 1, a schematic diagram of a system architecture according to an embodiment of the present application includes a transmitting end 1 and a receiving end 2. The transmitting end 1 and the receiving end 2 include, but are not limited to: personal computers, tablet computers, handheld devices, vehicle mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem, and the like. Terminals may be called different names in different networks, for example: a user equipment, an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent or user equipment, a cellular telephone, a cordless telephone, a Personal Digital Assistant (PDA), a terminal device in a 5G network or a future evolution network, etc. The transmitting end 1 and the receiving end 2 are terminal devices having NFC functions.
The transmitting end 1 and the receiving end 2 start the NFC function and can transmit data through the NFC link, and since the data transmission rate of NFC is small, in hundreds of k, a large amount of data is not generally directly transmitted through the NFC link.
And when a large amount of data needs to be transmitted, the sending end 1 and the receiving end 2 exchange Bluetooth state and Bluetooth address information through an NFC link. The bluetooth states of both include the following: the Bluetooth state of the transmitting end 1 is an open state, and the Bluetooth state of the receiving end 2 is an open state; the Bluetooth state of the transmitting end 1 is an open state, and the Bluetooth state of the receiving end 2 is a closed state; the Bluetooth state of the transmitting end 1 is in a closed state, and the Bluetooth state of the receiving end 2 is in an open state; the bluetooth state of the transmitting end 1 is the off state, and the bluetooth state of the receiving end 2 is the off state.
If the bluetooth state of the transmitting end 1 is in the off state and the bluetooth state of the receiving end 2 is in the on state, the transmitting end 1 can directly open bluetooth and wait for the connection of the receiving end 2. The two pairs are matched according to Bluetooth address information and a first Bluetooth connection is established.
Similarly, if the bluetooth state of the transmitting end 1 is in an on state and the bluetooth state of the receiving end 2 is in an off state, the receiving end 2 can directly open bluetooth and wait for the connection of the transmitting end 1, in this process, the transmitting end 1 monitors the bluetooth state of the receiving end 2, and establishes a first bluetooth connection with the receiving end 2 after determining that the bluetooth state of the receiving end 2 is changed to the on state.
If the Bluetooth states of the sending end 1 and the receiving end 2 are both open states, connection can be directly established; if both are in the off state, the connection of the other party can be waited after the Bluetooth is turned on.
In the embodiment of the application, no matter the Bluetooth state of the receiving end 2 is in the closed state or the open state, after monitoring that the Bluetooth state of the receiving end 2 is changed into the open state, the sending end 1 does not need to wait, but directly establishes a first Bluetooth connection with the receiving end 2, and transmits data to the receiving end 2 based on the first Bluetooth connection.
The present invention will be described in detail with reference to specific examples.
Fig. 2 is a schematic flow chart of a data transmission method according to an embodiment of the present application. Describing the transmitting end as an example, as shown in fig. 2, the method of the embodiment of the present application may include the following steps:
S101, determining that a Bluetooth state of a receiving end is an unopened state, and exchanging the Bluetooth state and Bluetooth address information with the receiving end through a P2P mode of NFC;
It can be understood that the bluetooth state is a bluetooth on state or a bluetooth off state. When the Bluetooth at one end of the sending end and the receiving end is in a closed state or the Bluetooth at both ends is in a closed state, bluetooth connection cannot be completed.
Like the ETHERNET MAC (MEDIA ACCESS Control) address, each bluetooth device has a basic identifier, i.e. bluetooth address information, which is a unique 48-bit (6-byte) identifier and is used when bluetooth establishes a connection.
Bluetooth has two types of addresses: public DEVICE ADDRESS and Random DEVICE ADDRESS.
Public DEVICE ADDRESS: corresponding to a fixed BR/EDR, factory programmed device address. It must register with the IEEE registry and not change during the life cycle of the device.
Random DEVICE ADDRESS is further categorized as shown in FIG. 3, including Static and Private, which in turn includes Resolvable and Non-resorvable.
For a bluetooth device, public, static and Resolvable or Non-resolvable type bluetooth addresses may be used, the address type being distinguished by a bit in the broadcast packet, which is TxAddr and RxAddr.
Static random address can be updated once STATIC DEVICE ADDRESS each time it is powered up. It should be noted that if STATIC DEVICE ADDRESS is updated, the saved pairing information is not valid.
PRIVATE ADDRESSES may vary periodically so that devices may be prevented from being tracked. Such addresses are in turn classified into resolvable addresses and unresolved private addresses.
Resolvable PRIVATE ADDRESS the two devices can resolve an address through a shared key, after being paired, the two BLE devices can generate a key for resolving a private address, in the subsequent connection, even if the BLE device address changes, the BLE device can be identified by a trusted device, but for other devices, the BLE device address changes randomly and cannot be tracked,
Non-resolvable PRIVATE ADDRESS, non-resolvable addresses, typically use less of this type of address.
In a specific implementation, three different modes are defined in NFC, namely a card reader mode, a card simulation mode and a point-to-point mode (P2P mode). The card reader mode is running Type1/2/3/4Platform defined by NFC Forum, namely PCD/VCD, corresponding to ISO14443 protocol, and currently, support for VCD is also added to NFC Forum. Under the reader may also be an Initiator as defined in ISO 18092; the card simulation mode is to run the TAG of Type4A/4B defined by NFC Forum, namely PICC; card emulation can also be done with the Target of ISO 18092; the point-to-point mode is Initiator and Target defined in ISO 18092.
The selection of the mode is determined entirely by the upper layer application. For example, when the NFC mobile phone runs an application program for reading a bus card, the NFC module or the NFC chip works in a card reader mode at the moment; if an application program of Google wallet is running, the NFC chip is set to a card simulation mode; if a File transfer application, such as File expert, is running, the NFC chip is set to a peer-to-peer communication mode. The mode selection of NFC is therefore entirely dependent on the upper layer application.
Specifically, when the NFC module (chip) in the terminal device is turned on, some parameters are initialized, and at this time, the NFC chip is in an IDLE state, and in this state, the NFC chip does not generate a radio frequency field, but is in a listening mode. It should be noted, however, that the NFC chip at this time does not operate in any of the three modes described above.
When the corresponding application program is started, the NFC chip can obtain corresponding mode configuration, such as (NFC-A, POLL, passive communication) representation, and NFC works in se:Sub>A card reader mode; such as (NFC-se:Sub>A, list, passive communication) means that NFC works in se:Sub>A card emulation mode; such as (NFC-F, poll, active communication), indicating that NFC is operating in a point-to-point mode. Of course, a plurality of such parameter sets may be configured for the NFC chip. In addition to these three parameters, there are other parameters such as RF protocol (ISO-DEP/NFC-DEP etc.), transmission rate, maximum load length that can be supported, etc.
When the mode of the NFC chip is configured, if the NFC chip is configured under POLL, the NFC chip turns on the radio frequency field and performs a discovery process according to the configured mode to discover surrounding NFC devices. In the NFC specification, the order of discovery is NFC-A- > NFC-B- > NFC-F- > private technology. When there are multiple target devices around or one target device supports multiple RF protocols, the NFC chip will notify the upper layer application of the target device, and let the upper layer application decide how to select. If the NFC chip is configured under the list, the NFC chip waits for a POLL command, such as sens_req/sensf_req, from the other device.
When the target device is selected, the device/protocol is activated, such as a transmission protocol using NFC-DEP, and then atr_req/RES is required; further, for point-to-point P2P communication, the LLCP link needs to be activated if LLCP is used. When the underlying link is established, communication between NFC devices is enabled.
The sending end determines that the Bluetooth of the receiving end is not opened, then the LLCP link is adopted to send the Bluetooth state and the Bluetooth address information to the receiving end, and the receiving end returns the Bluetooth state and the Bluetooth address information to the sending end, so that the exchange process of the Bluetooth state and the Bluetooth address information between the Bluetooth state and the Bluetooth address information is completed, and whether the Bluetooth state of the receiving end is changed or not is monitored.
S102, determining that the Bluetooth state of the receiving end is changed into an open state, and establishing a first Bluetooth connection based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end;
the sending end judges whether the Bluetooth of the receiving end is opened according to the received Bluetooth state of the receiving end, and if so, the sending end directly establishes a first Bluetooth connection according to the Bluetooth address information of the receiving end and the Bluetooth address information of the receiving end.
When the receiving end sends the Bluetooth state and the Bluetooth address information to the sending end, the receiving end also judges whether the Bluetooth state is in an open state or not, and if the Bluetooth state is not in the open state, the receiving end synchronously opens the Bluetooth so as to wait for the sending end to connect.
The establishment of the first bluetooth connection can be understood as: firstly, a sender (master), i.e. a device initiating a connection, pages a receiver (slave), the master pages the slave in a frequency hopping manner, the slave scans (scan) external pages at fixed intervals, and when the scan reaches an external page, the master responds to the page, so that link connection, i.e. ACL link connection, is established between the two devices. After ACL link connection is established, a sending end can initiate a channel connection request, namely L2CAP connection, after the L2CAP connection is established, the sending end adopts SDP to inquire the hands-free service of a receiving end, the channel number of the rfcomm is obtained from the service, and then the sending end can initiate the rfcomm connection request to establish the rfcomm connection, namely link establish- > channel establish- > rfcomm establish- > connection, so that the first Bluetooth connection is completed.
And S103, transmitting data based on the first Bluetooth connection.
The transmission of a large amount of data can be accomplished through the established first bluetooth connection. Since bluetooth supports both circuit and packet switching, data is transmitted in packets in channels and flow control is used to avoid packet loss and congestion. Whitening and error correction of the data is also performed to ensure proper transmission of the packet data.
Wherein for bluetooth packets, the packet data may contain voice, data, or both. A packet may occupy multiple time slots (multislot packet) and may continue to be transmitted in the next time slot, the Payload also carrying a 16-bit error check identification and check (CRC). There are 5 common packet types, 4 SCO packet packets and 7 ACL packet packets. The general packet format is shown in fig. 4.
Among other things, access codes (Access codes) are used for timing synchronization, offset Compensation, paging, and inquiry.
The packet Header (Header) contains 6 fields for link control. Where am_addr is the active member address, TYPE indicates the packet TYPE, FLOW is used for ACL traffic control bits, ARQN is the packet acknowledgement identity, SEQN is the packet number for packet reordering, and HEC examines the packet header. Bluetooth uses a fast, unnumbered packet acknowledgement scheme to distinguish whether a data packet is received by setting the appropriate ARQN value. If the time-out occurs, the packet is ignored and the next packet is sent.
For link and flow control, bluetooth defines two link types, namely connection oriented synchronous links (SCO) and connectionless oriented asynchronous links (ACL). SCO link is a symmetrical point-to-point synchronous link between master and slave nodes, SCO packet is sent in reserved time, belongs to circuit switching, and mainly carries voice information. The master node can support 3 SCO links simultaneously, the slave node can support 2-3 SCOs simultaneously, and the SCO packet does not support retransmission. The SCO link is established by the master node LMP sending a SCO setup message containing timing parameters (Tsco and Dsco).
ACL links are mechanisms that provide a piconets master node with the ability to exchange data asynchronously or synchronously with any slave node in time slots that are not reserved for SCO links. A pair of master-slave nodes can maintain only one ACL link. When multiple ACL packets are used, bluetooth employs a packet retransmission mechanism to ensure data integrity. When the ACL packet does not specify a certain slave node, it is regarded as a broadcast packet, and each slave node receives this packet.
Bluetooth recommends using FIFO (first in first out) queues to enable transmission and reception of ACL and SCO links, the link manager being responsible for filling these queues, and the link controller being responsible for automatically emptying the queues. Flow control is used when the receive FIFO queue is full to avoid packet loss and congestion. If data cannot be received, the recipient's link controller sends a STOP command and inserts it into the returned packet Header (Header) and FLOW position 1. When the sender receives the STOP indication, its FIFO queue is frozen to STOP transmitting. If the receiver is ready, a GO packet is sent to the sender to resume data transmission, FLOW position 0.
In the embodiment of the application, when the Bluetooth state of the receiving end is determined to be on, the Bluetooth state and the Bluetooth address information are exchanged with the receiving end through the P2P mode of NFC to monitor the Bluetooth state of the receiving end, and after the Bluetooth state of the receiving end is changed to the on state, a first Bluetooth connection is established based on the Bluetooth address information of the sending end and the receiving end, and data is transmitted based on the first Bluetooth connection. In the process, even if the Bluetooth of the receiving end is not opened, the sending end directly establishes Bluetooth connection with the receiving end to perform data transmission by monitoring the Bluetooth state of the receiving end and determining to change to the opened state without waiting for a preset time period, and in most cases, the connection is not overtime, so that the waiting time period of the data transmission can be saved, and the data transmission speed of NFC P2P can be improved.
Fig. 5 is a schematic flow chart of another data transmission method according to an embodiment of the present application. The embodiment describes from the transmitting end, and the data transmission method may include the following steps:
s201, determining that a second Bluetooth state of a receiving end is an unopened state, and creating an LLCP link between the receiving end and the receiving end through a P2P mode of NFC;
three different modes are defined in NFC, namely a card reader mode, a card emulation mode and a point-to-point mode.
For peer-to-peer P2P mode communication, data transfer between two NFC devices is mainly completed, and a transmitting party can receive data at the same time. Since the data transmission rate of NFC is small, at several hundred k, a large amount of data is generally not directly transmitted with the link of NFC. When a large amount of data needs to be transmitted, the Handover mode in the P2P mode needs to be used, so that an LLCP link needs to be created between a transmitting end and a receiving end and activated. When the underlying link is established, communication between NFC devices is enabled.
Therefore, when the transmitting end determines that the second bluetooth state of the receiving end is the unopened state, in order to monitor whether the bluetooth state of the receiving end is changed to perform bluetooth connection, an LLCP link between the transmitting end and the receiving end is created through the P2P mode of NFC, so as to be used for exchanging information.
S202, a first Bluetooth state and first Bluetooth address information are sent to the receiving end based on the LLCP link, and a second Bluetooth state and second Bluetooth address information sent by the receiving end are received based on the LLCP link;
The first Bluetooth state and the first Bluetooth address information are the Bluetooth state and the Bluetooth address information of the transmitting end, and the second Bluetooth state and the second Bluetooth address information are the Bluetooth state and the Bluetooth address information of the receiving end.
It can be understood that the transmitting end and the receiving end complete the exchange of bluetooth status and bluetooth address information for subsequent bluetooth connection.
S203, determining that the second Bluetooth state is changed into an open state, and establishing a first Bluetooth connection based on the first Bluetooth address information and the second Bluetooth address information;
After receiving the second bluetooth state sent by the receiving end, the sending end can judge whether the second bluetooth state is an open state, and if the second bluetooth state is changed to the open state, the sending end does not need to wait, and the first bluetooth connection is established directly based on bluetooth addresses of the second bluetooth state and the open state. This is because, when the receiving end sends its own bluetooth state and bluetooth address to the transmitting end, the receiving end will also determine whether the bluetooth state is on, and if not, the receiving end will synchronously open bluetooth to wait for the transmitting end to connect.
And when the first Bluetooth connection is not overtime, indicating that the first Bluetooth connection is successful, carrying out data transmission based on the first Bluetooth connection and by utilizing a Bluetooth object storage specification (Object Push Profile, OPP) protocol. The OPP protocol is used to transfer files.
Since the OPP profile is further subdivided into an OPPC (client) side profile and an OPPs (server) side profile, the two profiles are different in that only the client side can initiate a data transmission process, but in a scenario where the accessory device communicates with the terminal device, there is a need for the terminal device to initiate a data transmission request and for the accessory device side to initiate a transmission request, so that the two profiles of the OPPC and the OPPs are to be implemented in the device.
Optionally, the bluetooth transmission protocol may further include HFP, HSP, A DP, AVRCP, etc., and may be used for different types of data transmission.
Of course, if it is determined that the bluetooth state of the receiving end is the unopened state and the bluetooth state of the transmitting end is the unopened state, bluetooth of the transmitting end is opened and a first bluetooth connection is established based on the bluetooth address information of the transmitting end and the bluetooth address information of the receiving end.
S204, when the first Bluetooth connection is overtime, after waiting for a preset time length, a second Bluetooth connection is established based on the first Bluetooth address information and the second Bluetooth address information;
When the first bluetooth connection is over time, the failure of the first bluetooth connection is indicated, and the failure may be caused by the poor bluetooth signal strength, so as to prevent the instant reconnection failure, and then the second bluetooth connection is established after waiting for a preset time.
S205, transmitting the data based on the second bluetooth connection;
and after the second Bluetooth connection is successful, carrying out data transmission based on the second Bluetooth connection and by utilizing a Bluetooth OPP protocol.
S206, determining that the second Bluetooth state is an open state, exchanging Bluetooth state and Bluetooth address information with the receiving end through a P2P mode of NFC, and establishing a third Bluetooth connection based on the first Bluetooth address information and the second Bluetooth address information;
of course, if the transmitting end determines that the second bluetooth state of the receiving end is the on state, the third bluetooth connection may be established directly based on the bluetooth address information of the transmitting end and the receiving end.
S207, transmitting data based on the third Bluetooth connection.
And after the third Bluetooth connection is successful, carrying out data transmission based on the third Bluetooth connection and by utilizing a Bluetooth OPP protocol.
In the embodiment of the application, even if the Bluetooth of the receiving end is not opened, the Bluetooth state and the Bluetooth address information are exchanged with the receiving end through NFC, after the Bluetooth of the receiving end is changed into the opened state, the sending end does not need to wait for a preset time period, but directly establishes Bluetooth connection with the receiving end to perform data transmission, and in most cases, the connection is not overtime, so that the waiting time period of output transmission can be saved, and the data transmission speed of NFC P2P can be further improved.
Fig. 6 is a schematic flow chart of another data transmission method according to an embodiment of the present application. The embodiment describes from the receiving end, and the data transmission method may include the following steps:
s301, determining that the Bluetooth state of a receiving end is an unopened state, opening Bluetooth of the receiving end, and exchanging Bluetooth state and Bluetooth address information with a transmitting end through a P2P mode of NFC;
S302, establishing a first Bluetooth connection based on Bluetooth address information of the transmitting end and Bluetooth address information of the receiving end;
S303, receiving the data transmitted by the transmitting end based on the first Bluetooth connection.
It will be appreciated that the process of exchanging bluetooth status and bluetooth address information between the receiving end and the transmitting end is the same as described above. When the Bluetooth state of the receiving end is the unopened state after the exchange, the Bluetooth is directly opened to wait for the transmitting end to carry out Bluetooth connection, in the process, the transmitting end monitors the Bluetooth state of the receiving end, carries out Bluetooth connection with the receiving end after determining that the receiving end opens Bluetooth, and waits for receiving data transmitted by the transmitting end based on the first Bluetooth connection after the connection is successful, for example, receives the data based on an OPP protocol.
Optionally, when the first bluetooth connection is over time, a second bluetooth connection is established with the transmitting end after waiting for a preset time period, and after the connection is successful, data transmitted by the transmitting end is received based on the second bluetooth connection.
In the embodiment of the application, when the Bluetooth state of the receiving end is determined to be the unopened state, bluetooth is opened, the Bluetooth state and Bluetooth address information are exchanged with the receiving end through NFC, a first Bluetooth connection is established based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end, and the transmitted data is received based on the first Bluetooth. In the process, even if the Bluetooth of the receiving end is not opened, the transmitting end does not need to wait for a preset time period, but directly establishes Bluetooth connection with the receiving end to perform data transmission, and in most cases, the connection is not overtime, so that the waiting time period of the data transmission can be saved, and the data transmission speed of NFC P2P can be improved.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 7 is a schematic structural diagram of a data transmission device according to an exemplary embodiment of the present application. The data transmission means may be implemented as all or part of the terminal by software, hardware or a combination of both. The device 1 comprises an information interaction module 11, a first connection establishment module 12 and a data transmission module 13.
The information interaction module 11 is configured to determine that a bluetooth state of a receiving end is an unopened state, and exchange bluetooth state and bluetooth address information with the receiving end through a P2P mode of NFC;
A first connection establishment module 12, configured to determine that the bluetooth state of the receiving end is changed to an on state, and establish a first bluetooth connection based on the bluetooth address information of the transmitting end and the bluetooth address information of the receiving end;
a data transmission module 13, configured to transmit data based on the first bluetooth connection.
Optionally, as shown in fig. 8, the apparatus further includes:
a second connection establishment module 14, configured to establish a second bluetooth connection based on bluetooth address information of the transmitting end and bluetooth address information of the receiving end after waiting for a preset period of time when the first bluetooth connection is timed out;
the data transmission module 13 is further configured to transmit the data based on the second bluetooth connection.
Optionally, as shown in fig. 8, the apparatus further includes:
A third connection establishing module 15, configured to determine that a bluetooth state of the receiving end is an on state, exchange bluetooth state and bluetooth address information with the receiving end through a P2P mode of NFC, and establish a third bluetooth connection based on the bluetooth address information of the transmitting end and the bluetooth address information of the receiving end;
The data transmission module 13 is further configured to transmit data based on the third bluetooth connection.
Optionally, the information interaction module 11 is specifically configured to:
Creating an LLCP link with the receiving end through a P2P mode of NFC;
Transmitting a first Bluetooth state and first Bluetooth address information to the receiving end based on the LLCP link, and receiving a second Bluetooth state and second Bluetooth address information transmitted by the receiving end based on the LLCP link;
The first Bluetooth state and the first Bluetooth address information are the Bluetooth state and the Bluetooth address information of the sending end, and the second Bluetooth state and the second Bluetooth address information are the Bluetooth state and the Bluetooth address information of the receiving end.
Optionally, the first connection establishment module 12 is specifically configured to:
And determining that the Bluetooth state of the receiving end is changed into an open state and the Bluetooth state of the sending end is in a non-open state, opening Bluetooth of the sending end and establishing a first Bluetooth connection based on the Bluetooth address information of the sending end and the Bluetooth address information of the receiving end.
It should be noted that, in the data transmission apparatus provided in the foregoing embodiment, when the data transmission method is executed, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the data transmission device and the data transmission method provided in the foregoing embodiments belong to the same concept, which represents a detailed implementation process in the method embodiment, and are not described herein again.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the embodiment of the application, even if the Bluetooth of the receiving end is not opened, the Bluetooth state and the Bluetooth address information are exchanged with the receiving end through NFC, after the Bluetooth of the receiving end is changed to the opened state, the sending end does not need to wait for the preset duration, but directly establishes Bluetooth connection with the receiving end to perform data transmission, and in most cases, the connection is not overtime, so that the waiting duration of output transmission can be saved, and the data transmission speed of NFC P2P can be further improved.
Referring to fig. 9, a schematic structural diagram of a data transmission device according to an exemplary embodiment of the present application is shown. The data transmission means may be implemented as all or part of the terminal by software, hardware or a combination of both. The apparatus 2 comprises an information interaction module 21, a first connection establishment module 22 and a data reception module 23.
The information interaction module 21 is configured to determine that a bluetooth state of a receiving end is an unopened state, open bluetooth of the receiving end, and exchange bluetooth state and bluetooth address information with a transmitting end through a P2P mode of NFC;
A first connection establishment module 22, configured to establish a first bluetooth connection based on bluetooth address information of the transmitting end and bluetooth address information of the receiving end;
and the data receiving module 23 is configured to receive the data transmitted by the transmitting end based on the first bluetooth connection.
In the embodiment of the application, when the Bluetooth state of the receiving end is determined to be the unopened state, bluetooth is opened, the Bluetooth state and Bluetooth address information are exchanged with the receiving end through NFC, a first Bluetooth connection is established based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end, and the transmitted data is received based on the first Bluetooth. In the process, even if the Bluetooth of the receiving end is not opened, the transmitting end does not need to wait for a preset time period, but directly establishes Bluetooth connection with the receiving end to perform data transmission, and in most cases, the connection is not overtime, so that the waiting time period of the data transmission can be saved, and the data transmission speed of NFC P2P can be improved.
Embodiments of the present application further provide a non-transitory computer readable storage medium, where the computer readable storage medium may store a plurality of instructions adapted to be loaded and executed by a processor to perform the method steps of the embodiments described above, and the specific implementation procedure may refer to the specific descriptions of the embodiments shown in fig. 1-6, which are not repeated herein.
Fig. 10 is a schematic diagram of a computer-readable storage medium according to an embodiment of the application. As shown in fig. 10, a computer-readable storage medium according to an embodiment of the present application has stored thereon non-transitory computer-readable instructions 310. When the non-transitory computer readable instructions 310 are executed by a processor, all or part of the steps described above are performed.
Referring to fig. 11, a schematic structural diagram of an electronic device is provided in an embodiment of the present application. As shown in fig. 11, the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, at least one communication bus 1002.
Wherein the communication bus 1002 is used to enable connected communication between these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may further include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 1001 may include one or more processing cores. The processor 1001 connects various parts within the entire electronic device 1000 using various interfaces and lines, and performs various functions of the electronic device 1000 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and invoking data stored in the memory 1005. Alternatively, the processor 1001 may be implemented in at least one hardware form of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 1001 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 1001 and may be implemented by a single chip.
The Memory 1005 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory 1005 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 11, an operating system, a network communication module, a user interface module, and a data transmission application program may be included in the memory 1005, which is one type of computer storage medium.
In the electronic device 1000 shown in fig. 11, the user interface 1003 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the processor 1001 may be configured to invoke the data transfer application stored in the memory 1005 and specifically perform the following operations:
Exchanging Bluetooth state and Bluetooth address information with a receiving end through NFC;
when the Bluetooth state of the receiving end is determined to be an unopened state, a first Bluetooth connection is established based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end;
data is transmitted based on the first bluetooth connection.
In one embodiment, the processor 1001, when executing the data transmission based on the first bluetooth connection, specifically performs the following operations:
And carrying out data transmission based on the first Bluetooth connection and by utilizing a Bluetooth OPP protocol.
In one embodiment, after performing the first bluetooth connection established based on the bluetooth address information of the transmitting end and the bluetooth address information of the receiving end, the processor 1001 further performs the following operations:
When the first Bluetooth connection is timed out, after waiting for a preset time length, a second Bluetooth connection is established based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end;
transmitting the data based on the second bluetooth connection.
In one embodiment, the processor 1001, when executing the data transmission based on the second bluetooth connection, specifically performs the following operations:
and carrying out data transmission based on the second Bluetooth connection and by utilizing a Bluetooth OPP protocol.
In one embodiment, the processor 1001 further performs the following:
When the Bluetooth state of the receiving end is determined to be an open state, a third Bluetooth connection is established based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end;
and transmitting data based on the third Bluetooth connection.
In one embodiment, the processor 1001, when executing the data transmission based on the third bluetooth connection, specifically performs the following operations:
And carrying out data transmission based on the third Bluetooth connection and by utilizing a Bluetooth OPP protocol.
In one embodiment, the processor 1001, when executing the exchange of bluetooth status and bluetooth address information with the receiving end through NFC, specifically performs the following operations:
Creating an LLCP link with a receiving end through NFC;
Transmitting a first Bluetooth state and first Bluetooth address information to the receiving end based on the LLCP link, and receiving a second Bluetooth state and second Bluetooth address information transmitted by the receiving end based on the LLCP link;
The first Bluetooth state and the first Bluetooth address information are the Bluetooth state and the Bluetooth address information of the sending end, and the second Bluetooth state and the second Bluetooth address information are the Bluetooth state and the Bluetooth address information of the receiving end.
In one embodiment, when the processor 1001 performs the following operations when determining that the bluetooth state of the receiving end is an unopened state, and when establishing the first bluetooth connection based on the bluetooth address information of the transmitting end and the bluetooth address information of the receiving end:
And when the Bluetooth state of the receiving end is determined to be the unopened state and the Bluetooth state of the transmitting end is determined to be the unopened state, opening Bluetooth of the transmitting end and establishing a first Bluetooth connection based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end.
In the embodiment of the application, even if the Bluetooth of the receiving end is not opened, the Bluetooth state and the Bluetooth address information are exchanged with the receiving end through NFC, after the Bluetooth of the receiving end is changed to the opened state, the sending end does not need to wait for the preset duration, but directly establishes Bluetooth connection with the receiving end to perform data transmission, and in most cases, the connection is not overtime, so that the waiting duration of output transmission can be saved, and the data transmission speed of NFC P2P can be further improved.
Referring to fig. 12, a schematic structural diagram of an electronic device is provided in an embodiment of the present application. As shown in fig. 12, the electronic device 2000 may include: at least one processor 2001, at least one network interface 2004, a user interface 2003, a memory 2005, at least one communication bus 2002.
Wherein a communication bus 2002 is used to enable connected communications between these components.
The user interface 2003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 2003 may further include a standard wired interface and a standard wireless interface.
The network interface 2004 may optionally include standard wired interfaces, wireless interfaces (e.g., WI-FI interfaces), among others.
Wherein the processor 2001 may include one or more processing cores. The processor 2001 connects various portions of the overall electronic device 2000 using various interfaces and lines, executing various functions of the electronic device 2000 and processing data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 2005, and invoking data stored in the memory 2005. Alternatively, the processor 2001 may be implemented in at least one hardware form of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 2001 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 2001 and may be implemented by a single chip.
The Memory 2005 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 2005 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory 2005 may be used to store instructions, programs, code, sets of codes, or instruction sets. The memory 2005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 2005 may also optionally be at least one storage device located remotely from the aforementioned processor 2001. As shown in fig. 12, an operating system, a network communication module, a user interface module, and a data transmission application program may be included in the memory 2005 as one type of computer storage medium.
In the electronic device 2000 shown in fig. 12, the user interface 2003 is mainly an interface for providing input to a user, and acquires data input by the user; and processor 2001 may be operative to invoke data transfer applications stored in memory 2005 and to perform, in particular, the following operations:
exchanging Bluetooth state and Bluetooth address information with a transmitting end through NFC;
When the Bluetooth state of the receiving end is an unopened state, opening Bluetooth of the receiving end and establishing a first Bluetooth connection based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end;
And receiving the data transmitted by the transmitting end based on the first Bluetooth connection.
In the embodiment of the application, when the Bluetooth state of the receiving end is determined to be the unopened state, bluetooth is opened, the Bluetooth state and Bluetooth address information are exchanged with the receiving end through NFC, a first Bluetooth connection is established based on the Bluetooth address information of the transmitting end and the Bluetooth address information of the receiving end, and the transmitted data is received based on the first Bluetooth. In the process, even if the Bluetooth of the receiving end is not opened, the transmitting end does not need to wait for a preset time period, but directly establishes Bluetooth connection with the receiving end to perform data transmission, and in most cases, the connection is not overtime, so that the waiting time period of the data transmission can be saved, and the data transmission speed of NFC P2P can be improved.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (9)

1. A data transmission method, applied to a transmitting end, the method comprising:
determining that a second Bluetooth state of a receiving end is an unopened state, and creating an LLCP link between the receiving end and the receiving end through a P2P mode of NFC;
Transmitting a first Bluetooth state and first Bluetooth address information to the receiving end based on the LLCP link, and receiving the second Bluetooth state and second Bluetooth address information transmitted by the receiving end based on the LLCP link; the first Bluetooth state and the first Bluetooth address information are the Bluetooth state and the Bluetooth address information of the sending end, and the second Bluetooth state and the second Bluetooth address information are the Bluetooth state and the Bluetooth address information of the receiving end, wherein when the receiving end sends the second Bluetooth state and the second Bluetooth address information to the sending end, bluetooth of the receiving end is synchronously opened to wait for the sending end to connect under the condition that the second Bluetooth state of the receiving end is detected to be in an unopened state;
determining that the second Bluetooth state of the receiving end is changed into an open state, and establishing a first Bluetooth connection based on the first Bluetooth address information of the transmitting end and the second Bluetooth address information of the receiving end;
data is transmitted based on the first bluetooth connection.
2. The method according to claim 1, wherein after the first bluetooth connection is established based on the first bluetooth address information of the transmitting end and the second bluetooth address information of the receiving end, further comprising:
When the first Bluetooth connection is timed out, after waiting for a preset time length, establishing a second Bluetooth connection based on the first Bluetooth address information of the sending end and the second Bluetooth address information of the receiving end;
transmitting the data based on the second bluetooth connection.
3. The method according to claim 1, wherein the method further comprises:
Determining that the second Bluetooth state of the receiving end is an open state, exchanging Bluetooth state and Bluetooth address information with the receiving end through a P2P mode of NFC, and establishing a third Bluetooth connection based on the first Bluetooth address information of the transmitting end and the second Bluetooth address information of the receiving end;
and transmitting data based on the third Bluetooth connection.
4. The method of claim 1, wherein the determining that the second bluetooth state of the receiving end is changed to an on state, and establishing a first bluetooth connection based on the first bluetooth address information of the transmitting end and the second bluetooth address information of the receiving end, comprises:
Determining that the second Bluetooth state of the receiving end is changed into an open state and the first Bluetooth state of the transmitting end is an unopened state, opening Bluetooth of the transmitting end and establishing first Bluetooth connection based on the first Bluetooth address information of the transmitting end and the second Bluetooth address information of the receiving end.
5. A data transmission apparatus, applied to a transmitting end, comprising:
The information interaction module is used for determining that a second Bluetooth state of a receiving end is an unopened state, and establishing an LLCP link between the receiving end and the receiving end through a P2P mode of NFC; transmitting a first Bluetooth state and first Bluetooth address information to the receiving end based on the LLCP link, and receiving the second Bluetooth state and second Bluetooth address information transmitted by the receiving end based on the LLCP link; the first Bluetooth state and the first Bluetooth address information are the Bluetooth state and the Bluetooth address information of the sending end, and the second Bluetooth state and the second Bluetooth address information are the Bluetooth state and the Bluetooth address information of the receiving end, wherein when the receiving end sends the second Bluetooth state and the second Bluetooth address information to the sending end, bluetooth of the receiving end is synchronously opened to wait for the sending end to connect under the condition that the second Bluetooth state of the receiving end is detected to be in an unopened state;
The first connection establishing module is used for determining that the second Bluetooth state of the receiving end is changed into an open state, and establishing a first Bluetooth connection based on the first Bluetooth address information of the transmitting end and the second Bluetooth address information of the receiving end;
and the data transmission module is used for transmitting data based on the first Bluetooth connection.
6. A data transmission method, applied to a receiving end, the method comprising:
Determining that a second Bluetooth state of a receiving end is an unopened state, synchronously opening Bluetooth of the receiving end, exchanging Bluetooth state and Bluetooth address information with a transmitting end through a P2P mode of NFC, wherein the transmitting end establishes an LLCP link between the transmitting end and the receiving end through the P2P mode of NFC, sends a first Bluetooth state and first Bluetooth address information to the receiving end based on the LLCP link, and receives the second Bluetooth state and the second Bluetooth address information sent by the receiving end based on the LLCP link; the first Bluetooth state and the first Bluetooth address information are the Bluetooth state and the Bluetooth address information of the sending end, and the second Bluetooth state and the second Bluetooth address information are the Bluetooth state and the Bluetooth address information of the receiving end;
Establishing a first Bluetooth connection based on the first Bluetooth address information of the transmitting end and the second Bluetooth address information of the receiving end;
And receiving the data transmitted by the transmitting end based on the first Bluetooth connection.
7. A data transmission apparatus for use at a receiving end, the apparatus comprising:
The information interaction module is used for determining that a second Bluetooth state of a receiving end is an unopened state, synchronously opening Bluetooth of the receiving end, exchanging Bluetooth state and Bluetooth address information with a transmitting end through a P2P mode of NFC, wherein the transmitting end establishes an LLCP link between the transmitting end and the receiving end through the P2P mode of NFC, sends a first Bluetooth state and first Bluetooth address information to the receiving end based on the LLCP link, and receives the second Bluetooth state and the second Bluetooth address information sent by the receiving end based on the LLCP link; the first Bluetooth state and the first Bluetooth address information are the Bluetooth state and the Bluetooth address information of the sending end, and the second Bluetooth state and the second Bluetooth address information are the Bluetooth state and the Bluetooth address information of the receiving end;
The first connection establishing module is used for establishing a first Bluetooth connection based on the first Bluetooth address information of the sending end and the second Bluetooth address information of the receiving end;
and the data receiving module is used for receiving the data transmitted by the transmitting end based on the first Bluetooth connection.
8. A non-transitory computer readable storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any of claims 1-4 or 6.
9. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1-4 or 6.
CN202011077344.4A 2020-10-10 2020-10-10 Data transmission method and device, storage medium and electronic equipment Active CN112291757B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011077344.4A CN112291757B (en) 2020-10-10 2020-10-10 Data transmission method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011077344.4A CN112291757B (en) 2020-10-10 2020-10-10 Data transmission method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112291757A CN112291757A (en) 2021-01-29
CN112291757B true CN112291757B (en) 2024-07-05

Family

ID=74422420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011077344.4A Active CN112291757B (en) 2020-10-10 2020-10-10 Data transmission method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112291757B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116546471A (en) * 2022-01-26 2023-08-04 广州星际悦动股份有限公司 Bluetooth connection method of toothbrush equipment, terminal equipment and toothbrush equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457640A (en) * 2012-06-05 2013-12-18 中兴通讯股份有限公司 Method and system for rapid data transmission and mobile terminals
CN105325049A (en) * 2013-07-19 2016-02-10 三星电子株式会社 Method and device for communication

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8954003B2 (en) * 2011-10-18 2015-02-10 Blackberry Limited System and method of managing pairing information associated with peer-to-peer device pairings
CN103209007B (en) * 2012-01-11 2016-09-07 中兴通讯股份有限公司 A kind of method that bluetooth equipment quickly matches and bluetooth equipment
CN104661230A (en) * 2013-11-18 2015-05-27 中兴通讯股份有限公司 Method and device for establishing wireless local area network based on near field communication
WO2016003018A1 (en) * 2014-07-02 2016-01-07 엘지전자(주) Mobile terminal and control method therefor
CN104648321B (en) * 2015-01-28 2017-02-22 常州大学 Method for optimizing automotive electronics application by utilizing NFC (Near Field Communication)

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103457640A (en) * 2012-06-05 2013-12-18 中兴通讯股份有限公司 Method and system for rapid data transmission and mobile terminals
CN105325049A (en) * 2013-07-19 2016-02-10 三星电子株式会社 Method and device for communication

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于NFC的P2P文件传输系统研究";岳佳欣等;《重庆理工大学学报》;第1-5页 *

Also Published As

Publication number Publication date
CN112291757A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
RU2738260C1 (en) D2d communication method, remote user equipment and relaying user equipment
US9420631B2 (en) WLAN peer-to-peer group owner negotiation
JP3790186B2 (en) Device hiding
US9743218B2 (en) Proxy connection method and apparatus
US11172530B2 (en) Communication establishment method and terminal
EP2903228B1 (en) Systems and methods to transmit configuration change messages between an access point and a station
US8457552B1 (en) Method and apparatus for reduced complexity short range wireless communication system
US20160134709A1 (en) Method, apparatus, and computer program product for a node to advertise its presence and service profiles thereof in a wireless environment
US8270903B2 (en) Method for displaying information in mobile communication terminal using bluetooth
CN114208234A (en) Method for supporting multilink in bluetooth network environment and electronic device thereof
EP3081015A1 (en) Switching to advertising locator after connection establishment
CN112291757B (en) Data transmission method and device, storage medium and electronic equipment
JP2012100171A (en) Communication device, its control method and program
WO2022027341A1 (en) Wireless communication method and terminal device
JP6702916B2 (en) Communication device, external device, communication device control method, external device control method, and program
CN113114798B (en) Method for acquiring Internet protocol IP address and electronic equipment
WO2023283794A1 (en) Bluetooth connection method and apparatus
JP3785394B2 (en) Mobile terminal, communication control method, and communication system
CN116390212A (en) Wireless communication method and device
KR102406213B1 (en) The Method For Data Transmitting In Mobile Communication Terminal
JP2006019881A (en) Wireless network communication method and wireless network communication system
CN115767676A (en) Communication method and device

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
GR01 Patent grant
GR01 Patent grant