WO2021239032A1 - 蓝牙协议连接方法、装置、存储介质及相关设备 - Google Patents

蓝牙协议连接方法、装置、存储介质及相关设备 Download PDF

Info

Publication number
WO2021239032A1
WO2021239032A1 PCT/CN2021/096230 CN2021096230W WO2021239032A1 WO 2021239032 A1 WO2021239032 A1 WO 2021239032A1 CN 2021096230 W CN2021096230 W CN 2021096230W WO 2021239032 A1 WO2021239032 A1 WO 2021239032A1
Authority
WO
WIPO (PCT)
Prior art keywords
bluetooth
connection
bluetooth protocol
protocol information
protocol
Prior art date
Application number
PCT/CN2021/096230
Other languages
English (en)
French (fr)
Inventor
刘佳
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021239032A1 publication Critical patent/WO2021239032A1/zh

Links

Images

Classifications

    • 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
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • 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

Definitions

  • This application relates to the field of computer technology, and in particular to a Bluetooth protocol connection method, device, storage medium and related equipment.
  • an electronic device when an electronic device is connected with a Bluetooth device, it needs to obtain Bluetooth protocol information supported by the Bluetooth device through a complete Service Discovery Protocol (SDP) process, so as to complete the Bluetooth protocol connection with the Bluetooth device.
  • SDP Service Discovery Protocol
  • the embodiments of the present application provide a Bluetooth protocol connection method, device, storage medium, and related equipment, which saves the SDP process, can increase the protocol connection speed, and thereby increase the speed of the entire Bluetooth connection process.
  • the technical solution is as follows:
  • the embodiments of the present application provide a Bluetooth protocol connection method, which is applied to an electronic device.
  • the electronic device is used as a master device to perform a current connection with a Bluetooth device, the method includes:
  • Obtaining step Obtain the first Bluetooth protocol information supported by the Bluetooth device stored locally by the electronic device, where the first Bluetooth protocol information is that the electronic device serves as the master device and is connected to the Bluetooth device before the current round of connection Saved by query saving step;
  • Connection step completing the Bluetooth protocol connection corresponding to the first Bluetooth protocol information with the Bluetooth device based on the first Bluetooth protocol information.
  • an embodiment of the present application provides a Bluetooth protocol connection device, which is applied to an electronic device.
  • the electronic device is used as a master device to perform a current connection with a Bluetooth device, the device includes:
  • the first protocol acquisition module is configured to acquire the first Bluetooth protocol information supported by the Bluetooth device stored locally by the electronic device. The description is saved through the query saving step before this round of connection;
  • the Bluetooth protocol connection module is configured to complete the Bluetooth protocol connection corresponding to the first Bluetooth protocol information with the Bluetooth device based on the first Bluetooth protocol information.
  • an embodiment of the present application provides a Bluetooth headset.
  • the Bluetooth headset includes a detection circuit and a Bluetooth circuit.
  • the detection circuit is configured to detect a Bluetooth connection command. When the detection circuit detects a Bluetooth connection
  • the detection circuit is configured to send a Bluetooth back-connection signal to the Bluetooth circuit, and the Bluetooth circuit is configured to start a Bluetooth back-connection to the Bluetooth device after receiving the Bluetooth back-connection signal;
  • the bluetooth circuit is configured to save the first bluetooth protocol information supported by the bluetooth device queried during the first bluetooth connection back into the memory of the bluetooth headset;
  • the detection circuit When the detection circuit detects the Bluetooth connection back instruction again, the detection circuit is configured to send the Bluetooth connection back signal to the Bluetooth circuit, and the Bluetooth circuit is configured to After the Bluetooth back-connection signal, the Bluetooth back-connection to the Bluetooth device is started; the Bluetooth circuit is configured to retrieve the first Bluetooth protocol information stored in the memory during the non-first Bluetooth back-connection process, and It is configured to perform a Bluetooth protocol connection corresponding to the first Bluetooth protocol information based on the first Bluetooth protocol information.
  • an embodiment of the present application provides a computer storage medium that stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the above method steps.
  • 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, and the computer program is adapted to be loaded by the processor and execute the above method steps .
  • the first Bluetooth protocol information supported by the Bluetooth device stored locally in the electronic device is acquired, and the first Bluetooth protocol is The information is saved by the electronic device as the master device and the Bluetooth device before this round of connection, and the Bluetooth protocol connection is completed with the Bluetooth device based on the first Bluetooth protocol information.
  • the first Bluetooth protocol information is sufficient, which saves the SDP process and can increase the protocol connection speed, thereby increasing the speed of the entire Bluetooth connection process, and bringing a better user experience to the user.
  • FIG. 1 is a schematic flowchart of a Bluetooth protocol connection method provided by an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a pairing connection system provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a Bluetooth protocol connection method provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a security authentication process provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a first connection process between an electronic device and a Bluetooth device according to an embodiment of the present application
  • FIG. 6 is a schematic diagram of an example of a back connection between a headset and a mobile phone according to an embodiment of the present application
  • FIG. 7 is a schematic flowchart of a non-first connection between an electronic device and a Bluetooth device according to an embodiment of the present application
  • FIG. 8 is a schematic structural diagram of a Bluetooth protocol connection device provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a Bluetooth protocol connection device provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a Bluetooth headset provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • plural means two or more.
  • “And/or” describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone.
  • the character “/” generally indicates that the associated objects before and after are in an "or” relationship.
  • SDP Service Discovery Protocol
  • this information is generally determined when the Bluetooth device leaves the factory and will not change significantly. Every time an electronic device connects to a Bluetooth device, it needs to do a complete SDP process to obtain Bluetooth protocol information, which is redundant, and frequent SDP connection disconnection It will consume a lot of time, which will affect the connection speed.
  • the Bluetooth protocol connection method provided by the embodiments of the present application will be described in detail below in conjunction with accompanying drawings 1 to 7.
  • the method can be realized by relying on a computer program, and can be run on a Bluetooth protocol connection device based on the von Neumann system.
  • the computer program can be integrated in the application or run as an independent tool application.
  • the Bluetooth protocol connection device in the embodiment of the present application may be an electronic device.
  • FIG. 1 is a schematic flowchart of a Bluetooth protocol connection method provided by an embodiment of this application.
  • the method of the embodiment of the present application may include the following steps:
  • Bluetooth protocol specification follows the Open System Interconnection Reference Model (OSI/RM), and defines the various layers of the Bluetooth protocol stack from low to high, including: Physical Layer, Logical Layer, L2CAP Layer, and Application Layer (APP Layer).
  • OSI/RM Open System Interconnection Reference Model
  • APP Layer Application Layer
  • Common Bluetooth protocols can include:
  • Head-Set-Profile HSP
  • HSP The device specification
  • Hands-Free Profile allows electronic devices to control calls, such as answering, hanging up, rejecting, and voice dialing.
  • the Bluetooth Media Audio Distribution Protocol (Advanced Audio Distribution Profile, A2DP) can use the chip in the headset to stack data to achieve high-definition sound, which allows the transmission of stereo audio signals.
  • the sound can reach 44.1kHz, and the average earphone can only reach 8kHz.
  • the Bluetooth device can be used.
  • Audio/Video Remote Control Profile used to send commands (such as skip forward, pause and play) from the controller (such as stereo headset) to the target device (such as a computer with Media Player) .
  • AVRCP is designed to provide a standard interface for controlling TV, Hi-Fi equipment, etc. This configuration file is used to allow a single remote control device (or other device) to control all A/V devices that users can access. It can be used in conjunction with A2DP or VDP.
  • AVRCP defines how to control the characteristics of streaming media. Including pause, stop, start playback, volume control and other types of remote control operations.
  • AVRCP defines two roles, namely the controller and the target device.
  • the controller is usually a remote control device, and the target device is a device whose characteristics can be changed.
  • the controller translates the detected user operations into A/V control signals, and then transmits them to the remote Bluetooth device.
  • the control device can be a headset that allows skipping audio tracks, while the target device is the actual player.
  • the available functions of the conventional infrared remote control can be implemented in this protocol.
  • the AVRCP protocol stipulates the application range of the AV/C digital interface command set (AV/C command set), which achieves simplified implementation and ease of operation.
  • This protocol uses the AV/C device mode and command format for control messages, which can be transmitted through the Audio/Video Control Transmission Protocol (AVCTP).
  • AVCTP Audio/Video Control Transmission Protocol
  • the SPP Bluetooth serial port is a device based on the SPP protocol (Serial Port Profile) that can create a serial port for data transmission between Bluetooth devices.
  • SPP protocol Serial Port Profile
  • one of the devices is an electronic device, and the other device is a Bluetooth device. Both devices have Bluetooth function and can complete Bluetooth protocol connection.
  • the system architecture 100 may include one or more of the electronic devices 101, 102, and 103, the Bluetooth network 104 and the Bluetooth device 105.
  • the Bluetooth network 104 is used to provide a medium for communication links between the electronic devices 101, 102, 103 and the Bluetooth device 105.
  • Bluetooth is a radio technology that supports short-distance communication (generally within 10m) of devices, and can exchange wireless information among many devices including mobile phones, PDAs, wireless headsets, notebook computers, and related peripherals.
  • Bluetooth technology can effectively simplify the communication between terminal devices, and also successfully simplify the communication between the device and the Internet, so that data transmission becomes faster and more efficient, and broadens the way for wireless communication.
  • the numbers of electronic devices, Bluetooth networks, and Bluetooth devices in FIG. 2 are merely illustrative. According to implementation needs, there can be any number of electronic devices, Bluetooth networks, and Bluetooth devices.
  • the Bluetooth device 105 may be a Bluetooth device cluster composed of multiple Bluetooth devices or multiple independent Bluetooth devices within a certain distance.
  • the user can use the electronic devices 101, 102, 103 to interact with the Bluetooth device 105 through the Bluetooth network 104 to receive or send messages, and so on.
  • the electronic devices 101, 102, 103 may be devices with Bluetooth functions, including but not limited to smart phones, tablets, portable computers, desktop computers, Bluetooth headsets, Bluetooth car, Bluetooth MP3, Bluetooth flash drives, Bluetooth adapters, Bluetooth gateways, Bluetooth CF card and so on.
  • the bluetooth device is also a device with bluetooth function, which may include but not limited to bluetooth headset, bluetooth car, bluetooth MP3, bluetooth flash disk, bluetooth adapter, bluetooth gateway, bluetooth CF card and so on.
  • the Bluetooth headset may be a true wireless stereo (TWS) headset.
  • the electronic device has acquired and saved the first Bluetooth protocol information supported by the Bluetooth device, such as protocol Name, protocol version, protocol function, etc. Therefore, when the electronic device is connected with the Bluetooth device for this round (such as the second time, the third time, etc.), the Bluetooth device supported by the Bluetooth device can be directly read from the local cache.
  • the first Bluetooth protocol information does not need to obtain the first Bluetooth protocol information supported by the Bluetooth device.
  • the electronic device is a mobile phone and the Bluetooth device is a Bluetooth headset
  • the headset is generally connected to the headset through the mobile phone as the main device. Therefore, during this connection process, the mobile phone can Acquire and save the Bluetooth protocol information supported by the headset.
  • the mobile phone reconnects to the headset (such as the second time, the third time, etc.), it can connect back to the headset based on the Bluetooth protocol information saved for the first time.
  • the connection back refers to the non-first connection between the electronic device as the master device and the Bluetooth device.
  • the mobile phone is the main device, the second connection or the third connection with the headset, and for example, after the headset has established a Bluetooth connection with the mobile phone, the headset is used as the main device to establish a Bluetooth connection with the mobile phone, which is called back connection.
  • the electronic device is a Bluetooth headset
  • the Bluetooth device is a mobile phone
  • the headset when the headset is connected to the mobile phone for the first time, the headset is generally connected to the headset through the mobile phone as the main device. Therefore, the headset cannot obtain the Bluetooth protocol information of the mobile phone during the first connection.
  • the headset when the headset is connected to the mobile phone (such as the second time), the headset can be used as the main device to obtain and save the Bluetooth protocol information supported by the mobile phone. Therefore, when the headset is connected to the mobile phone the next time (such as the third and fourth time), you can Connect back to the mobile phone based on the Bluetooth protocol information saved for the second time.
  • the back-connection refers to the non-first connection between the electronic device as the main device and the Bluetooth device, that is, for example, the second connection or the third connection between the headset and the mobile phone, and the headset has already established a Bluetooth connection with the mobile phone. Later, the headset establishes a Bluetooth connection with the mobile phone as the main device, which is called back connection.
  • the Bluetooth protocol information supported by the mobile phone can be obtained and saved locally when the headset is connected to the mobile phone for the first time, which is also suitable for this application and belongs to the protection of this application. Scope.
  • connection step completing a Bluetooth protocol connection corresponding to the first Bluetooth protocol information with the Bluetooth device based on the first Bluetooth protocol information.
  • the electronic device obtains the locally supported second Bluetooth protocol information, configures the second Bluetooth protocol information and the first Bluetooth protocol information, requests the Bluetooth device for protocol connection, and after the Bluetooth device responds, completes the protocol connection .
  • the second Bluetooth protocol information and the first Bluetooth protocol information correspond to the same type of Bluetooth protocol, for example, both are HSP protocols or both are AVRCP protocols, and so on.
  • the Bluetooth protocol corresponding to the first Bluetooth protocol information is any one of one or more types of Bluetooth protocols supported by both the electronic device and the Bluetooth device.
  • the query saving step is executed based on each Bluetooth protocol type in turn to save all the first Bluetooth protocol information corresponding to the Bluetooth protocol types.
  • the query saving step is executed for one round when the electronic device establishes a Bluetooth connection with the Bluetooth device as the master device for the first time; or, the query saving step is preset for each connection between the electronic device and the Bluetooth device. Perform one round afterwards.
  • the query saving step may include: establishing an SDP connection with a Bluetooth device through an asynchronous connection-oriented link; querying the first Bluetooth protocol information supported by the Bluetooth device through the SDP connection, and saving the first Bluetooth protocol information To local; disconnect the SDP connection.
  • the configuration and connection can be performed in sequence according to the above method.
  • the electronic device and the Bluetooth All devices with the same type of Bluetooth protocol are connected.
  • the first Bluetooth protocol information supported by the Bluetooth device stored locally in the electronic device is acquired, and the first Bluetooth protocol is The information is saved by the electronic device as the master device and the Bluetooth device before this round of connection, and the Bluetooth protocol connection is completed with the Bluetooth device based on the first Bluetooth protocol information.
  • the first Bluetooth protocol information is sufficient, which saves the SDP process and can increase the protocol connection speed, thereby increasing the speed of the entire Bluetooth connection process, and bringing a better user experience to the user.
  • FIG. 3 is a schematic flowchart of a Bluetooth protocol connection method provided by an embodiment of this application.
  • the Bluetooth protocol connection method may include the following steps:
  • the Bluetooth protocol information can be inquired and saved in the above three cases, and the purpose of the preset round is In order to ensure that the Bluetooth protocol of the Bluetooth device is updated when the Bluetooth protocol is changed.
  • the first round of connection can be understood as the scenario where the electronic device is a mobile phone, the Bluetooth device is a headset, and the electronic device is used as the main device to connect back to the headset, that is, the electronic device can obtain the Bluetooth protocol information of the Bluetooth device when it is connected to the Bluetooth device for the first round. And save.
  • Non-first-round connection can be understood as the electronic device is a headset, and the Bluetooth device is a mobile phone.
  • the Bluetooth device is the main device to initiate the connection
  • the electronic device is the main device to initiate the back connection. Only then can the Bluetooth protocol information of the Bluetooth device be obtained and saved locally. Then any round of connection after the non-first round of connection (such as this round of connection) can directly perform the Bluetooth protocol connection based on the Bluetooth protocol information queried in the non-first round of connection.
  • Performing a round after each connection preset round can be understood as a periodic query (for example, performing a round of query and saving after every 5 rounds of connection), so as to update the Bluetooth protocol saved in the previous round of query.
  • This round of connection is any round of connection after the connection is saved in the most recent query, and the Bluetooth protocol connection can be directly performed based on the Bluetooth protocol information queried in the most recent round.
  • the electronic device When the electronic device is used as the master device to connect with the Bluetooth device before this round of connection, it is first necessary to create an asynchronous connection-oriented ACL link between the two. After the ACL link is created, the link layer data is authenticated and encrypted to ensure the security of data transmission. The electronic device obtains the Bluetooth protocol information supported by the Bluetooth device from the Bluetooth device through the link.
  • the electronic device (master, the device that initiates the connection) will page the Bluetooth device (slave, the device that receives the connection), the master will page the slave in a frequency hopping manner, and the slave will scan at regular intervals (page scan) External page, when scanning to an external page, it will respond to the page, so that a link connection is established between the electronic device and the Bluetooth device, that is, the connection of the ACL link.
  • the maximum timeout time of a page is 40.9 seconds, and the minimum is 0.625ms.
  • the Bluetooth device enables the page scan mode to respond to connection requests from other Bluetooth devices.
  • Page scan is a state. Only when the Bluetooth device is in the page scan state can the electronic device be successfully connected.
  • ACL link is a logical link for connection-oriented Bluetooth asynchronous transmission. Send data packets directionally through this link, which supports both symmetrical and asymmetrical connections (that is, one-to-one or one-to-many).
  • the master device (electronic device) is responsible for controlling the link bandwidth and determining how much bandwidth each slave device (Bluetooth device) can occupy and the symmetry of the connection. The slave device can only transmit data when it is selected.
  • the ACL link also supports receiving broadcast messages sent by the master device to all slave devices. In addition, the ACL link is mainly used for the transmission of packet data.
  • Two-way authentication adopts challenge-response (challenge-response) method.
  • the electronic device A is the responder
  • the Bluetooth device B is the requester.
  • the A device as the responding party generates a 128-bit random number AU_RANDA and transmits it to the B device in plain text.
  • the A and B devices both use the E1 algorithm to generate 32-bit SRESA and SRESB by encrypting the AU_RANDA, Kab, and BD_ANDRB obtained separately.
  • B device transmits the result SRESB to A device,
  • a device compares SRESA and SRESB, if they are equal, the authentication is passed this time, otherwise the authentication is not passed.
  • the roles of the A device and the B device are swapped, that is, the A device is the requester and the B device is the responder, and the same method is used for authentication. After both parties have passed the authentication, it is confirmed that the safety authentication is passed.
  • S202 Establish an SDP connection with the Bluetooth device through the asynchronous connection-oriented link
  • SDP is the core protocol in the Bluetooth protocol system, an important part of the Bluetooth system, and the basis of all user modes.
  • the Bluetooth system it is necessary to obtain device information, service information, and service characteristics through a service discovery protocol to establish mutual connections on this basis. Through this protocol, the application can discover which services are available and what are the characteristics of the services.
  • the SDP connection between the electronic device and the Bluetooth device is established through the ACL link.
  • S203 Query the first Bluetooth protocol information supported by the Bluetooth device through the SDP connection and the Bluetooth protocol type, and save the first Bluetooth protocol information locally, and disconnect the SDP connection;
  • the second Bluetooth protocol is locally supported, and the second Bluetooth protocol corresponds to Bluetooth information, including the Bluetooth protocol type.
  • a round of query and save is performed; or, after each preset round of connection between the electronic device and the Bluetooth device, a round of query and save is performed.
  • the query and save may be understood as the electronic device inquires the Bluetooth device for the first Bluetooth protocol information supported by the Bluetooth device and saves it in the memory of the electronic device.
  • the Bluetooth protocol type includes multiple, such as HSP, HFP, AVRCP, A2DP, etc.
  • the same Bluetooth protocol supported by the Bluetooth device is queried through the SDP connection and one of the multiple Bluetooth protocols Information, if it exists, save the Bluetooth protocol information locally and disconnect the SDP connection; then establish an SDP connection with the Bluetooth device through the SDP and the next one of the multiple Bluetooth protocol types
  • the Bluetooth protocol type queries the Bluetooth protocol information supported by the Bluetooth device, saves the Bluetooth protocol information locally, and disconnects the SDP connection; in the same way, the other types of Bluetooth protocols are inquired and saved in sequence.
  • the search of the Bluetooth protocol can be a random search according to any one of the multiple Bluetooth protocol types, or can be a search for each Bluetooth protocol type in sequence according to default rules (such as priority order).
  • the electronic device first requests HFP protocol information query from the Bluetooth device through the SDP connection, and then receives the Bluetooth device After replying to the HFP protocol information, record the HFP protocol related information, disconnect the SDP connection, and perform the HFP protocol connection. After the protocol connection is completed, establish the SDP connection again, and perform the A2DP protocol information query and connection in the same way as above In this way, it completes the inquiry of multiple Bluetooth protocol types contained in the electronic device.
  • the process of Bluetooth protocol connection can be understood as: after the electronic device configures the second Bluetooth protocol information and the first Bluetooth protocol information, it requests the Bluetooth device for protocol connection, and after the Bluetooth device responds, completes the protocol connection.
  • the connection history of the electronic device and these multiple Bluetooth devices is searched in the cache to determine the current needs Which Bluetooth device to connect to.
  • FIG. 6 shows the TWS Bluetooth headset and mobile phone.
  • TWS earphones are equipped with a charging box + earphones on the market.
  • the TWS earphone as an electronic device main device
  • Bluetooth device A is Electronic equipment
  • Bluetooth device B is a Bluetooth device.
  • the ACL link creation and authentication process is the same as the ACL link creation and authentication process for the first connection described above, and will not be repeated here.
  • S205 Acquire first Bluetooth protocol information supported by the Bluetooth device and stored locally by the electronic device;
  • the first Bluetooth protocol information supported by the Bluetooth device such as the protocol version, the functions supported by the protocol, etc., are generally determined when the device leaves the factory and will not change significantly. Therefore, the electronic device directly reads the first connection recorded in the cache The first Bluetooth protocol information is sufficient.
  • S206 Acquire second Bluetooth protocol information supported by the electronic device, where the second Bluetooth protocol information and the first Bluetooth protocol information correspond to the same type of Bluetooth protocol;
  • the second Bluetooth protocol information and the first Bluetooth protocol information supported by the electronic device it is necessary to configure the second Bluetooth protocol information and the first Bluetooth protocol information supported by the electronic device. Therefore, it is also necessary to read the second Bluetooth protocol information of the electronic device, such as the protocol name. , Protocol version, protocol function, etc., the second Bluetooth protocol information and the first Bluetooth protocol information correspond to the same type of Bluetooth protocol.
  • S207 Based on the first Bluetooth protocol information and the second Bluetooth protocol information, complete a Bluetooth protocol connection corresponding to the first Bluetooth protocol information with the Bluetooth device.
  • Bluetooth protocol it is only necessary to obtain the Bluetooth device support through the SDP process when the electronic device is used as the main device and the Bluetooth device is connected before this round of connection (such as the first time, the second time, and the preset round every interval).
  • Bluetooth protocol and save it.
  • the Bluetooth protocol information corresponding to each type of Bluetooth protocol is obtained in the same way and saved.
  • the subsequent connection process only the Bluetooth protocol information needs to be read locally. Yes, the SDP process is saved, the connection process is simple and convenient, and the time consumed by frequent SDP connection disconnections is saved, which can increase the protocol connection speed, thereby increasing the speed of the entire Bluetooth connection process, and bringing a better user experience to the user.
  • connection speed of the headset to the mobile phone is generally about 2.5s, and the connection speed of the mobile phone and the Bluetooth device using this solution will increase by at least 300-500ms.
  • the electronic device and the Bluetooth device are in a strong interference environment, it may take multiple interactions to obtain the Bluetooth protocol information of the Bluetooth device through the SDP connection each time. Therefore, through the implementation of this solution, in the strong interference environment, The effect of increasing the connection speed is more obvious.
  • FIG. 8 shows a schematic structural diagram of a Bluetooth protocol connection device provided by an exemplary embodiment of the present application.
  • the Bluetooth protocol connection device can be implemented as all or a part of the electronic device through software, hardware or a combination of the two.
  • the device 1 is applied to an electronic device.
  • the electronic device When the electronic device is used as a master device to connect with a Bluetooth device in this round, it includes a first protocol acquisition module 11 and a Bluetooth protocol connection module 12.
  • the first protocol acquisition module 11 is configured to acquire the first Bluetooth protocol information supported by the Bluetooth device stored locally by the electronic device, and the first Bluetooth protocol information indicates that the electronic device acts as a master device and is connected to the Bluetooth device. The said current round of connection was saved through the query saving step;
  • the Bluetooth protocol connection module 12 is configured to complete the Bluetooth protocol connection corresponding to the first Bluetooth protocol information with the Bluetooth device based on the first Bluetooth protocol information.
  • the device further includes:
  • the link creation module 13 is used to initiate a paging to the Bluetooth device to create an asynchronous connection-oriented link
  • the link authentication module 14 is configured to authenticate link layer data through the asynchronous connection-oriented link.
  • the Bluetooth protocol connection module 11 is specifically used for:
  • Second Bluetooth protocol information supported by the electronic device, where the second Bluetooth protocol information and the first Bluetooth protocol information correspond to the same type of Bluetooth protocol;
  • the Bluetooth protocol corresponding to the first Bluetooth protocol information is any one of one or more types of Bluetooth protocols supported by both the electronic device and the Bluetooth device;
  • the Bluetooth protocol includes multiple types
  • based on each type of Bluetooth protocol in turn, trigger the first protocol acquisition module 11 and the Bluetooth protocol connection module 12 to complete the communication between the electronic device and the Bluetooth device All Bluetooth protocol connections.
  • the current round of connection includes the first round of connection, non-first round of connection, or any round of connection with a preset time interval
  • the Bluetooth device is the Bluetooth device whose connection time with at least one Bluetooth device is closest to the current time. equipment.
  • the query and save step is performed for one round when the electronic device establishes a Bluetooth connection with the Bluetooth device as a master device for the first time; or,
  • the query saving step is executed one round after each preset round of connection between the electronic device and the Bluetooth device.
  • the device further includes:
  • the link creation module 15 is used to initiate a paging to the Bluetooth device to create an asynchronous connection-oriented link when the electronic device is used as the master device to connect with the Bluetooth device before this round of connection.
  • the link authenticates the link layer data
  • the SDP connection module 16 is configured to establish an SDP connection with the Bluetooth device through the asynchronous connection-oriented link;
  • the Bluetooth protocol storage module 17 is configured to query the first Bluetooth protocol information supported by the Bluetooth device through the SDP connection, and save the first Bluetooth protocol information locally;
  • the SDP disconnect module 18 is used to disconnect the SDP connection.
  • the query and save step may include: establishing an SDP connection with a Bluetooth device through an asynchronous connection-oriented link; querying the first Bluetooth protocol information supported by the Bluetooth device through the SDP connection, and connecting the first Bluetooth device The protocol information is saved locally; the SDP connection is disconnected.
  • the query saving step can be executed by the SDP connection module 16, the Bluetooth protocol saving module 17, and the SDP disconnect module 18.
  • the Bluetooth protocol saving module 17 is specifically used for:
  • the Bluetooth protocol saving module 17 is also used for:
  • the query saving step is executed based on each Bluetooth protocol type in turn to save all the first Bluetooth protocol information corresponding to the Bluetooth protocol types.
  • the Bluetooth protocol connection device provided in the above embodiment executes the Bluetooth protocol connection method
  • only the division of the above functional modules is used as an example.
  • the above functions can be assigned to different functions according to needs.
  • Module completion means dividing the internal structure of the device into different functional modules to complete all or part of the functions described above.
  • the Bluetooth protocol connection device provided in the foregoing embodiment and the Bluetooth protocol connection method embodiment belong to the same concept, and the implementation process is detailed in the method embodiment, which will not be repeated here.
  • Bluetooth protocol it is only necessary to obtain the Bluetooth device support through the SDP process when the electronic device is used as the main device and the Bluetooth device is connected before this round of connection (such as the first time, the second time, and the preset round every interval).
  • Bluetooth protocol and save it.
  • the Bluetooth protocol information corresponding to each type of Bluetooth protocol is obtained in the same way and saved.
  • the subsequent connection process only the Bluetooth protocol information needs to be read locally. Yes, the SDP process is saved, the connection process is simple and convenient, and the time consumed by frequent SDP connection disconnections is saved, which can increase the protocol connection speed, thereby increasing the speed of the entire Bluetooth connection process, and bringing a better user experience to the user.
  • FIG. 10 shows a schematic structural diagram of a Bluetooth headset provided by an exemplary embodiment of the present application.
  • the Bluetooth headset 2 includes a detection circuit 21 and a Bluetooth circuit 22.
  • the detection circuit 21 is configured to detect a Bluetooth back-connect command.
  • the detection circuit 21 is configured to The circuit 22 sends out a Bluetooth back-connection signal, and the Bluetooth circuit 22 is configured to initiate a Bluetooth back-connection to the Bluetooth device after receiving the Bluetooth back-connection signal;
  • the Bluetooth circuit 22 is configured to retrieve the information queried during the first Bluetooth back-connection process
  • the first Bluetooth protocol information supported by the Bluetooth device is stored in the memory of the Bluetooth headset;
  • the detection circuit 21 When the detection circuit 21 detects the Bluetooth back-connection command again, the detection circuit 21 is configured to send a Bluetooth back-connection signal to the Bluetooth circuit 22, and the Bluetooth circuit 22 is configured to initiate communication to the Bluetooth device after receiving the Bluetooth back-connection signal.
  • Bluetooth back-connection; Bluetooth circuit 22 is configured to retrieve the first Bluetooth protocol information stored in the memory during the non-first Bluetooth back-connection process, and is configured to correspond to the first Bluetooth protocol information based on the first Bluetooth protocol information Bluetooth protocol connection.
  • the Bluetooth circuit 22 is configured to retrieve the first Bluetooth protocol information stored in the memory during the non-first Bluetooth connection back process, and is configured to perform the corresponding first Bluetooth protocol information based on the first Bluetooth protocol information
  • the Bluetooth protocol connection is specifically: the Bluetooth circuit 22 is configured to retrieve the first Bluetooth protocol information stored in the memory during the non-first Bluetooth connection process, and is also configured to retrieve the second Bluetooth headset stored locally.
  • Bluetooth protocol information and is also configured to perform a Bluetooth protocol connection corresponding to the first Bluetooth protocol information based on the stored first Bluetooth protocol information and the second Bluetooth protocol of the Bluetooth headset; the second Bluetooth protocol information corresponds to the first Bluetooth protocol information The same type of Bluetooth protocol.
  • the Bluetooth protocol corresponding to the stored first Bluetooth protocol information is any one of one or more types of Bluetooth protocols supported by both the Bluetooth device and the Bluetooth headset;
  • the detection circuit 21 and the Bluetooth circuit 22 are configured to be based on the first Bluetooth protocol information and the second Bluetooth protocol corresponding to each type of Bluetooth protocol in the process of non-first Bluetooth connection.
  • the information is connected to the Bluetooth protocol to complete all Bluetooth protocol connections between the Bluetooth headset and the Bluetooth device.
  • the detection circuit 21 when the detection circuit 21 detects the Bluetooth connection back instruction again, the detection circuit 21 is configured to first send a paging signal to the Bluetooth circuit 22, and the Bluetooth circuit 22 is configured to send a paging signal to the Bluetooth circuit 22 after receiving the paging signal.
  • the Bluetooth device initiates paging to create an asynchronous connection-oriented link and authenticates link layer data through the asynchronous connection-oriented link.
  • the detection circuit 21 when the detection circuit 21 detects the first Bluetooth connection instruction, or when the detection circuit 21 detects the Bluetooth connection instruction after a preset round, the detection circuit 21 is configured to send the first Bluetooth connection instruction to the Bluetooth circuit 22 Bluetooth loopback signal.
  • the Bluetooth circuit 22 After receiving the first Bluetooth loopback signal, the Bluetooth circuit 22 initiates the Bluetooth connection with the Bluetooth device for the first time, or initiates the Bluetooth connection after each preset round of connection with the Bluetooth device, and is configured to communicate with the Bluetooth device.
  • the Bluetooth device obtains the first Bluetooth protocol information supported by the Bluetooth device and saves it in the memory of the Bluetooth headset.
  • the detection circuit 21 when the detection circuit 21 detects the first Bluetooth connection back instruction, or when the detection circuit 21 detects the Bluetooth connection back instruction after a preset round of connection, the detection circuit 21 is configured to first send to the Bluetooth circuit 22 Paging signal. After receiving the paging signal, the Bluetooth circuit 22 is configured to initiate a paging to the Bluetooth device to create an asynchronous connection-oriented link and authenticate the link layer data through the asynchronous connection-oriented link; During the Bluetooth connection of the Bluetooth device, or start the Bluetooth connection after each preset round of connection with the Bluetooth device, it is configured to obtain the first Bluetooth protocol supported by the Bluetooth device from the Bluetooth device and save it in the memory of the Bluetooth headset, Specifically:
  • the Bluetooth circuit 22 is configured to establish an SDP connection with a Bluetooth device through an asynchronous connection-oriented link, query the Bluetooth device for the first Bluetooth protocol information supported by the Bluetooth device through the SDP connection, and save the first Bluetooth protocol information to In the memory of the Bluetooth headset, disconnect the SDP connection.
  • the detection circuit 21 and the Bluetooth circuit 22 are configured to follow the first Bluetooth connection instruction or the Bluetooth connection instruction after a preset round of connection, based on each Bluetooth protocol in turn.
  • Type obtain the first Bluetooth protocol supported by the Bluetooth device from the Bluetooth device, so as to save the first Bluetooth protocol information corresponding to all the Bluetooth protocol types in the memory of the Bluetooth headset.
  • the Bluetooth device support through the SDP process when the Bluetooth headset is used as the main device and the Bluetooth device is connected before this round of connection (such as the first time, the second time, and the preset rounds every interval).
  • the Bluetooth protocol information corresponding to each type of Bluetooth protocol is obtained and saved in the same way.
  • the subsequent connection process it only needs to be read from the memory of the Bluetooth headset.
  • the connection process is simple and convenient, and saves the time consumed by frequent SDP connection and disconnection, which can increase the protocol connection speed, thereby increasing the speed of the entire Bluetooth connection process, and bringing more to users. Good experience.
  • the embodiment of the present application also provides a computer storage medium.
  • the computer storage medium may store multiple instructions.
  • the instructions are suitable for being loaded by a processor and executing the method steps of the above-mentioned embodiments shown in FIG. 1 to FIG. 7, and the specific execution process is Reference may be made to the specific description of the embodiment shown in FIG. 1 to FIG. 7, which will not be repeated here.
  • the electronic device 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002.
  • the communication bus 1002 is used to implement connection and 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 also include a standard wired interface and a wireless interface.
  • Display display screen
  • Camera Camera
  • the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the processor 1001 may include one or more processing cores.
  • the processor 1001 uses various excuses and lines to connect various parts of the entire electronic device 1000, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and calling data stored in the memory 1005.
  • Various functions and processing data of the electronic device 1000 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 1001 may be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing the content that the display needs to display; the modem is used for processing wireless communication. It is understandable that the above-mentioned modem may not be integrated into the processor 1001, but may be implemented by a chip alone.
  • the memory 1005 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory).
  • the memory 1005 includes a non-transitory computer-readable storage medium.
  • the memory 1005 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 1005 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing the operating system and instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), Instructions used to implement the foregoing method embodiments, etc.; the storage data area can store the data involved in the foregoing method embodiments, etc.
  • the memory 1005 may also be at least one storage device located far away from the foregoing processor 1001.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a Bluetooth protocol connection application program.
  • the user interface 1003 is mainly used to provide an input interface for the user to obtain data input by the user; and the processor 1001 can be used to call the Bluetooth protocol connection application program stored in the memory 1005, When the electronic device is used as the main device to connect with the Bluetooth device this round, and specifically perform the following operations:
  • Obtaining step Obtain the first Bluetooth protocol information supported by the Bluetooth device stored locally by the electronic device, where the first Bluetooth protocol information is stored by the electronic device as the main device and the Bluetooth device before the current round of connection with the Bluetooth device through the query and save step;
  • Connection step completing the Bluetooth protocol connection corresponding to the first Bluetooth protocol information with the Bluetooth device based on the first Bluetooth protocol information.
  • the processor 1001 further performs the following operations before performing the obtaining step:
  • Paging is initiated to the Bluetooth device to create an asynchronous connection-oriented link; the link layer data is authenticated through the asynchronous connection-oriented link.
  • the processor 1001 specifically performs the following operations when performing the connection step:
  • the second Bluetooth protocol information and the first Bluetooth protocol information correspond to the same type of Bluetooth protocol; based on the first Bluetooth protocol information and the second Bluetooth protocol information, complete the first Bluetooth with the Bluetooth device The Bluetooth protocol connection corresponding to the protocol information.
  • the Bluetooth protocol corresponding to the first Bluetooth protocol information is any one of one or more types of Bluetooth protocols supported by both the electronic device and the Bluetooth device;
  • the processor 1001 sequentially executes the acquiring step and the connecting step based on each type of Bluetooth protocol to complete all Bluetooth protocol connections between the electronic device and the Bluetooth device.
  • the query and save step is executed for one round when the electronic device is the master device to establish a Bluetooth connection with the Bluetooth device for the first time; or,
  • the query and save step is executed after each preset round of connection between the electronic device and the Bluetooth device.
  • the processor 1001 when the processor 1001 executes the connection between the electronic device as the master device and the Bluetooth device before the current round of connection, it also performs the following operations: initiate a paging to the Bluetooth device to create an asynchronous connection-oriented link, through asynchronous The connection-oriented link authenticates the link layer data; the SDP connection with the Bluetooth device is established through the asynchronous connection-oriented link; the first Bluetooth protocol information supported by the Bluetooth device is queried through the SDP connection, and the first Bluetooth protocol information Save to local; disconnect SDP connection.
  • the processor 1001 when the processor 1001 queries the first Bluetooth protocol information supported by the Bluetooth device through the SDP connection, and saves the first Bluetooth protocol information locally, it specifically performs the following operations: Obtain the second Bluetooth protocol supported by the electronic device For the Bluetooth protocol type in the information, the first Bluetooth protocol information supported by the Bluetooth device is queried through the SDP connection and the Bluetooth protocol type, and the first Bluetooth protocol information is stored locally.
  • the processor 1001 further performs the following operation: when there are multiple Bluetooth protocol types, it executes the query saving step based on each Bluetooth protocol type in turn to save the first Bluetooth protocol information corresponding to all Bluetooth protocol types.
  • Bluetooth protocol it is only necessary to obtain the Bluetooth device support through the SDP process when the electronic device is used as the main device and the Bluetooth device is connected before this round of connection (such as the first time, the second time, and the preset round every interval).
  • Bluetooth protocol and save it.
  • the Bluetooth protocol information corresponding to each type of Bluetooth protocol is obtained in the same way and saved.
  • the subsequent connection process only the Bluetooth protocol information needs to be read locally. Yes, the SDP process is saved, the connection process is simple and convenient, and the time consumed by frequent SDP connection disconnections is saved, which can increase the protocol connection speed, thereby increasing the speed of the entire Bluetooth connection process, and bringing a better user experience to the user.
  • the program can be stored in a computer readable storage medium. During execution, it may include the processes of the above-mentioned method embodiments.
  • the storage medium can be a magnetic disk, an optical disc, a read-only storage memory or a random storage memory, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

提供了一种蓝牙协议连接方法、装置、存储介质及相关设备,在电子设备作为主设备与蓝牙设备进行本轮连接时,方法包括:获取步骤:获取电子设备本地保存的蓝牙设备支持的第一蓝牙协议信息,第一蓝牙协议信息为电子设备作为主设备与蓝牙设备在本轮连接之前通过查询保存步骤所保存(S101);连接步骤:基于第一蓝牙协议信息与蓝牙设备完成第一蓝牙协议信息对应的蓝牙协议连接(S102)。因此,节省了SDP流程,可以提升协议连接速度,进而提升整个蓝牙连接过程的速度。

Description

蓝牙协议连接方法、装置、存储介质及相关设备 技术领域
本申请涉及计算机技术领域,尤其涉及一种蓝牙协议连接方法、装置、存储介质及相关设备。
背景技术
目前电子设备在与蓝牙设备连接时,需要通过完整的服务发现协议(Service Discovery Protocol,SDP)流程获取蓝牙设备所支持的蓝牙协议信息,以便完成与蓝牙设备的蓝牙协议连接。
发明内容
本申请实施例提供了一种蓝牙协议连接方法、装置、存储介质及相关设备,节省了SDP流程,可以提升协议连接速度,进而提升整个蓝牙连接过程的速度。所述技术方案如下:
第一方面,本申请实施例提供了一种蓝牙协议连接方法,应用于电子设备,在所述电子设备作为主设备与蓝牙设备进行本轮连接时,所述方法包括:
获取步骤:获取所述电子设备本地保存的所述蓝牙设备支持的第一蓝牙协议信息,所述第一蓝牙协议信息为所述电子设备作为主设备与所述蓝牙设备在所述本轮连接之前通过查询保存步骤所保存;
连接步骤:基于所述第一蓝牙协议信息与所述蓝牙设备完成所述第一蓝牙协议信息对应的蓝牙协议连接。
第二方面,本申请实施例提供了一种蓝牙协议连接装置,应用于电子设备,在所述电子设备作为主设备与蓝牙设备进行本轮连接时,所述装置包括:
第一协议获取模块,用于获取所述电子设备本地保存的所述蓝牙设备支持的第一蓝牙协议信息,所述第一蓝牙协议信息为所述电子设备作为主设备与所述蓝牙设备在所述本轮连接之前通过查询保存步骤所保存;
蓝牙协议连接模块,用于基于所述第一蓝牙协议信息与所述蓝牙设备完成所述第一蓝牙协议信息对应的蓝牙协议连接。
第三方面,本申请实施例提供了一种蓝牙耳机,所述蓝牙耳机包括检测电路和蓝牙电路,所述检测电路被配置用于检测蓝牙回连指令,当所述检测电路检测到蓝牙回连指令时,所述检测电路被配置用于向所述蓝牙电路发出蓝牙回连信号,所述蓝牙电路被配置用于在接收到所述蓝牙回连信号后,启动对蓝牙设备的蓝牙回连;所述蓝牙电路被配置用于将首次蓝牙回连过程中查询到的所述蓝牙设备所支持的第一蓝牙协议信息保存至所述蓝牙耳机的存储器中;
当所述检测电路再次检测到所述蓝牙回连指令时,所述检测电路被配置用于向所述蓝牙电路发出所述蓝牙回连信号,所述蓝牙电路被配置用于在接收到所述蓝牙回连信号后,启动对所述蓝牙设备的蓝牙回连;所述蓝牙电路被配置用于在非首次蓝牙回连过程中调取所述存储器中存储的所述第一蓝牙协议信息,并被配置用于基于所述第一蓝牙协议信息进行第一蓝牙协议信息对应的蓝牙协议连接。
第四方面,本申请实施例提供一种计算机存储介质,所述计算机存储介质存储有多条指令,所述指令适于由处理器加载并执行上述的方法步骤。
第五方面,本申请实施例提供一种电子设备,可包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行上述的方法步骤。
本申请一些实施例提供的技术方案带来的有益效果至少包括:
在本申请实施例中,在所述电子设备作为主设备与蓝牙设备进行本轮连接时,获取所述电子设备本地保存的所述蓝牙设备支持的第一蓝牙协议信息,所述第一蓝牙协议信息为所述电子设备作为主设备与所述蓝牙设备在本轮连接之前所保存,基于所述第一蓝牙协议信息与所述蓝牙设备完成蓝牙协议连接。只需要在电子设备作为主设备与蓝牙设备在本轮连接之前进行连接时通过SDP流程获取到蓝牙设备支持的蓝牙协议并进行保存后,在后续的连接过程中只需要从本地读取所保存的第一蓝牙协议信息即可,节省了SDP流程,可以提升协议连接速度,进而提升整个蓝牙连接过程的速度,给用户带来更好的使用体验。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种蓝牙协议连接方法的流程示意图;
图2是本申请实施例提供的一种配对连接***的架构示意图;
图3是本申请实施例提供的一种蓝牙协议连接方法的流程示意图;
图4是本申请实施例提供的一种安全认证过程的流程示意图;
图5是本申请实施例提供的一种电子设备与蓝牙设备首次连接的流程示意图;
图6是本申请实施例提供的一种耳机与手机回连的举例示意图;
图7是本申请实施例提供的一种电子设备与蓝牙设备非首次连接的流程示意图;
图8是本申请实施例提供的一种蓝牙协议连接装置的结构示意图;
图9是本申请实施例提供的一种蓝牙协议连接装置的结构示意图;
图10是本申请实施例提供的一种蓝牙耳机的结构示意图;
图11是本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。在本申请的描述中,需要说明的是,除非另有明确的规定和限定,“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、***、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。此外,在本申请的描述中,除非另有说明,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
电子设备在与蓝牙设备连接时,需要通过完整的服务发现协议(Service Discovery Protocol,SDP)流程获取蓝牙设备所支持的蓝牙协议信息,以便完成与蓝牙设备的蓝牙协议连接。
但这些信息一般在蓝牙设备出厂时就已经确定,不会大更改,电子设备每次连接蓝牙设备都需要 做完整的SDP流程去获取蓝牙协议信息也就显得冗余,频繁的SDP连接断开也会消耗不少时间,从而影响连接速度。
下面将结合附图1-附图7,对本申请实施例提供的蓝牙协议连接方法进行详细介绍。该方法可依赖于计算机程序实现,可运行于基于冯诺依曼体系的蓝牙协议连接装置上。该计算机程序可集成在应用中,也可作为独立的工具类应用运行。其中,本申请实施例中的蓝牙协议连接装置可以为电子设备。
请参见图1,为本申请实施例提供的一种蓝牙协议连接方法的流程示意图。如图1所示,在所述电子设备作为主设备与蓝牙设备进行本轮连接时,本申请实施例的所述方法可以包括以下步骤:
S101,获取步骤:获取所述电子设备本地保存的所述蓝牙设备支持的第一蓝牙协议信息,所述第一蓝牙协议信息为所述电子设备作为主设备与所述蓝牙设备在所述本轮连接之前通过查询保存步骤所保存;
两个蓝牙设备进行配对连接,需要完成两者之间的蓝牙协议连接,以实现相应功能。
蓝牙协议规范遵循开放***互连参考模型(OSI/RM),从低到高地定义了蓝牙协议堆栈的各个层次,包括:物理层(Physical Layer)、逻辑层(Logical Layer)、L2CAP Layer和应用层(APP Layer)。常见的蓝牙协议可包括:
设备规格(Head-Set-Profile,HSP),提供了电子设备与蓝牙设备之间通信所需的基本功能。是最常用的配置,为当前流行支持蓝牙耳机与移动电话使用。它依赖于在64千比特编码的音频/s的CVSD或PCM以及AT命令从GSM 07.07的一个子集,包括环的能力最小的控制,接听来电,挂断以及音量调整。
免提规格(Hands-Free Profile,HFP),让电子设备可以控制电话,如接听、挂断、拒接、语音拨号等功能。
蓝牙媒体音频传输协议(Advanced Audio Distribution Profile,A2DP),是能够采用耳机内的芯片来堆栈数据,达到声音的高清晰度,即允许传输立体声音频信号。声音能达到44.1kHz,一般的耳机只能达到8kHz。蓝牙设备只要装载A2DP协议,就能使用A2DP蓝牙设备了。
音频/视频远程控制协议(Audio/Video Remote Control Profile,AVRCP),用于从控制器(如立体声耳机)向目标设备(如装有Media Player的电脑)发送命令(如前跳、暂停和播放)。
AVRCP设计用于提供控制TV、Hi-Fi设备等的标准接口。此配置文件用于许可单个远程控制设备(或其它设备)控制所有用户可以接入的A/V设备。它可以与A2DP或VDP配合使用。
AVRCP定义了如何控制流媒体的特征。包括暂停、停止、启动重放、音量控制及其它类型的远程控制操作。AVRCP定义了两个角色,即控制器和目标设备。控制器通常为远程控制设备,而目标设备为特征可以更改的设备。在AVRCP中,控制器将检测到的用户操作翻译为A/V控制信号,然后再将其传输至远程Bluetooth设备。对于“随身听”类型的媒体播放器,控制设备可以是允许跳过音轨的耳机,而目标设备则是实际的播放器。常规红外遥控器的可用功能可以在此协议中实现。
AVRCP协议规定了AV/C数字接口命令集(AV/C命令集)的应用范围,实现了简化实施和易操作性。此协议为控制消息采用了AV/C设备模式和命令格式,这些消息可以通过音频/视频控制传输协议(AVCTP)传输。
SPP蓝牙串口是基于SPP协议(Serial Port Profile),能在蓝牙设备之间创建串口进行数据传输的一种设备。
在本申请实施例中,其中一个设备为电子设备,另一个设备为蓝牙设备。两设备均具有蓝牙功能,且可完成蓝牙协议连接。
如图2所示,***架构100可以包括电子设备101、102、103中的一种或多种,蓝牙网络104和蓝牙设备105。蓝牙网络104用以在电子设备101、102、103和蓝牙设备105之间提供通信链路的介质。
其中,蓝牙是一种支持设备短距离通信(一般10m内)的无线电技术,能在包括移动电话、PDA、无线耳机、笔记本电脑、相关外设等众多设备之间进行无线信息交换。利用蓝牙技术,能够有效地简化终端设备之间的通信,也能够成功地简化设备与因特网Internet之间的通信,从而使得数据传输变得更加迅速高效,为无线通信拓宽道路。
应该理解,图2中的电子设备、蓝牙网络和蓝牙设备的数目仅仅是示意性的。根据实现需要,可以具有任意数目的电子设备、蓝牙网络和蓝牙设备。比如蓝牙设备105可以是多个蓝牙设备组成的蓝牙设备集群或多个独立的在一定距离范围内的蓝牙设备等。
用户可以使用电子设备101、102、103通过蓝牙网络104与蓝牙设备105交互,以接收或发送消息等。电子设备101、102、103可以是具有蓝牙功能的设备,包括但不限于智能手机、平板电脑、便携式计算机、台式计算机、蓝牙耳机、蓝牙车载、蓝牙MP3、蓝牙闪存盘、蓝牙适配器、蓝牙网关、蓝牙CF卡等等。所述蓝牙设备也是具有蓝牙功能的设备,可以包括但不限于蓝牙耳机、蓝牙车载、蓝牙MP3、蓝牙闪存盘、蓝牙适配器、蓝牙网关、蓝牙CF卡等等。所述蓝牙耳机可以为真无线立体声(True Wireless Stereo,TWS)耳机。
具体的,由于在所述电子设备作为主设备与蓝牙设备在本轮连接之前(如第一次、第二次),电子设备已获取并保存蓝牙设备所支持的第一蓝牙协议信息,如协议名称、协议版本、协议功能等,因此,在所述电子设备与蓝牙设备进行本轮(如第二次、第三次等)连接时,可直接从本地缓存中读取所述蓝牙设备支持的第一蓝牙协议信息,而无需向蓝牙设备获取其所支持的第一蓝牙协议信息。
需要说明的是,当电子设备为手机,蓝牙设备为蓝牙耳机,在手机与耳机第一次连接时,目前一般都是通过手机作为主设备连接耳机,因此,在此次连接过程中,手机可以获取并保存耳机所支持的蓝牙协议信息,当手机回连耳机(如第二次、第三次等)时,则可基于第一次保存的蓝牙协议信息与耳机进行回连。其中,所述回连是指电子设备作为主设备与蓝牙设备的非首次连接。即例如手机作为主设备,与耳机的第二次连接或第三次连接等,又例如耳机在与手机已经建立过一次蓝牙连接后,耳机作为主设备与手机建立蓝牙连接,叫做回连。
当电子设备为蓝牙耳机,蓝牙设备为手机,在耳机与手机第一次连接时,目前一般都是通过手机作为主设备连接耳机,因此,首次连接过程中,耳机无法获取手机的蓝牙协议信息,在耳机回连手机(如第二次),耳机可作为主设备获取并保存手机支持的蓝牙协议信息,因此,在耳机下一次(如第三次、第四次)回连手机时,则可基于第二次保存的蓝牙协议信息与手机进行回连。其中,所述回连是指电子设备作为主设备与蓝牙设备的非首次连接,即例如耳机与手机的第二次连接或第三次连接等,又例如耳机在与手机已经建立过一次蓝牙连接后,耳机作为主设备与手机建立蓝牙连接,叫做回连。
当然,若后续修改耳机作为主设备与手机首次连接的逻辑,即在耳机与手机第一次连接时即可获取并保存手机支持的蓝牙协议信息至本地,也适应本申请,属于本申请的保护范围。
S102,连接步骤:基于所述第一蓝牙协议信息与所述蓝牙设备完成所述第一蓝牙协议信息对应的蓝牙协议连接。
具体的,电子设备获取本地支持的第二蓝牙协议信息,对第二蓝牙协议信息与第一蓝牙协议信息进行配置后,向蓝牙设备请求进行协议连接,并在蓝牙设备响应后,完成该协议连接。所述第二蓝牙协议信息和所述第一蓝牙协议信息对应同一种类型的蓝牙协议,如均为HSP协议或均为AVRCP协议,等。
所述第一蓝牙协议信息对应的蓝牙协议为所述电子设备和所述蓝牙设备均支持的一种或多种类型蓝牙协议中的任一种。
当所述蓝牙协议类型包括多个时,依次基于每个所述蓝牙协议类型,执行所述查询保存步骤,以保存所有所述蓝牙协议类型对应的第一蓝牙协议信息。
所述查询保存步骤在所述电子设备首次作为主设备与所述蓝牙设备建立蓝牙连接时执行一轮;或者,所述查询保存步骤在所述电子设备与所述蓝牙设备每连接预设轮次后执行一轮。
查询保存步骤可以是包括:通过异步面向连接链路,建立与蓝牙设备之间的SDP连接;通过SDP连接查询所述蓝牙设备支持的第一蓝牙协议信息,并将所述第一蓝牙协议信息保存至本地;断开所述SDP连接。
当所述蓝牙协议类型包括多个时,则可按照上述方式依次进行配置及连接,当具有相同类型的全部第一蓝牙协议信息与全部第二蓝牙协议信息完成连接时,电子设备与所述蓝牙设备所有相同类型的蓝牙协议均完成连接。
需要说明的是,获取步骤以及连接步骤都属于本轮连接的过程。
在本申请实施例中,在所述电子设备作为主设备与蓝牙设备进行本轮连接时,获取所述电子设备本地保存的所述蓝牙设备支持的第一蓝牙协议信息,所述第一蓝牙协议信息为所述电子设备作为主设备与所述蓝牙设备在本轮连接之前所保存,基于所述第一蓝牙协议信息与所述蓝牙设备完成蓝牙协议连接。只需要在电子设备作为主设备与蓝牙设备在本轮连接之前进行连接时通过SDP流程获取到蓝牙设备支持的蓝牙协议并进行保存后,在后续的连接过程中只需要从本地读取所保存的第一蓝牙协议信息即可,节省了SDP流程,可以提升协议连接速度,进而提升整个蓝牙连接过程的速度,给用户带来更好的使用体验。
请参见图3,为本申请实施例提供的一种蓝牙协议连接方法的流程示意图。该蓝牙协议连接方法可以包括以下步骤:
S201,在所述电子设备作为主设备与蓝牙设备在本轮连接之前进行连接时,向所述蓝牙设备发起寻呼以创建异步面向连接链路,通过所述异步面向连接链路对链路层数据进行认证;
所述本轮连接之前包括首轮连接、非首轮连接或每连接预设轮次后执行一轮连接,可以在上述三种情况下进行查询保存蓝牙协议信息,其中预设轮次的目的是为了保障蓝牙设备的蓝牙协议发生变更时,进行更新。
其中,首轮连接可理解为电子设备为手机,蓝牙设备为耳机,电子设备作为主设备回连耳机的场景,即电子设备在与蓝牙设备首轮连接时就可获取到蓝牙设备的蓝牙协议信息并保存。
非首轮连接可理解为电子设备为耳机,蓝牙设备为手机,在首轮连接中,由蓝牙设备作为主设备发起连接,在第二轮连接时,则由电子设备作为主设备发起回连,此时才可以获取到蓝牙设备的蓝牙协议信息并保存至本地。那么在非首轮连接之后的任一轮连接(如本轮连接)就可基于非首轮连接所查询到的蓝牙协议信息直接进行蓝牙协议连接。
每连接预设轮次后执行一轮可理解为周期性查询(如每连接5轮后执行一轮查询并进行保存),从而对上一轮查询保存的蓝牙协议进行更新。本轮连接即为在最近的查询保存连接后的任一轮连接,就可基于最近一轮所查询到的蓝牙协议信息直接进行蓝牙协议连接。
在电子设备作为主设备与蓝牙设备在本轮连接之前进行连接时,首先需要创建两者之间的异步面向连接ACL链路。在ACL链路创建完成后,对链路层数据进行认证,实现加密,确保数据传输的安全性。电子设备通过该链路向蓝牙设备获取所述蓝牙设备所支持的蓝牙协议信息。
具体的,电子设备(master,即发起连接的设备)会寻呼(page)蓝牙设备(slave,接收连接的设备),master以跳频的方式去寻呼slave,slave固定间隔地去扫描(page scan)外部寻呼,当scan到外部page时便会响应该page,这样电子设备与蓝牙设备之间便建立链路的连接,即ACL链路的连接。
page的超时时间最大是40.9秒,最小是0.625ms。当蓝牙设备在未超时时间内没有返回Page Response时,则返回Page Timeout事件。
其中,蓝牙设备开启page scan模式,才能够响应其他蓝牙设备的连接请求。page scan是一个状态,只有蓝牙设备处于page scan状态,电子设备才有可能连接成功。
ACL链路是一种面向连接的蓝牙异步传输的逻辑链路。通过该链路定向发送数据包,它既支持对称连接,也支持不对称连接(即可以一对一,也可以一对多)。主设备(电子设备)负责控制链路带宽,并决定每个从设备(蓝牙设备)可以占用多少带宽和连接的对称性。从设备只有被选中时才能传送数据。ACL链路也支持接收主设备发给所有从设备的广播消息。此外,ACL链路主要用于分组数据的传送。
由于任何无线通信技术都存在被监听和破解的可能,为了保证蓝牙通信的安全性,通过认证的方式给双方链路层数据加密。
双向认证通过challenge-response(挑战-应答)方式。如图4所示,电子设备A为应答方,蓝牙设备B为请求方。作为应答方的A设备产生一个128位的随机数AU_RANDA,并以明文方式传送至B设备。A、B设备都用E1算法将各自得到的AU_RANDA、Kab和BD_ANDRB加密运算分别生成32位的SRESA和SRESB。B设备将结果SRESB传送给A设备,A设备比较SRESA和SRESB,如果相等,此次认证通过,否则认证不通过。执行完此次认证后,A设备和B设备的角色对换,即A设备作为请求方,B设备作为应答方,采用同样的方式进行认证。在双方认证均通过后,则确认安全认证通过。
S202,通过所述异步面向连接链路,建立与所述蓝牙设备之间的SDP连接;
由于两个蓝牙设备需要知道对方支持的协议等信息,才能完成蓝牙通信。因此,需要一种协议,这种协议规定了服务在服务器上面是如何存储的以及对方如何能够通过这个协议来获取到数据,以及双方共同遵守的一些规定等等。定义该协议为SDP。
SDP是蓝牙协议体系中的核心协议,是蓝牙***重要组成部分,是所有用户模式的基础。在蓝牙***中,需要通过服务发现协议获得设备信息、服务信息及服务特征,才能在此基础上建立相互间的连接。通过这个协议,应用程序可以发现哪些服务可用以及服务的特性是什么。
因此,在建立ACL链路后,通过ACL链路建立电子设备与蓝牙设备两者之间的SDP连接。
S203,通过所述SDP连接以及所述蓝牙协议类型查询所述蓝牙设备支持的第一蓝牙协议信息,并将所述第一蓝牙协议信息保存至本地,断开所述SDP连接;
对于电子设备而言,本地支持第二蓝牙协议,该第二蓝牙协议对应蓝牙信息,其中包括蓝牙协议类型。
在所述电子设备首次作为主设备与所述蓝牙设备建立蓝牙连接时执行一轮查询保存;或者,在所述电子设备与所述蓝牙设备每连接预设轮次后执行一轮查询保存。所述查询保存可理解为电子设备向蓝牙设备查询蓝牙设备所支持的第一蓝牙协议信息并保存在电子设备的存储器中。
当所述蓝牙协议类型包括多个时,如HSP、HFP、AVRCP、A2DP等,通过所述SDP连接以及多个所述蓝牙协议中的一个蓝牙协议类型查询所述蓝牙设备支持的相同的蓝牙协议信息,若存在,则保存该蓝牙协议信息至本地,并断开所述SDP连接;再建立与所述蓝牙设备之间的SDP连接,通过该SDP以及多个所述蓝牙协议类型中的下一个蓝牙协议类型查询所述蓝牙设备支持的蓝牙协议信息,保存所述蓝牙协议信息至本地,并断开所述SDP连接的步骤;按照相同的方式依次完成其余类型的蓝牙协议的查询和保存。而蓝牙协议的查找可以为按照多个蓝牙协议类型中的任一个蓝牙协议类型随机查找,也可以为按照默认规则(如优先级高低顺序)依次完成各蓝牙协议类型的查找。
例如,如图5所示,如第二蓝牙协议信息中的蓝牙类型包括HFP协议、A2DP协议、HSP协议等,电子设备首先通过SDP连接向蓝牙设备请求HFP协议信息查询,并在接收到蓝牙设备回复的HFP协议信息后,记录HFP协议相关信息,断开SDP连接,并进行HFP协议连接,在该协议连接完成后,再建立SDP连接,并按照上述相同的方式进行A2DP协议信息的查询及连接等操作,依此方式完成电子设备包含的多个蓝牙协议类型的查询。
其中,蓝牙协议连接的过程可理解为,电子设备对第二蓝牙协议信息与第一蓝牙协议信息进行配置后,向蓝牙设备请求进行协议连接,并在蓝牙设备响应后,完成该协议连接。
S204,在所述电子设备作为主设备与蓝牙设备进行本轮连接时,向所述蓝牙设备发起寻呼以创建异步面向连接链路,通过所述异步面向连接链路对链路层数据进行认证;
在所述电子设备与所述蓝牙设备进行本轮连接时,由于电子设备可能连接过多个蓝牙设备,因此,通过在缓存中查找电子设备与这多个蓝牙设备的连接历史,以确定当前需要连接哪个蓝牙设备。
例如,如图6所示为TWS蓝牙耳机与手机。由于目前大部分手机厂商会有一些专门的用户体验上的优化,如快速配对弹框,耳机连接成功弹框等等。TWS耳机市面上都是充电盒子+耳机的搭配,当手机与TWS耳机完成首次连接后,后面TWS耳机作为电子设备(主设备)每次开盖都会主动去回连最后一次与之连接的手机。
因此,确定所述连接时间距离当前时间最近的蓝牙设备为当前需要连接的蓝牙设备,然后向蓝牙设备发起连接请求以创建ACL链路,并进行认证,如图7所示,其中蓝牙设备A为电子设备,蓝牙设备B为蓝牙设备。此处ACL链路的创建及认证过程与上述首次连接时的ACL链路创建及认证过程相同,此处不再赘述。
S205,获取所述电子设备本地保存的所述蓝牙设备支持的第一蓝牙协议信息;
在链路认证完成后数据通信前,需要建立两者之间的协议连接。而蓝牙设备支持的第一蓝牙协议信息,如协议版本,协议支持的功能等,一般在设备出厂时就已经确定,不会大更改,因此,电子设备直接读取缓存中首次连接时所记录的第一蓝牙协议信息即可。
S206,获取所述电子设备支持的第二蓝牙协议信息,所述第二蓝牙协议信息和所述第一蓝牙协议信息对应同一种类型的蓝牙协议;
当然,为了完成两者之间的协议连接,需要对电子设备支持的第二蓝牙协议信息与第一蓝牙协议信息进行配置,因此,还需要读取电子设备的第二蓝牙协议信息,如协议名称、协议版本、协议功能等,所述第二蓝牙协议信息和所述第一蓝牙协议信息对应同一种类型的蓝牙协议。
S207,基于所述第一蓝牙协议信息以及所述第二蓝牙协议信息,与所述蓝牙设备完成所述第一蓝牙协议信息对应的蓝牙协议连接。
具体参见S102,此处不再赘述。
在本申请实施例中,只需要在电子设备作为主设备与蓝牙设备在本轮连接之前(如首次、第二次、每间隔预设轮次)进行连接时通过SDP流程获取到蓝牙设备支持的蓝牙协议并进行保存,当包括多个蓝牙协议类型时,按照相同的方式依次获取各个类型的蓝牙协议对应的蓝牙协议信息并保存,在后续的连接过程中只需要从本地读取蓝牙协议信息即可,节省了SDP流程,连接过程简单方便,并节省了SDP频繁的连接断开消耗的时间,可以提升协议连接速度,进而提升整个蓝牙连接过程的速度,给用户带来更好的使用体验。例如,一般情况下,耳机回连手机的速度一般在2.5s左右,采用本方案手机与蓝牙设备回连的速度会提升至少300~500ms。尤其是当电子设备与蓝牙设备处于干扰比较强的环境时,每次通过SDP连接获取蓝牙设备的蓝牙协议信息可能需要多次交互才能成功,因此,通过实施本方案,在处于强干扰环境时,连接速度提升效果更明显。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参见图8,其示出了本申请一个示例性实施例提供的蓝牙协议连接装置的结构示意图。该蓝牙协议连接装置可以通过软件、硬件或者两者的结合实现成为电子设备的全部或一部分。该装置1应用于电子设备,在所述电子设备作为主设备与蓝牙设备进行本轮连接时,包括第一协议获取模块11和蓝牙协议连接模块12。
第一协议获取模块11,用于获取所述电子设备本地保存的所述蓝牙设备支持的第一蓝牙协议信息,所述第一蓝牙协议信息为所述电子设备作为主设备与所述蓝牙设备在所述本轮连接之前通过查询保存步骤所保存;
蓝牙协议连接模块12,用于基于所述第一蓝牙协议信息与所述蓝牙设备完成所述第一蓝牙协议信息对应的蓝牙协议连接。
可选的,如图9所示,所述装置还包括:
链路创建模块13,用于向所述蓝牙设备发起寻呼以创建异步面向连接链路;
链路认证模块14,用于通过所述异步面向连接链路对链路层数据进行认证。
可选的,所述蓝牙协议连接模块11,具体用于:
获取所述电子设备支持的第二蓝牙协议信息,所述第二蓝牙协议信息和所述第一蓝牙协议信息对应同一种类型的蓝牙协议;
基于所述第一蓝牙协议信息以及所述第二蓝牙协议信息,与所述蓝牙设备完成所述第一蓝牙协议信息对应的蓝牙协议连接。
可选的,所述第一蓝牙协议信息对应的蓝牙协议为所述电子设备和所述蓝牙设备均支持的一种或多种类型蓝牙协议中的任一种;
当所述蓝牙协议类型包括多个时,依次基于每种类型的蓝牙协议,触发所述第一协议获取模块11和所述蓝牙协议连接模块12以完成所述电子设备和所述蓝牙设备之间的所有蓝牙协议连接。
可选的,所述本轮连接之前包括首轮连接、非首轮连接或每间隔预设时长的任一轮连接,所述蓝牙设备为与至少一个蓝牙设备的连接时间距离当前时间最近的蓝牙设备。
可选的,所述查询保存步骤在所述电子设备首次作为主设备与所述蓝牙设备建立蓝牙连接时执行一轮;或者,
所述查询保存步骤在所述电子设备与所述蓝牙设备每连接预设轮次后执行一轮。
可选的,如图9所示,所述装置还包括:
链路创建模块15,用于在所述电子设备作为主设备与蓝牙设备在本轮连接之前进行连接时,向所述蓝牙设备发起寻呼以创建异步面向连接链路,通过所述异步面向连接链路对链路层数据进行认证;
SDP连接模块16,用于通过所述异步面向连接链路,建立与所述蓝牙设备之间的SDP连接;
蓝牙协议保存模块17,用于通过所述SDP连接查询所述蓝牙设备支持的第一蓝牙协议信息,并将所述第一蓝牙协议信息保存至本地;
SDP断开模块18,用于断开所述SDP连接。
可以理解的,查询保存步骤可以包括:通过异步面向连接链路,建立与蓝牙设备之间的SDP连接;通过SDP连接查询所述蓝牙设备支持的第一蓝牙协议信息,并将所述第一蓝牙协议信息保存至本地;断开所述SDP连接。也就是说,查询保存步骤可以通过SDP连接模块16、蓝牙协议保存模块17和SDP断开模块18来执行。
可选的,所述蓝牙协议保存模块17,具体用于:
获取所述电子设备支持的第二蓝牙协议信息中的蓝牙协议类型,通过所述SDP连接以及所述蓝牙协议类型查询所述蓝牙设备支持的第一蓝牙协议信息,并将所述第一蓝牙协议信息保存至本地。
可选的,所述蓝牙协议保存模块17,还用于:
当所述蓝牙协议类型包括多个时,依次基于每个所述蓝牙协议类型,执行所述查询保存步骤,以保存所有所述蓝牙协议类型对应的第一蓝牙协议信息。
需要说明的是,上述实施例提供的蓝牙协议连接装置在执行蓝牙协议连接方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成, 即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的蓝牙协议连接装置与蓝牙协议连接方法实施例属于同一构思,其体现实现过程详见方法实施例,这里不再赘述。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
在本申请实施例中,只需要在电子设备作为主设备与蓝牙设备在本轮连接之前(如首次、第二次、每间隔预设轮次)进行连接时通过SDP流程获取到蓝牙设备支持的蓝牙协议并进行保存,当包括多个蓝牙协议类型时,按照相同的方式依次获取各个类型的蓝牙协议对应的蓝牙协议信息并保存,在后续的连接过程中只需要从本地读取蓝牙协议信息即可,节省了SDP流程,连接过程简单方便,并节省了SDP频繁的连接断开消耗的时间,可以提升协议连接速度,进而提升整个蓝牙连接过程的速度,给用户带来更好的使用体验。尤其是当电子设备与蓝牙设备处于干扰比较强的环境时,每次通过SDP连接获取蓝牙设备的蓝牙协议信息可能需要多次交互才能成功,因此,通过实施本方案,在处于强干扰环境时,连接速度提升效果更明显。
请参见图10,其示出了本申请一个示例性实施例提供的蓝牙耳机的结构示意图。
蓝牙耳机2包括检测电路21和蓝牙电路22,检测电路21被配置用于检测蓝牙回连指令,当检测电路21被配置用于检测到蓝牙回连指令时,检测电路21被配置用于向蓝牙电路22发出蓝牙回连信号,蓝牙电路22被配置用于在接收到蓝牙回连信号后,启动对蓝牙设备的蓝牙回连;蓝牙电路22被配置用于将首次蓝牙回连过程中查询到的蓝牙设备所支持的第一蓝牙协议信息保存至蓝牙耳机的存储器中;
当检测电路21再次检测到蓝牙回连指令时,检测电路21被配置用于向蓝牙电路22发出蓝牙回连信号,蓝牙电路22被配置用于在接收到蓝牙回连信号后,启动对蓝牙设备的蓝牙回连;蓝牙电路22被配置用于在非首次蓝牙回连过程中调取存储器中存储的第一蓝牙协议信息,并被配置用于基于第一蓝牙协议信息进行第一蓝牙协议信息对应的蓝牙协议连接。
可选的,蓝牙电路22在非首次蓝牙回连过程中被配置用于调取存储器中存储的第一蓝牙协议信息,并被配置用于基于第一蓝牙协议信息进行第一蓝牙协议信息对应的蓝牙协议连接,具体为:蓝牙电路22在非首次蓝牙回连过程中被配置用于调取存储器中存储的第一蓝牙协议信息,同时还被配置用于调取本地保存的蓝牙耳机的第二蓝牙协议信息,并还被配置用于基于存储的第一蓝牙协议信息和蓝牙耳机的第二蓝牙协议进行第一蓝牙协议信息对应的蓝牙协议连接;第二蓝牙协议信息和第一蓝牙协议信息对应同一种类型的蓝牙协议。
可选的,存储的第一蓝牙协议信息对应的蓝牙协议为蓝牙设备和蓝牙耳机均支持的一种或多种类型蓝牙协议中的任一种;
当蓝牙协议类型包括多个时,检测电路21和蓝牙电路22被配置用于在非首次蓝牙回连的过程中,依次基于每种类型的蓝牙协议对应的第一蓝牙协议信息和第二蓝牙协议信息进行蓝牙协议连接,以完成蓝牙耳机和蓝牙设备之间的所有蓝牙协议连接。
可选的,当检测电路21再次检测到蓝牙回连指令时,检测电路21被配置用于先向蓝牙电路22发出寻呼信号,蓝牙电路22在接收到寻呼信号后,被配置用于向蓝牙设备发起寻呼以创建异步面向连接链路并通过异步面向连接链路对链路层数据进行认证。
可选的,当检测电路21检测到首次蓝牙回连指令时,或者,检测电路21检测到检测预设轮次后的蓝牙回连指令时,检测电路21被配置用于向蓝牙电路22发出首次蓝牙回连信号,蓝牙电路22在接收到首次蓝牙回连信号后,首次启动与蓝牙设备的蓝牙连接时,或者,启动与蓝牙设备每连接预设轮次后的蓝牙连接,被配置用于向蓝牙设备获取蓝牙设备所支持的第一蓝牙协议信息并保存至蓝牙耳机的存储器中。
可选的,在检测电路21检测到首次蓝牙回连指令时,或者,检测电路21检测到连接预设轮次后的蓝牙回连指令时,检测电路21被配置用于先向蓝牙电路22发出寻呼信号,蓝牙电路22在接收到寻呼信号后,被配置用于向蓝牙设备发起寻呼以创建异步面向连接链路并通过异步面向连接链路对链路层数据进行认证;首次启动与蓝牙设备的蓝牙连接时,或者,启动与蓝牙设备每连接预设轮次后的蓝牙连接,被配置用于向蓝牙设备获取蓝牙设备所支持的第一蓝牙协议并保存至蓝牙耳机的存储器中,具体为:
蓝牙电路22被配置用于通过异步面向连接链路,建立与蓝牙设备之间的SDP连接,通过SDP连接向蓝牙设备查询蓝牙设备支持的第一蓝牙协议信息,并将第一蓝牙协议信息保存至蓝牙耳机的存储器中,再断开SDP连接。
可选的,当蓝牙协议类型包括多个时,检测电路21和蓝牙电路22被配置用于按照上述首次蓝牙回连指令或连接预设轮次后的蓝牙回连指令,依次基于每个蓝牙协议类型,向蓝牙设备获取蓝牙设备所支持的第一蓝牙协议,以保存所有蓝牙协议类型对应的第一蓝牙协议信息至蓝牙耳机的存储器中。
在本申请实施例中,只需要在蓝牙耳机作为主设备与蓝牙设备在本轮连接之前(如首次、第二次、每间隔预设轮次)进行连接时,通过SDP流程获取到蓝牙设备支持的蓝牙协议并进行保存,当包括多个蓝牙协议类型时,按照相同的方式依次获取各个类型的蓝牙协议对应的蓝牙协议信息并保存,在后续的连接过程中只需要从蓝牙耳机的存储器中读取蓝牙协议信息即可,节省了SDP流程,连接过程简单方便,并节省了SDP频繁的连接断开消耗的时间,可以提升协议连接速度,进而提升整个蓝牙连接过程的速度,给用户带来更好的使用体验。尤其是当蓝牙耳机与蓝牙设备处于干扰比较强的环境时,每次通过SDP连接获取蓝牙设备的蓝牙协议信息可能需要多次交互才能成功,因此,通过实施本方案,在处于强干扰环境时,连接速度提升效果更明显。
本申请实施例还提供了一种计算机存储介质,计算机存储介质可以存储有多条指令,指令适于由处理器加载并执行如上述图1-图7所示实施例的方法步骤,具体执行过程可以参见图1-图7所示实施例的具体说明,在此不进行赘述。
请参见图11,为本申请实施例提供了一种电子设备的结构示意图。如图11所示,电子设备1000可以包括:至少一个处理器1001,至少一个网络接口1004,用户接口1003,存储器1005,至少一个通信总线1002。
其中,通信总线1002用于实现这些组件之间的连接通信。
其中,用户接口1003可以包括显示屏(Display)、摄像头(Camera),可选用户接口1003还可以包括标准的有线接口、无线接口。
其中,网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。
其中,处理器1001可以包括一个或者多个处理核心。处理器1001利用各种借口和线路连接整个电子设备1000内的各个部分,通过运行或执行存储在存储器1005内的指令、程序、代码集或指令集,以及调用存储在存储器1005内的数据,执行电子设备1000的各种功能和处理数据。可选的,处理器1001可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1001可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作***、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1001中,单独通过一块芯片进行实现。
其中,存储器1005可以包括随机存储器(RandomAccess Memory,RAM),也可以包括只读存储器(Read-Only Memory)。可选的,该存储器1005包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1005可用于存储指令、程序、代码、代码集或指令集。存储器1005可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作***的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等;存储数据区可存储上面各个方法实施例中涉及到的数据等。存储器1005可选的还可以是至少一个位于远离前述处理器1001的存储装置。如图11所示,作为一种计算机存储介质的存储器1005中可以包括操作***、网络通信模块、用户接口模块以及蓝牙协议连接应用程序。
在图11所示的电子设备1000中,用户接口1003主要用于为用户提供输入的接口,获取用户输入的数据;而处理器1001可以用于调用存储器1005中存储的蓝牙协议连接应用程序,在电子设备作为主设备与蓝牙设备进行本轮连接时,并具体执行以下操作:
获取步骤:获取电子设备本地保存的蓝牙设备支持的第一蓝牙协议信息,第一蓝牙协议信息为电子设备作为主设备与蓝牙设备在本轮连接之前通过查询保存步骤所保存;
连接步骤:基于第一蓝牙协议信息与蓝牙设备完成第一蓝牙协议信息对应的蓝牙协议连接。
在一个实施例中,处理器1001在执行获取步骤之前,还执行以下操作:
向蓝牙设备发起寻呼以创建异步面向连接链路;通过异步面向连接链路对链路层数据进行认证。
在一个实施例中,处理器1001在执行连接步骤时,具体执行以下操作:
获取电子设备支持的第二蓝牙协议信息,第二蓝牙协议信息和第一蓝牙协议信息对应同一种类型的蓝牙协议;基于第一蓝牙协议信息以及第二蓝牙协议信息,与蓝牙设备完成第一蓝牙协议信息对应的蓝牙协议连接。
在一个实施例中,第一蓝牙协议信息对应的蓝牙协议为电子设备和蓝牙设备均支持的一种或多种类型蓝牙协议中的任一种;
当蓝牙协议类型包括多个时,处理器1001依次基于每种类型的蓝牙协议,执行获取步骤和连接步骤以完成电子设备和蓝牙设备之间的所有蓝牙协议连接。
在一个实施例中,查询保存步骤在电子设备首次作为主设备与蓝牙设备建立蓝牙连接时执行一轮;或者,
查询保存步骤在电子设备与蓝牙设备每连接预设轮次后执行一轮。
在一个实施例中,处理器1001在执行在电子设备作为主设备与蓝牙设备在本轮连接之前进行连接时,还执行以下操作:向蓝牙设备发起寻呼以创建异步面向连接链路,通过异步面向连接链路对链路层数据进行认证;通过异步面向连接链路,建立与蓝牙设备之间的SDP连接;通过SDP连接查询蓝牙设备支持的第一蓝牙协议信息,并将第一蓝牙协议信息保存至本地;断开SDP连接。
在一个实施例中,处理器1001在通过SDP连接查询蓝牙设备支持的第一蓝牙协议信息,并将第一蓝牙协议信息保存至本地时,具体执行以下操作:获取电子设备支持的第二蓝牙协议信息中的蓝牙协议类型,通过SDP连接以及蓝牙协议类型查询蓝牙设备支持的第一蓝牙协议信息,并将第一蓝牙协议信息保存至本地。
在一个实施例中,处理器1001还执行以下操作:当蓝牙协议类型包括多个时,依次基于每个蓝牙协议类型,执行查询保存步骤,以保存所有蓝牙协议类型对应的第一蓝牙协议信息。
在本申请实施例中,只需要在电子设备作为主设备与蓝牙设备在本轮连接之前(如首次、第二次、每间隔预设轮次)进行连接时通过SDP流程获取到蓝牙设备支持的蓝牙协议并进行保存,当包括多个蓝牙协议类型时,按照相同的方式依次获取各个类型的蓝牙协议对应的蓝牙协议信息并保存,在后续的连接过程中只需要从本地读取蓝牙协议信息即可,节省了SDP流程,连接过程简单方便,并节省了SDP频繁的连接断开消耗的时间,可以提升协议连接速度,进而提升整个蓝牙连接过程的速度,给用户带来更好的使用体验。尤其是当电子设备与蓝牙设备处于干扰比较强的环境时,每次通过SDP连接获取蓝牙设备的蓝牙协议信息可能需要多次交互才能成功,因此,通过实施本方案,在处于强干扰环境时,连接速度提升效果更明显。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体或随机存储记忆体等。
以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。

Claims (21)

  1. 一种蓝牙协议连接方法,应用于电子设备,在所述电子设备作为主设备与蓝牙设备进行本轮连接时,所述方法包括:
    获取步骤:获取所述电子设备本地保存的所述蓝牙设备支持的第一蓝牙协议信息,所述第一蓝牙协议信息为所述电子设备作为主设备与所述蓝牙设备在所述本轮连接之前通过查询保存步骤所保存;
    连接步骤:基于所述第一蓝牙协议信息与所述蓝牙设备完成所述第一蓝牙协议信息对应的蓝牙协议连接。
  2. 根据权利要求1所述的方法,其中,所述获取步骤之前,还包括:
    向所述蓝牙设备发起寻呼以创建异步面向连接链路;
    通过所述异步面向连接链路对链路层数据进行认证。
  3. 根据权利要求1所述的方法,其中,所述连接步骤,包括:
    获取所述电子设备支持的第二蓝牙协议信息,所述第二蓝牙协议信息和所述第一蓝牙协议信息对应同一种类型的蓝牙协议;
    基于所述第一蓝牙协议信息以及所述第二蓝牙协议信息,与所述蓝牙设备完成所述第一蓝牙协议信息对应的蓝牙协议连接。
  4. 根据权利要求1所述的方法,其中,所述第一蓝牙协议信息对应的蓝牙协议为所述电子设备和所述蓝牙设备均支持的一种或多种类型蓝牙协议中的任一种;
    当所述蓝牙协议类型包括多个时,依次基于每种类型的蓝牙协议,执行所述获取步骤和所述连接步骤以完成所述电子设备和所述蓝牙设备之间的所有蓝牙协议连接。
  5. 根据权利要求1所述的方法,其中,所述查询保存步骤在所述电子设备首次作为主设备与所述蓝牙设备建立蓝牙连接时执行一轮;或者,
    所述查询保存步骤在所述电子设备与所述蓝牙设备每连接预设轮次后执行一轮。
  6. 根据权利要求1所述的方法,其中,在所述电子设备作为主设备与蓝牙设备在所述本轮连接之前进行连接时,还包括:
    向所述蓝牙设备发起寻呼以创建异步面向连接链路,通过所述异步面向连接链路对链路层数据进行认证;
    所述查询保存步骤包括:
    通过所述异步面向连接链路,建立与所述蓝牙设备之间的SDP连接;
    通过所述SDP连接查询所述蓝牙设备支持的第一蓝牙协议信息,并将所述第一蓝牙协议信息保存至本地;
    断开所述SDP连接。
  7. 根据权利要求6所述的方法,其中,所述通过所述SDP连接查询所述蓝牙设备支持的第一蓝牙协议信息,并将所述第一蓝牙协议信息保存至本地,包括:
    获取所述电子设备支持的第二蓝牙协议信息中的蓝牙协议类型,通过所述SDP连接以及所述蓝牙协议类型查询所述蓝牙设备支持的第一蓝牙协议信息,并将所述第一蓝牙协议信息保存至本地。
  8. 根据权利要求1所述的方法,其中,当所述蓝牙协议类型包括多个时,依次基于每个所述蓝牙协议类型,执行所述查询保存步骤,以保存所有所述蓝牙协议类型对应的第一蓝牙协议信息。
  9. 一种蓝牙协议连接装置,应用于电子设备,在所述电子设备作为主设备与蓝牙设备进行本轮连接时,所述装置包括:
    第一协议获取模块,用于获取所述电子设备本地保存的所述蓝牙设备支持的第一蓝牙协议信息,所述第一蓝牙协议信息为所述电子设备作为主设备与所述蓝牙设备在所述本轮连接之前通过查询保存步骤所保存;
    蓝牙协议连接模块,用于基于所述第一蓝牙协议信息与所述蓝牙设备完成所述第一蓝牙协议信息对应的蓝牙协议连接。
  10. 根据权利要求9所述的装置,其中,所述装置还包括:
    链路创建模块,用于向所述蓝牙设备发起寻呼以创建异步面向连接链路;
    链路认证模块,用于通过所述异步面向连接链路对链路层数据进行认证。
  11. 根据权利要求9所述的装置,其中,所述蓝牙协议连接模块,具体用于:
    获取所述电子设备支持的第二蓝牙协议信息,所述第二蓝牙协议信息和所述第一蓝牙协议信息对应同一种类型的蓝牙协议;
    基于所述第一蓝牙协议信息以及所述第二蓝牙协议信息,与所述蓝牙设备完成所述第一蓝牙协议信息对应的蓝牙协议连接。
  12. 根据权利要求9所述的装置,其中,所述第一蓝牙协议信息对应的蓝牙协议为所述电子设备和所述蓝牙设备均支持的一种或多种类型蓝牙协议中的任一种;
    当所述蓝牙协议类型包括多个时,依次基于每种类型的蓝牙协议,触发所述第一协议获取模块和所述蓝牙协议连接模块以完成所述电子设备和所述蓝牙设备之间的所有蓝牙协议连接。
  13. 根据权利要求9所述的装置,其中,所述查询保存步骤在所述电子设备首次作为主设备与所述蓝牙设备建立蓝牙连接时执行一轮;或者,
    所述查询保存步骤在所述电子设备与所述蓝牙设备每连接预设轮次后执行一轮。
  14. 根据权利要求9所述的装置,其中,所述装置还包括:
    链路创建模块,用于在所述电子设备作为主设备与蓝牙设备在本轮连接之前进行连接时,向所述蓝牙设备发起寻呼以创建异步面向连接链路,通过所述异步面向连接链路对链路层数据进行认证;
    所述查询保存步骤包括:
    SDP连接模块,用于通过所述异步面向连接链路,建立与所述蓝牙设备之间的SDP连接;
    蓝牙协议保存模块,用于通过所述SDP连接查询所述蓝牙设备支持的第一蓝牙协议信息,并将所述第一蓝牙协议信息保存至本地;
    SDP断开模块,用于断开所述SDP连接。
  15. 根据权利要求14所述的装置,其中,所述蓝牙协议保存模块,具体用于:
    获取所述电子设备支持的第二蓝牙协议信息中的蓝牙协议类型,通过所述SDP连接以及所述蓝牙协议类型查询所述蓝牙设备支持的第一蓝牙协议信息,并将所述第一蓝牙协议信息保存至本地。
  16. 根据权利要求14所述的装置,其中,所述蓝牙协议保存模块,具体用于:
    当所述蓝牙协议类型包括多个时,依次基于每个所述蓝牙协议类型,执行所述查询保存步骤,以保存所有所述蓝牙协议类型对应的第一蓝牙协议信息。
  17. 一种蓝牙耳机,其中,所述蓝牙耳机包括检测电路和蓝牙电路,所述检测电路被配置用于检测蓝牙回连指令,当所述检测电路检测到蓝牙回连指令时,所述检测电路被配置用于向所述蓝牙电路发出蓝牙回连信号,所述蓝牙电路被配置用于在接收到所述蓝牙回连信号后,启动对蓝牙设备的蓝牙回连;所述蓝牙电路被配置用于将首次蓝牙回连过程中查询到的所述蓝牙设备所支持的第一蓝牙协议信息保存至所述蓝牙耳机的存储器中;
    当所述检测电路再次检测到所述蓝牙回连指令时,所述检测电路被配置用于向所述蓝牙电路发出所述蓝牙回连信号,所述蓝牙电路被配置用于在接收到所述蓝牙回连信号后,启动对所述蓝牙设备的蓝牙回连;所述蓝牙电路被配置用于在非首次蓝牙回连过程中调取所述存储器中存储的所述第一蓝牙协议信息,并被配置用于基于所述第一蓝牙协议信息进行所述第一蓝牙协议对应的蓝牙协议连接。
  18. 根据权利要求17所述的蓝牙耳机,其中,所述蓝牙电路在非首次蓝牙回连过程中被配置用于调取所述存储器中存储的所述第一蓝牙协议信息,并被配置用于基于所述第一蓝牙协议信息进行所述第一蓝牙协议对应的蓝牙协议连接,包括:
    所述蓝牙电路在非首次蓝牙回连过程中被配置用于调取所述存储器中存储的所述第一蓝牙协议信息,同时还被配置用于调取本地保存的所述蓝牙耳机的第二蓝牙协议信息,并还被配置用于基于所述存储的所述第一蓝牙协议信息和所述蓝牙耳机的第二蓝牙协议信息进行所述第一蓝牙协议对应的蓝牙协议连接;所述第二蓝牙协议信息和所述第一蓝牙协议信息对应同一种类型的蓝牙协议。
  19. 根据权利要求18所述的蓝牙耳机,所述存储的所述第一蓝牙协议信息对应的蓝牙协议为所述蓝牙设备和所述蓝牙耳机均支持的一种或多种类型蓝牙协议中的任一种;
    当所述蓝牙协议类型包括多个时,所述检测电路和所述蓝牙电路被配置用于在所述非首次蓝牙回连的过程中,依次基于每种类型的蓝牙协议对应的第一蓝牙协议信息和第二蓝牙协议信息进行蓝牙协议连接,以完成所述蓝牙耳机和所述蓝牙设备之间的所有蓝牙协议连接。
  20. 一种计算机存储介质,所述计算机存储介质存储有多条指令,所述指令适于由处理器加载并执行如权利要求1~8任意一项的方法步骤。
  21. 一种电子设备,包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行如权利要求1~8任意一项的方法步骤。
PCT/CN2021/096230 2020-05-29 2021-05-27 蓝牙协议连接方法、装置、存储介质及相关设备 WO2021239032A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010479396.8A CN113810887B (zh) 2020-05-29 2020-05-29 蓝牙协议连接方法、装置、存储介质及相关设备
CN202010479396.8 2020-05-29

Publications (1)

Publication Number Publication Date
WO2021239032A1 true WO2021239032A1 (zh) 2021-12-02

Family

ID=78745616

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/096230 WO2021239032A1 (zh) 2020-05-29 2021-05-27 蓝牙协议连接方法、装置、存储介质及相关设备

Country Status (2)

Country Link
CN (1) CN113810887B (zh)
WO (1) WO2021239032A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114786139A (zh) * 2022-02-28 2022-07-22 Oppo广东移动通信有限公司 连接建立方法、装置、设备、存储介质及程序产品

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075828A (zh) * 2007-07-20 2007-11-21 中兴通讯股份有限公司 终端与音频设备建立连接的方法
WO2013016084A1 (en) * 2011-07-25 2013-01-31 Motorola Mobility Llc Methods and apparatuses for providing profile information in a bluetooth communication system
CN106792483A (zh) * 2017-01-20 2017-05-31 北京信安世纪科技有限公司 移动平台与蓝牙设备的连接方法和连接装置
US20190289442A1 (en) * 2018-03-14 2019-09-19 I/O Interconnect, Ltd. Wireless connecting method, backup device, and non-transitory backup device-readable storage medium
CN110460984A (zh) * 2019-08-16 2019-11-15 深圳市中擎创科技有限公司 基于分布式存储的多蓝牙控制方法、***、终端及存储
US20200068491A1 (en) * 2017-10-27 2020-02-27 Avago Technologies International Sales Pte. Limited Apparatus to save power smartly from bluetooth audio visual remote control protocol notifications

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127538B (zh) * 2007-09-19 2011-11-23 中兴通讯股份有限公司 不同蓝牙设备间自适应的匹配方法
CN106255051A (zh) * 2016-09-23 2016-12-21 歌尔科技有限公司 一种蓝牙设备的连接方法及设备
US10165613B2 (en) * 2016-10-06 2018-12-25 Htc Corporation Control method for bluetooth communication and bluetooth low energy communication
CN107231627B (zh) * 2017-08-10 2020-11-10 乐鑫信息科技(上海)股份有限公司 一种蓝牙网络及配网方法
CN113225693B (zh) * 2019-04-18 2022-04-15 华为技术有限公司 一种蓝牙连接方法、设备及***

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075828A (zh) * 2007-07-20 2007-11-21 中兴通讯股份有限公司 终端与音频设备建立连接的方法
WO2013016084A1 (en) * 2011-07-25 2013-01-31 Motorola Mobility Llc Methods and apparatuses for providing profile information in a bluetooth communication system
CN106792483A (zh) * 2017-01-20 2017-05-31 北京信安世纪科技有限公司 移动平台与蓝牙设备的连接方法和连接装置
US20200068491A1 (en) * 2017-10-27 2020-02-27 Avago Technologies International Sales Pte. Limited Apparatus to save power smartly from bluetooth audio visual remote control protocol notifications
US20190289442A1 (en) * 2018-03-14 2019-09-19 I/O Interconnect, Ltd. Wireless connecting method, backup device, and non-transitory backup device-readable storage medium
CN110460984A (zh) * 2019-08-16 2019-11-15 深圳市中擎创科技有限公司 基于分布式存储的多蓝牙控制方法、***、终端及存储

Also Published As

Publication number Publication date
CN113810887B (zh) 2023-07-14
CN113810887A (zh) 2021-12-17

Similar Documents

Publication Publication Date Title
US11812485B2 (en) Bluetooth communication method and terminal
EP3893109B1 (en) Method and device for connecting bluetooth devices
WO2020200127A1 (zh) 业务连接建立方法、蓝牙主设备、芯片及蓝牙***
CN107889092B (zh) 蓝牙设备通信控制方法、装置、终端设备及存储介质
US8825873B2 (en) Using a service discovery request to find available devices
WO2019090726A1 (zh) 选择蓝牙设备的方法、终端和***
WO2014047853A1 (zh) 一种蓝牙设备之间连接的方法及设备
WO2012142794A1 (zh) 蓝牙配件配对蓝牙设备的方法及蓝牙配件
WO2021254160A1 (zh) 蓝牙设备及其蓝牙抢占方法和装置、计算机可读存储介质
WO2018082335A1 (zh) 连接蓝牙设备的方法、装置、***及设备
US10863559B2 (en) Method and apparatus for communicating in a wireless communication network
US20160299739A1 (en) Method for controlling data streaming using bluetooth communication
US11991612B2 (en) Bluetooth data transmission method and apparatus, terminal and storage medium
EP3240269B1 (en) A headset adapter and a headset system
WO2014110855A1 (zh) 一种数据传输的方法及终端
WO2020132878A1 (zh) 一种蓝牙服务的查询方法及电子设备
JP2021521737A (ja) アクセス制御方法、メッセージ放送方法及び関連装置
WO2021239032A1 (zh) 蓝牙协议连接方法、装置、存储介质及相关设备
WO2015139401A1 (zh) 无线网络的建立方法、***及无线路由装置
WO2024066694A1 (zh) 音频设备的连接方法、装置、存储介质及设备
WO2024041189A1 (zh) 一种无线音频/视频装置和无线通信方法
WO2023151423A1 (zh) 设备连接方法、装置、设备及存储介质
WO2023061273A1 (zh) 设备连接方法、装置、电子设备以及存储介质
WO2024016885A1 (zh) 蓝牙连接方法、装置、电子设备及计算机可读存储介质
WO2024001134A1 (zh) 音频设备的连接方法、装置、存储介质及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21813939

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21813939

Country of ref document: EP

Kind code of ref document: A1