WO2018032455A1 - 一种蓝牙通信的方法及终端 - Google Patents

一种蓝牙通信的方法及终端 Download PDF

Info

Publication number
WO2018032455A1
WO2018032455A1 PCT/CN2016/095836 CN2016095836W WO2018032455A1 WO 2018032455 A1 WO2018032455 A1 WO 2018032455A1 CN 2016095836 W CN2016095836 W CN 2016095836W WO 2018032455 A1 WO2018032455 A1 WO 2018032455A1
Authority
WO
WIPO (PCT)
Prior art keywords
bluetooth
bluetooth headset
terminal
headset
user
Prior art date
Application number
PCT/CN2016/095836
Other languages
English (en)
French (fr)
Inventor
黄康敏
董明杰
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP16913212.3A priority Critical patent/EP3493643B1/en
Priority to PCT/CN2016/095836 priority patent/WO2018032455A1/zh
Priority to CN202110538077.4A priority patent/CN113411793A/zh
Priority to CN201680088578.4A priority patent/CN109644216A/zh
Publication of WO2018032455A1 publication Critical patent/WO2018032455A1/zh
Priority to US16/278,222 priority patent/US11129218B2/en
Priority to US17/406,780 priority patent/US11812485B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • H04M1/6033Substation equipment, e.g. for use by subscribers including speech amplifiers for providing handsfree use or a loudspeaker mode in telephone sets
    • H04M1/6041Portable telephones adapted for handsfree use
    • H04M1/6058Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone
    • H04M1/6066Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone including a wireless connection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • 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
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/022Selective call receivers
    • H04W88/023Selective call receivers with message or information receiving capability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/38Transceivers, i.e. devices in which transmitter and receiver form a structural unit and in which at least one part is used for functions of transmitting and receiving
    • H04B1/3827Portable transceivers
    • H04B1/385Transceivers carried on the body, e.g. in helmets
    • H04B2001/3866Transceivers carried on the body, e.g. in helmets carried on the head
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/02Details of telephonic subscriber devices including a Bluetooth interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a Bluetooth communication method and terminal.
  • Bluetooth technology is a short-range wireless communication technology. It replaces the cable connection between digital devices and computers and mobile phone peripherals based on low-cost short-range wireless connection. Realize wireless networking between digital devices.
  • Bluetooth technology is widely used in Bluetooth headsets, car hands-free Bluetooth and so on.
  • many applications supporting Bluetooth headsets have appeared, which has brought great convenience to users of the terminal.
  • the wireless call of the telephone can be realized without requiring the user to hold the terminal, which reduces the burden on the user, and can also reduce the radiation of the mobile phone to the user's brain.
  • the stereo music can be played through the Bluetooth earphone, which reduces the occupation of the space and the audio line to the user compared with the conventional wired earphone.
  • the existing terminal can usually only connect one Bluetooth headset for communication, and the user cannot use two or more Bluetooth headsets to play music or answer the call, which cannot satisfy the user's use more than one Bluetooth headset. At the same time, communication needs with the terminal.
  • the technical problem to be solved by the embodiments of the present invention is to provide a method and a terminal for Bluetooth communication. It enables the terminal to simultaneously communicate with more than one Bluetooth headset at the same time.
  • an embodiment of the present invention provides a method for Bluetooth communication, including:
  • the Bluetooth headset working mode includes an exclusive mode and a non-exclusive mode
  • the terminal creates a headset tag object for a designated Bluetooth headset and establishes a communication link, and performs Bluetooth communication with the designated one Bluetooth headset;
  • the terminal separately creates a headset label for all Bluetooth headsets. Signing objects and establishing communication links respectively, performing Bluetooth communication simultaneously with more than one Bluetooth headset selected by the user, or simultaneously performing Bluetooth communication with all Bluetooth headsets having established communication links; wherein the headset label object Contains information for establishing a communication link with the terminal.
  • the terminal can receive the association request of at least two Bluetooth headset devices.
  • the terminal can communicate with at least two Bluetooth headsets according to the needs of the user, thereby expanding the function and applicability of the terminal. Improve the user experience, which is convenient for single or multiple users to use the terminal and multiple Bluetooth headsets according to their needs.
  • the method when the terminal establishes a communication link with the Bluetooth headset, the method includes:
  • a synchronous connection-oriented link setup request is sent to the connected Bluetooth headset to establish a synchronization-oriented connection link with the connected Bluetooth headset.
  • a communication link can be established for two or more Bluetooth headsets respectively, thereby realizing the effect of using two or more Bluetooth headsets to communicate with the terminal according to the needs of the user.
  • the method before determining whether the number of Bluetooth headsets currently connected to the terminal is greater than one, the method further includes:
  • a headset label object is created and established for the Bluetooth headset.
  • a communication link for Bluetooth communication with the Bluetooth headset is created and established.
  • a headset tag object is directly created for the Bluetooth headset and a communication link is established to ensure normal Bluetooth communication.
  • the user is prompted to select whether to switch the Bluetooth headset working mode. If the user chooses to switch to the non-exclusive mode, the user is further prompted to select a Bluetooth headset that simultaneously performs audio transmission.
  • the application of the multi-headphone communication mode in different scenarios can be fully utilized, and the applicability and intelligence of the terminal are improved.
  • a fifth possible implementation manner of the first aspect when the user uses the terminal and the Bluetooth headset for audio transmission of the non-incoming call, the user is prompted to select at least one Bluetooth headset to answer the call.
  • the multi-headphone communication mode can be fully utilized to receive an application in an incoming call scene during music playback, thereby improving the applicability and intelligence of the terminal.
  • an embodiment of the present invention provides a terminal, including:
  • a receiving unit configured to receive a multi-Bluetooth headset communication command input by the user when the user uses the terminal and the Bluetooth headset for audio transmission;
  • a determining unit configured to determine whether the number of Bluetooth headsets currently connected to the terminal is greater than one
  • a reading unit configured to read a Bluetooth headset working mode selected by a user if the number of Bluetooth headsets currently connected to the terminal is greater than one, the Bluetooth headset working mode includes an exclusive mode and a non-exclusive mode;
  • a communication unit configured to create a headset tag object for a designated Bluetooth headset and establish a communication link to perform Bluetooth communication with the designated one of the Bluetooth headsets if the user selects the exclusive mode; if the user selects the non-exclusive mode, Separately creating a headset tag object for all Bluetooth headsets and establishing a communication link, simultaneously performing Bluetooth communication with more than one Bluetooth headset selected by the user, or simultaneously performing Bluetooth communication with all Bluetooth headsets having established communication links;
  • the headset tag object includes information for establishing a communication link with the terminal.
  • the communication unit when the terminal establishes a communication link with the Bluetooth headset, the communication unit is specifically configured to:
  • the determining unit is further configured to:
  • the communication unit is further configured to:
  • a headset tag object is created for the Bluetooth headset and a communication link is established, and Bluetooth communication is performed with the Bluetooth headset.
  • the terminal further includes:
  • a prompting unit when the user uses the terminal and the Bluetooth headset for audio transmission, if a new Bluetooth headset is accessed, the user is prompted to select whether to switch to a new Bluetooth headset for audio transmission;
  • the user is prompted to select whether to switch the Bluetooth headset working mode. If the user chooses to switch to the non-exclusive mode, the user is further prompted to select a Bluetooth headset that simultaneously performs audio transmission.
  • the terminal further includes:
  • the prompting unit is configured to prompt the user to select at least one Bluetooth headset to answer the call when the user uses the terminal and the Bluetooth headset to perform audio transmission of the non-incoming call.
  • an embodiment of the present invention provides a terminal, including:
  • the Bluetooth wireless transceiver is configured to perform Bluetooth communication with a Bluetooth headset
  • the display screen is used for human-computer interaction and prompting a user to input a selection instruction
  • the speaker is used to play a sound
  • the memory is used to store a set of programs.
  • the processor is configured to invoke program code stored in the memory, and perform the following operations:
  • the Bluetooth headset working mode includes an exclusive mode and a non-exclusive mode
  • the processor creates a headset tag object for the designated one Bluetooth headset and establishes a communication link with the designated one Bluetooth headset through the Bluetooth wireless transceiver, with the designated one Bluetooth headset for Bluetooth communication;
  • the processor separately creates a headset tag object for all the Bluetooth headsets and establishes a communication link with all the Bluetooth headsets through the Bluetooth wireless transceiver, and more than one Bluetooth selected by the user.
  • the headset performs Bluetooth communication at the same time, or performs Bluetooth communication with all Bluetooth headsets that have established a communication link;
  • the headset tag object includes information for establishing a communication link with the terminal.
  • the processor when the terminal establishes a communication link with the Bluetooth headset, the processor is specifically configured to:
  • a synchronous connection-oriented link setup request is sent to the connected Bluetooth headset to establish a synchronization-oriented connection link with the connected Bluetooth headset.
  • the processor is further configured to:
  • the processor is configured to create the Bluetooth headset
  • the headset tag object establishes a communication link with the Bluetooth headset through the Bluetooth wireless transceiver, and performs Bluetooth communication with the Bluetooth headset.
  • the processor is configured to instruct the display screen to display a prompt message, prompting the user to select whether to switch to a new Bluetooth headset for audio transmission;
  • the user is prompted to select whether to switch the Bluetooth headset working mode. If the user chooses to switch to the non-exclusive mode, the user is further prompted to select a Bluetooth headset that simultaneously performs audio transmission.
  • the processor when the user uses the terminal and the Bluetooth headset to perform non-incoming call audio transmission
  • the processor is configured to instruct the display screen to display a prompt message, prompting the user to select at least one Bluetooth headset to answer the call.
  • an embodiment of the present invention provides a computer storage medium, the computer storage medium comprising a set of program code, for performing the method according to any implementation manner of the first aspect of the embodiment of the present invention.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for Bluetooth communication provided by the present invention
  • FIG. 2 is a schematic flowchart diagram of a second embodiment of a method for Bluetooth communication provided by the present invention.
  • FIG. 3 is a schematic flowchart diagram of a third embodiment of a method for Bluetooth communication according to the present invention.
  • FIG. 4 is a schematic structural diagram of a first embodiment of a terminal according to the present invention.
  • FIG. 5 is a schematic structural diagram of a second embodiment of a terminal according to the present invention.
  • FIG. 6 is a schematic structural diagram of a third embodiment of a terminal according to the present invention.
  • the terminal in the embodiment of the present invention may include a smart phone (such as an Android mobile phone, an iOS mobile phone, a Windows Phone mobile phone, etc.), a tablet computer, a palmtop computer, a notebook computer, a mobile Internet device (MID) or a wearable device.
  • a smart phone such as an Android mobile phone, an iOS mobile phone, a Windows Phone mobile phone, etc.
  • a tablet computer such as an Android mobile phone, an iOS mobile phone, a Windows Phone mobile phone, etc.
  • a palmtop computer such as a notebook computer
  • MID mobile Internet device
  • the terminal is provided with a Bluetooth communication module, and can perform Bluetooth communication with the Bluetooth headset, including making a call and playing music, etc., which is not limited in the embodiment of the present invention.
  • the Bluetooth headset in the embodiment of the present invention may be a Bluetooth mono headset or a Bluetooth stereo headset, and the embodiment of the present invention is also not limited.
  • the present invention mainly relates to improvements in the terminal related to Bluetooth communication and Bluetooth management. Optimize the link between the Bluetooth module and the relationship management between the Bluetooth devices, so that the existing terminal can support one terminal to associate multiple Bluetooth headsets at the same time.
  • the Android system Take the Android system as an example. Under the Android system architecture, the android.bluetooth package is the main software module involved in the Bluetooth protocol and Bluetooth device and associated management management.
  • the BluetoothAdapter class represents the local Bluetooth adapter, while the BluetoothDevice class represents the remote Bluetooth device.
  • the terminal After the Bluetooth headset is paired with the terminal, the terminal records the headset status in the BluetoothDevice module, and queries the service provided by the headset through the Service Discovery Protocol (SDP) service, and records the service type in the headset status.
  • SDP Service Discovery Protocol
  • the terminal's application needs to establish a Synchronous Connection Oriented (SCO)
  • SCO Synchronous Connection Oriented
  • the BluetoothDevice is created with the Bluetooth controller activated. Similar to Bluetooth communication and Bluetooth management in other operating systems, the terminal also needs to save some status information of the Bluetooth headset, which can be paired with and managed by the Bluetooth headset.
  • the Bluetooth communication method of the present invention will be described in detail below in conjunction with specific embodiments.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for Bluetooth communication provided by the present invention.
  • the method includes:
  • the audio transmission between the terminal and the Bluetooth headset may be performed when the system application of the terminal is executed, and may include, but is not limited to, a call application, a voice mailbox application, a recording application, a music playing application, and a video playing application provided by the system. It can also be performed when executing other third-party applications, including but not limited to audio-visual applications, such as common music playing applications, video playing applications including audio, broadcast listening applications, and e-book voice playing applications; third-party applications Can also include common instant messaging Letter application with voice chat or video chat.
  • the method described in this embodiment can be used for multi-Bluetooth communication.
  • the multiple Bluetooth headset communication command may input or configure an option for the user to select in the Bluetooth setting interface, or may input the display interface input or the call interface input in the music play application, or the call interface input, in the display interface of any application, in the embodiment of the present invention No restrictions are imposed.
  • step S102 Determine whether the number of Bluetooth headsets currently connected to the terminal is greater than one. If yes, step S103 is performed.
  • the Bluetooth headset working mode includes an exclusive mode and a non-exclusive mode.
  • exclusive mode only one Bluetooth headset works, and Bluetooth communication with the terminal, such as making a call or music playback.
  • non-exclusive mode there can be two or more Bluetooth headsets working in conjunction with the terminal for Bluetooth communication.
  • the terminal creates a Headset Base object for the designated one Bluetooth headset and establishes a communication link, and performs Bluetooth communication with the designated one Bluetooth headset.
  • the designated one Bluetooth headset is a Bluetooth headset selected by the user or a Bluetooth headset preset by the user or a Bluetooth headset that is newly paired with the terminal.
  • the terminal separately creates a headset tag object for all the Bluetooth headsets and establishes a communication link respectively, and simultaneously performs Bluetooth communication with more than one Bluetooth headset selected by the user, or The Bluetooth headset that has established the communication link performs Bluetooth communication at the same time.
  • the headset tag object includes information for establishing a communication link with the terminal.
  • the address information of the Bluetooth headset, the service that the Bluetooth headset can provide, etc. can be used to implement the main functions of the headset communication (such as the establishment and release of the communication link, the volume adjustment and other functions).
  • the Bluetooth headset should be paired first. Only when the pairing is successful, the communication between the Bluetooth devices can be This is done, and the mutual transmission between Bluetooth communications is based on a unique Media Access Control (Media Access Control).
  • Media Access Control Media Access Control
  • the Android system is used to create a plurality of BluetoothDevices according to the number of Bluetooth headsets selected by the user and the getRemoteDevice(String) method provided by the Android platform.
  • the headset label object Collectively referred to as the headset label object), in fact this class is a simple package of Bluetooth hardware addresses. This class of operations is performed on the remote Bluetooth hardware address, which can be created using a Bluetooth adapter. Therefore, the terminal can not communicate with the Bluetooth headset, and it is necessary to create a headset tag object and establish a communication link before Bluetooth communication with the Bluetooth headset.
  • the communication link establishment process is as follows:
  • the terminal If the terminal is the master device, the terminal initiates a Serial COM emulation (RFCOMM) connection to the device of the selected Bluetooth address, such as a Bluetooth headset.
  • RCOMM Serial COM emulation
  • the terminal can send a ringing command.
  • the Bluetooth headset receives the ringing indication, it will ring the ringing tone.
  • the user can press the Talk button to agree to establish.
  • the terminal receives the response message returned by the Bluetooth headset, and establishes a serial port emulation protocol connection with the Bluetooth headset.
  • the terminal After the RFCOMM connection is established, the terminal initiates a Synchronous Connection Oriented (SCO) setup request.
  • SCO Synchronous Connection Oriented
  • the Bluetooth wireless communication hardware provides two different physical links, namely Synchronous Connection Oriented (SCO) and Asynchronous Connection Less (ACL), it needs to be generated according to the user.
  • SCO Synchronous Connection Oriented
  • ACL Asynchronous Connection Less
  • the Bluetooth headset is mainly used to transmit voice for design. Therefore, when the terminal is paired with the Bluetooth headset, the software corresponding to the terminal operating system selects to establish an SCO link with two or more Bluetooth headsets respectively.
  • the headset status is recorded in the Bluetooth Device class, and the service provided by the headset is queried through the SDP service, and the service type is recorded in the headset status.
  • the Bluetooth headset is registered, if the application on the terminal needs to establish a SCO link, the correct status can be obtained through the records in the Bluetooth Device class.
  • the multi-headphone communication mode of the terminal is started by receiving a multi-Bluetooth headset communication command input by the user, and then determining whether the number of Bluetooth headsets currently connected to the terminal is More than one; if yes, the user selects the Bluetooth headset working mode; if the user selects the exclusive mode, the terminal is a designated Bluetooth headset Establishing a headset tag object and establishing a communication link, performing Bluetooth communication with the specified one Bluetooth headset; if the user selects a non-exclusive mode, the terminal separately creates a headset tag object for each Bluetooth headset and establishes a communication link respectively.
  • Bluetooth communication is performed simultaneously with more than one Bluetooth headset selected by the user, or Bluetooth communication is simultaneously performed with all Bluetooth headsets that have established a communication link. Therefore, the terminal can accept the association request of at least two Bluetooth headset devices.
  • the terminal can communicate with at least two Bluetooth headsets according to the needs of the user, thereby expanding the function and applicability of the terminal, and improving the user.
  • the user experience is beneficial for single or multiple users to use the terminal and multiple Bluetooth headsets according to their needs.
  • FIG. 2 is a schematic flowchart diagram of a second embodiment of a method for Bluetooth communication provided by the present invention.
  • the method includes:
  • the terminal can determine whether there is currently a paired Bluetooth headset.
  • step S203 is performed. If there is no paired Bluetooth headset, the audio can be played by using the speaker to play the audio or using the microphone to complete the audio transmission. That is, there is no Bluetooth headset paired with the terminal at this time.
  • the user chooses to use the multi-headphone communication mode, since there is no pairing of the headphones, only the microphone and/or the speaker can be used to ensure the normal realization of the terminal call or the music playing function, of course, Increasing the privacy, it can also be configured to be silent here, and the embodiment of the present invention does not impose any limitation.
  • the terminal can determine whether the terminal has a paired Bluetooth headset by accessing the number of Bluetooth device connection information on the Bluetooth device Service module, and the connection can be established only after pairing.
  • step S203 Determine whether the number of Bluetooth headsets currently connected to the terminal is greater than one. If yes, go to step S204, otherwise go to step S205.
  • the audio transmission S204 reads the working mode of the Bluetooth headset selected by the user.
  • the Bluetooth headset working mode includes an exclusive mode and a non-exclusive mode.
  • the terminal creates a headset tag object for the specified one Bluetooth headset and establishes a communication link, and performs Bluetooth communication with the designated one Bluetooth headset.
  • the terminal separately creates a headset tag object for all the Bluetooth headsets and establishes a communication link respectively, and simultaneously communicates with more than one Bluetooth headset selected by the user, or A Bluetooth headset that establishes a communication link performs Bluetooth communication at the same time.
  • the headset tag object includes information for establishing a communication link with the terminal.
  • the processing strategy when the number of paired or connected headphones is insufficient is increased.
  • the speaker is used to play the sound
  • the microphone is used to pick up the sound.
  • the earphone is directly used. Establishing a communication link for Bluetooth communication improves the applicability of the terminal and ensures the normal operation of the call and music playback.
  • FIG. 3 is a schematic flowchart diagram of a third embodiment of a method for Bluetooth communication provided by the present invention.
  • the steps S301 to S307 are the same as the steps S201 to 207, and are not described here.
  • the method further includes:
  • the user is prompted to select whether to switch the Bluetooth headset working mode. If the user chooses to switch to the non-exclusive mode, the user is further prompted to select a Bluetooth headset that simultaneously performs audio transmission.
  • Step S308 is more suitable for the scene that was originally in the exclusive mode.
  • non-exclusive mode scenarios when there is a new Bluetooth headset access, you can directly activate and use the new Bluetooth headset for non-exclusive mode, or you can switch to exclusive mode directly, using only the new Bluetooth headset.
  • the embodiment of the invention is not limited at all.
  • Step S309 is more suitable for the scene that was originally in the non-exclusive mode.
  • the importance of the call based is usually higher than the audio transmission of the non-incoming call.
  • the Bluetooth headset can be directly switched from the non-incoming call audio transmission to the call, and the non-incoming call is resumed when the call ends. of Audio transmission.
  • the strategy of using multiple Bluetooth communication modes in various scenarios is specifically described.
  • the user's different needs can be fully satisfied, the applicability and intelligence of the terminal are improved, and the user's Use experience.
  • the terminal includes:
  • the receiving unit 100 is configured to receive a multi-Bluetooth headset communication command input by the user when the user uses the terminal and the Bluetooth headset for audio transmission;
  • the determining unit 200 is configured to determine whether the number of Bluetooth headsets currently connected to the terminal is greater than one;
  • the reading unit 300 is configured to: if the number of Bluetooth headsets currently connected to the terminal is greater than one, read a Bluetooth headset working mode selected by the user, where the Bluetooth headset working mode includes an exclusive mode and a non-exclusive mode;
  • the communication unit 400 is configured to: if the user selects the exclusive mode, create a headset tag object for the specified one of the Bluetooth headsets and establish a communication link, and perform Bluetooth communication with the designated one of the Bluetooth headsets; if the user selects the non-exclusive mode , respectively, create a headset tag object for all Bluetooth headsets and establish a communication link respectively, perform Bluetooth communication simultaneously with more than one Bluetooth headset selected by the user, or perform Bluetooth communication simultaneously with all Bluetooth headsets that have established communication links. ;
  • the headset tag object includes information for establishing a communication link with the terminal.
  • the communication unit 400 is specifically configured to:
  • a synchronous connection-oriented link setup request is sent to the connected Bluetooth headset to establish a synchronization-oriented connection link with the connected Bluetooth headset.
  • the determining unit 200 is further configured to:
  • the communication unit 400 is also used to use the speaker and / Or a microphone for audio transmission;
  • the step of determining whether the number of Bluetooth headsets currently connected to the terminal is greater than one is performed.
  • the communication unit 400 is further configured to:
  • a headset tag object is created for the Bluetooth headset and a communication link is established, and Bluetooth communication is performed with the Bluetooth headset.
  • the terminal further includes:
  • the prompting unit 500 is configured to prompt the user to select whether to switch to a new Bluetooth headset for audio transmission if the user uses the terminal and the Bluetooth headset for audio transmission, or if there is a new Bluetooth headset access; or
  • the user is prompted to select whether to switch the Bluetooth headset working mode. If the user chooses to switch to the non-exclusive mode, the user is further prompted to select a Bluetooth headset that simultaneously performs audio transmission.
  • the user uses the terminal and the Bluetooth headset to perform the non-incoming call audio transmission, if the incoming call is received, the user is prompted to select at least one Bluetooth headset to answer the call.
  • the foregoing receiving unit 100, the determining unit 200, the reading unit 300, the communication unit 400, and the prompting unit 500 may exist independently or may be integrated, and the receiving unit 100, the determining unit 200, and the reading in the above terminal embodiment
  • the taking unit 300, the communication unit 400 or the prompting unit 500 may be separately set in hardware form independently of the processor of the terminal, and may be in the form of a microprocessor; or may be embedded in the processor of the terminal in hardware form. It can also be stored in the memory of the terminal in software, so that the processor of the terminal invokes the operations corresponding to the above receiving unit 100, the determining unit 200, the reading unit 300, the communication unit 400, and the prompting unit 500.
  • the communication unit 400 may be a processor of the terminal, and the receiving unit 100, the determining unit 200, the reading unit 300, and the prompting unit 500
  • the functions may be embedded in the processor, or may be set separately from the processor, or may be stored in the memory in the form of software, which is called by the processor to implement its functions.
  • the above processor may be a central processing unit (CPU), a microprocessor, a single chip microcomputer, or the like.
  • FIG. 6 is a schematic diagram of a composition of a terminal according to an embodiment of the present invention.
  • the terminal includes:
  • the speaker 1106 is connected and completes communication with each other through the bus 1107, wherein the Bluetooth wireless transceiver 1104 is used for Bluetooth communication with a Bluetooth headset, and the display screen 1105 is used for human-computer interaction and prompting the user to input a selection instruction.
  • the speaker 1106 is configured to play a sound
  • the memory 1102 is configured to store a set of program codes
  • the processor 1101 is configured to invoke the program code stored in the memory 1102 to perform the following operations:
  • the Bluetooth headset working mode includes an exclusive mode and a non-exclusive mode
  • the processor 1101 creates a headset tag object for the designated one Bluetooth headset and establishes a communication link with the designated one Bluetooth headset through the Bluetooth wireless transceiver 1104, and the designation a Bluetooth headset for Bluetooth communication;
  • the processor 1101 creates a headset tag object for all the Bluetooth headsets respectively and establishes a communication link with all the Bluetooth headsets through the Bluetooth wireless transceiver 1104, and more than one selected by the user.
  • the Bluetooth headset performs Bluetooth communication at the same time, or performs Bluetooth communication with all Bluetooth headsets that have established communication links;
  • the headset tag object includes information for establishing a communication link with the terminal.
  • the processor 1101 when the communication link is established between the terminal and the Bluetooth headset, the processor 1101 is specifically configured to:
  • a synchronous connection-oriented link setup request is sent to the connected Bluetooth headset to establish a synchronization-oriented connection link with the connected Bluetooth headset.
  • processor 1101 is further configured to:
  • the processor 1101 is configured to create a headset tag object for the Bluetooth headset and establish a communication link with the Bluetooth headset through the Bluetooth wireless transceiver 1104 to perform Bluetooth communication with the Bluetooth headset.
  • the processor 1101 when the user uses the terminal and the Bluetooth headset for audio transmission, if a new Bluetooth headset is accessed, the processor 1101 is configured to instruct the display screen 1105 to display a prompt message, prompting the user to select whether to switch to the new one. Bluetooth headset for audio transmission; or
  • the user is prompted to select whether to switch the Bluetooth headset working mode. If the user chooses to switch to the non-exclusive mode, the user is further prompted to select a Bluetooth headset that simultaneously performs audio transmission.
  • the processor 1101 is configured to instruct the display 1105 to display the prompt information, prompting the user to select at least one Bluetooth headset to answer the call.
  • the processor 1101 herein may be a processor or a collective name of multiple processing elements.
  • the processor may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. .
  • the memory 1102 can be a storage device, or a collective name of a plurality of storage elements, and can be used to store executable program code or parameters, data, and the like required for operation of the access network device.
  • the memory 1102 may include random access memory (RAM), and may also include non-volatile memory such as a magnetic disk memory, a flash memory, or the like.
  • the bus 1107 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 6, but it does not mean that there is only one bus or one type of bus.
  • the present invention has the following advantages:
  • the multi-headphone communication mode of the terminal is turned on by receiving a multi-Bluetooth headset communication command input by the user, and then it is determined whether the number of Bluetooth headsets currently connected to the terminal is greater than one; if yes, Reading the Bluetooth headset working mode selected by the user; if the user selects the exclusive mode, the terminal creates a headset label object for the specified one Bluetooth headset.
  • the terminal can accept the association request of at least two Bluetooth headset devices.
  • the terminal can communicate with at least two Bluetooth headsets according to the needs of the user, thereby expanding the function and applicability of the terminal, and improving the user.
  • the user experience is beneficial for single or multiple users to use the terminal and multiple Bluetooth headsets according to their needs.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

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

Abstract

本发明实施例公开一种蓝牙通信的方法及终端,方法包括:当用户使用终端和蓝牙耳机进行音频传输时,接收用户输入的多蓝牙耳机通信指令;判断当前与终端连接的蓝牙耳机数量是否大于一个;若是,则读取用户选择的蓝牙耳机工作模式,蓝牙耳机工作模式包括独占模式和非独占模式;若是独占模式,则为指定的一个蓝牙耳机创建耳机标签对象并建立通信链路,与指定的一个蓝牙耳机进行蓝牙通信;若是非独占模式,则终端为所有蓝牙耳机分别创建耳机标签对象并分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机同时进行蓝牙通信。采用本发明,可使得终端能同时与多于一个蓝牙耳机同时通信。

Description

一种蓝牙通信的方法及终端 技术领域
本发明涉及通信技术领域,尤其涉及一种蓝牙通信的方法及终端。
背景技术
随着终端如手机、平板等的智能化发展,可为人们的生活、工作、学习及娱乐提供非常大的帮助。现有终端通常具备蓝牙通信的功能,蓝牙技术是一种短距无线通信技术,它以低成本的近距离无线连接为基础,替代了数字设备和计算机、手机外设间的电缆连线,可实现数字设备之间的无线组网。目前蓝牙技术广泛应用于蓝牙耳机、车载免提蓝牙等。近年出现许多支持蓝牙耳机的应用,给终端的使用者带来了极大的便利。例如,可实现电话的无线通话,而不需要用户手持终端,减轻了用户的负担,也可以减少手机对用户大脑的辐射。又例如通过蓝牙耳机可以实现立体声音乐的播放,相较于以往常规的有线耳机,减小了占用空以及音频线对用户的束缚。
但是,在实际使用过程中发现,现有终端通常只能连接一个蓝牙耳机进行通信,用户不能用两个或更多个蓝牙耳机来播放音乐或接听电话,无法满足用户的使用多于一个蓝牙耳机同时与终端的通信需求。
发明内容
本发明实施例所要解决的技术问题在于,提供一种蓝牙通信的方法及终端。可使得终端能同时与多于一个蓝牙耳机同时通信。
第一方面,本发明实施例提供了一种蓝牙通信的方法,包括:
当用户使用终端和蓝牙耳机进行音频传输时,接收用户输入的多蓝牙耳机通信指令;
判断当前与所述终端连接的蓝牙耳机数量是否大于一个;
若当前与所述终端连接的蓝牙耳机数量大于一个,则读取用户选择的蓝牙耳机工作模式,所述蓝牙耳机工作模式包括独占模式和非独占模式;
若用户选择的是独占模式,则所述终端为指定的一个蓝牙耳机创建耳机标签对象并建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信;
若用户选择的是非独占模式,则所述终端为所有蓝牙耳机分别创建耳机标 签对象并分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机同时进行蓝牙通信;其中,所述耳机标签对象中包含用于与所述终端建立通信链路的信息。
通过上述方法,可以实现终端接受至少两个蓝牙耳机设备的关联请求,当需要进行蓝牙通信时,可以根据用户的需要,同时与至少两个蓝牙耳机进行通信,扩展了终端的功能和适用性,提升了用户的使用体验,利于单用户或多用户根据自己的需求使用终端和多个蓝牙耳机。
结合第一方面,在第一方面第一种可能的实现方式中,所述终端与蓝牙耳机之间建立通信链路时,包括:
向蓝牙耳机发送串口仿真协议连接请求;
接收所述蓝牙耳机返回的响应消息,根据所述响应消息与所述蓝牙耳机建立串口仿真协议连接;
向已连接的蓝牙耳机发送同步面向连接链路建立请求,与所述已连接的蓝牙耳机建立同步面向连接链路。
通过上述通信链路的建立流程,可以为两个或两个以上的蓝牙耳机分别建立通信链路,从而实现根据用户需要,同时使用两个或两个以上的蓝牙耳机与终端进行通信的效果。
结合第一方面,在第一方面第二种可能的实现方式中,在判断当前与所述终端连接的蓝牙耳机数量是否大于一个之前,所述方法还包括:
确定当前存在已配对的蓝牙耳机。
当不存在配对的蓝牙耳机时,可使用扬声器播放声音,可以确保通话功能和音乐播放功能的正常实现。
结合第一方面第二种可能的实现方式,在第一方面第三种可能的实现方式中,若当前与所述终端连接的蓝牙耳机数量为一个,则为该蓝牙耳机创建耳机标签对象并建立通信链路,与该蓝牙耳机进行蓝牙通信。
当只有一个蓝牙耳机与终端连接时,直接为该蓝牙耳机创建耳机标签对象并建立通信链路,从而确保蓝牙通信的正常进行。
结合第一方面,或结合第一方面第一至第三种任一可能的实现方式,在第一方面第四种可能的实现方式中,
当用户使用终端和蓝牙耳机进行音频传输时,若有新的蓝牙耳机接入,则 提示用户选择是否切换到新的蓝牙耳机进行音频传输;或者
在当前蓝牙耳机工作模式为独占模式时,提示用户选择是否切换蓝牙耳机工作模式,若用户选择切换到非独占模式,进一步提示用户选择同时进行音频传输的蓝牙耳机。
通过提示,可充分发挥多耳机通信模式在不同场景下的应用,提升了终端的适用性和智能性。
结合第一方面,或结合第一方面第一至第三种任一可能的实现方式,在第一方面第五种可能的实现方式中,当用户使用终端和蓝牙耳机进行非来电通话的音频传输时,若收到来电,则提示用户选择至少一个蓝牙耳机接听电话。
通过提示,可充分发挥多耳机通信模式在音乐播放时收到来电场景下的应用,提升了终端的适用性和智能性。
第二方面,本发明实施例提供了一种终端,包括:
接收单元,用于当用户使用终端和蓝牙耳机进行音频传输时,接收用户输入的多蓝牙耳机通信指令;
判断单元,用于判断当前与所述终端连接的蓝牙耳机数量是否大于一个;
读取单元,用于若当前与所述终端连接的蓝牙耳机数量大于一个,则读取用户选择的蓝牙耳机工作模式,所述蓝牙耳机工作模式包括独占模式和非独占模式;
通信单元,用于若用户选择的是独占模式,则为指定的一个蓝牙耳机创建耳机标签对象并建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信;若用户选择的是非独占模式,则为所有蓝牙耳机分别创建耳机标签对象并分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机同时进行蓝牙通信;
其中,所述耳机标签对象中包含用于与所述终端建立通信链路的信息。
结合第二方面,在第二方面第一种可能的实现方式中,所述终端与蓝牙耳机之间建立通信链路时,所述通信单元具体用于:
向蓝牙耳机发送串口仿真协议连接请求;
接收所述蓝牙耳机返回的响应消息,根据所述响应消息与所述蓝牙耳机建立串口仿真协议连接;
向已连接的蓝牙耳机发送同步面向连接链路建立请求,与所述已连接的蓝 牙耳机建立同步面向连接链路。
结合第二方面,在第二方面第二种可能的实现方式中,所述判断单元还用于:
确定当前存在已配对的蓝牙耳机。
结合第二方面第二种可能的实现方式,在第二方面第三种可能的实现方式中,所述通信单元还用于:
若当前与所述终端连接的蓝牙耳机数量为一个,则为该蓝牙耳机创建耳机标签对象并建立通信链路,与该蓝牙耳机进行蓝牙通信。
结合第二方面,或结合二方面第一至第三种任一可能的实现方式,在第二方面第四种可能的实现方式中,所述终端还包括:
提示单元,用于当用户使用终端和蓝牙耳机进行音频传输时,若有新的蓝牙耳机接入,则提示用户选择是否切换到新的蓝牙耳机进行音频传输;或者
在当前蓝牙耳机工作模式为独占模式时,提示用户选择是否切换蓝牙耳机工作模式,若用户选择切换到非独占模式,进一步提示用户选择同时进行音频传输的蓝牙耳机。
结合第二方面,或结合二方面第一至第三种任一可能的实现方式,在第二方面第五种可能的实现方式中,所述终端还包括:
提示单元,用于当用户使用终端和蓝牙耳机进行非来电通话的音频传输时,若收到来电,则提示用户选择至少一个蓝牙耳机接听电话。
第三方面,本发明实施例提供了一种终端,包括:
处理器、存储器、接口电路、蓝牙无线收发器、显示屏、扬声器和总线,所述处理器、存储器、接口电路、蓝牙无线收发器、显示屏、扬声器通过所述总线连接并完成相互间的通信,其中,所述蓝牙无线收发器用于与蓝牙耳机进行蓝牙通信,所述显示屏用于人机交互及提示用户输入选择指令,所述扬声器用于播放声音,所述存储器用于存储一组程序代码,所述处理器用于调用所述存储器中存储的程序代码,执行以下操作:
当用户使用终端和蓝牙耳机进行音频传输时,通过所述显示屏和所述接口电路接收用户输入的多蓝牙耳机通信指令;
判断当前与所述终端连接的蓝牙耳机数量是否大于一个;
若当前与所述终端连接的蓝牙耳机数量大于一个,则读取用户选择的蓝牙 耳机工作模式,所述蓝牙耳机工作模式包括独占模式和非独占模式;
若用户选择的是独占模式,则所述处理器为指定的一个蓝牙耳机创建耳机标签对象并通过所述蓝牙无线收发器与所述指定的一个蓝牙耳机建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信;
若用户选择的是非独占模式,则所述处理器为所有蓝牙耳机分别创建耳机标签对象并通过所述蓝牙无线收发器与所有蓝牙耳机分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机,进行蓝牙通信;
其中,所述耳机标签对象中包含用于与所述终端建立通信链路的信息。
结合第三方面,在第三方面第一种可能的实现方式中,所述终端与蓝牙耳机之间建立通信链路时,所述处理器具体用于:
通过接口电路向蓝牙耳机发送串口仿真协议连接请求;
接收所述蓝牙耳机返回的响应消息,根据所述响应消息与所述蓝牙耳机建立串口仿真协议连接;
向已连接的蓝牙耳机发送同步面向连接链路建立请求,与所述已连接的蓝牙耳机建立同步面向连接链路。
结合第三方面,在第三方面第二种可能的实现方式中,所述处理器还用于:
确定当前存在已配对的蓝牙耳机。
结合第三方面第二种可能的实现方式,在第三方面第三种可能的实现方式中,若当前与所述终端连接的蓝牙耳机数量为一个,则所述处理器用于为该蓝牙耳机创建耳机标签对象并通过所述蓝牙无线收发器与该蓝牙耳机建立通信链路,与该蓝牙耳机进行蓝牙通信。
结合第三方面,或结合第三方面第一至第三种任一可能的实现方式,在第三方面第四种可能的实现方式中,
当用户使用终端和蓝牙耳机进行音频传输时,若有新的蓝牙耳机接入,则所述处理器用于指示所述显示屏显示提示信息,提示用户选择是否切换到新的蓝牙耳机进行音频传输;或者
在当前蓝牙耳机工作模式为独占模式时,提示用户选择是否切换蓝牙耳机工作模式,若用户选择切换到非独占模式,进一步提示用户选择同时进行音频传输的蓝牙耳机。
结合第三方面,或结合第三方面第一至第三种任一可能的实现方式,在第三方面第五种可能的实现方式中,当用户使用终端和蓝牙耳机进行非来电通话的音频传输时,若收到来电,则所述处理器用于指示所述显示屏显示提示信息,提示用户选择至少一个蓝牙耳机接听电话。
第四方面,本发明实施例提供了一种计算机存储介质,所述计算机存储介质包括一组程序代码,用于执行如本发明实施例第一方面任一实现方式所述的方法。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明提供的一种蓝牙通信的方法的第一实施例的流程示意图;
图2为本发明提供的一种蓝牙通信的方法的第二实施例的流程示意图;
图3为本发明提供的一种蓝牙通信的方法的第三实施例的流程示意图;
图4为本发明提供的一种终端的第一实施例的组成示意图;
图5为本发明提供的一种终端的第二实施例的组成示意图;
图6为本发明提供的一种终端的第三实施例的组成示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
本发明实施例中的终端可以包括智能手机(如Android手机、iOS手机、Windows Phone手机等)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备(Mobile Internet Devices,简称MID)或穿戴式设备等,上述终端仅是举例,而非穷举,包含但不限于上述终端。终端上设置有蓝牙通信模块,可与蓝牙耳机进行蓝牙通信,包括进行通话和播放音乐等,本发明实施例不作任何限定。
本发明实施例中的蓝牙耳机可以是蓝牙单声道耳机或蓝牙立体声耳机,本发明实施例同样不作任何限定。
本发明主要涉及对于终端中关于蓝牙通信及蓝牙管理相关的部分进行了改进。优化蓝牙模块的链路及蓝牙设备间关系管理,使得现有的终端能够支持一个终端同时关联多个蓝牙耳机。以安卓(Android)系统为例,在Android系统架构下,android.bluetooth包是涉及对于蓝牙协议及蓝牙设备及关联管理管理的主要软件模块。其中BluetoothAdapter类代表的是本地蓝牙适配器,而BluetoothDevice类代表的是远程蓝牙设备。蓝牙耳机与终端配对之后,终端会在BluetoothDevice模块中记录耳机状态,并通过服务发现协议(Service Discovery Protocol,SDP)服务查询耳机所能提供的服务,并把这种服务类型记录在耳机状态中。当蓝牙耳机被注册之后,如果终端的应用程序需要建立同步面向连接链路(Synchronous Connection Oriented,SCO)时,就可以通过BluetoothDevice类中的记录得到正确的耳机状态。BluetoothDevice随蓝牙控制器启动而创建。其他操作系统中的蓝牙通信及蓝牙管理类似,终端同样需要保存一些蓝牙耳机的状态信息,可以与蓝牙耳机配对及及管理等。下面结合具体地实施例对本发明的蓝牙通信方法进行详细描述。
请参考图1,为本发明提供的一种蓝牙通信的方法的第一实施例的流程示意图。在本实施例中,所述方法包括:
S101,当用户使用终端和蓝牙耳机进行音频传输时,接收用户输入的多蓝牙耳机通信指令。
可选地,终端与蓝牙耳机进行音频传输可以在执行终端的系统应用时进行,可以包括但不限于系统自带的通话应用、语音邮箱应用、录音应用、音乐播放应用和视频播放应用等。也可以在执行其他第三方应用时进行,第三方应用可以包括但不限于视听应用,如常见的音乐播放应用、包含音频的视频播放应用、广播收听应用和电子书语音播放应用等;第三方应用还可以包括常见的即时通 信应用,其具备语音聊天功能或视频聊天功能。综上,当用户使用终端和蓝牙耳机进行包含音频传输的应用时,均可以采用本实施例所述的方法进行多蓝牙通信。
所述多蓝牙耳机通信指令可以在蓝牙设置界面输入或配置可选项供用户选择,或者也可以在任意应用的显示界面输入如在音乐播放类应用的显示界面输入或通话界面输入,本发明实施例不作任何限定。
S102,判断当前与所述终端连接的蓝牙耳机数量是否大于一个。若是,则执行步骤S103。
S103,读取用户选择的蓝牙耳机工作模式。
所述蓝牙耳机工作模式包括独占模式和非独占模式。在独占模式下,只有一个蓝牙耳机工作,与终端配合进行蓝牙通信,如进行通话或音乐播放等。在非独占模式下,可以有两个或两个以上的蓝牙耳机工作,与终端配合进行蓝牙通信。
S104,若用户选择的是独占模式,则所述终端为指定的一个蓝牙耳机创建耳机标签(Headset Base)对象并建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信。
其中,所述指定的一个蓝牙耳机为用户选定的一个蓝牙耳机或用户预设的一个蓝牙耳机或与所述终端最新配对的一个蓝牙耳机。
S105,若用户选择的是非独占模式,则所述终端为所有蓝牙耳机分别创建耳机标签对象并分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机同时进行蓝牙通信。
其中,所述耳机标签对象中包含用于与所述终端建立通信链路的信息。如蓝牙耳机的地址信息、蓝牙耳机可提供的服务等,可用于实现耳机通信的主要功能(如通信链路的建立和释放、音量调节等功能的实现)。
需要说明的是,由于蓝牙通信时,对于安全问题是比较重视的,所以终端与蓝牙耳机在需要进行通信时,首先要对蓝牙耳机进行配对,只有配对成功时,蓝牙设备之间的通信才能够进行,而且蓝牙通信之间的相互传输是在基于唯一的媒体访问控制地址(Media Access Control)前提下进行的。仍以安卓系统为例,首先要根据用户选择的蓝牙耳机数量,用Android平台提供的getRemoteDevice(String)方法创建多个BluetoothDevice类(即本发明实施例中 统称的耳机标签对象),实际上这个类是一个蓝牙硬件地址的简单封装。这个类的操作在远程蓝牙硬件地址上执行,可使用蓝牙适配器创建这个蓝牙设备。因此,终端与蓝牙耳机连接还无法进行蓝牙通信,需要创建耳机标签对象并建立通信链路之后,才能与蓝牙耳机进行蓝牙通信。
具体地通信链路建立过程如下:
终端如果作为主设备,则终端要向所选择的蓝牙地址的设备如蓝牙耳机发起串口仿真协议(Reference COM Model,RFCOMM)连接。
当蓝牙耳机作为从设备接收到终端发起连接时,终端可以发送一个振铃命令,当蓝牙耳机收到振铃指示时,会发出振铃声,这时用户可以按下确认(Talk)按键,同意建立连接,终端接收蓝牙耳机返回的响应消息,与蓝牙耳机建立串口仿真协议连接。
RFCOMM连接建立之后,终端再发起同步面向连接链路(Synchronous Connection Oriented,SCO)建立请求,当蓝牙耳机接收到建立SCO连接的指示消息后,设置蓝牙耳机语音分组,则SCO通信链路建立。这时就可以进行蓝牙耳机和终端之间的蓝牙通信了。
此外,由于蓝牙无线通信硬件提供了两种不同的物理链路,即同步面向连接链路(Synchronous Connection Oriented,SCO)和异步无连接链路(Asynchronous Connection Less,ACL),因此需要根据用户要产生的业务来选择创建哪种链路。SCO因为是面向连接的,更适用于语音通话等业务,但是ACL也是可以传输语音,只不过是以数据形式传输。本实施例中,主要针对的是蓝牙耳机传输语音来进行设计,因此,当终端与蓝牙耳机配对后,终端操作系统对应的软件选择与两个或两个以上蓝牙耳机分别建立SCO链路。在Android系统中,蓝牙耳机匹配之后,会在Bluetooth Device类中记录耳机状态,并通过SDP服务查询耳机所能提供的服务,并把这种服务类型记录在耳机状态中。当蓝牙耳机被注册之后,如果终端上的应用程序需要建立SCO链路时,即可通过Bluetooth Device类中的记录得到正确的状态。
在本实施例中,当用户使用终端和蓝牙耳机进行音频传输时,通过接收用户输入的多蓝牙耳机通信指令,开启终端的多耳机通信模式,然后判断当前与所述终端连接的蓝牙耳机数量是否大于一个;若是,则读取用户选择的蓝牙耳机工作模式;若用户选择的是独占模式,则所述终端为指定的一个蓝牙耳机创 建耳机标签对象并建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信;若用户选择的是非独占模式,则所述终端为所有蓝牙耳机分别创建耳机标签对象并分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机同时进行蓝牙通信。从而可以实现终端接受至少两个蓝牙耳机设备的关联请求,当需要进行蓝牙通信时,可以根据用户的需要,同时与至少两个蓝牙耳机进行通信,扩展了终端的功能和适用性,提升了用户的使用体验,利于单用户或多用户根据自己的需求使用终端和多个蓝牙耳机。
请参考图2,为本发明提供的一种蓝牙通信的方法的第二实施例的流程示意图。在本实施例中,所述方法包括:
S201,当用户使用终端和蓝牙耳机进行音频传输时,接收用户输入的多蓝牙耳机通信指令。
S202,确定当前存在已配对的蓝牙耳机。
可选地,终端可以判断当前是否存在已配对的蓝牙耳机。
若存在,则执行步骤S203,若不存在已配对的蓝牙耳机,则可以使用扬声器播放音频或使用麦克风拾音,完成音频传输。即此时没有与终端配对的蓝牙耳机,虽然用户选择使用多耳机通信模式,但由于没有耳机配对,所以只能使用麦克风和/或扬声器来确保终端通话或音乐播放功能的正常实现,当然,为了提高隐私性,此处也可以配置为静音,本发明实施例不作任何限定
可选地,以安卓系统为例,终端可通过访问Bluetooth device Service模块上的蓝牙设备连接个数信息确定终端是否存在已配对的蓝牙耳机,只有配对后才可以建立连接。
S203,判断当前与所述终端连接的蓝牙耳机数量是否大于一个。若是,则执行步骤S204,否则执行步骤S205。
音频传输S204,读取用户选择的蓝牙耳机工作模式。
所述蓝牙耳机工作模式包括独占模式和非独占模式。
S205,为仅有的一个蓝牙耳机创建耳机标签对象并建立通信链路,与该蓝牙耳机进行蓝牙通信。即当前与所述终端连接的蓝牙耳机数量仅为一个时,为了确保蓝牙通信的正常进行,直接为该耳机创建耳机标签对象并建立通信链路, 与该耳机进行蓝牙通信即可。
S206,若用户选择的是独占模式,则所述终端为指定的一个蓝牙耳机创建耳机标签对象并建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信。
S207,若用户选择的是非独占模式,则所述终端为所有蓝牙耳机分别创建耳机标签对象并分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行通信,或,与所有已建立通信链路的蓝牙耳机同时进行蓝牙通信。
其中,所述耳机标签对象中包含用于与所述终端建立通信链路的信息。
在本实施例中,增加了已配对或已连接耳机数量不足时的处理策略,如没有已配对耳机时采用扬声器播放声音,采用麦克风拾音,只有一个已连接的蓝牙耳机时,直接为该耳机建立通信链路进行蓝牙通信,提高了终端的适用性,确保了通话和音乐播放的正常进行。
请参考图3,为本发明提供的一种蓝牙通信的方法的第三实施例的流程示意图。在本实施例中,步骤S301-步骤S307与步骤S201-步骤207相同,此处不再赘述,针对不同的场景,所述方法还包括:
S308,当用户使用终端和蓝牙耳机进行音频传输时,若存在新的蓝牙耳机接入,则提示用户选择是否切换到新的蓝牙耳机进行音频传输;或者
在当前蓝牙耳机工作模式为独占模式时,提示用户选择是否切换蓝牙耳机工作模式,若用户选择切换到非独占模式,进一步提示用户选择同时进行音频传输的蓝牙耳机。
如果用户选择切换到新的蓝牙耳机进行音频传输,则关闭原来进行音频传输的蓝牙耳机;如果用户切换到非独占模式,则根据用户选定的蓝牙耳机进行音频传输。步骤S308更适用于原来处于独占模式的场景。当然,对于非独占模式的场景,当存在新的蓝牙耳机接入时,可以直接激活并使用新的蓝牙耳机进行非独占模式的使用,也可以直接切换到独占模式,仅使用新的蓝牙耳机,本发明实施例不作任何限定。
S309,当用户使用终端和蓝牙耳机进行非来电通话的音频传输时,若收到来电,则提示用户选择至少一个蓝牙耳机接听电话。
步骤S309更适用于原来处于非独占模式的场景。当然,对于独占模式的场景,基于通话的重要性通常高于非来电通话的音频传输,此时可直接将蓝牙耳机由非来电通话的音频传输切换到通话,当通话结束后再恢复非来电通话的 音频传输。
在本实施例中,具体描述了在各个场景下使用多蓝牙通信模式的策略,通过提示和响应用户选择,可以充分满足用户的不同需求,提高了终端的适用性和智能性,提升了用户的使用体验。
请参考图4,为本发明实施例提供的一种终端的组成示意图,在本实施例中,所述终端包括:
接收单元100,用于当用户使用终端和蓝牙耳机进行音频传输时,接收用户输入的多蓝牙耳机通信指令;
判断单元200,用于判断当前与所述终端连接的蓝牙耳机数量是否大于一个;
读取单元300,用于若当前与所述终端连接的蓝牙耳机数量大于一个,则读取用户选择的蓝牙耳机工作模式,所述蓝牙耳机工作模式包括独占模式和非独占模式;
通信单元400,用于若用户选择的是独占模式,则为指定的一个蓝牙耳机创建耳机标签对象并建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信;若用户选择的是非独占模式,则为所有蓝牙耳机分别创建耳机标签对象并分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机同时进行蓝牙通信;
其中,所述耳机标签对象中包含用于与所述终端建立通信链路的信息。
可选地,所述终端与蓝牙耳机之间建立通信链路时,所述通信单元400具体用于:
向蓝牙耳机发送串口仿真协议连接请求;
接收所述蓝牙耳机返回的响应消息,根据所述响应消息与所述蓝牙耳机建立串口仿真协议连接;
向已连接的蓝牙耳机发送同步面向连接链路建立请求,与所述已连接的蓝牙耳机建立同步面向连接链路。
可选地,所述判断单元200还用于:
确定当前存在已配对的蓝牙耳机。
具体地,可以判断当前是否存在已配对的蓝牙耳机;
若不存在已配对的蓝牙耳机,则所述通信单元400还用于使用扬声器和/ 或麦克风进行音频传输;
若存在已配对的蓝牙耳机,则执行所述判断当前与所述终端连接的蓝牙耳机数量是否大于一个的步骤。
可选地,所述通信单元400还用于:
若当前与所述终端连接的蓝牙耳机数量为一个,则为该蓝牙耳机创建耳机标签对象并建立通信链路,与该蓝牙耳机进行蓝牙通信。
请参考图5,为本发明实施例提供的另一种终端的组成示意图,在本发明实施例中,与图6所示实施例相比,所述终端还包括:
提示单元500,用于当用户使用终端和蓝牙耳机进行音频传输时,若存在新的蓝牙耳机接入,则提示用户选择是否切换到新的蓝牙耳机进行音频传输;或者
在当前蓝牙耳机工作模式为独占模式时,提示用户选择是否切换蓝牙耳机工作模式,若用户选择切换到非独占模式,进一步提示用户选择同时进行音频传输的蓝牙耳机。
以及,用于当用户使用终端和蓝牙耳机进行非来电通话的音频传输时,若收到来电,则提示用户选择至少一个蓝牙耳机接听电话。
需要说明的是,以上接收单元100、判断单元200、读取单元300、通信单元400及提示单元500可以独立存在,也可以集成设置,且以上终端实施例中接收单元100、判断单元200、读取单元300、通信单元400或提示单元500可以以硬件的形式独立于终端的处理器单独设置,且设置形式可以是微处理器的形式;也可以以硬件形式内嵌于终端的处理器中,还可以以软件形式存储于终端的存储器中,以便于终端的处理器调用执行以上接收单元100、判断单元200、读取单元300、通信单元400及提示单元500对应的操作。
例如,在本发明终端的第二实施例(图5所示的实施例)中,通信单元400可以为终端的处理器,而接收单元100、判断单元200、读取单元300及提示单元500的功能可以内嵌于该处理器中,也可以独立于处理器单独设置,也可以以软件的形式存储于存储器中,由处理器调用实现其功能。以上处理器可以为中央处理单元(CPU)、微处理器、单片机等。
请参照图6,为本发明实施例提供的又一种终端的组成示意图,在本发明实施例中,所述终端包括:
处理器1101、存储器1102、接口电路1103、蓝牙无线收发器1104、显示屏1105、扬声器1106和总线1107,所述处理器1101、存储器1102、接口电路1103、蓝牙无线收发器1104、显示屏1105和扬声器1106通过所述总线1107连接并完成相互间的通信,其中,所述蓝牙无线收发器1104用于与蓝牙耳机进行蓝牙通信,所述显示屏1105用于人机交互及提示用户输入选择指令,所述扬声器1106用于播放声音,所述存储器1102用于存储一组程序代码,所述处理器1101用于调用所述存储器1102中存储的程序代码,执行以下操作:
当用户使用终端和蓝牙耳机进行音频传输时,通过所述显示屏1105和所述接口电路1103接收用户输入的多蓝牙耳机通信指令;
判断当前与所述终端连接的蓝牙耳机数量是否大于一个;
若当前与所述终端连接的蓝牙耳机数量大于一个,则读取用户选择的蓝牙耳机工作模式,所述蓝牙耳机工作模式包括独占模式和非独占模式;
若用户选择的是独占模式,则所述处理器1101为指定的一个蓝牙耳机创建耳机标签对象并通过所述蓝牙无线收发器1104与所述指定的一个蓝牙耳机建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信;
若用户选择的是非独占模式,则所述处理器1101为所有蓝牙耳机分别创建耳机标签对象并通过所述蓝牙无线收发器1104与所有蓝牙耳机分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机,进行蓝牙通信;
其中,所述耳机标签对象中包含用于与所述终端建立通信链路的信息。
可选地,所述终端与蓝牙耳机之间建立通信链路时,所述处理器1101具体用于:
通过接口电路1103向蓝牙耳机发送串口仿真协议连接请求;
接收所述蓝牙耳机返回的响应消息,根据所述响应消息与所述蓝牙耳机建立串口仿真协议连接;
向已连接的蓝牙耳机发送同步面向连接链路建立请求,与所述已连接的蓝牙耳机建立同步面向连接链路。
可选地,所述处理器1101还用于:
确定当前存在已配对的蓝牙耳机。
可选地,若当前与所述终端连接的蓝牙耳机数量为一个,则所述处理器 1101用于为该蓝牙耳机创建耳机标签对象并通过所述蓝牙无线收发器1104与该蓝牙耳机建立通信链路,与该蓝牙耳机进行蓝牙通信。
可选地,当用户使用终端和蓝牙耳机进行音频传输时,若有新的蓝牙耳机接入,则所述处理器1101用于指示所述显示屏1105显示提示信息,提示用户选择是否切换到新的蓝牙耳机进行音频传输;或者
在当前蓝牙耳机工作模式为独占模式时,提示用户选择是否切换蓝牙耳机工作模式,若用户选择切换到非独占模式,进一步提示用户选择同时进行音频传输的蓝牙耳机。
当用户使用终端和蓝牙耳机进行非来电通话的音频传输时,若收到来电,则所述处理器1101用于指示所述显示屏1105显示提示信息,提示用户选择至少一个蓝牙耳机接听电话。
需要说明的是,这里的处理器1101可以是一个处理器,也可以是多个处理元件的统称。例如,该处理器可以是中央处理器(Central Processing Unit,CPU),也可以是特定集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。
存储器1102可以是一个存储装置,也可以是多个存储元件的统称,且用于存储可执行程序代码或接入网设备运行所需要参数、数据等。且存储器1102可以包括随机存储器(RAM),也可以包括非易失性存储器(non-volatile memory),例如磁盘存储器,闪存(Flash)等。
总线1107可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
通过上述实施例的描述,本发明具有以下优点:
当用户使用终端和蓝牙耳机进行音频传输时,通过接收用户输入的多蓝牙耳机通信指令,开启终端的多耳机通信模式,然后判断当前与所述终端连接的蓝牙耳机数量是否大于一个;若是,则读取用户选择的蓝牙耳机工作模式;若用户选择的是独占模式,则所述终端为指定的一个蓝牙耳机创建耳机标签对象 并建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信;若用户选择的是非独占模式,则所述终端为所有蓝牙耳机分别创建耳机标签对象并分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机同时进行蓝牙通信。从而可以实现终端接受至少两个蓝牙耳机设备的关联请求,当需要进行蓝牙通信时,可以根据用户的需要,同时与至少两个蓝牙耳机进行通信,扩展了终端的功能和适用性,提升了用户的使用体验,利于单用户或多用户根据自己的需求使用终端和多个蓝牙耳机。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上对本发明实施例所提供的一种蓝牙通信的方法及终端进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (15)

  1. 一种蓝牙通信的方法,其特征在于,包括:
    当用户使用终端和蓝牙耳机进行音频传输时,接收用户输入的多蓝牙耳机通信指令;
    判断当前与所述终端连接的蓝牙耳机数量是否大于一个;
    若当前与所述终端连接的蓝牙耳机数量大于一个,则读取用户选择的蓝牙耳机工作模式,所述蓝牙耳机工作模式包括独占模式和非独占模式;
    若用户选择的是独占模式,则所述终端为指定的一个蓝牙耳机创建耳机标签对象并建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信;
    若用户选择的是非独占模式,则所述终端为所有蓝牙耳机分别创建耳机标签对象并分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机同时进行蓝牙通信;其中,所述耳机标签对象中包含用于与所述终端建立通信链路的信息。
  2. 根据权利要求1所述的方法,其特征在于,所述终端与蓝牙耳机之间建立通信链路时,包括:
    向蓝牙耳机发送串口仿真协议连接请求;
    接收所述蓝牙耳机返回的响应消息,根据所述响应消息与所述蓝牙耳机建立串口仿真协议连接;
    向已连接的蓝牙耳机发送同步面向连接链路建立请求,与所述已连接的蓝牙耳机建立同步面向连接链路。
  3. 根据权利要求1所述的方法,其特征在于,在判断当前与所述终端连接的蓝牙耳机数量是否大于一个之前,所述方法还包括:
    确定当前存在已配对的蓝牙耳机。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,当用户使用终端和蓝牙耳机进行音频传输时,若有新的蓝牙耳机接入,则提示用户选择是否切换到新的蓝牙耳机进行音频传输;或者
    在当前蓝牙耳机工作模式为独占模式时,提示用户选择是否切换蓝牙耳机工作模式,若用户选择切换到非独占模式,进一步提示用户选择同时进行音频传输的蓝牙耳机。
  5. 根据权利要求1-3任一项所述的方法,其特征在于,当用户使用终端和蓝牙耳机进行非来电通话的音频传输时,若收到来电,则提示用户选择至少一个蓝牙耳机接听电话。
  6. 一种终端,其特征在于,包括:
    接收单元,用于当用户使用终端和蓝牙耳机进行音频传输时,接收用户输入的多蓝牙耳机通信指令;
    判断单元,用于判断当前与所述终端连接的蓝牙耳机数量是否大于一个;
    读取单元,用于若当前与所述终端连接的蓝牙耳机数量大于一个,则读取用户选择的蓝牙耳机工作模式,所述蓝牙耳机工作模式包括独占模式和非独占模式;
    通信单元,用于若用户选择的是独占模式,则为指定的一个蓝牙耳机创建耳机标签对象并建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信;若用户选择的是非独占模式,则为所有蓝牙耳机分别创建耳机标签对象并分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机同时进行蓝牙通信;
    其中,所述耳机标签对象中包含用于与所述终端建立通信链路的信息。
  7. 根据权利要求6所述的终端,其特征在于,所述终端与蓝牙耳机之间建立通信链路时,所述通信单元具体用于:
    向蓝牙耳机发送串口仿真协议连接请求;
    接收所述蓝牙耳机返回的响应消息,根据所述响应消息与所述蓝牙耳机建立串口仿真协议连接;
    向已连接的蓝牙耳机发送同步面向连接链路建立请求,与所述已连接的蓝牙耳机建立同步面向连接链路。
  8. 根据权利要求6所述的终端,其特征在于,所述判断单元还用于:
    确定当前存在已配对的蓝牙耳机。
  9. 根据权利要求6-8任一项所述的终端,其特征在于,所述终端还包括:
    提示单元,用于当用户使用终端和蓝牙耳机进行音频传输时,若有新的蓝牙耳机接入,则提示用户选择是否切换到新的蓝牙耳机进行音频传输;或者
    在当前蓝牙耳机工作模式为独占模式时,提示用户选择是否切换蓝牙耳机工作模式,若用户选择切换到非独占模式,进一步提示用户选择同时进行音频传输的蓝牙耳机。
  10. 根据权利要求6-8任一项所述的终端,其特征在于,所述终端还包括:
    提示单元,用于当用户使用终端和蓝牙耳机进行非来电通话的音频传输时,若收到来电,则提示用户选择至少一个蓝牙耳机接听电话。
  11. 一种终端,其特征在于,包括:
    处理器、存储器、接口电路、蓝牙无线收发器、显示屏、扬声器和总线,所述处理器、存储器、接口电路、蓝牙无线收发器、显示屏、扬声器通过所述总线连接并完成相互间的通信,其中,所述蓝牙无线收发器用于与蓝牙耳机进行蓝牙通信,所述显示屏用于人机交互及提示用户输入选择指令,所述扬声器用于播放声音,所述存储器用于存储一组程序代码,所述处理器用于调用所述存储器中存储的程序代码,执行以下操作:
    当用户使用终端和蓝牙耳机进行音频传输时,通过所述显示屏和所述接口电路接收用户输入的多蓝牙耳机通信指令;
    判断当前与所述终端连接的蓝牙耳机数量是否大于一个;
    若当前与所述终端连接的蓝牙耳机数量大于一个,则读取用户选择的蓝牙耳机工作模式,所述蓝牙耳机工作模式包括独占模式和非独占模式;
    若用户选择的是独占模式,则所述处理器为指定的一个蓝牙耳机创建耳机标签对象并通过所述蓝牙无线收发器与所述指定的一个蓝牙耳机建立通信链路,与所述指定的一个蓝牙耳机进行蓝牙通信;
    若用户选择的是非独占模式,则所述处理器为所有蓝牙耳机分别创建耳机 标签对象并通过所述蓝牙无线收发器与所有蓝牙耳机分别建立通信链路,与用户选定的多于一个的蓝牙耳机同时进行蓝牙通信,或,与所有已建立通信链路的蓝牙耳机,进行蓝牙通信;
    其中,所述耳机标签对象中包含用于与所述终端建立通信链路的信息。
  12. 根据权利要求11所述的终端,其特征在于,所述终端与蓝牙耳机之间建立通信链路时,所述处理器具体用于:
    通过接口电路向蓝牙耳机发送串口仿真协议连接请求;
    接收所述蓝牙耳机返回的响应消息,根据所述响应消息与所述蓝牙耳机建立串口仿真协议连接;
    向已连接的蓝牙耳机发送同步面向连接链路建立请求,与所述已连接的蓝牙耳机建立同步面向连接链路。
  13. 根据权利要求11所述的终端,其特征在于,所述处理器还用于:
    确定当前存在已配对的蓝牙耳机。
  14. 根据权利要求11-13任一项所述的终端,其特征在于,当用户使用终端和蓝牙耳机进行音频传输时,若有新的蓝牙耳机接入,则所述处理器用于指示所述显示屏显示提示信息,提示用户选择是否切换到新的蓝牙耳机进行音频传输;或者
    在当前蓝牙耳机工作模式为独占模式时,提示用户选择是否切换蓝牙耳机工作模式,若用户选择切换到非独占模式,进一步提示用户选择同时进行音频传输的蓝牙耳机。
  15. 根据权利要求11-13任一项所述的终端,其特征在于,当用户使用终端和蓝牙耳机进行非来电通话的音频传输时,若收到来电,则所述处理器用于指示所述显示屏显示提示信息,提示用户选择至少一个蓝牙耳机接听电话。
PCT/CN2016/095836 2016-08-18 2016-08-18 一种蓝牙通信的方法及终端 WO2018032455A1 (zh)

Priority Applications (6)

Application Number Priority Date Filing Date Title
EP16913212.3A EP3493643B1 (en) 2016-08-18 2016-08-18 Bluetooth communication method and terminal
PCT/CN2016/095836 WO2018032455A1 (zh) 2016-08-18 2016-08-18 一种蓝牙通信的方法及终端
CN202110538077.4A CN113411793A (zh) 2016-08-18 2016-08-18 一种蓝牙通信的方法及终端
CN201680088578.4A CN109644216A (zh) 2016-08-18 2016-08-18 一种蓝牙通信的方法及终端
US16/278,222 US11129218B2 (en) 2016-08-18 2019-02-18 Bluetooth communication method and terminal
US17/406,780 US11812485B2 (en) 2016-08-18 2021-08-19 Bluetooth communication method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/095836 WO2018032455A1 (zh) 2016-08-18 2016-08-18 一种蓝牙通信的方法及终端

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/278,222 Continuation US11129218B2 (en) 2016-08-18 2019-02-18 Bluetooth communication method and terminal

Publications (1)

Publication Number Publication Date
WO2018032455A1 true WO2018032455A1 (zh) 2018-02-22

Family

ID=61197270

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/095836 WO2018032455A1 (zh) 2016-08-18 2016-08-18 一种蓝牙通信的方法及终端

Country Status (4)

Country Link
US (2) US11129218B2 (zh)
EP (1) EP3493643B1 (zh)
CN (2) CN109644216A (zh)
WO (1) WO2018032455A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109802705A (zh) * 2019-01-31 2019-05-24 慧翰微电子股份有限公司 基于bt5的汽车或工业用数据传输系统
CN110234137A (zh) * 2019-04-30 2019-09-13 努比亚技术有限公司 通信控制方法、设备、系统及可读存储介质
EP3606015A1 (en) * 2018-07-31 2020-02-05 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for call processing and electronic device
CN111294777A (zh) * 2018-12-06 2020-06-16 海能达通信股份有限公司 一种蓝牙音频传输器的控制方法及通信方法
CN111491278A (zh) * 2019-01-29 2020-08-04 青岛海信移动通信技术股份有限公司 一种通过蓝牙设备播放音频的方法及终端
CN111510551A (zh) * 2020-04-02 2020-08-07 Tcl通力电子(惠州)有限公司 通话隐私保护方法、设备及计算机可读存储介质
CN114449093A (zh) * 2022-01-04 2022-05-06 安徽华米信息科技有限公司 设备控制方法、来电处理方法、装置、设备及介质

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106936987B (zh) * 2017-02-24 2019-12-20 田力 一种可识别蓝牙耳机语音来源的方法及设备
US10785818B2 (en) * 2018-09-20 2020-09-22 Qualcomm Incorporated Coordination between wireless audio devices
US10721163B1 (en) * 2019-03-15 2020-07-21 Dell Products L.P. Spanning tree protocol bridge-based link selection system
CN110519742B (zh) * 2019-09-16 2022-02-18 安徽华米信息科技有限公司 一种音频同步播放方法、装置及tws蓝牙耳机
CN110944326B (zh) * 2019-12-10 2023-05-23 上海闻泰信息技术有限公司 蓝牙耳机的配对方法、装置、计算机设备及存储介质
CN112437371B (zh) * 2020-08-11 2023-02-21 珠海市杰理科技股份有限公司 Ble链路的切换方法、设备、耳机对、芯片及介质
CN111935583B (zh) * 2020-08-24 2022-09-27 Oppo(重庆)智能科技有限公司 耳机模式控制方法、装置、终端设备、系统以及存储介质
CN113329373A (zh) * 2021-06-08 2021-08-31 阿波罗智联(北京)科技有限公司 车机互联方法和装置
CN113938971A (zh) * 2021-11-30 2022-01-14 Oppo广东移动通信有限公司 设备连接切换方法、装置、电子设备和计算机可读存储介质
CN114125735B (zh) * 2021-12-03 2023-04-21 Oppo广东移动通信有限公司 耳机连接方法及装置、计算机可读存储介质和电子设备
CN114553530B (zh) * 2022-02-22 2023-08-15 深圳市冠旭电子股份有限公司 蓝牙耳机付费方法和装置、电子设备、存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101909107A (zh) * 2009-06-04 2010-12-08 英华达(西安)通信科技有限公司 一种双蓝牙移动通讯装置
CN103475775A (zh) * 2013-08-15 2013-12-25 宇龙计算机通信科技(深圳)有限公司 通信终端及其连接方法
CN103986818A (zh) * 2014-04-01 2014-08-13 联想(北京)有限公司 一种信息处理方法和电子设备
US20150105022A1 (en) * 2013-10-14 2015-04-16 Sena Technologies Inc. Multitasking system of bluetooth headset
CN105101058A (zh) * 2015-07-13 2015-11-25 惠州Tcl移动通信有限公司 多个蓝牙耳机协同工作的实现方法及设备

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1372299A1 (en) * 2002-06-13 2003-12-17 Red-M (Communications) Limited A system for improving wireless communications devices
CN1832365A (zh) 2005-03-10 2006-09-13 深圳市零点通信有限公司 多功能蓝牙耳机及其实现方法
CN2854988Y (zh) * 2005-08-19 2007-01-03 易路达科技有限公司 蓝牙耳机
US20090061775A1 (en) * 2006-07-05 2009-03-05 Warren Robert W Systems and methods for multiport communication distribution
CN101119399B (zh) 2006-07-31 2010-11-17 新科电子集团有限公司 蓝牙喇叭
EP1962481B1 (en) * 2007-02-21 2009-12-16 Research In Motion Limited Teleconferencing and call multiplexing with mutiple headsets coupled to a single mobile telephone
US20080200159A1 (en) * 2007-02-21 2008-08-21 Research In Motion Limited Teleconferencing and call multiplexing with multiple external audio devices coupled to a single mobile telephone
KR20080078368A (ko) * 2007-02-23 2008-08-27 삼성전자주식회사 사용자의 확인절차 후에 무선 통신할 무선기기를 교체하는무선통신방법 및 이를 적용한 영상기기
US20080233877A1 (en) * 2007-03-20 2008-09-25 Gwee Lin-Kar Method of connecting a bluetooth headphone to bluetooth communications devices
CN101645717B (zh) 2009-09-07 2012-12-19 中兴通讯股份有限公司 一种多用户利用蓝牙耳机共享音频信息的方法及终端
US8391792B2 (en) * 2011-02-03 2013-03-05 Cardo Systems, Inc. System and method for initiating ad-hoc communication between mobile headsets
US8983384B2 (en) * 2012-10-30 2015-03-17 Qualcomm Incorporated Apparatus and method for extending Bluetooth device range
EP2787790B1 (en) * 2012-11-16 2017-07-26 Huawei Device Co., Ltd. Method, mobile terminal and system for establishing bluetooth connection
CN104426582B (zh) * 2013-08-28 2018-09-25 中兴通讯股份有限公司 蓝牙通信处理方法、蓝牙通信终端及通信装置
CN103701000B (zh) 2013-12-27 2017-04-19 北京奇虎科技有限公司 一种具有蓝牙配对功能的智能Hub及其蓝牙配对方法
CN104767868A (zh) * 2014-01-07 2015-07-08 中兴通讯股份有限公司 一种通话控制方法及终端
US9591684B2 (en) * 2014-06-06 2017-03-07 BBPOS Limited System and method of bluetooth pairing with a group of bluetooth devices
CN105634561B (zh) * 2014-11-03 2018-09-25 阿里巴巴集团控股有限公司 一种信息交互方法及装置
CN104822127A (zh) * 2015-03-09 2015-08-05 中国科学院信息工程研究所 一种蓝牙设备及其数据通道实时管控方法和系统
CN105208511A (zh) * 2015-08-28 2015-12-30 深圳市冠旭电子有限公司 基于智能蓝牙耳机的音乐共享方法、系统及智能蓝牙耳机
KR20170091913A (ko) * 2016-02-02 2017-08-10 삼성전자주식회사 영상 서비스 제공 방법 및 장치

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101909107A (zh) * 2009-06-04 2010-12-08 英华达(西安)通信科技有限公司 一种双蓝牙移动通讯装置
CN103475775A (zh) * 2013-08-15 2013-12-25 宇龙计算机通信科技(深圳)有限公司 通信终端及其连接方法
US20150105022A1 (en) * 2013-10-14 2015-04-16 Sena Technologies Inc. Multitasking system of bluetooth headset
CN103986818A (zh) * 2014-04-01 2014-08-13 联想(北京)有限公司 一种信息处理方法和电子设备
CN105101058A (zh) * 2015-07-13 2015-11-25 惠州Tcl移动通信有限公司 多个蓝牙耳机协同工作的实现方法及设备

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3606015A1 (en) * 2018-07-31 2020-02-05 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for call processing and electronic device
US10785361B2 (en) 2018-07-31 2020-09-22 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for call processing and electronic device
CN111294777A (zh) * 2018-12-06 2020-06-16 海能达通信股份有限公司 一种蓝牙音频传输器的控制方法及通信方法
CN111491278A (zh) * 2019-01-29 2020-08-04 青岛海信移动通信技术股份有限公司 一种通过蓝牙设备播放音频的方法及终端
CN111491278B (zh) * 2019-01-29 2022-09-02 青岛海信移动通信技术股份有限公司 一种通过蓝牙设备播放音频的方法及终端
CN109802705A (zh) * 2019-01-31 2019-05-24 慧翰微电子股份有限公司 基于bt5的汽车或工业用数据传输系统
CN110234137A (zh) * 2019-04-30 2019-09-13 努比亚技术有限公司 通信控制方法、设备、系统及可读存储介质
CN111510551A (zh) * 2020-04-02 2020-08-07 Tcl通力电子(惠州)有限公司 通话隐私保护方法、设备及计算机可读存储介质
CN114449093A (zh) * 2022-01-04 2022-05-06 安徽华米信息科技有限公司 设备控制方法、来电处理方法、装置、设备及介质

Also Published As

Publication number Publication date
EP3493643B1 (en) 2021-03-03
US11812485B2 (en) 2023-11-07
EP3493643A1 (en) 2019-06-05
CN113411793A (zh) 2021-09-17
US20210385892A1 (en) 2021-12-09
US11129218B2 (en) 2021-09-21
CN109644216A (zh) 2019-04-16
US20190182878A1 (en) 2019-06-13
EP3493643A4 (en) 2019-06-19

Similar Documents

Publication Publication Date Title
WO2018032455A1 (zh) 一种蓝牙通信的方法及终端
WO2019090726A1 (zh) 选择蓝牙设备的方法、终端和系统
WO2018082335A1 (zh) 连接蓝牙设备的方法、装置、系统及设备
WO2020063066A1 (zh) 数据传输方法、装置、电子设备及存储介质
WO2012142794A1 (zh) 蓝牙配件配对蓝牙设备的方法及蓝牙配件
WO2011017875A1 (zh) 一种终端控制蓝牙耳机有序连接的方法及系统
JP5942864B2 (ja) 端末装置、コンテンツ送信方法、コンテンツ送信プログラムおよびコンテンツ再生システム
WO2008055418A1 (fr) Système et procédé permettant l'établissement et la déconnexion automatiques de plusieurs connexions sans fil
CN111432386B (zh) 蓝牙耳机的连接切换方法、装置、设备及存储介质
WO2024055494A1 (zh) 基于蓝牙耳机的通话方法、装置及存储介质
EP4210362A1 (en) Bluetooth communication system, bluetooth connection method, electronic device, and storage medium
CN113286281B (zh) 紧急呼叫方法和相关装置
WO2024119947A1 (zh) 蓝牙通信方法、装置、电子设备及计算机可读介质
WO2023045784A1 (zh) 通话控制方法、装置、电子设备及计算机可读存储介质
CN114844736B (zh) 一种设备及通话控制方法
WO2021239032A1 (zh) 蓝牙协议连接方法、装置、存储介质及相关设备
CN114844735B (zh) 一种显示设备及语音转发方法
WO2022017291A1 (zh) 功能冲突的处理方法、装置、电子设备和可读存储介质
CN114844983A (zh) 一种显示设备、通话设备及投屏控制方法
JP6555395B2 (ja) 車載装置、車載装置の制御方法およびプログラム
KR101945174B1 (ko) Ptt 통신 서비스를 실행하기 위한 기록매체에 저장된 프로그램
CN110968233A (zh) 音乐播放切换操作方法、系统、存储介质及设备
WO2024060750A1 (zh) 蓝牙切换方法和装置、蓝牙连接方法和装置及电子设备
JP6747555B2 (ja) 車載装置、車載装置の制御方法、制御プログラム、端末装置、端末装置の制御方法および制御プログラム
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: 16913212

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2016913212

Country of ref document: EP

Effective date: 20190301