WO2019237463A1 - 一种建立bt连接的方法、无线耳机及tws耳机 - Google Patents

一种建立bt连接的方法、无线耳机及tws耳机 Download PDF

Info

Publication number
WO2019237463A1
WO2019237463A1 PCT/CN2018/097398 CN2018097398W WO2019237463A1 WO 2019237463 A1 WO2019237463 A1 WO 2019237463A1 CN 2018097398 W CN2018097398 W CN 2018097398W WO 2019237463 A1 WO2019237463 A1 WO 2019237463A1
Authority
WO
WIPO (PCT)
Prior art keywords
connection
wireless headset
ble
address
establishing
Prior art date
Application number
PCT/CN2018/097398
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 歌尔科技有限公司
Publication of WO2019237463A1 publication Critical patent/WO2019237463A1/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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • 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 technical field of portable listening devices, and in particular, to a method, a device, a wireless headset, a TWS headset, a method for acquiring a Bluetooth address when establishing a BT connection, and a computer-readable storage medium.
  • a TWS (True Wireless Stereo) headset is composed of a first wireless headset and a second wireless headset.
  • the TWS headset technically means that the terminal is connected to the first wireless headset via Bluetooth, and the first wireless headset and the second wireless headset are connected via BT, thereby realizing the true wireless separation of left and right channels of Bluetooth.
  • TWS headsets scan directly through BT to establish a connection.
  • the first wireless headset when the first wireless headset establishes a BT connection with the second wireless headset, it usually takes 22.5ms to scan 32 channels of other devices, and it takes hundreds of milliseconds to establish a connection.
  • This BT connection method takes a long time.
  • the purpose of the present invention is to provide a method, a device, a wireless headset, a TWS headset, a method for obtaining a Bluetooth address when establishing a BT connection, and a computer-readable storage medium, which can solve the cost of establishing a BT connection between existing wireless headsets.
  • the present invention provides a method for establishing a BT connection, including:
  • the first wireless headset When the first wireless headset receives the instruction to establish a BT connection, it starts BLE broadcasting;
  • a BT connection is established according to the BT address of the first wireless headset and the BT address of the second wireless headset.
  • the BLE broadcast is started, including:
  • the first wireless headset detects a preset event that triggers a BT connection, generates a BT connection establishment instruction
  • the method for establishing a BT connection further includes:
  • the preset event is detected by determining a state where the first wireless headset and the second wireless headset have not established a BT connection.
  • the method for establishing a BT connection further includes:
  • the preset event is detected by determining that the first wireless headset changes from a non-working state to a working state change.
  • the BT connection after the BT connection is established, it further includes:
  • the present invention also provides a device for establishing a BT connection, including:
  • BLE broadcast module used to enable BLE broadcast when receiving BT connection establishment instruction
  • a BLE connection module configured to receive a BLE connection request sent by a second wireless headset according to the BLE address of the first wireless headset in the BLE broadcast, and establish a BLE connection;
  • a first BT address acquisition module configured to acquire a BT address of the second wireless headset through the BLE connection
  • the first BT connection module is configured to establish a BT connection according to the BT address of the first wireless headset and the BT address of the second wireless headset.
  • the BLE broadcast module includes:
  • a BT connection instruction unit configured to generate a BT connection instruction when a preset event that triggers a BT connection is detected
  • a BLE broadcast unit is configured to enable BLE broadcast according to the instruction for establishing a BT connection.
  • the BLE broadcast module further includes:
  • a first preset event detection unit configured to detect the preset event by determining a state in which a BT connection is not established between the first wireless headset and the second wireless headset; and / or,
  • a second preset event detection unit is configured to detect the preset event by determining that the first wireless headset changes from a non-working state to a working state change.
  • the device for establishing a BT connection further includes:
  • the BLE disconnection module is configured to disconnect the BLE connection after the BT connection is established.
  • the invention also provides a wireless headset, which includes: a communication interface, a memory, and a processor; wherein the memory is used to store a computer program, and the processor is used to implement the establishment of the BT as described above when the computer program is executed. Steps of the method of connection.
  • the present invention also provides a method for establishing a BT connection, including:
  • the BT connection after the BT connection is established, it further includes:
  • the present invention also provides a device for establishing a BT connection, including:
  • a scanning module configured to obtain the BLE address of the first wireless headset according to the BLE broadcast after scanning the BLE broadcast of the first wireless headset;
  • a BLE connection request sending module configured to use the BLE address of the first wireless headset to initiate a BLE connection request to the first wireless headset to establish a BLE connection;
  • a second BT address obtaining module configured to obtain a BT address of the first wireless headset through the BLE connection
  • the second BT connection module is configured to establish a BT connection according to the BT address of the first wireless headset and the BT address of the second wireless headset.
  • the invention also provides a wireless headset, which includes: a communication interface, a memory, and a processor; wherein the memory is used to store a computer program, and the processor is used to implement the establishment of the BT as described above when the computer program is executed. Steps of the method of connection.
  • the present invention also provides a TWS headset, which includes a first wireless headset and a second wireless headset.
  • the first wireless headset includes: a communication interface, a memory, and a processor; wherein the memory is used to store a computer program, and The processor is configured to enable the BLE broadcast when receiving the instruction to establish a BT connection when the computer program is executed; receive a BLE connection request sent by the second wireless headset according to the BLE address of the first wireless headset in the BLE broadcast, and establish BLE Connect; obtain the BT address of the second wireless headset through the BLE connection; establish a BT connection according to the BT address of the first wireless headset and the BT address of the second wireless headset; the second wireless headset includes: communication An interface, a memory, and a processor; wherein the memory is used to store a computer program, and the processor is configured to implement scanning of a BLE broadcast to a first wireless headset when the computer program is executed to obtain the first BLE broadcast according to the BLE broadcast A BLE address of a wireless headset; using the BLE
  • the invention also provides a method for acquiring a Bluetooth address when establishing a BT connection, including:
  • the first wireless headset When the first wireless headset receives the instruction to establish a BT connection, it starts BLE broadcasting;
  • the invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, when a BT connection establishment instruction is received, a BLE broadcast is started;
  • the wireless headset establishes a BLE connection according to the BLE connection request sent by the BLE address of the first wireless headset in the BLE broadcast; obtains the BT address of the second wireless headset through the BLE connection; and according to the BT of the first wireless headset Address and the BT address of the second wireless headset to establish a BT connection; and / or, when the computer program is executed by the processor, it scans the BLE broadcast of the first wireless headset and obtains the first BLE broadcast according to the BLE broadcast The BLE address of the wireless headset; using the BLE address of the first wireless headset to initiate a BLE connection request to the first wireless headset to establish a BLE connection; obtaining the BT address of the first wireless headset through the BLE connection; Establishing a BT connection with the BT address of the first
  • a method for establishing a BT connection includes: when a first wireless headset receives an instruction to establish a BT connection, start a BLE broadcast; and receive a BLE sent by a second wireless headset according to the BLE address of the first wireless headset in the BLE broadcast
  • the connection request establishes a BLE connection; obtains the BT address of the second wireless headset through the BLE connection; and establishes a BT connection according to the BT address of the first wireless headset and the BT address of the second wireless headset.
  • this method implements BT connection through BLE connection assistance. That is, the BT address sharing of the two wireless headsets is quickly realized through the BLE connection with a fast connection speed. After sharing the BT address, the BT connection is directly performed. This process avoids the long time-consuming scanning to obtain each other during the existing BT connection process.
  • the step of using a Bluetooth address ie, a BT address
  • the current process of BT scanning to obtain the Bluetooth address between each other consumes a lot of power, and the present invention omits this process, so the power consumption of the BT connection process can be reduced.
  • the present invention also provides a device for establishing a BT connection, a wireless headset, a TWS headset, a method for obtaining a Bluetooth address when establishing a BT connection, and a computer-readable storage medium, which have the above-mentioned beneficial effects, and are not repeated here.
  • FIG. 1 is a flowchart of a method for establishing a BT connection according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a specific embodiment of establishing a BT connection according to an embodiment of the present invention
  • FIG. 3 is a structural block diagram of a device for establishing a BT connection according to an embodiment of the present invention
  • FIG. 4 is a flowchart of another method for establishing a BT connection according to an embodiment of the present invention.
  • FIG. 5 is a structural block diagram of another device for establishing a BT connection according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of a method for acquiring a Bluetooth address when establishing a BT connection according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for establishing a BT connection according to an embodiment of the present invention.
  • the execution subject of this embodiment is a first wireless headset.
  • any One wireless headset can be the first wireless headset.
  • the TWS headset includes a master wireless headset and a slave wireless headset
  • the master wireless headset may be the first wireless headset
  • the slave wireless headset may be the first wireless headset.
  • the method may specifically include:
  • the first wireless headset When the first wireless headset receives the instruction to establish a BT connection, it starts BLE broadcasting.
  • the second wireless headset that establishes a BT connection with the first wireless headset is referred to as a second wireless headset in this embodiment
  • Turn on BLE broadcast so that the second wireless headset can obtain the BLE address of the first wireless headset.
  • the BT connection instruction can be a specific high level or low level; or a small piece of data code; or an identifier, etc. Need form.
  • the conditions for generating the BT connection instruction are not limited in this embodiment.
  • the conditions for generating the BT connection instruction may be generated when the first wireless headset and the second wireless headset need to be paired, or the first wireless headset and the second wireless headset are generated.
  • a BT connection establishment instruction is generated.
  • this embodiment does not limit the body that generates the instruction for establishing a BT connection.
  • which device executes the conditions for detecting and generating the BT connection instruction which device generates the BT connection instruction.
  • the main body that generates the instruction to establish a BT connection is the first wireless headset.
  • the execution subject that enables BLE scanning is set to be the same as the execution subject that generates the instruction to establish a BT connection.
  • enabling the BLE broadcast may include:
  • the first wireless headset detects a preset event that triggers a BT connection, generates a BT connection establishment instruction
  • the operations of generating the BT connection establishment instruction and starting the BLE broadcast in this embodiment are implemented by the first wireless headset.
  • the preset event is not limited in this embodiment, and the user may set the actual situation of establishing a BT connection between the first wireless headset and the second wireless headset according to actual needs.
  • the preset event is that the first wireless headset is disconnected from the second wireless headset, or the first wireless headset and / or the second wireless headset is changed from the non-working state to the working state. That is, as long as the first wireless headset detects a preset event set by a user, it can directly generate a BT connection establishment instruction, and then turn on BLE broadcasting.
  • this embodiment does not limit a specific detection method for a preset event, and a corresponding detection method may be determined according to the selected preset event.
  • a preset event may be detected by determining a status in which the first wireless headset and the second wireless headset have not established a BT connection.
  • the preset event may be detected by determining that the first wireless headset changes from the non-working state to a change in the working state.
  • the second wireless headset can scan the BLE broadcast. After scanning the BLE broadcast, the second wireless headset can obtain the BLE address of the first wireless headset from the BLE broadcast. At this time, the second wireless headset sends a BLE connection request to the first wireless headset according to the BLE address of the first wireless headset. According to the BLE connection request, the first wireless headset and the second wireless headset can establish a BLE connection.
  • This embodiment is not limited to an execution subject that performs a BLE connection establishment operation after the first wireless headset receives the BLE connection request.
  • the first wireless headset may first send a first operation to the second wireless headset to start establishing a BLE connection; of course, the second wireless headset may first send a first operation to the first wireless headset to start establishing a BLE connection.
  • the first wireless headset first sends a second operation to the second wireless headset to start establishing a BLE connection.
  • This embodiment does not limit the specific process of establishing a BLE connection, and may refer to the current specific process of establishing a BLE connection.
  • the first wireless headset and the second wireless headset can be connected to each other through BLE, so that the first wireless headset and the second wireless headset can share the Bluetooth address through the BLE connection. That is, the first wireless headset can obtain the BT address of the second wireless headset; the second wireless headset can also obtain the BT address of the first wireless headset.
  • steps S100 to S120 are implemented to share the Bluetooth address of the first wireless headset and the second wireless headset through the BLE connection, which avoids the need to obtain the first wireless headset and the first wireless headset through BT scanning in the prior art.
  • the process of the Bluetooth address between the second wireless headsets saves time for sharing the Bluetooth address.
  • the BLE connection when a BT connection is established between the first wireless headset and the second wireless headset, it usually takes 22.5ms to scan 32 channels of other wireless devices.
  • the BLE connection only takes 0.6 to 1.2 ms to scan to other wireless devices, and it takes only 3 ms to establish a connection. It can be clearly seen that the time required to share the Bluetooth address between the two in this embodiment is shorter than the time required to obtain the mutual Bluetooth address of the two through BT scanning in the prior art. This shortens the time required to establish a BT connection as a whole. Improve the speed of establishing BT connections.
  • the power consumption of scanning other wireless devices during BT connection is large, and the power consumption of BLE scanning to locate other wireless devices is much smaller.
  • the power consumption of BLE positioning other wireless devices is 10 to 20 times lower than the power consumption of BT positioning other wireless devices. Therefore, the overall power consumption for establishing a BT connection in this embodiment is much smaller than the power consumption for establishing a BT connection in the prior art.
  • the first wireless headset obtains the BT address of the second wireless headset through the BLE connection, and obtains its own BT address (that is, the BT address of the first wireless headset). At this time, the first wireless headset has the BT of the first wireless headset. Address and the BT address of the second wireless headset, a BT connection can be established based on these two BT addresses.
  • the first wireless headset and the second wireless headset quickly establish a BT connection.
  • This embodiment is not limited to the execution subject that triggers the BT connection after the two wireless headsets finish sharing the Bluetooth address.
  • the first wireless headset may first issue a first operation to start a BT connection to the second wireless headset; of course, the second wireless headset may first issue a first operation to start a BT connection to the first wireless headset.
  • the first wireless headset first sends a second operation to the second wireless headset to start establishing a BT connection.
  • This embodiment does not limit the specific process of establishing a BT connection, and may refer to the current specific process of establishing a BT connection.
  • the method for establishing a BT connection provided by the embodiment of the present invention solves the problem of the long time required to scan other wireless devices during the prior art BT connection process.
  • the BLE assisted method is used to quickly establish a BLE connection first.
  • the first wireless headset After sharing the Bluetooth address with the second wireless headset, the scanning process of the existing BT is omitted, so that a BT connection can be quickly established.
  • the method may further include:
  • the first wireless headset actively disconnects the BLE connection.
  • the power consumption of the first wireless headset and the second wireless headset can be reduced without affecting the wireless connection between the first wireless headset and the second wireless headset.
  • the first wireless headset detects that a BT connection is needed (that is, in a scenario where a BT connection needs to be established, for example, a user opens a charging box and uses a TWS headset or the first wireless headset is disconnected from the second wireless headset), the BLE broadcast is started;
  • the second wireless headset scans the BLE broadcast, it obtains the BLE address of the first wireless headset
  • the second wireless headset initiates a BLE connection request, and the first wireless headset and the second wireless headset establish a BLE connection;
  • the first wireless headset and the second wireless headset share a Bluetooth address
  • the establishment of the BT connection is assisted by BLE: first, the first wireless headset and the second wireless headset establish a BLE connection through BLE broadcast scanning to realize the Bluetooth address sharing of the first wireless headset and the second wireless headset, and then quickly establish BT after the Bluetooth address sharing connection.
  • the device for establishing a BT connection, a wireless headset, and a TWS headset, a method for obtaining a Bluetooth address when establishing a BT connection, and a computer-readable storage medium are described below.
  • the device for establishing a BT connection, wireless headset, and TWS are described below.
  • the headset, the method for obtaining a Bluetooth address when establishing a BT connection, and the computer-readable storage medium and the method for establishing a BT connection described above may refer to each other.
  • FIG. 3 is a structural block diagram of a device for establishing a BT connection according to an embodiment of the present invention.
  • the device may include:
  • the BLE broadcast module 110 is configured to enable BLE broadcast when receiving a BT connection establishment instruction
  • the BLE connection module 120 is configured to receive a BLE connection request sent by the second wireless headset according to the BLE address of the first wireless headset in the BLE broadcast, and establish a BLE connection;
  • a first BT address acquisition module 130 configured to acquire a BT address of a second wireless headset through a BLE connection
  • the first BT connection module 140 is configured to establish a BT connection according to the BT address of the first wireless headset and the BT address of the second wireless headset.
  • the BLE broadcast module 100 may include:
  • a BT connection instruction unit configured to generate a BT connection instruction when a preset event that triggers a BT connection is detected
  • the BLE broadcast unit is used to enable BLE broadcast according to the instruction for establishing a BT connection.
  • the BLE broadcast module 100 may further include:
  • a first preset event detection unit configured to detect a preset event by determining a state where a BT connection is not established between the first wireless headset and the second wireless headset; and / or,
  • the second preset event detection unit is configured to detect a preset event by determining that the first wireless headset changes from an unoperated state to a changed operating state.
  • any one of the detection units detects a preset event and triggers an operation of generating an instruction to establish a BT connection.
  • the device may further include:
  • the BLE disconnection module is used to disconnect the BLE connection after the BT connection is established.
  • the BLE disconnection module may also be provided in the second wireless headset.
  • the device may be implemented based on a programmable logic device, and the programmable logic device includes an FPGA, a CPLD, a single-chip microcomputer, and the like. These programmable logic devices may be provided in the first wireless headset.
  • An embodiment of the present invention further provides a wireless headset, including: a communication interface, a memory, and a processor; wherein, the memory is used to store a computer program, and the processor is used to execute a computer program to enable the BLE broadcast when a BT connection establishment instruction is received.
  • the processor is further configured to, when executing a computer program, disconnect the BLE connection after establishing a BT connection.
  • FIG. 4 is a flowchart of another method for establishing a BT connection according to an embodiment of the present invention.
  • the execution subject of this embodiment is a second wireless headset.
  • One wireless headset can be a second wireless headset.
  • the TWS headset includes a master wireless headset and a slave wireless headset
  • the master wireless headset may be used as the second wireless headset
  • the slave wireless headset may be used as the second wireless headset.
  • the method may specifically include:
  • the timing of the second wireless headset to start scanning is not limited in this embodiment. For example, it may be in the scanning state all the time, or it may start scanning when it is detected that it is disconnected from the first wireless headset, and of course, it may also start scanning when the second wireless headset changes from the non-working state to the working state.
  • S210. Use the BLE address of the first wireless headset to initiate a BLE connection request to the first wireless headset to establish a BLE connection.
  • this embodiment is not limited to an execution subject that performs an operation of establishing a BLE connection.
  • the first wireless headset may first send a first operation to the second wireless headset to start establishing a BLE connection; of course, the second wireless headset may first send a first operation to the first wireless headset to start establishing a BLE connection.
  • This embodiment also does not limit the specific process of establishing a BLE connection, and may refer to the specific process of currently establishing a BLE connection.
  • the first wireless headset and the second wireless headset quickly establish a BT connection.
  • This embodiment is not limited to the execution subject that triggers the BT connection after the two wireless headsets finish sharing the Bluetooth address.
  • the first wireless headset may first issue a first operation to start a BT connection to the second wireless headset; of course, the second wireless headset may first issue a first operation to start a BT connection to the first wireless headset.
  • This embodiment also does not limit the specific process of establishing a BT connection, and may refer to the specific process of currently establishing a BT connection.
  • steps S200 and S220 are used to realize the sharing of the Bluetooth address of the first wireless headset and the second wireless headset through the BLE connection, which avoids the need to scan the BT to obtain the first wireless headset and The process of the Bluetooth address between the second wireless headsets saves time for sharing the Bluetooth address.
  • the power consumption of scanning other wireless devices during BT connection is large, and the power consumption of BLE scanning to locate other wireless devices is much smaller.
  • the power consumption of BLE positioning other wireless devices is 10 to 20 times lower than the power consumption of BT positioning other wireless devices. Therefore, the overall power consumption for establishing a BT connection in this embodiment is much smaller than the power consumption for establishing a BT connection in the prior art.
  • the method for establishing a BT connection provided by the embodiment of the present invention solves the problem of the long time required to scan other wireless devices during the prior art BT connection process.
  • the BLE assisted method is used to quickly establish a BLE connection first.
  • the first wireless headset After sharing the Bluetooth address with the second wireless headset, the scanning process of the existing BT is omitted, so that a BT connection can be quickly established.
  • the method may further include:
  • the second wireless headset actively disconnects the BLE connection.
  • the power consumption of the first wireless headset and the second wireless headset can be reduced without affecting the wireless connection between the first wireless headset and the second wireless headset.
  • FIG. 5 is a structural block diagram of another device for establishing a BT connection according to an embodiment of the present invention.
  • the device may include:
  • a scanning module 210 configured to obtain the BLE address of the first wireless headset according to the BLE broadcast after scanning the BLE broadcast of the first wireless headset;
  • the BLE connection request sending module 220 is configured to use the BLE address of the first wireless headset to initiate a BLE connection request to the first wireless headset to establish a BLE connection;
  • a second BT address obtaining module 230 configured to obtain a BT address of the first wireless headset through the BLE connection
  • the second BT connection module 240 is configured to establish a BT connection according to the BT address of the first wireless headset and the BT address of the second wireless headset.
  • the device may be implemented based on a programmable logic device, and the programmable logic device includes an FPGA, a CPLD, a single-chip microcomputer, and the like.
  • An embodiment of the present invention further provides a wireless headset, including: a communication interface, a memory, and a processor; wherein the memory is used to store a computer program, and the processor is configured to implement scanning of the second wireless headset to the first wireless headset when the computer program is executed.
  • a wireless headset including: a communication interface, a memory, and a processor; wherein the memory is used to store a computer program, and the processor is configured to implement scanning of the second wireless headset to the first wireless headset when the computer program is executed.
  • An embodiment of the present invention further provides a TWS headset, which includes a first wireless headset and a second wireless headset.
  • the first wireless headset includes a communication interface, a memory, and a processor.
  • the memory is used to store a computer program, and the processor is used to execute
  • the computer program receives the instruction to establish a BT connection, the BLE broadcast is started; the BLE connection request sent by the second wireless headset according to the BLE address of the first wireless headset in the BLE broadcast is established, and the BLE connection is established; BT address; establish a BT connection according to the BT address of the first wireless headset and the BT address of the second wireless headset;
  • the second wireless headset includes: a communication interface, a memory, and a processor; wherein the memory is used to store a computer program and process
  • the device is used to execute the computer program to scan the BLE broadcast of the first wireless headset and obtain the BLE address of the first wireless headset according to the BLE broadcast; use the BLE address of the first wireless headset to initiate a B
  • FIG. 6 is a flowchart of a method for obtaining a Bluetooth address when establishing a BT connection according to an embodiment of the present invention.
  • the execution subject of this embodiment is a first wireless headset.
  • Any of the wireless earphones may be a first wireless earphone.
  • the TWS headset includes a master wireless headset and a slave wireless headset
  • the master wireless headset may be the first wireless headset
  • the slave wireless headset may be the first wireless headset.
  • the method may specifically include:
  • the first wireless headset When the first wireless headset receives the instruction to establish a BT connection, it turns on BLE broadcasting.
  • S310 Receive a BLE connection request sent by the second wireless headset according to the BLE address of the first wireless headset in the BLE broadcast, and establish a BLE connection.
  • the first wireless headset and the second wireless headset can share a Bluetooth address. That is, the first wireless headset can obtain the BT address of the second wireless headset; the second wireless headset can also obtain the BT address of the first wireless headset.
  • steps S300 to S320 are used to share the Bluetooth addresses of the first wireless headset and the second wireless headset through the BLE connection, which avoids the need to obtain the first wireless headset and the first wireless headset through BT scanning in the prior art.
  • the process of the Bluetooth address between the second wireless headsets saves time for sharing the Bluetooth address.
  • the power consumption of scanning other wireless devices during BT connection is large, and the power consumption of BLE scanning to locate other wireless devices is much smaller.
  • the power consumption of BLE positioning other wireless devices is 10 to 20 times lower than the power consumption of BT positioning other wireless devices. Therefore, the overall power consumption of sharing the two Bluetooth addresses in this embodiment is much smaller than the overall power consumption of sharing the two Bluetooth addresses through BT scanning in the prior art.
  • the present invention also provides a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the BLE broadcast instruction is started when the BT connection establishment instruction is received.
  • the second wireless headset is received according to the BLE.
  • the BLE connection request sent by the BLE address of the first wireless headset in the broadcast establishes a BLE connection; obtains the BT address of the second wireless headset through the BLE connection; establishes a BT based on the BT address of the first wireless headset and the BT address of the second wireless headset.
  • the BLE broadcast of the first wireless headset is scanned and the BLE address of the first wireless headset is obtained according to the BLE broadcast; the BLE address of the first wireless headset is used to initiate to the first wireless headset
  • a BLE connection request establishes a BLE connection; obtains the BT address of the first wireless headset through the BLE connection; establishes a BT connection based on the BT address of the first wireless headset and the BT address of the second wireless headset; and / or, the computer program is processed by the processor When it is executed, it will enable BLE broadcast when it receives the instruction to establish a BT connection.
  • BLE connection of the first wireless headset BLE address to send a request to establish connection BLE; BT address of the second acquiring a wireless headset is connected via BLE.
  • the computer-readable storage medium may include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.
  • the medium may include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.
  • RAM random access memory
  • ROM read-only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disks, removable disks, CD-ROMs, or in technical fields Any other form of storage medium is known.
  • the device for establishing a BT connection, a wireless headset, a TWS headset, a method for obtaining a Bluetooth address when establishing a BT connection, and a computer-readable storage medium provided by the present invention have been described in detail above. Specific examples are used herein to explain the principle and implementation of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Landscapes

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

Abstract

本发明公开了一种建立BT连接的方法,涉及便携式收听设备技术领域,包括:第一无线耳机接收到建立BT连接指令时,开启BLE广播;接收第二无线耳机根据BLE广播中第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;通过BLE连接获取第二无线耳机的BT地址;根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。该方法通过连接速度快的BLE连接实现两无线耳机的BT地址共享,避免了BT连接过程中耗时长的扫描过程,进而实现快速建立BT连接。本发明还公开了一种建立BT连接的装置、无线耳机、TWS耳机、建立BT连接时蓝牙地址的获取方法以及计算机可读存储介质,具有上述有益效果。

Description

一种建立BT连接的方法、无线耳机及TWS耳机
本申请要求于2018年6月14日提交中国专利局、申请号2018106127682、发明名称为“一种建立BT连接的方法、无线耳机及TWS耳机”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及便携式收听设备技术领域,特别涉及一种建立BT连接的方法、装置、无线耳机、TWS耳机、建立BT连接时蓝牙地址的获取方法以及计算机可读存储介质。
背景技术
TWS(True Wireless Stereo)耳机由第一无线耳机以及第二无线耳机构成。TWS耳机从技术上来说是指终端通过蓝牙连接第一无线耳机,第一无线耳机与第二无线耳机通过BT方式进行连接,从而实现真正的蓝牙左右声道无线分离使用。
现有的TWS耳机都是通过BT直接进行扫描建立连接。这个过程中第一无线耳机与第二无线耳机建立BT连接时通常需要22.5ms时间才能扫描到其他设备的32个信道,建立连接需要数百毫秒。这种BT连接方式耗时长。
发明内容
本发明的目的是提供一种建立BT连接的方法、装置、无线耳机、TWS耳机、建立BT连接时蓝牙地址的获取方法以及计算机可读存储介质,能够解决现有无线耳机之间建立BT连接耗时长且功耗大的问题。
为解决上述技术问题,本发明提供一种建立BT连接的方法,包括:
第一无线耳机接收到建立BT连接指令时,开启BLE广播;
接收第二无线耳机根据所述BLE广播中所述第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;
通过所述BLE连接获取所述第二无线耳机的BT地址;
根据第一无线耳机的BT地址以及所述第二无线耳机的BT地址,建立BT连接。
可选的,第一无线耳机接收到建立BT连接指令时,开启BLE广播,包括:
第一无线耳机检测到触发BT连接的预设事件时,生成建立BT连接指令;
根据所述建立BT连接指令开启BLE广播。
可选的,所述建立BT连接的方法还包括:
通过确定所述第一无线耳机与所述第二无线耳机未建立BT连接的状态来检测所述预设事件。
可选在,所述建立BT连接的方法还包括:
通过确定所述第一无线耳机从未工作状态转换为工作状态的变化来检测所述预设事件。
可选的,在建立BT连接之后,还包括:
断开所述BLE连接。
本发明还提供一种建立BT连接的装置,包括:
BLE广播模块,用于接收到建立BT连接指令时,开启BLE广播;
BLE连接模块,用于接收第二无线耳机根据所述BLE广播中所述第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;
第一BT地址获取模块,用于通过所述BLE连接获取所述第二无线耳机的BT地址;
第一BT连接模块,用于根据第一无线耳机的BT地址以及所述第二无线耳机的BT地址,建立BT连接。
可选的,所述BLE广播模块,包括:
BT连接指令单元,用于检测到触发BT连接的预设事件时,生成建立BT连接指令;
BLE广播单元,用于根据所述建立BT连接指令开启BLE广播。
可选的,所述BLE广播模块,还包括:
第一预设事件检测单元,用于通过确定所述第一无线耳机与所述第二无线耳机未建立BT连接的状态来检测所述预设事件;和/或,
第二预设事件检测单元,用于通过确定所述第一无线耳机从未工作状态转换为工作状态的变化来检测所述预设事件。
可选的,所述建立BT连接的装置还包括:
BLE断开模块,用于在建立BT连接之后,断开所述BLE连接。
本发明还提供一种无线耳机,包括:通讯接口、存储器、处理器;其中,所述存储器,用于存储计算机程序,所述处理器用于执行所述计算机程序时实现如上述所述的建立BT连接的方法的步骤。
本发明还提供一种建立BT连接的方法,包括:
第二无线耳机扫描到第一无线耳机的BLE广播后根据所述BLE广播获取所述第一无线耳机的BLE地址;
利用所述第一无线耳机的BLE地址向所述第一无线耳机发起BLE连接请求,建立BLE连接;
通过所述BLE连接获取所述第一无线耳机的BT地址;
根据所述第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
可选的,在建立BT连接之后,还包括:
断开所述BLE连接。
本发明还提供一种建立BT连接的装置,包括:
扫描模块,用于扫描到第一无线耳机的BLE广播后根据所述BLE广播获取所述第一无线耳机的BLE地址;
BLE连接请求发送模块,用于利用所述第一无线耳机的BLE地址向所述第一无线耳机发起BLE连接请求,建立BLE连接;
第二BT地址获取模块,用于通过所述BLE连接获取所述第一无线耳机的BT地址;
第二BT连接模块,用于根据所述第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
本发明还提供一种无线耳机,包括:通讯接口、存储器、处理器;其中,所述存储器,用于存储计算机程序,所述处理器用于执行所述计算机程序时实现如上述所述的建立BT连接的方法的步骤。
本发明还提供一种TWS耳机,包括第一无线耳机和第二无线耳机,所述第一无线耳机包括:通讯接口、存储器、处理器;其中,所述存储器,用于存储计算机程序,所述处理器用于执行所述计算机程序时实现接收到建立BT连接指令时,开启BLE广播;接收第二无线耳机根据所述BLE广播中所述第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;通过所述BLE连接获取所述第二无线耳机的BT地址;根据第一无线耳机的BT地址以及所述第二无线耳机的BT地址,建立BT连接;所述第二无线耳机包括:通讯接口、存储器、处理器;其中,所述存储器,用于存储计算机程序,所述处理器用于执行所述计算机程序时实现扫描到第一无线耳机的BLE广播后根据所述BLE广播获取所述第一无线耳机的BLE地址;利用所述第一无线耳机的BLE地址向所述第一无线耳机发起BLE连接请求,建立BLE连接;通过所述BLE连接获取所述第一无线耳机的BT地址;根据所述第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
本发明还提供一种建立BT连接时蓝牙地址的获取方法,包括:
第一无线耳机接收到建立BT连接指令时,开启BLE广播;
接收第二无线耳机根据所述BLE广播中所述第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;
通过所述BLE连接获取所述第二无线耳机的BT地址。
本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现接收到建立BT连接指令时,开启BLE广播;接收第二无线耳机根据所述BLE广播中所述第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;通过所述BLE连接获取所述第二无线耳机的BT地址;根据第一无线耳机的BT地址以及所述第二无线耳机的BT地址,建立BT连接;和/或,所述计算机程序被处理器执行时实现扫描到第一无线耳机的BLE广播后根据所述BLE广播获取所 述第一无线耳机的BLE地址;利用所述第一无线耳机的BLE地址向所述第一无线耳机发起BLE连接请求,建立BLE连接;通过所述BLE连接获取所述第一无线耳机的BT地址;根据所述第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接;和/或,所述计算机程序被处理器执行时实现接收到建立BT连接指令时,开启BLE广播;接收第二无线耳机根据所述BLE广播中所述第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;通过所述BLE连接获取所述第二无线耳机的BT地址。
本发明所提供的一种建立BT连接的方法,包括:第一无线耳机接收到建立BT连接指令时,开启BLE广播;接收第二无线耳机根据BLE广播中第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;通过BLE连接获取第二无线耳机的BT地址;根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
可见,该方法通过BLE连接辅助实现BT连接。即通过连接速度快的BLE连接快速实现两无线耳机的BT地址共享,在共享BT地址后,直接进行BT连接,该过程避免了现有BT连接过程中通过耗时较长的扫描获取相互之间的蓝牙地址(即BT地址)的步骤,节省了获取相互之间蓝牙地址的时间,从而实现快速建立BT连接。进一步,由于现有BT扫描获取相互之间的蓝牙地址的过程功耗很大,本发明省掉了该过程,因此可以降低BT连接过程的功耗。本发明还提供了一种建立BT连接的装置、无线耳机、TWS耳机、建立BT连接时蓝牙地址的获取方法以及计算机可读存储介质,具有上述有益效果,在此不再赘述。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本发明实施例所提供的一种建立BT连接的方法的流程图;
图2为本发明实施例所提供的建立BT连接的具体实施例的流程示意图;
图3为本发明实施例所提供的一种建立BT连接的装置的结构框图;
图4为本发明实施例所提供的另一建立BT连接的方法的流程图;
图5为本发明实施例所提供的另一建立BT连接的装置的结构框图;
图6为本发明实施例所提供的一种建立BT连接时蓝牙地址的获取方法的流程图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于 本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参考图1,图1为本发明实施例所提供的一种建立BT连接的方法的流程图;本实施例的执行主体是第一无线耳机,其中,建立BT连接的两个无线耳机中任何一个无线耳机都可以是第一无线耳机。例如当TWS耳机包含主无线耳机和从无线耳机时,即可以是主无线耳机作为第一无线耳机,也可以是从无线耳机作为第一无线耳机。只要可以实现下述各个步骤的无线耳机都可以称之为第一无线耳机。该方法具体可以包括:
S100、第一无线耳机接收到建立BT连接指令时,开启BLE广播。
具体的,该步骤中第一无线耳机在确定需要与另一个无线耳机(本实施例中将与第一无线耳机建立BT连接的第二无线耳机称之为第二无线耳机)建立BT连接时,开启BLE广播,以使第二无线耳机能够获得第一无线耳机的BLE地址。
本实施例并不限定建立BT连接指令的形式,例如建立BT连接指令可以是一个特定的高电平或低电平;或者是一小段数据代码;或者是一个标识等,可以根据实际情况确定所需形式。
本实施例中并不限定生成建立BT连接指令的条件,例如可以是第一无线耳机和第二无线耳机需要进行配对连接时,生成建立BT连接指令;或者是第一无线耳机和第二无线耳机需要进行回连操作时,生成建立BT连接指令。进一步,本实施例也不限定生成建立BT连接指令的主体。一般情况下,哪个设备执行检测生成建立BT连接指令的条件,哪个设备就会生成建立BT连接指令。例如当第一无线耳机检测到生成建立BT连接指令的条件(即预设事件)时,则生成建立BT连接指令的主体就是第一无线耳机。
进一步,为了提高建立BT连接的效率,设置开启BLE扫描的执行主体和生成建立BT连接指令的执行主体一致,这样避免一个设备在确定需要进行BT连接后,还需要向另一个设备发送建立BT连接指令,使其开启BLE扫描,从而减少两个设备之间的数据交互,即降低数据发送失败的可能性,又减少获取数据的时间消耗。优选的,本实施例中第一无线耳机接收到建立BT连接指令时,开启BLE广播可以包括:
第一无线耳机检测到触发BT连接的预设事件时,生成建立BT连接指令;
根据建立BT连接指令开启BLE广播。
具体的,本实施例中生成建立BT连接指令和开启BLE广播的操作都由第一无线耳机实现。本实施例中并不对预设事件进行限定,用户可以根据实际需要使第一无线耳机和第二无线耳机建立BT连接的实际情况进行设定。例如预设事件为第一无线耳机与第二无线耳机断开连接,或者第一无线耳机和/或第二无线耳机从未工作状态变为工作状态。即只要第一无线耳机检测到用户设定的预设事件后,就可以直接生成建立BT连接指令,进而开启BLE 广播。
进一步,本实施例中并不限定具体对预设事件的检测方式,可以根据选取的预设事件,确定对应的检测方式,例如,当预设事件为第一无线耳机和第二无线耳机连接的状态为未连接,可选的,可以通过确定第一无线耳机与第二无线耳机未建立BT连接的状态来检测预设事件。例如,当预设事件为回连事件,可选的,可以通过确定第一无线耳机从未工作状态转换为工作状态的变化来检测预设事件。
S110、接收第二无线耳机根据BLE广播中第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接。
具体的,在第一无线耳机开启BLE广播后,第二无线耳机能够扫描该BLE广播。第二无线耳机在扫描到BLE广播后就可以从BLE广播中获取第一无线耳机的BLE地址,此时第二无线耳机根据第一无线耳机的BLE地址向其发送BLE连接请求。根据该BLE连接请求,第一无线耳机和第二无线耳机可以建立BLE连接。
本实施例并不限定在第一无线耳机接收到该BLE连接请求后,执行建立BLE连接操作的执行主体。例如可以是第一无线耳机首先向第二无线耳机发出开始建立BLE连接的第一个操作;当然也可以是第二无线耳机首先向第一无线耳机发出开始建立BLE连接的第一个操作。为了提高建立BLE连接的可靠性,优选的,由第一无线耳机首先向第二无线耳机发出开始建立BLE连接的第一个操作。本实施例并不对建立BLE连接的具体过程进行限定,可以参考当前建立BLE连接的具体过程。
S120、通过BLE连接获取第二无线耳机的BT地址。
具体的,通过BLE连接第一无线耳机和第二无线耳机可以实现数据交互,这样第一无线耳机和第二无线耳机就可以通过BLE连接实现蓝牙地址的共享。即第一无线耳机可以获取第二无线耳机的BT地址;第二无线耳机也可以获取第一无线耳机的BT地址。
本实施例中通过步骤S100到步骤S120实现了借助BLE连接,进行第一无线耳机和第二无线耳机的蓝牙地址的共享,避免了现有技术中需要通过BT的扫描来获取第一无线耳机与第二无线耳机相互之间的蓝牙地址的过程,节省共享蓝牙地址的时间。
具体的,现有技术中第一无线耳机与第二无线耳机建立BT连接时通常需要22.5ms时间才能扫描到其他无线设备的32个信道。而实施例中BLE连接中BLE扫描到其他无线设备只需0.6~1.2ms,建立连接只需3ms。可以清楚地看到本实施例中共享两者之间的蓝牙地址所需要的时间要短短小于现有技术中通过BT的扫描来获取两者相互的蓝牙地址的时间。进而缩短整体建立BT连接做需要的时间。提高建立BT连接的速度。
进一步,现有技术中BT连接时扫描其他无线设备的功耗很大,而BLE 扫描定位其他无线设备所需要的功耗要小很多。通常情况下,BLE定位其它无线设备所需的功耗要比BT定位其他无线设备的功耗低10至20倍。因此,本实施例中建立BT连接的整体功耗要远远小于现有技术中建立BT连接的功耗。
S130、根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
其中,第一无线耳机通过BLE连接获取第二无线耳机的BT地址,其自身获取自己的BT地址(即第一无线耳机的BT地址),此时,第一无线耳机具有第一无线耳机的BT地址以及第二无线耳机的BT地址,根据这两个BT地址可以建立BT连接。
具体的,第一无线耳机和第二无线耳机获得彼此蓝牙地址后,快速建立BT连接。本实施例并不限定在两个无线耳机完成共享蓝牙地址后,触发BT连接的执行主体。例如可以是第一无线耳机首先向第二无线耳机发出开始建立BT连接的第一个操作;当然也可以是第二无线耳机首先向第一无线耳机发出开始建立BT连接的第一个操作。为了提高建立BT连接的可靠性,优选的,由第一无线耳机首先向第二无线耳机发出开始建立BT连接的第一个操作。本实施例并不对建立BT连接的具体过程进行限定,可以参考当前建立BT连接的具体过程。
基于上述技术方案,本发明实施例提供的建立BT连接的方法,解决了现有技术BT连接过程中扫描其他无线设备耗时长的问题,采用BLE辅助方式,先快速建立BLE连接,第一无线耳机和第二无线耳机共享蓝牙地址后便省略了现有BT的扫描过程,从而可以快速建立BT连接。
基于上述实施例,在建立BT连接之后还可以包括:
断开BLE连接。
具体的,本实施例中在确定第一无线耳机和第二无线耳机已经建立了BT连接后,第一无线耳机主动断开BLE连接。本实施例通过断开BLE连接可以在不影响第一无线耳机和第二无线耳机无线连接的情况下,减少第一无线耳机和第二无线耳机的功耗。
下面以TWS耳机为例,具体请参考图2。说明上述具体过程:
1、第一无线耳机检测到需要进行BT连接时(即需要建立BT连接场景下,例如用户打开充电盒使用TWS耳机或者第一无线耳机和第二无线耳机断开连接),开启BLE广播;
2、第二无线耳机扫描到BLE广播后,获得第一无线耳机的BLE地址;
3、第二无线耳机发起BLE连接请求,第一无线耳机和第二无线耳机建立BLE连接;
4、第一无线耳机和第二无线耳机共享蓝牙地址;
5、第一无线耳机和第二无线耳机共享蓝牙地址后,建立BT连接;
6、BT连接建立完成后,断开BLE连接。
即通过BLE辅助完成BT连接的建立:首先第一无线耳机和第二无线耳机通过BLE的广播扫描建立BLE连接实现第一无线耳机和第二无线耳机蓝牙地址共享,然后蓝牙地址共享后快速建立BT连接。
下面对本发明实施例提供的建立BT连接的装置、无线耳机、TWS耳机、建立BT连接时蓝牙地址的获取方法以及计算机可读存储介质进行介绍,下文描述的建立BT连接的装置、无线耳机、TWS耳机、建立BT连接时蓝牙地址的获取方法以及计算机可读存储介质与上文描述的建立BT连接的方法可相互对应参照。
请参考图3,图3为本发明实施例所提供的一种建立BT连接的装置的结构框图;该装置可以包括:
BLE广播模块110,用于接收到建立BT连接指令时,开启BLE广播;
BLE连接模块120,用于接收第二无线耳机根据BLE广播中第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;
第一BT地址获取模块130,用于通过BLE连接获取第二无线耳机的BT地址;
第一BT连接模块140,用于根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
基于上述实施例,BLE广播模块100可以包括:
BT连接指令单元,用于检测到触发BT连接的预设事件时,生成建立BT连接指令;
BLE广播单元,用于根据建立BT连接指令开启BLE广播。
基于上述任意实施例,BLE广播模块100还可以包括:
第一预设事件检测单元,用于通过确定第一无线耳机与第二无线耳机未建立BT连接的状态来检测预设事件;和/或,
第二预设事件检测单元,用于通过确定第一无线耳机从未工作状态转换为工作状态的变化来检测预设事件。
具体的,当BLE广播模块100同时具有这两个检测单元时,任何一个检测单元检测到预设事件都会触发生成建立BT连接指令的操作。
基于上述任意实施例,该装置还可以包括:
BLE断开模块,用于在建立BT连接之后,断开BLE连接。
当然,该BLE断开模块也可以设置在第二无线耳机中。
需要说明的是,基于上述任意实施例,所述装置可以是基于可编程逻辑器件实现的,可编程逻辑器件包括FPGA,CPLD,单片机等。这些可编程逻辑器件可以设置在第一无线耳机中。
本发明实施例还提供一种无线耳机,包括:通讯接口、存储器、处理器;其中,存储器,用于存储计算机程序,处理器用于执行计算机程序时实现接收到建立BT连接指令时,开启BLE广播;接收第二无线耳机根据BLE广播中第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;通过BLE连接获取第二无线耳机的BT地址;根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。进一步,处理器还用于执行计算机程序时实现在建立BT连接之后,断开BLE连接。
请参考图4,图4为本发明实施例所提供的另一建立BT连接的方法的流程图;本实施例的执行主体是第二无线耳机,其中,建立BT连接的两个无线耳机中任何一个无线耳机都可以是第二无线耳机。例如当TWS耳机包含主无线耳机和从无线耳机时,即可以是主无线耳机作为第二无线耳机,也可以是从无线耳机作为第二无线耳机。只要可以实现下述各个步骤的无线耳机都可以称之为第二无线耳机。该方法具体可以包括:
S200、第二无线耳机扫描到第一无线耳机的BLE广播后根据BLE广播获取第一无线耳机的BLE地址。
本实施例中并不限定第二无线耳机开始进行扫描的时机。例如可以是一直处于扫描状态,也可以是检测到与第一无线耳机断开连接时开始扫描,当然也可以是第二无线耳机从未工作状态变化为工作状态时开始扫描。S210、利用第一无线耳机的BLE地址向第一无线耳机发起BLE连接请求,建立BLE连接。
具体的,本实施例并不限定执行建立BLE连接操作的执行主体。例如可以是第一无线耳机首先向第二无线耳机发出开始建立BLE连接的第一个操作;当然也可以是第二无线耳机首先向第一无线耳机发出开始建立BLE连接的第一个操作。本实施例也不对建立BLE连接的具体过程进行限定,可以参考当前建立BLE连接的具体过程。
S220、通过BLE连接获取第一无线耳机的BT地址;
S230、根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
具体的,第一无线耳机和第二无线耳机获得彼此蓝牙地址后,快速建立BT连接。本实施例并不限定在两个无线耳机完成共享蓝牙地址后,触发BT连接的执行主体。例如可以是第一无线耳机首先向第二无线耳机发出开始建立BT连接的第一个操作;当然也可以是第二无线耳机首先向第一无线耳机发出开始建立BT连接的第一个操作。本实施例也不对建立BT连接的具体过程进行限定,可以参考当前建立BT连接的具体过程。
本实施例中通过步骤S200和步骤S220实现了借助BLE连接,进行第一无线耳机和第二无线耳机的蓝牙地址的共享,避免了现有技术中需要通过BT 的扫描来获取第一无线耳机与第二无线耳机相互之间的蓝牙地址的过程,节省共享蓝牙地址的时间。
进一步,现有技术中BT连接时扫描其他无线设备的功耗很大,而BLE扫描定位其他无线设备所需要的功耗要小很多。通常情况下,BLE定位其它无线设备所需的功耗要比BT定位其他无线设备的功耗低10至20倍。因此,本实施例中建立BT连接的整体功耗要远远小于现有技术中建立BT连接的功耗。
基于上述技术方案,本发明实施例提供的建立BT连接的方法,解决了现有技术BT连接过程中扫描其他无线设备耗时长的问题,采用BLE辅助方式,先快速建立BLE连接,第一无线耳机和第二无线耳机共享蓝牙地址后便省略了现有BT的扫描过程,从而可以快速建立BT连接。
基于上述实施例,在建立BT连接之后还可以包括:
断开BLE连接。
具体的,本实施例中在确定第一无线耳机和第二无线耳机已经建立了BT连接后,第二无线耳机主动断开BLE连接。本实施例通过断开BLE连接可以在不影响第一无线耳机和第二无线耳机无线连接的情况下,减少第一无线耳机和第二无线耳机的功耗。
请参考图5,图5为本发明实施例所提供的另一建立BT连接的装置的结构框图,该装置可以包括:
扫描模块210,用于扫描到第一无线耳机的BLE广播后根据BLE广播获取第一无线耳机的BLE地址;
BLE连接请求发送模块220,用于利用第一无线耳机的BLE地址向第一无线耳机发起BLE连接请求,建立BLE连接;
第二BT地址获取模块230,用于通过所述BLE连接获取所述第一无线耳机的BT地址;
第二BT连接模块240,用于根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
需要说明的是,基于上述任意实施例,所述装置可以是基于可编程逻辑器件实现的,可编程逻辑器件包括FPGA,CPLD,单片机等。
本发明实施例还提供一种无线耳机,包括:通讯接口、存储器、处理器;其中,存储器,用于存储计算机程序,处理器用于执行计算机程序时实现第二无线耳机扫描到第一无线耳机的BLE广播后根据BLE广播获取第一无线耳机的BLE地址;利用第一无线耳机的BLE地址向第一无线耳机发起BLE连接请求,建立BLE连接;通过BLE连接获取第一无线耳机的BT地址;根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
本发明实施例还提供一种TWS耳机,包括第一无线耳机和第二无线耳 机,第一无线耳机包括:通讯接口、存储器、处理器;其中,存储器,用于存储计算机程序,处理器用于执行计算机程序时实现接收到建立BT连接指令时,开启BLE广播;接收第二无线耳机根据BLE广播中第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;通过BLE连接获取第二无线耳机的BT地址;根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接;第二无线耳机包括:通讯接口、存储器、处理器;其中,存储器,用于存储计算机程序,处理器用于执行计算机程序时实现扫描到第一无线耳机的BLE广播后根据BLE广播获取第一无线耳机的BLE地址;利用第一无线耳机的BLE地址向第一无线耳机发起BLE连接请求,建立BLE连接;通过BLE连接获取第一无线耳机的BT地址;根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
请参考图6,图6为本发明实施例所提供的一种建立BT连接时蓝牙地址的获取方法的流程图;本实施例的执行主体是第一无线耳机,其中,建立BT连接的两个无线耳机中任何一个无线耳机都可以是第一无线耳机。例如当TWS耳机包含主无线耳机和从无线耳机时,即可以是主无线耳机作为第一无线耳机,也可以是从无线耳机作为第一无线耳机。只要可以实现下述各个步骤的无线耳机都可以称之为第一无线耳机。该方法具体可以包括:
S300、第一无线耳机接收到建立BT连接指令时,开启BLE广播;
S310、接收第二无线耳机根据BLE广播中第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;
S320、通过BLE连接获取第二无线耳机的BT地址。
具体的,通过BLE连接,第一无线耳机和第二无线耳机可以实现蓝牙地址的共享。即第一无线耳机可以获取第二无线耳机的BT地址;第二无线耳机也可以获取第一无线耳机的BT地址。
本实施例中通过步骤S300到步骤S320实现了借助BLE连接,进行第一无线耳机和第二无线耳机的蓝牙地址的共享,避免了现有技术中需要通过BT的扫描来获取第一无线耳机与第二无线耳机相互之间的蓝牙地址的过程,节省共享蓝牙地址的时间。
进一步,现有技术中BT连接时扫描其他无线设备的功耗很大,而BLE扫描定位其他无线设备所需要的功耗要小很多。通常情况下,BLE定位其它无线设备所需的功耗要比BT定位其他无线设备的功耗低10至20倍。因此,本实施例中实现两者蓝牙地址共享的整体功耗要远远小于现有技术中通过BT扫描实现两者蓝牙地址共享的整体功耗。
本发明还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现接收到建立BT连接指令时,开 启BLE广播;接收第二无线耳机根据BLE广播中第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;通过BLE连接获取第二无线耳机的BT地址;根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接;和/或,计算机程序被处理器执行时实现扫描到第一无线耳机的BLE广播后根据BLE广播获取第一无线耳机的BLE地址;利用第一无线耳机的BLE地址向第一无线耳机发起BLE连接请求,建立BLE连接;通过BLE连接获取第一无线耳机的BT地址;根据第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接;和/或,计算机程序被处理器执行时实现接收到建立BT连接指令时,开启BLE广播;接收第二无线耳机根据BLE广播中第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;通过BLE连接获取第二无线耳机的BT地址。
该计算机可读存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
以上对本发明所提供的一种建立BT连接的装置、无线耳机、TWS耳机、建立BT连接时蓝牙地址的获取方法以及计算机可读存储介质进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。

Claims (17)

  1. 一种建立BT连接的方法,其特征在于,包括:
    第一无线耳机接收到建立BT连接指令时,开启BLE广播;
    接收第二无线耳机根据所述BLE广播中所述第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;
    通过所述BLE连接获取所述第二无线耳机的BT地址;
    根据第一无线耳机的BT地址以及所述第二无线耳机的BT地址,建立BT连接。
  2. 根据权利要求1所述的建立BT连接的方法,其特征在于,第一无线耳机接收到建立BT连接指令时,开启BLE广播,包括:
    第一无线耳机检测到触发BT连接的预设事件时,生成建立BT连接指令;
    根据所述建立BT连接指令开启BLE广播。
  3. 根据权利要求2所述的建立BT连接的方法,其特征在于,还包括:
    通过确定所述第一无线耳机与所述第二无线耳机未建立BT连接的状态来检测所述预设事件。
  4. 根据权利要求2所述的建立BT连接的方法,其特征在于,还包括:
    通过确定所述第一无线耳机从未工作状态转换为工作状态的变化来检测所述预设事件。
  5. 根据权利要求1-4任一项所述的建立BT连接的方法,其特征在于,在建立BT连接之后,还包括:
    断开所述BLE连接。
  6. 一种建立BT连接的装置,其特征在于,包括:
    BLE广播模块,用于接收到建立BT连接指令时,开启BLE广播;
    BLE连接模块,用于接收第二无线耳机根据所述BLE广播中所述第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;
    第一BT地址获取模块,用于通过所述BLE连接获取所述第二无线耳机的BT地址;
    第一BT连接模块,用于根据第一无线耳机的BT地址以及所述第二无线耳机的BT地址,建立BT连接。
  7. 根据权利要求6所述的建立BT连接的装置,其特征在于,所述BLE广播模块,包括:
    BT连接指令单元,用于检测到触发BT连接的预设事件时,生成建立BT连接指令;
    BLE广播单元,用于根据所述建立BT连接指令开启BLE广播。
  8. 根据权利要求7所述的建立BT连接的装置,其特征在于,所述BLE广播模块,还包括:
    第一预设事件检测单元,用于通过确定所述第一无线耳机与所述第二无 线耳机未建立BT连接的状态来检测所述预设事件;和/或,
    第二预设事件检测单元,用于通过确定所述第一无线耳机从未工作状态转换为工作状态的变化来检测所述预设事件。
  9. 根据权利要求6-8任一项所述的建立BT连接的装置,其特征在于,还包括:
    BLE断开模块,用于在建立BT连接之后,断开所述BLE连接。
  10. 一种无线耳机,其特征在于,包括:通讯接口、存储器、处理器;其中,所述存储器,用于存储计算机程序,所述处理器用于执行所述计算机程序时实现如权利要求1至5任一项所述的建立BT连接的方法的步骤。
  11. 一种建立BT连接的方法,其特征在于,包括:
    第二无线耳机扫描到第一无线耳机的BLE广播后根据所述BLE广播获取所述第一无线耳机的BLE地址;
    利用所述第一无线耳机的BLE地址向所述第一无线耳机发起BLE连接请求,建立BLE连接;
    通过所述BLE连接获取所述第一无线耳机的BT地址;
    根据所述第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
  12. 根据权利要求11所述的建立BT连接的方法,其特征在于,在建立BT连接之后,还包括:
    断开所述BLE连接。
  13. 一种建立BT连接的装置,其特征在于,包括:
    扫描模块,用于扫描到第一无线耳机的BLE广播后根据所述BLE广播获取所述第一无线耳机的BLE地址;
    BLE连接请求发送模块,用于利用所述第一无线耳机的BLE地址向所述第一无线耳机发起BLE连接请求,建立BLE连接;
    第二BT地址获取模块,用于通过所述BLE连接获取所述第一无线耳机的BT地址;
    第二BT连接模块,用于根据所述第一无线耳机的BT地址以及第二无线耳机的BT地址,建立BT连接。
  14. 一种无线耳机,其特征在于,包括:通讯接口、存储器、处理器;其中,所述存储器,用于存储计算机程序,所述处理器用于执行所述计算机程序时实现如权利要求11或12所述的建立BT连接的方法的步骤。
  15. 一种TWS耳机,包括第一无线耳机和第二无线耳机,其特征在于,所述第一无线耳机如权利要求10所述的无线耳机,所述第二无线耳机如权利要求14所述的无线耳机。
  16. 一种建立BT连接时蓝牙地址的获取方法,其特征在于,包括:
    第一无线耳机接收到建立BT连接指令时,开启BLE广播;
    接收第二无线耳机根据所述BLE广播中所述第一无线耳机的BLE地址发送的BLE连接请求,建立BLE连接;
    通过所述BLE连接获取所述第二无线耳机的BT地址。
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述的建立BT连接的方法的步骤;和/或,所述计算机程序被处理器执行时实现如权利要求11或12所述的建立BT连接的方法的步骤;和/或,所述计算机程序被处理器执行时实现如权利要求16所述的建立BT连接时蓝牙地址的获取方法的步骤。
PCT/CN2018/097398 2018-06-14 2018-07-27 一种建立bt连接的方法、无线耳机及tws耳机 WO2019237463A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810612768.2 2018-06-14
CN201810612768.2A CN108449746B (zh) 2018-06-14 2018-06-14 一种建立bt连接的方法、无线耳机及tws耳机

Publications (1)

Publication Number Publication Date
WO2019237463A1 true WO2019237463A1 (zh) 2019-12-19

Family

ID=63206890

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097398 WO2019237463A1 (zh) 2018-06-14 2018-07-27 一种建立bt连接的方法、无线耳机及tws耳机

Country Status (2)

Country Link
CN (1) CN108449746B (zh)
WO (1) WO2019237463A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110908687B (zh) * 2019-11-22 2021-12-07 歌尔股份有限公司 耳机升级方法、耳机组件、升级装置和可读存储介质
CN111629370B (zh) * 2020-05-27 2022-11-04 歌尔科技有限公司 一种蓝牙耳机及其配对连接方法、装置和tws耳机
CN111629369B (zh) * 2020-05-27 2022-11-04 歌尔科技有限公司 一种蓝牙耳机及其配对连接方法、装置和tws耳机
CN112105010B (zh) * 2020-09-22 2024-04-26 深圳市汇顶科技股份有限公司 蓝牙设备间进行地址交换的方法、通信系统以及蓝牙耳机
CN114679710A (zh) * 2020-12-25 2022-06-28 华为技术有限公司 一种tws耳机连接方法及设备
CN116846429A (zh) * 2023-07-07 2023-10-03 苏州墨觉智能电子有限公司 耳机间的近场通信方法、装置、耳机及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106488383A (zh) * 2015-08-28 2017-03-08 宇龙计算机通信科技(深圳)有限公司 一种连接蓝牙设备的方法及装置
US20170134890A1 (en) * 2014-06-06 2017-05-11 BBPOS Limited System and method of bluetooth pairing with a group of bluetooth devices
CN107257516A (zh) * 2017-07-17 2017-10-17 湖南海翼电子商务股份有限公司 无线耳机及其配对方法
CN107809697A (zh) * 2017-11-30 2018-03-16 成都必盛科技有限公司 一种用于与无线耳机建立交互的耳机盒
CN107809696A (zh) * 2017-11-30 2018-03-16 成都必盛科技有限公司 一种与耳机盒建立交互的无线耳机

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120327920A1 (en) * 2011-06-27 2012-12-27 Texas Instruments Incorporated Methods to enhance coexistence with low energy wireless networks
US9800429B2 (en) * 2013-03-15 2017-10-24 Smartbotics Inc. Adaptive home and commercial automation devices, methods and systems based on the proximity of controlling elements
KR20140146362A (ko) * 2013-06-17 2014-12-26 삼성전자주식회사 휴대단말기의 콘텐츠 전송 방법 및 장치
KR102144046B1 (ko) * 2013-10-17 2020-08-13 삼성전자주식회사 전자장치들간 연결 방법 및 장치
KR20150121940A (ko) * 2014-04-22 2015-10-30 삼성전자주식회사 의료 기기와 관련된 정보 제공 방법 및 시스템
CN104318741B (zh) * 2014-10-20 2018-02-02 小米科技有限责任公司 蓝牙设备控制方法及装置
US9826482B2 (en) * 2015-06-26 2017-11-21 Intel Corporation Method of fine grained wake-up modes for Wi-Fi/BT utilizing wake-up receiver
CN106210102A (zh) * 2016-07-20 2016-12-07 广州小鸡快跑网络科技有限公司 基于蓝牙ble的无线升级手柄固件的方法及装置
CN106331276B (zh) * 2016-08-24 2020-07-07 深圳市超世科技有限公司 一种通过蓝牙耳机发送电子名片的装置和方法
CN106507273B (zh) * 2016-10-09 2019-10-08 广州创想云科技有限公司 蓝牙ble通信装置及利用该装置进行通信控制的方法
CN107277754B (zh) * 2017-07-12 2020-02-28 深圳市冠旭电子股份有限公司 一种蓝牙连接的方法及蓝牙外围设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170134890A1 (en) * 2014-06-06 2017-05-11 BBPOS Limited System and method of bluetooth pairing with a group of bluetooth devices
CN106488383A (zh) * 2015-08-28 2017-03-08 宇龙计算机通信科技(深圳)有限公司 一种连接蓝牙设备的方法及装置
CN107257516A (zh) * 2017-07-17 2017-10-17 湖南海翼电子商务股份有限公司 无线耳机及其配对方法
CN107809697A (zh) * 2017-11-30 2018-03-16 成都必盛科技有限公司 一种用于与无线耳机建立交互的耳机盒
CN107809696A (zh) * 2017-11-30 2018-03-16 成都必盛科技有限公司 一种与耳机盒建立交互的无线耳机

Also Published As

Publication number Publication date
CN108449746A (zh) 2018-08-24
CN108449746B (zh) 2021-06-01

Similar Documents

Publication Publication Date Title
WO2019237463A1 (zh) 一种建立bt连接的方法、无线耳机及tws耳机
WO2019237491A1 (zh) 一种无线耳机配对的方法、装置及无线耳机
WO2019232901A1 (zh) 一种语音数据的传输方法、无线耳机及tws耳机
WO2020147342A1 (zh) 一种无线耳机的配对方法、装置、终端及充电盒
WO2019237464A1 (zh) 一种建立单线连接的方法、装置、无线耳机及充电盒
US20210243831A1 (en) Method for establishing classic bluetooth connection between dual-mode bluetooth devices, and dual-mode bluetooth device
WO2018000134A1 (zh) 一种蓝牙连接的方法及终端
CN111246441B (zh) 蓝牙耳机与终端的连接方法、系统及存储介质
US11368777B2 (en) Method and system for upgrading program of TWS headset, and TWS headset
WO2019232912A1 (zh) 一种无线耳机角色切换的方法、无线耳机及tws耳机
CN108810697B (zh) 一种无线耳机配对的方法、装置及无线耳机
CN109547897B (zh) 一种无线耳机连接的方法、装置、系统及无线耳机盒子
US11800337B2 (en) Method and apparatus for establishing Bluetooth data channel
CN109618318A (zh) 一种tws耳机的配对方法及tws耳机
US20200413456A1 (en) Method for pairing and connecting secondary earphone with sound source device
JP2011055472A (ja) 車載端末装置及び車載端末装置用の無線接続プログラム
CN110191389B (zh) 无线耳机的多点连接方法、装置、蓝牙耳机及tws耳机
CN112203179B (zh) Tws耳机及其自动回连方法、装置、计算机存储介质
WO2019019050A1 (zh) 无线通信配对方法、无线接收设备和无线发射设备、系统
CN112437371B (zh) Ble链路的切换方法、设备、耳机对、芯片及介质
WO2023061127A1 (zh) 通信方法、装置、耳机组及计算机可读介质
CN111757307A (zh) 无线耳机的控制方法、无线耳机及可读存储介质
JP7173956B2 (ja) 通信方法、通信装置、電子機器及びコンピュータ可読記憶媒体
CN108696845A (zh) 一种蓝牙设备的自动连接方法及其系统
CN107318153B (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: 18922947

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: 18922947

Country of ref document: EP

Kind code of ref document: A1