WO2022247470A1 - 建立蓝牙链路的方法、装置、设备及存储介质 - Google Patents

建立蓝牙链路的方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2022247470A1
WO2022247470A1 PCT/CN2022/085146 CN2022085146W WO2022247470A1 WO 2022247470 A1 WO2022247470 A1 WO 2022247470A1 CN 2022085146 W CN2022085146 W CN 2022085146W WO 2022247470 A1 WO2022247470 A1 WO 2022247470A1
Authority
WO
WIPO (PCT)
Prior art keywords
bluetooth
target device
paging
target
bluetooth device
Prior art date
Application number
PCT/CN2022/085146
Other languages
English (en)
French (fr)
Inventor
许超杰
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2022247470A1 publication Critical patent/WO2022247470A1/zh
Priority to US18/515,990 priority Critical patent/US20240090049A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • 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
    • H04W68/00User notification, e.g. alerting and paging, for incoming communication, change of service or the like
    • H04W68/02Arrangements for increasing efficiency of notification or paging channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • H04W84/20Master-slave selection or change arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Definitions

  • the embodiments of the present application relate to the technical field of wireless communication, and in particular to a method, device, device, and storage medium for establishing a Bluetooth link.
  • Two Bluetooth-enabled devices can communicate wirelessly by establishing a Bluetooth link.
  • Bluetooth links between one Bluetooth device and multiple target devices.
  • a Bluetooth headset establishes Bluetooth links with two mobile phones, or a Bluetooth headset establishes Bluetooth links with a mobile phone and a laptop computer.
  • the related technology supports the Bluetooth device to serially establish Bluetooth links with multiple target devices. That is, after the Bluetooth device successfully establishes a Bluetooth link with a target device or fails over time, it establishes a Bluetooth link with another target device.
  • Embodiments of the present application provide a method, device, device, and storage medium for establishing a Bluetooth link. Described technical scheme is as follows:
  • a method for establishing a Bluetooth link in a master Bluetooth device comprising:
  • connection notification is used to instruct the secondary Bluetooth device to initiate paging to the second target device as a proxy of the primary Bluetooth device
  • connection information from the secondary Bluetooth device, where the connection information is used for the primary Bluetooth device to communicate with the second target device;
  • a method for establishing a Bluetooth link in a secondary Bluetooth device comprising:
  • connection notification is used to instruct the slave Bluetooth device to initiate paging to the second target device as a proxy of the master Bluetooth device
  • connection information is used for the master Bluetooth device to carry out continuous communication with the second target device to establish the master bluetooth device.
  • a device for establishing a Bluetooth link in a master Bluetooth device comprising:
  • a connection notification sending module configured to send a connection notification to the secondary Bluetooth device, and the connection notification is used to instruct the secondary Bluetooth device to initiate paging to the second target device as a proxy of the primary Bluetooth device;
  • a connection information receiving module configured to receive connection information from the secondary Bluetooth device, and the connection information is used for continuous communication between the primary Bluetooth device and the second target device;
  • a Bluetooth link establishment module configured to establish a second Bluetooth link with the second target device based on the connection information.
  • an apparatus for establishing a Bluetooth link in a secondary Bluetooth device comprising:
  • a connection notification receiving module configured to receive a connection notification from the primary Bluetooth device, the connection notification is used to instruct the secondary Bluetooth device to initiate paging to the second target device as a proxy of the primary Bluetooth device;
  • a paging initiating module configured to initiate paging to the second target device
  • a connection information sending module configured to send connection information to the main Bluetooth device if the paging of the second target device is successful, and the connection information is used for the connection between the main Bluetooth device and the second target device communicating to establish a second Bluetooth link between the master Bluetooth device and the second target device.
  • a Bluetooth device includes a processor and a memory, and a computer program is stored in the memory, and the computer program is executed by the processor to realize the above-mentioned main The method on the side of the Bluetooth device, or implement the method on the side of the auxiliary Bluetooth device.
  • a computer-readable storage medium is provided, and a computer program is stored in the storage medium, and the computer program is executed by a processor to implement the above-mentioned method on the master Bluetooth device side, or to implement The method on the side of the secondary Bluetooth device described above.
  • a computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the bluetooth device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the bluetooth device executes the above-mentioned method on the master bluetooth device side, or executes the above-mentioned method on the auxiliary bluetooth device side.
  • Fig. 1 schematically shows a state diagram of a bluetooth device
  • Fig. 2 schematically shows a flow chart of the bluetooth link establishment process
  • Fig. 3 is a schematic diagram of a solution implementation environment provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of a solution implementation environment provided by another embodiment of the present application.
  • FIG. 5 is a flowchart of a method for establishing a Bluetooth link provided by an embodiment of the present application
  • FIG. 6 is a flowchart of a method for establishing a Bluetooth link provided by another embodiment of the present application.
  • FIG. 7 is a block diagram of a device for establishing a Bluetooth link provided by an embodiment of the present application.
  • FIG. 8 is a block diagram of a device for establishing a Bluetooth link provided by another embodiment of the present application.
  • Fig. 9 is a structural block diagram of a Bluetooth device provided by an embodiment of the present application.
  • FIG. 1 exemplarily shows a state diagram of a Bluetooth device.
  • Inquiry state Once the device wants to discover a new device, it will enter the query state. At this time, the device broadcasts its query packet (ID packet) to all devices within the specified range.
  • the packet contains the IAC (Inquiry Access Code, query access code) ). Packets are sent out by using the query hopping sequence.
  • a device in the query state can also receive query replies (FHS packets), however, the device will not acknowledge these packets.
  • Inquiry scan state When the device wants to receive query packets, it will enter the query scanning state. Scanning is performed according to an inquiry hopping sequence.
  • Paging state (page state). The state entered when a device searches for other devices. The device sends a paging packet (ID packet) using a page hopping sequence to inform other devices that it intends to learn about other devices and their services.
  • ID packet paging packet
  • Page scan state In the paging scanning state, the device listens to the paging sequence containing its own DAC (Device Access Code, device access code). Once the device wants to receive a paging packet, it will enter the paging scanning state, and the scanning will be performed according to the paging frequency hopping sequence. If the device receives a paging packet, it will enter the slave response state.
  • DAC Device Access Code
  • the synchronization training state (synchronization train state) and the synchronization scanning state (synchronization scan state) have little correlation with the technical solution of this application, so they will not be described in detail.
  • FIG. 2 it exemplarily shows a flowchart of a bluetooth link establishment process.
  • This process may include 6 steps (S1-S6) as shown in Table 1 below:
  • a variety of different packet types are defined in the baseband layer of the Bluetooth system, and higher layers use these packets to form high-level PDUs (Protocol Data Unit, protocol data unit).
  • the above packet types include: ID, NULL, POLL, FHS (Frequency Hop Synchronization, frequency hopping synchronization), DM1; in synchronous link (Synchronous Connection Oriented link, referred to as SCO) and asynchronous link (Asynchronous Connectionless Link, referred to as ACL) , both of which define the above packages.
  • DH1, AUX1, DM3, DH3, DM5, and DH5 are only defined in the asynchronous link (ACL).
  • HV1, HV2, HV3, DV are only defined in Synchronous Link (SCO).
  • the ID packet is a 68-bit data packet used for paging, inquiry and response process, mainly composed of device access code (DAC) or inquiry access code (IAC).
  • DAC device access code
  • IAC inquiry access code
  • the FHS packet is a special control packet that contains the device's Bluetooth device address (Bluetooth Device Address) and the clock information of the source device. It contains 144 information bits and 16-bit CRC (Cyclic Redundancy Check, cyclic redundancy check) code. Payload (load) adopts 2/3 Forward Error Correction (FEC for short) encoding, which can make the total length of payload (load) reach 240 bits.
  • An FHS packet covers a single time slot.
  • the POLL packet is similar to the NULL packet (that is, an empty packet).
  • the NULL packet is a 126-bit packet consisting only of a Channel Access Code (CAC) and a packet header. It is used to return connection information to the source device.
  • CAC Channel Access Code
  • the NULL packet Does not have to be confirmed.
  • the difference between a POLL packet and a NULL packet is that a POLL packet requires an acknowledgment from the destination device. Once a POLL packet is received from the master, the slave must send a packet back in response.
  • the master device sends high-frequency ID packets, which use the highest priority from the software point of view, but occupy a high bandwidth from the point of view of the air interface, and generally do not support concurrent paging processes. Therefore, the current related technology only supports the serial connection of Bluetooth.
  • a Bluetooth device When a Bluetooth device needs to connect to multiple target devices, it must first connect to one target device, and then connect to another target device. If the first target device does not turn on Bluetooth, or is out of range, you need to wait until the connection times out before starting to connect to another Bluetooth device. The overall time required is relatively long, the efficiency is low, and the user experience is affected.
  • This application provides a method for establishing a Bluetooth link.
  • the primary Bluetooth device uses the secondary Bluetooth device as its proxy to initiate paging to the target device, thereby effectively overcoming the limitation that a single Bluetooth device cannot initiate paging to multiple target devices at the same time. Realize that the main Bluetooth device initiates paging to a target device.
  • the secondary Bluetooth device acts as the proxy of the main Bluetooth device to initiate paging to another target device, thereby realizing parallel paging of two target devices and shortening the establishment of multiple Bluetooth devices. Time-consuming links required to improve efficiency.
  • Fig. 3 shows a schematic diagram of a solution implementation environment provided by an embodiment of the present application.
  • the solution implementation environment may include: a master Bluetooth device 31 , a slave Bluetooth device 32 , a first target device 33 and a second target device 34 .
  • the master Bluetooth device 31 is a device that initiates a Bluetooth connection, and the master Bluetooth device 31 needs to establish Bluetooth connections with the first target device 33 and the second target device 34 respectively.
  • the connection establishment process between the master Bluetooth device 31 and the first target device 33 and the second target device 34 can be executed in parallel.
  • the master bluetooth device 31 itself initiates paging to the first target device 33, and establishes the first bluetooth link with the first target device 33;
  • the secondary Bluetooth device 32 initiates paging to the second target device 34 , and after the paging is successful, the primary Bluetooth device 31 establishes a second Bluetooth link with the second target device 34 .
  • the above-mentioned main bluetooth device 31, secondary bluetooth device 32, first target device 33 and second target device 34 can be any electronic device that supports bluetooth function (such as having a bluetooth chip), including but not limited to earphones, mobile phones, tablet computers, Wearable devices, notebook computers, vehicle terminal equipment, etc.
  • bluetooth function such as having a bluetooth chip
  • the master Bluetooth device 31 and the slave Bluetooth device 32 may be the left and right earphones of a pair of earphones.
  • the main Bluetooth device is the main Bluetooth headset
  • the secondary Bluetooth device is the secondary Bluetooth headset.
  • the main bluetooth device 31 (or called the main bluetooth headset) is the left earphone
  • the secondary bluetooth device 32 (or called the secondary bluetooth headset) is the right earphone
  • Earphone the secondary Bluetooth device 32 (or called secondary Bluetooth headset) is the left earphone.
  • which of the left and right earphones is the primary Bluetooth device 31 and which is the secondary Bluetooth device 32 can be determined through negotiation between the two earphones, or can be configured by default, which is not limited in this application.
  • a certain user has a pair of TWS (True Wireless Stereo, true wireless stereo) Bluetooth headset and 2 mobile phones (denoted as mobile phone #A and mobile phone #B).
  • TWS Truste Wireless Stereo, true wireless stereo
  • 2 mobile phones denoted as mobile phone #A and mobile phone #B.
  • the left and right earphones are in the earphone box, and there is no Bluetooth connection between mobile phone #A and mobile phone #B.
  • the user opens the earphone box, and the two earphones can adopt the technical solution provided by this application.
  • the main earphone (such as the left earphone) initiates paging to the mobile phone #A by itself, and establishes a bluetooth link with the mobile phone #A;
  • the main earphone (such as the left earphone) uses the secondary earphone (such as the right earphone) as its proxy device, and the secondary earphone (such as the right earphone) initiates paging to the mobile phone #B, and after the paging is successful, the main earphone (such as the left earphone) communicates with the mobile phone# B establishes a Bluetooth link.
  • the above-mentioned primary Bluetooth device 31 and secondary Bluetooth device 32 may also be a set of speakers or other Bluetooth devices, which is not limited in this application.
  • Fig. 5 shows a flowchart of a method for establishing a Bluetooth link provided by an embodiment of the present application.
  • the method can be applied in the scheme implementation environment shown in Figure 3, and the method can include the following steps (510-540):
  • Step 510 the master Bluetooth device sends a connection notification to the slave Bluetooth device, and the connection notification is used to instruct the slave Bluetooth device to initiate paging to the second target device as a proxy of the master Bluetooth device.
  • a Bluetooth connection can be established between the master Bluetooth device and the slave Bluetooth device.
  • the Bluetooth connection between the primary Bluetooth device and the secondary Bluetooth device is called an inter-device Bluetooth link, and the primary Bluetooth device sends a connection notification to the secondary Bluetooth device through the inter-device Bluetooth link .
  • the main Bluetooth device Since a single device does not support concurrent paging process, the main Bluetooth device is in the process of paging the first target device, and can use the secondary Bluetooth device as its proxy device to initiate paging to the second target device, so that the main Bluetooth device will On the one hand, it can initiate paging to the first target device by itself, and initiate paging to the second target device by means of the secondary Bluetooth device, so as to realize parallel paging of two target devices.
  • the DAC of the second target device is included in the connection notification, so that the secondary Bluetooth device knows which device the primary Bluetooth device expects to establish a Bluetooth link with.
  • Step 520 the secondary Bluetooth device initiates paging to the second target device.
  • the secondary Bluetooth device After receiving the connection notification from the primary Bluetooth device, the secondary Bluetooth device initiates paging to the second target device.
  • the secondary bluetooth device sends a paging message to the second target device; Sending a paging response from the master device; afterward, if the secondary Bluetooth device receives the second paging response from the slave device from the second target device, the secondary Bluetooth device determines that the paging of the second target device is successful. That is, the secondary Bluetooth device executes the process of steps S1-S4 shown in FIG. 2 and Table 1 above. Subsequently, the master Bluetooth device executes steps S5-S6 shown in FIG. 2 and Table 1 above, so as to establish a second Bluetooth link between the master Bluetooth device and the second target device.
  • the secondary Bluetooth device determines that paging the second target device has failed.
  • the secondary Bluetooth device may send a paging failure notification to the primary Bluetooth device, where the paging failure notification is used to indicate that the secondary Bluetooth device fails to page the second target device.
  • the primary Bluetooth device can learn that the secondary Bluetooth device failed to page the second target device. Subsequently, if the master Bluetooth device still wants to establish a Bluetooth link with the second target device, it can initiate paging to the second target device by itself.
  • the secondary Bluetooth device performs the above step S3 to send the main device paging response to the second target device, since the main device paging response needs to carry the device that actually establishes a connection with the second target device (that is, the main Bluetooth device) Therefore, before sending the paging response of the primary device to the second target device, the secondary Bluetooth device needs to obtain the relevant information of the primary Bluetooth device.
  • the connection notification sent by the master Bluetooth device to the slave Bluetooth device may carry relevant information of the master Bluetooth device.
  • the slave Bluetooth device after receiving the first paging response from the slave device from the second target device, the slave Bluetooth device sends an information acquisition request to the master Bluetooth device, where the information acquisition request is used to request to acquire relevant information of the master Bluetooth device; correspondingly, After receiving the information acquisition request, the master bluetooth device sends relevant information of the master bluetooth device to the slave bluetooth device.
  • the secondary Bluetooth device can also acquire relevant information of the primary Bluetooth device at other appropriate occasions, which is not limited in this application.
  • the relevant information of the master Bluetooth device refers to the information that needs to be carried in the paging response of the master device, including but not limited to at least one of the following: LAP (LAN Access Point, local area network access point), UAP (Upper Address Portion, high address part), NAP (Non-significant Address Portion, non-significant address part), device type, device address (LT_ADDR (Logical Transport Access Request Address, Logical Transport Access Request Address)), clock information, paging scan mode.
  • the secondary Bluetooth device sends a paging message to the second target device; if the secondary Bluetooth device receives the first paging response from the second target device, the secondary Bluetooth device determines to page the second target device.
  • the second target device succeeds. That is, the secondary Bluetooth device executes the process of steps S1-S2 shown in FIG. 2 and Table 1 above. Subsequently, the master Bluetooth device executes steps S3-S6 shown in FIG. 2 and Table 1 above, so as to establish a second Bluetooth link between the master Bluetooth device and the second target device.
  • the secondary Bluetooth device determines that paging the second target device fails.
  • the secondary Bluetooth device may send a paging failure notification to the primary Bluetooth device, where the paging failure notification is used to indicate that the secondary Bluetooth device fails to page the second target device.
  • the primary Bluetooth device can learn that the secondary Bluetooth device failed to page the second target device. Subsequently, if the master Bluetooth device still wants to establish a Bluetooth link with the second target device, it can initiate paging to the second target device by itself.
  • the secondary Bluetooth device does not need to perform the above step S3 to send the primary device paging response to the second target device, but the primary Bluetooth device performs the above step S3 to send the primary device paging response to the second target device, Therefore, the relevant information of the master Bluetooth device described above may not be provided to the slave Bluetooth device.
  • Step 530 if the paging of the second target device is successful, then the secondary Bluetooth device sends connection information to the primary Bluetooth device, and the connection information is used for the primary Bluetooth device to continue communication with the second target device.
  • the secondary Bluetooth device sends connection information to the primary Bluetooth device through the Bluetooth link between devices.
  • the so-called continuous communication means that the main Bluetooth device does not need to initiate paging to the second target device, and can directly use the connection information to communicate with the second target device, such as exchanging the necessary information required to establish a Bluetooth link, and realize the main Bluetooth device.
  • a Bluetooth link is established with the second target device.
  • connection information includes clock synchronization information
  • the clock synchronization information is used to enable the master Bluetooth device and the second target device to communicate at the same frequency point.
  • the clock synchronization information may be clock offset information
  • the master Bluetooth device can adjust its own clock according to the clock offset information, so that the master Bluetooth device and the second target device can communicate at the same frequency point.
  • Step 540 the master Bluetooth device establishes a second Bluetooth link with the second target device based on the connection information.
  • the master Bluetooth device After receiving the connection information from the slave Bluetooth device, the master Bluetooth device establishes a second Bluetooth link with the second target device based on the connection information.
  • the Bluetooth link between the master Bluetooth device and the second target device is called a second Bluetooth link.
  • the primary Bluetooth device determines the target frequency point based on the connection information, and sends a message to the second target device at the target frequency point
  • Send an LMP (Link Manager Protocol, link management protocol) feature exchange request which includes the feature information of the main Bluetooth device in the LMP feature exchange request, and receives an LMP feature exchange response from the second target device, including the first LMP feature exchange response
  • LMP Link Manager Protocol, link management protocol
  • the characteristic information of the second target device is stored, and the characteristic information of the second target device is saved, and an LMP establishment complete message is sent to the second target device, and the LMP establishment complete message is used to indicate that the Bluetooth link establishment is completed. That is, after the master Bluetooth device determines the target frequency point based on the connection information, it executes the processes of steps S5-S6 shown in FIG. 2 and Table 1 above to complete the establishment process of the Bluetooth link.
  • the master Bluetooth device determines the target frequency point based on the connection information, and sends a message to the second target device at the target frequency point The device sends a master page response. If receiving the second paging response from the second target device from the device, an LMP feature exchange request is sent to the second target device, and the LMP feature exchange request includes the feature information of the master Bluetooth device.
  • the LMP feature exchange response includes feature information of the second target device, save the feature information of the second target device, and send an LMP establishment complete message to the second target device, the LMP The establishment complete message is used to indicate that the establishment of the Bluetooth link is completed. That is, after the master Bluetooth device determines the target frequency point based on the connection information, it executes the processes of steps S3-S6 shown in FIG. 2 and Table 1 above to complete the establishment process of the Bluetooth link.
  • the master Bluetooth device initiates paging to the first target device, and if the paging of the first target device succeeds, the master Bluetooth device establishes a first Bluetooth link with the first target device; wherein, the establishment of the second Bluetooth link The process is performed in parallel with the establishment process of the first Bluetooth link.
  • the Bluetooth link between the master Bluetooth device and the first target device is called the first Bluetooth link
  • the establishment process of the first Bluetooth link can refer to the steps shown in Figure 2 and Table 1 The process of S1 ⁇ S6.
  • the primary Bluetooth device uses the secondary Bluetooth device as its proxy to initiate paging to the target device, thereby effectively overcoming the problem that a single Bluetooth device cannot simultaneously initiate paging to multiple target devices.
  • the main Bluetooth device initiates paging to a target device, and in parallel, the secondary Bluetooth device acts as the proxy of the main Bluetooth device to initiate paging to another target device, thereby realizing parallel paging of two target devices, shortening the establishment of multiple The time-consuming required for each Bluetooth link improves efficiency.
  • the secondary Bluetooth device performs the above step S3 to send the primary device paging response to the second target device, then the primary Bluetooth device performs relatively few steps, and the secondary Bluetooth device performs as many steps as possible. share the steps as much as possible, so as to make full use of the processing resources of the secondary Bluetooth device and reduce the processing capacity of the primary Bluetooth device as much as possible; if the primary Bluetooth device executes the above step S3 to send the primary device paging response to the second target device, then the above Relevant information of the master Bluetooth device does not need to be provided to the slave Bluetooth device, which helps to reduce signaling overhead between the master and slave Bluetooth devices.
  • Fig. 6 shows a flowchart of a method for establishing a Bluetooth link provided by another embodiment of the present application.
  • the master Bluetooth device is the master Bluetooth headset
  • the slave Bluetooth device is the slave Bluetooth headset.
  • the application of the method in the implementation environment of the solution shown in FIG. 4 is used as an example for illustration.
  • the preset conditions include: the mobile phone #A has been paired with the headset, and the Bluetooth of the mobile phone #A is turned on or off; the mobile phone #B and the headset have been paired, and the Bluetooth of the mobile phone #B is turned on or off; the left earphone and the right earphone are both in the earphone box ;The earphone box is closed; there is no Bluetooth connection between the left earphone and the right earphone; there is no Bluetooth connection between the left earphone/right earphone and the mobile phone (including mobile phone #A and mobile phone #B).
  • the user usage scenario is: the earphone box is opened, and the earphone automatically connects back to mobile phone #A and mobile phone #B.
  • each earphone is divided into two parts: the main program (Host) and the controller (Controller); among them, the main program is the upper layer software, and the controller is the underlying hardware module, which is responsible for processing the Bluetooth technology wireless signal. send and receive.
  • the main program is the upper layer software
  • the controller is the underlying hardware module, which is responsible for processing the Bluetooth technology wireless signal. send and receive.
  • the method may include the following steps (601-614):
  • step 601 the user opens the earphone box, and the earphone box sends box opening events to the left earphone and the right earphone respectively.
  • the earphone box sends box opening events to the main program of the left earphone and the main program of the right earphone respectively.
  • Step 602 establishing a connection between the left earphone and the right earphone, performing role arbitration and merging PDL (Paired Device List, paired device list).
  • the purpose of role arbitration is to determine the role between two headsets.
  • the result of role arbitration assumes that the left earphone takes the primary role (that is, the left earphone is the master Bluetooth device), and the right earphone takes the secondary role (that is, the right earphone is the secondary Bluetooth device).
  • the role arbitration process can be as follows: the left headset sends its status information to the right headset, and the status information includes: (a) whether it is in the charging box of the headset, (b) whether it is connected to a mobile phone, (c) ) whether a call service is in progress, (d) whether a music service is in progress, etc.
  • the right earphone will combine its status information with that of the left earphone to determine its own role.
  • the right earphone replies its role information to the left earphone. It should be noted that, for different Bluetooth devices, the process of role arbitration may be different, which is not limited in this application.
  • the purpose of merging PDL is to merge the PDLs of the two headphones together. Since the two earphones can be used independently, it is possible that the two earphones are paired with different devices. For example, the left earphone is paired with mobile phone #A, and the address and key of mobile phone #A are saved, and the right earphone is paired with mobile phone #B, and The address and key of mobile phone #B are saved. After this process is completed, both the left earphone and the right earphone will save the address and key of mobile phone #A and the address and key of mobile phone #B.
  • the process of merging PDL can be as follows: the left earphone sends its pairing record to the right earphone, the right earphone merges the PDL and saves the merged PDL, the right earphone sends the merged PDL to the left earphone, the left earphone The headset saves the merged PDL. It should be noted that, for different Bluetooth devices, the process of merging PDL may be different, which is not limited in this application.
  • the main earphone (such as the left earphone) only needs to connect to one target device at most; if the number of paired devices included in the merged PDL If it is greater than or equal to 2 (indicated as PDL ⁇ 2), the main earphone (such as the left earphone) needs to be connected to at least two target devices.
  • Figure 6 shows the process of PDL ⁇ 2, where mobile phone #A is the main earphone (such as the left earphone) to manage the connection status, and the main earphone initiates paging to mobile phone #A, and mobile phone #B is the main earphone (such as the left earphone) ) to manage the connection status, but use the secondary earphone (such as the right earphone) as a proxy to initiate paging to mobile phone #B.
  • mobile phone #A is the main earphone (such as the left earphone) to manage the connection status
  • mobile phone #B is the main earphone (such as the left earphone) ) to manage the connection status
  • secondary earphone such as the right earphone
  • the bluetooth link establishment process of mobile phone #A includes steps 603-605.
  • Step 603 the main program of the left earphone sends a connection creation command to the controller of the left earphone.
  • connection creation command can be the standard HCI_Create_Connection command.
  • step 604 the controller of the left earphone and the mobile phone #A perform the above steps S1-S6 to establish a bluetooth link between the left earphone and the mobile phone #A.
  • Step 605 after the Bluetooth link is established, the controller of the left earphone sends a connection completion event to the main program of the left earphone.
  • connection complete event may be a standard HCI_Connection_Complete event.
  • the bluetooth link establishment process of mobile phone #B includes steps 606-614.
  • Step 606 the main program of the left earphone sends a connection notification to the main program of the right earphone, and the connection notification is used to instruct the right earphone to act as a proxy of the left earphone to initiate paging to mobile phone #B.
  • Step 607 the main program of the right earphone sends a connection creation command to the controller of the right earphone.
  • connection creation command can be a standard HCI_Create_Connection command or a private Create_Connection command.
  • Step 608 the controller of the right earphone initiates paging to mobile phone #B.
  • Step 609 if the mobile phone #B is successfully paged, the controller of the right earphone sends a paging success event to the main program of the right earphone.
  • the paging success event may be Page_Complete Event-Success or Vendor_Connection_Complete Event-Page Success.
  • Step 610 if the paging of mobile phone #B fails, the controller of the right earphone sends a paging failure event to the main program of the right earphone.
  • the paging failure event may be Page_Complete Event-Timeout or Vendor_Connection_Complete Event-Page Timeout.
  • Step 611 the main program of the right earphone sends the connection result to the main program of the left earphone.
  • the main program of the right earphone when the main program of the right earphone receives the paging success event, the main program of the right earphone sends a successful connection result (also called a paging success notification) to the main program of the left earphone, and carries the connection information , the connection information includes clock synchronization information, which is used to enable the left earphone to communicate with mobile phone #B at the same frequency; when the main program of the right earphone receives a paging failure event, the main program of the right earphone The program sends the connection failure result (also called paging failure notification) to the main program of the left earphone.
  • the connection information may also include information such as address information and device type, which is not limited in this embodiment of the present application.
  • Step 612 the controller of the right earphone sends a paging completion indication to the controller of the left earphone.
  • the paging completion indication may be Page_Complete indication.
  • Step 613 the process of the above steps 5-6 is executed between the controller of the left earphone and the mobile phone #B, and the bluetooth link between the left earphone and the mobile phone #B is established.
  • characteristic information is exchanged between the left earphone and the right earphone, and then an LMP establishment complete message is sent.
  • Step 614 after the Bluetooth link is established, the controller of the left earphone sends a connection completion event to the main program of the left earphone.
  • connection complete event may be a Connection_Complete event.
  • the secondary earphone executes the above step S3 to send the main device paging response to the mobile phone #B, that is, the secondary earphone (ie, the right earphone) performs steps S1-S4 and the main earphone (that is, the left earphone) continue to perform steps S5-S6, and finally establish a bluetooth link between the main earphone (that is, the left earphone) and the mobile phone #B.
  • the above step S3 may also be performed by the main earphone (ie, the left earphone) to send the paging response of the main device to the mobile phone #B, that is, the secondary earphone (ie, the right earphone) performs steps S1-S2 and the main earphone (ie, The left earphone) continues to perform steps S3-S6, and finally establishes a bluetooth link between the main earphone (ie, the left earphone) and the mobile phone #B.
  • the main earphone ie, the left earphone
  • connection request is sent to the auxiliary earphone to realize the parallel connection of two target devices (such as two mobile phones).
  • two target devices such as two mobile phones
  • the technical solution of the present application is introduced and described only from the perspective of interaction between the master Bluetooth device and the slave Bluetooth device.
  • the above-mentioned steps performed by the master Bluetooth device can be independently implemented as a Bluetooth link establishment method on the master Bluetooth device side
  • the above-mentioned steps performed by the slave Bluetooth device can be independently implemented as a Bluetooth link establishment method on the slave Bluetooth device side.
  • Fig. 7 shows a block diagram of an apparatus for establishing a Bluetooth link in a master Bluetooth device provided by an embodiment of the present application.
  • the apparatus has the function of realizing the above-mentioned method example on the master Bluetooth device side, and the function may be realized by hardware, or may be realized by hardware executing corresponding software.
  • the device may be the master Bluetooth device described above, or be set in the master Bluetooth device.
  • the apparatus 700 may include: a connection notification sending module 710 , a connection information receiving module 720 and a Bluetooth link establishing module 730 .
  • the connection notification sending module 710 is configured to send a connection notification to the secondary Bluetooth device, and the connection notification is used to instruct the secondary Bluetooth device to initiate paging to the second target device as a proxy of the primary Bluetooth device.
  • the connection information receiving module 720 is configured to receive connection information from the secondary Bluetooth device, and the connection information is used for the main Bluetooth device to communicate with the second target device.
  • a Bluetooth link establishment module 730 configured to establish a second Bluetooth link with the second target device based on the connection information.
  • the Bluetooth link establishment module 730 is configured to:
  • the Bluetooth link establishment module 730 is configured to:
  • an LMP feature exchange request is sent to the second target device, and the LMP feature exchange request includes feature information of the master Bluetooth device;
  • connection information includes clock synchronization information
  • the clock synchronization information is used to enable the master Bluetooth device and the second target device to communicate at the same frequency point.
  • the apparatus 700 further includes: a failure notification receiving module, configured to receive a paging failure notification from the secondary Bluetooth device, and the paging failure notification is used to instruct the secondary Bluetooth device to paging The second target device failed.
  • a failure notification receiving module configured to receive a paging failure notification from the secondary Bluetooth device, and the paging failure notification is used to instruct the secondary Bluetooth device to paging The second target device failed.
  • the apparatus 700 further includes a paging initiating module, configured to initiate paging to the first target device.
  • the Bluetooth link establishment module 730 is further configured to establish a first Bluetooth link with the first target device if the paging of the first target device is successful.
  • the establishment process of the second Bluetooth link is executed in parallel with the establishment process of the first Bluetooth link.
  • the primary Bluetooth device is a primary Bluetooth headset
  • the secondary Bluetooth device is a secondary Bluetooth headset.
  • Fig. 8 shows a block diagram of an apparatus for establishing a Bluetooth link in a secondary Bluetooth device according to another embodiment of the present application.
  • the device has the function of realizing the above-mentioned method example on the side of the secondary Bluetooth device, and the function may be realized by hardware, or may be realized by hardware executing corresponding software.
  • the device may be the secondary bluetooth device described above, or may be set in the secondary bluetooth device.
  • the apparatus 800 may include: a connection notification receiving module 810 , a paging initiating module 820 and a connection information sending module 830 .
  • the connection notification receiving module 810 is configured to receive a connection notification from the primary Bluetooth device, and the connection notification is used to instruct the secondary Bluetooth device to initiate paging to the second target device as a proxy of the primary Bluetooth device.
  • a paging initiating module 820 configured to initiate paging to the second target device.
  • the connection information sending module 830 is configured to send connection information to the main Bluetooth device if the paging of the second target device is successful, and the connection information is used for the communication between the main Bluetooth device and the second target device Continue communication to establish a second Bluetooth link between the master Bluetooth device and the second target device.
  • the paging initiation module 820 is configured to:
  • the second paging response from the second target device is received from the slave device, it is determined that the second target device is successfully paged.
  • the paging initiation module 820 is configured to:
  • connection information includes clock synchronization information
  • the clock synchronization information is used to enable the master Bluetooth device and the second target device to communicate at the same frequency point.
  • the apparatus 800 further includes: a failure notification sending module, configured to send a paging failure notification to the main Bluetooth device if the paging of the second target device fails, the paging failure The notification is used to indicate that the secondary Bluetooth device fails to page the second target device.
  • a failure notification sending module configured to send a paging failure notification to the main Bluetooth device if the paging of the second target device fails, the paging failure The notification is used to indicate that the secondary Bluetooth device fails to page the second target device.
  • the establishment process of the second Bluetooth link is executed in parallel with the establishment process of the first Bluetooth link, and the first Bluetooth link is between the master Bluetooth device and the first target device Bluetooth link.
  • the primary Bluetooth device is a primary Bluetooth headset
  • the secondary Bluetooth device is a secondary Bluetooth headset.
  • the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional modules according to the needs.
  • the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the device and the method embodiment provided by the above embodiment belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
  • Fig. 9 shows a structural block diagram of a Bluetooth device provided by an embodiment of the present application.
  • the bluetooth device can be used to implement the functions of the above bluetooth link establishment method.
  • the Bluetooth device 90 may include: a processor 91 , a receiver 92 , a transmitter 93 , a memory 94 and a bus 95 .
  • the processor 91 includes one or more processing cores, and the processor 101 executes various functional applications and information processing by running software programs and modules.
  • the receiver 92 and the transmitter 93 can be implemented as a communication component, which can be a communication chip.
  • the memory 94 is connected to the processor 91 through the bus 95 .
  • the memory 94 can be used to store a computer program, and the processor 91 is used to execute the computer program, so as to realize various steps in the above method embodiments.
  • memory 94 can be realized by any type of volatile or nonvolatile storage device or their combination, and volatile or nonvolatile storage device includes but not limited to: RAM (Random-Access Memory, random access memory) And ROM (Read-Only Memory, read-only memory), EPROM (Erasable Programmable Read-Only Memory, erasable programmable read-only memory), EEPROM (Electrically Erasable Programmable Read-Only Memory, electrically erasable programmable read-only memory memory), flash memory or other solid-state memory technology, CD-ROM (Compact Disc Read-Only Memory, CD-ROM), DVD (Digital Video Disc, high-density digital video disc) or other optical storage, tape cartridge, tape, disk storage or other magnetic storage devices.
  • RAM Random-Access Memory, random access memory
  • ROM Read-Only Memory, read-only memory
  • EPROM Erasable Programmable Read-Only Memory, erasable programmable read-only memory
  • EEPROM Electrically Erasable Programmable
  • a computer-readable storage medium is also provided, and a computer program is stored in the storage medium.
  • the computer program is executed by a processor of a Bluetooth device, the above-mentioned method of establishing a Bluetooth link is implemented.
  • the computer-readable storage medium may include: ROM, RAM, SSD (Solid State Drives, solid state disk) or optical disc, etc.
  • the random access memory may include ReRAM (Resistance Random Access Memory, resistive random access memory) and DRAM (Dynamic Random Access Memory, dynamic random access memory).
  • a computer program product comprising computer instructions stored on a computer readable storage medium.
  • a processor of the Bluetooth device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the Bluetooth device executes the above-mentioned method for establishing a Bluetooth link.
  • the "plurality” mentioned herein refers to two or more than two.
  • “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently.
  • the character "/” generally indicates that the contextual objects are an "or” relationship.
  • the numbering of the steps described herein only exemplarily shows a possible sequence of execution among the steps. In some other embodiments, the above-mentioned steps may not be executed according to the order of the numbers, such as two different numbers The steps are executed at the same time, or two steps with different numbers are executed in the reverse order as shown in the illustration, which is not limited in this embodiment of the present application.

Abstract

本申请公开了一种建立蓝牙链路的方法、装置、设备及存储介质,涉及无线通信技术领域。所述方法包括:主蓝牙设备向副蓝牙设备发送连接通知,该连接通知用于指示副蓝牙设备作为主蓝牙设备的代理,向第二目标设备发起寻呼(510);副蓝牙设备向第二目标设备发起寻呼(520);若寻呼第二目标设备成功,则副蓝牙设备向主蓝牙设备发送连接信息,该连接信息用于供主蓝牙设备与第二目标设备进行接续通信(530);主蓝牙设备基于连接信息与第二目标设备建立第二蓝牙链路(540)。本申请克服了单个蓝牙设备无法同时向多个目标设备发起寻呼的限制,实现并行寻呼两个目标设备,缩短建立多个蓝牙链路所需的耗时,提升效率。

Description

建立蓝牙链路的方法、装置、设备及存储介质
本申请要求于2021年05月24日提交的申请号为202110565801.2、发明名称为“建立蓝牙链路的方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及无线通信技术领域,特别涉及一种建立蓝牙链路的方法、装置、设备及存储介质。
背景技术
两个支持蓝牙功能的设备之间,可以通过建立蓝牙链路进行无线通信。
在一些场景中,需要将一个蓝牙设备与多个目标设备建立蓝牙链路。例如,蓝牙耳机与两个手机均建立蓝牙链路,或者蓝牙耳机与一个手机和一个笔记本电脑均建立蓝牙链路。相关技术支持蓝牙设备串行与多个目标设备建立蓝牙链路。即,在蓝牙设备与一个目标设备建立蓝牙链路成功或超时失败之后,再与另一个目标设备建立蓝牙链路。
显然,这种串行连接方式需要的时间比较长,效率较低。
发明内容
本申请实施例提供了一种建立蓝牙链路的方法、装置、设备及存储介质。所述技术方案如下:
根据本申请实施例的一个方面,提供了一种在主蓝牙设备中建立蓝牙链路的方法,所述方法包括:
向副蓝牙设备发送连接通知,所述连接通知用于指示所述副蓝牙设备作为所述主蓝牙设备的代理,向第二目标设备发起寻呼;
接收来自所述副蓝牙设备的连接信息,所述连接信息用于供所述主蓝牙设备与所述第二目标设备进行接续通信;
基于所述连接信息与所述第二目标设备建立第二蓝牙链路。
根据本申请实施例的一个方面,提供了一种在副蓝牙设备中建立蓝牙链路的方法,所述方法包括:
接收来自主蓝牙设备的连接通知,所述连接通知用于指示所述副蓝牙设备作为所述主蓝牙设备的代理,向第二目标设备发起寻呼;
向所述第二目标设备发起寻呼;
若寻呼所述第二目标设备成功,则向所述主蓝牙设备发送连接信息,所述连接信息用于供所述主蓝牙设备与所述第二目标设备进行接续通信,以建立所述主蓝牙设备与所述第二目标设备之间的第二蓝牙链路。
根据本申请实施例的一个方面,提供了一种在主蓝牙设备中建立蓝牙链路 的装置,所述装置包括:
连接通知发送模块,用于向副蓝牙设备发送连接通知,所述连接通知用于指示所述副蓝牙设备作为所述主蓝牙设备的代理,向第二目标设备发起寻呼;
连接信息接收模块,用于接收来自所述副蓝牙设备的连接信息,所述连接信息用于供所述主蓝牙设备与所述第二目标设备进行接续通信;
蓝牙链路建立模块,用于基于所述连接信息与所述第二目标设备建立第二蓝牙链路。
根据本申请实施例的一个方面,提供了一种在副蓝牙设备中建立蓝牙链路的装置,所述装置包括:
连接通知接收模块,用于接收来自主蓝牙设备的连接通知,所述连接通知用于指示所述副蓝牙设备作为所述主蓝牙设备的代理,向第二目标设备发起寻呼;
寻呼发起模块,用于向所述第二目标设备发起寻呼;
连接信息发送模块,用于若寻呼所述第二目标设备成功,则向所述主蓝牙设备发送连接信息,所述连接信息用于供所述主蓝牙设备与所述第二目标设备进行接续通信,以建立所述主蓝牙设备与所述第二目标设备之间的第二蓝牙链路。
根据本申请实施例的一个方面,提供了一种蓝牙设备,所述蓝牙设备包括处理器和存储器,所述存储器中存储有计算机程序,所述计算机程序由所述处理器执行,以实现上述主蓝牙设备侧的方法,或者实现上述辅蓝牙设备侧的方法。
根据本申请实施例的一个方面,提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序由处理器执行,以实现上述主蓝牙设备侧的方法,或者实现上述辅蓝牙设备侧的方法。
根据本申请实施例的一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。蓝牙设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该蓝牙设备执行上述主蓝牙设备侧的方法,或者执行上述辅蓝牙设备侧的方法。
附图说明
图1示例性示出了蓝牙设备的状态图;
图2示例性示出了蓝牙链路建立过程的流程图;
图3是本申请一个实施例提供的方案实施环境的示意图;
图4是本申请另一个实施例提供的方案实施环境的示意图;
图5是本申请一个实施例提供的建立蓝牙链路的方法的流程图;
图6是本申请另一个实施例提供的建立蓝牙链路的方法的流程图;
图7是本申请一个实施例提供的建立蓝牙链路的装置的框图;
图8是本申请另一个实施例提供的建立蓝牙链路的装置的框图;
图9是本申请一个实施例提供的蓝牙设备的结构框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在对本申请技术方案进行介绍说明之前,首先对蓝牙技术的一些背景知识进行介绍说明。
图1示例性示出了蓝牙设备的状态图。
查询状态(inquiry state)。一旦设备想发现新的设备,就会进入查询状态,此时,该设备就向规定范围内的所有设备广播出其查询包(ID packet),包中包含了IAC(Inquiry Access Code,查询访问码)。通过使用查询跳频序列把包发送出去。在查询状态的设备也可以接收查询回复(FHS packets),但是,该设备不会对这些包进行确认。
查询扫描状态(inquiry scan state)。当设备想接收查询包时,就会进入查询扫描状态。扫描是根据查询跳频序列进行的。
寻呼状态(page state)。当一个设备搜索其他设备时所进入的状态。该设备使用寻呼跳频序列(page hopping sequence)发送一个寻呼包(ID packet),用来通知其他设备,它打算了解其他设备及其服务。
寻呼扫描状态(page scan state)。在寻呼扫描状态下,设备监听包含自己的DAC(Device Access Code,设备访问码)的寻呼序列。一旦设备希望接收寻呼数据包时,就会进入寻呼扫描状态,扫描将按照寻呼跳频序列进行,如果设备接收了一个寻呼包,就会进入从设备响应状态(slave response state)。
同步训练状态(synchronization train state)和同步扫描状态(synchronization scan state)与本申请技术方案相关性不大,故不作赘述。
当两个设备需要建立蓝牙链路的时候,一个设备进入寻呼状态,另一个设备进入寻呼扫描状态,两个设备使用相同的寻呼跳频序列,当跳到同样的频点上的时候,这两个设备之间就建立了蓝牙链路。我们将发起寻呼的设备称为主设备(master device),进行寻呼扫描的设备称为从设备(slave device)。
如图2所示,其示例性示出了蓝牙链路建立过程的流程图。该过程可以包括如下表1所示的6个步骤(S1~S6):
表1
Figure PCTCN2022085146-appb-000001
蓝牙系统的基带层中定义了多种不同的包类型(packet type),更高一些的层使用这些包来构成高层PDU(Protocol Data Unit,协议数据单元)。上述包类型包括:ID、NULL、POLL、FHS(Frequency Hop Synchronization,跳频同步)、DM1;在同步链路(Synchronous Connection Oriented link,简称SCO)和异步链路(Asynchronous Connectionless Link,简称ACL)中,都定义了上述这些包。DH1、AUX1、DM3、DH3、DM5、DH5仅仅在异步链路(ACL)中作了定义。HV1、HV2、HV3、DV仅仅在同步链路(SCO)中作了定义。
在蓝牙链路建立过程中,主要涉及ID、FHS和POLL这3种包类型。
ID包是一个用于寻呼、查询和响应过程的68位的数据包,主要由设备访问码(DAC)或者查询访问码(IAC)组成。
FHS包是一个特殊的控制包,其中包含了设备的蓝牙设备地址(Bluetooth Device Address)以及源设备的时钟信息。它包含144个信息位和16位的CRC(Cyclic Redundancy Check,循环冗余校验)码。Payload(载荷)采用的是2/3前向纠错(Forward Error Correction,简称FEC)编码,可以使得payload(载荷)的总长度达到240位。FHS包覆盖单一的时隙。
POLL包类似于NULL包(即空包),NULL包是一个长度为126位的包,仅由信道访问码(Channel Access Code,CAC)和包头构成,用来返回连接信息给源设备,NULL包不必被确认。POLL包与NULL包的区别在于,POLL包需要来自目的设备的确认。一旦收到主设备的POLL包,从设备必须发回一个包进行响应。
在上述步骤S1中,主设备发送高频率的ID包,从软件上看使用最高的优先级,从空口上看占用很高的带宽,一般不支持并发的寻呼过程。因此,目前相关技术仅支持蓝牙的串行连接。在一个蓝牙设备需要连接多个目标设备的时候,必须先连接一个目标设备,然后再连接另一个目标设备。如果第一个目标设备没有打开蓝牙,或者超出可连接的范围,则需要等到连接超时,才能开始连接另一个蓝牙设备。整体需要的时间比较长,效率较低,影响用户体验。
本申请提供了一种蓝牙链路建立方法,主蓝牙设备通过副蓝牙设备作为其代理,向目标设备发起寻呼,从而能够有效克服单个蓝牙设备无法同时向多个目标设备发起寻呼的限制,实现主蓝牙设备向一个目标设备发起寻呼,与此并行的,副蓝牙设备作为主蓝牙设备的代理向另一个目标设备发起寻呼,从而实现并行寻呼两个目标设备,缩短建立多个蓝牙链路所需的耗时,提升效率。
图3示出了本申请一个实施例提供的方案实施环境的示意图。该方案实施环境可以包括:主蓝牙设备31、副蓝牙设备32、第一目标设备33和第二目标设备34。
主蓝牙设备31是发起蓝牙连接的设备,主蓝牙设备31需要与第一目标设备33和第二目标设备34分别建立蓝牙连接。
在本申请实施例中,主蓝牙设备31与第一目标设备33和第二目标设备34之间的连接建立过程,可以并行执行。一方面,主蓝牙设备31自身向第一目标 设备33发起寻呼,与第一目标设备33建立第一蓝牙链路;另一方面,主蓝牙设备31通过副蓝牙设备32作为其代理设备,由副蓝牙设备32向第二目标设备34发起寻呼,然后在寻呼成功之后,主蓝牙设备31与第二目标设备34建立第二蓝牙链路。这样就克服了单个设备不支持并发的寻呼过程的限制,实现高效的并行连接。
上述主蓝牙设备31、副蓝牙设备32、第一目标设备33和第二目标设备34可以是任何支持蓝牙功能(如具备蓝牙芯片)的电子设备,包括但不限于耳机、手机、平板电脑、可穿戴设备、笔记本电脑、车载终端设备等。
在一示例性应用场景中,如图4所示,主蓝牙设备31和副蓝牙设备32可以是一副耳机的左右两个耳机。主蓝牙设备为主蓝牙耳机,副蓝牙设备为副蓝牙耳机。例如,主蓝牙设备31(或称为主蓝牙耳机)为左耳机,副蓝牙设备32(或称为副蓝牙耳机)为右耳机;或者,主蓝牙设备31(或称为主蓝牙耳机)为右耳机,副蓝牙设备32(或称为副蓝牙耳机)为左耳机。可选地,左右两个耳机哪个作为主蓝牙设备31,哪个作为副蓝牙设备32,可以由两个耳机协商确定,也可以默认配置设定,本申请对此不作限定。
示例性地,某一用户具有一副TWS(True Wireless Stereo,真无线立体声)蓝牙耳机和2个手机(记为手机#A和手机#B)。在初始状态下,左右两个耳机在耳机盒内,且与手机#A和手机#B之间均没有蓝牙连接。用户打开耳机盒,两个耳机可以采用本申请提供的技术方案,一方面主耳机(如左耳机)自身向手机#A发起寻呼,与手机#A建立蓝牙链路,另一方面主耳机(如左耳机)通过副耳机(如右耳机)作为其代理设备,由副耳机(如右耳机)向手机#B发起寻呼,然后在寻呼成功之后,主耳机(如左耳机)与手机#B建立蓝牙链路。通过这种并行连接的方式,能够实现耳机开盒后,高效快速地回连两个目标设备。
当然,在一些其他应用场景中,上述主蓝牙设备31和副蓝牙设备32还可以是一组音箱或者其他蓝牙设备,本申请对此不作限定。
图5示出了本申请一个实施例提供的建立蓝牙链路的方法的流程图。该方法可应用于图3所示的方案实施环境中,该方法可以包括以下几个步骤(510~540):
步骤510,主蓝牙设备向副蓝牙设备发送连接通知,该连接通知用于指示副蓝牙设备作为主蓝牙设备的代理,向第二目标设备发起寻呼。
为了实现主蓝牙设备与副蓝牙设备之间的通信,主蓝牙设备和副蓝牙设备之间可以建立有蓝牙连接。可选地,在本申请实施例中,将主蓝牙设备与副蓝牙设备之间的蓝牙连接称为设备间蓝牙链路,主蓝牙设备通过该设备间蓝牙链路,向副蓝牙设备发送连接通知。
由于单个设备不支持并发的寻呼过程,因此主蓝牙设备正在寻呼第一目标设备的过程中,可以通过副蓝牙设备作为其代理设备,向第二目标设备发起寻呼,这样主蓝牙设备就可以一方面自身向第一目标设备发起寻呼,并借助于副蓝牙设备向第二目标设备发起寻呼,实现并行寻呼两个目标设备。
可选地,连接通知中包括第二目标设备的DAC,使得副蓝牙设备获知主蓝牙设备期望和哪个设备建立蓝牙链路。
步骤520,副蓝牙设备向第二目标设备发起寻呼。
副蓝牙设备接收来自主蓝牙设备的连接通知之后,向第二目标设备发起寻呼。
在一示例性实施例中,副蓝牙设备向第二目标设备发送寻呼消息;若副蓝牙设备接收到来自第二目标设备的从设备第一寻呼响应,则副蓝牙设备向第二目标设备发送主设备寻呼响应;之后,若副蓝牙设备接收到来自第二目标设备的从设备第二寻呼响应,则副蓝牙设备确定寻呼第二目标设备成功。也即,副蓝牙设备执行上述图2和表1所示的步骤S1~S4的过程。后续,由主蓝牙设备执行上述图2和表1所示的步骤S5~S6,从而建立主蓝牙设备与第二目标设备之间的第二蓝牙链路。
对于这种方式,若副蓝牙设备没有接收到来自第二目标设备的从设备第一寻呼响应,或者副蓝牙设备没有接收到来自第二目标设备的从设备第二寻呼响应,则副蓝牙设备确定寻呼第二目标设备失败。在寻呼第二目标设备失败的情况下,副蓝牙设备可以向主蓝牙设备发送寻呼失败通知,该寻呼失败通知用于指示副蓝牙设备寻呼第二目标设备失败。主蓝牙设备接收到来自副蓝牙设备的寻呼失败通知之后,便可获知副蓝牙设备寻呼第二目标设备失败。后续,如果主蓝牙设备还想和第二目标设备建立蓝牙链路,则可以自己向第二目标设备发起寻呼。
另外,如果由副蓝牙设备执行上述步骤S3向第二目标设备发送主设备寻呼响应,由于该主设备寻呼响应中需要携带实际与第二目标设备建立连接的设备(也即主蓝牙设备)的相关信息,因此,副蓝牙设备在向第二目标设备发送主设备寻呼响应之前,需要先获取主蓝牙设备的相关信息。例如,主蓝牙设备向副蓝牙设备发送的连接通知中,可以携带主蓝牙设备的相关信息。或者,副蓝牙设备在接收到来自第二目标设备的从设备第一寻呼响应之后,向主蓝牙设备发送信息获取请求,该信息获取请求用于请求获取主蓝牙设备的相关信息;相应地,主蓝牙设备接收到该信息获取请求之后,向副蓝牙设备发送主蓝牙设备的相关信息。当然,在一些其他实施例中,副蓝牙设备还可以在其他合适的时机,获取主蓝牙设备的相关信息,本申请对此不作限定。另外,主蓝牙设备的相关信息是指主设备寻呼响应中需要携带的信息,包括但不限于以下至少一项:LAP(LAN Access Point,局域网接入点)、UAP(Upper Address Portion,高位地址部分)、NAP(Non-significant Address Portion,非重要地址部分)、设备类型、设备地址(LT_ADDR(Logical Transport Access Request Address,逻辑传输访问请求地址))、时钟信息、寻呼扫描模式。
在另一示例性实施例中,副蓝牙设备向第二目标设备发送寻呼消息;若副蓝牙设备接收到来自第二目标设备的从设备第一寻呼响应,则副蓝牙设备确定寻呼第二目标设备成功。也即,副蓝牙设备执行上述图2和表1所示的步骤S1~S2的过程。后续,由主蓝牙设备执行上述图2和表1所示的步骤S3~S6,从而建立 主蓝牙设备与第二目标设备之间的第二蓝牙链路。
对于这种方式,若副蓝牙设备没有接收到来自第二目标设备的从设备第一寻呼响应,则副蓝牙设备确定寻呼第二目标设备失败。在寻呼第二目标设备失败的情况下,副蓝牙设备可以向主蓝牙设备发送寻呼失败通知,该寻呼失败通知用于指示副蓝牙设备寻呼第二目标设备失败。主蓝牙设备接收到来自副蓝牙设备的寻呼失败通知之后,便可获知副蓝牙设备寻呼第二目标设备失败。后续,如果主蓝牙设备还想和第二目标设备建立蓝牙链路,则可以自己向第二目标设备发起寻呼。
另外,对于这种方式,副蓝牙设备不需要执行上述步骤S3向第二目标设备发送主设备寻呼响应,而是由主蓝牙设备执行上述步骤S3向第二目标设备发送主设备寻呼响应,因此上文介绍的主蓝牙设备的相关信息可以不必提供给副蓝牙设备。
步骤530,若寻呼第二目标设备成功,则副蓝牙设备向主蓝牙设备发送连接信息,该连接信息用于供主蓝牙设备与第二目标设备进行接续通信。
可选地,副蓝牙设备通过上述设备间蓝牙链路,向主蓝牙设备发送连接信息。
所谓接续通信是指主蓝牙设备不需要再向第二目标设备发起寻呼,可以直接利用该连接信息与第二目标设备进行通信,如交换建立蓝牙链路所需的必要信息,实现主蓝牙设备与第二目标设备之间建立蓝牙链路。
可选地,连接信息包括时钟同步信息,该时钟同步信息用于使得主蓝牙设备与第二目标设备在相同的频点进行通信。例如,时钟同步信息可以是时钟偏移信息,主蓝牙设备根据该时钟偏移信息,能够调整自己的时钟,以使得主蓝牙设备与第二目标设备能够在相同的频点进行通信。
步骤540,主蓝牙设备基于连接信息与第二目标设备建立第二蓝牙链路。
主蓝牙设备接收来自副蓝牙设备的连接信息之后,基于该连接信息与第二目标设备建立第二蓝牙链路。在本申请实施例中,将主蓝牙设备与第二目标设备之间的蓝牙链路称为第二蓝牙链路。
在一示例性实施例中,如果由副蓝牙设备执行上述步骤S3向第二目标设备发送主设备寻呼响应,那么主蓝牙设备基于连接信息确定目标频点,在目标频点向第二目标设备发送LMP(Link Manager Protocol,链路管理协议)特性交换请求,该LMP特性交换请求中包括主蓝牙设备的特性信息,接收来自第二目标设备的LMP特性交换响应,该LMP特性交换响应中包括第二目标设备的特性信息,保存第二目标设备的特性信息,并向第二目标设备发送LMP建立完成消息,该LMP建立完成消息用于指示蓝牙链路建立完成。也即,主蓝牙设备基于连接信息确定目标频点之后,执行上述图2和表1所示的步骤S5~S6的过程,完成蓝牙链路的建立过程。
在另一示例性实施例中,如果由主蓝牙设备执行上述步骤S3向第二目标设备发送主设备寻呼响应,那么主蓝牙设备基于连接信息确定目标频点,在目标频点向第二目标设备发送主设备寻呼响应。若接收到来自第二目标设备的从设 备第二寻呼响应,则向第二目标设备发送LMP特性交换请求,该LMP特性交换请求中包括主蓝牙设备的特性信息。接收来自第二目标设备的LMP特性交换响应,该LMP特性交换响应中包括第二目标设备的特性信息,保存第二目标设备的特性信息,并向第二目标设备发送LMP建立完成消息,该LMP建立完成消息用于指示蓝牙链路建立完成。也即,主蓝牙设备基于连接信息确定目标频点之后,执行上述图2和表1所示的步骤S3~S6的过程,完成蓝牙链路的建立过程。
可选地,主蓝牙设备向第一目标设备发起寻呼,若寻呼第一目标设备成功,则主蓝牙设备与第一目标设备建立第一蓝牙链路;其中,第二蓝牙链路的建立过程与第一蓝牙链路的建立过程并行执行。在本申请实施例中,将主蓝牙设备与第一目标设备之间的蓝牙链路称为第一蓝牙链路,该第一蓝牙链路的建立过程可以参考图2和表1所示的步骤S1~S6的过程。
综上所述,本申请实施例提供的技术方案,主蓝牙设备通过副蓝牙设备作为其代理,向目标设备发起寻呼,从而能够有效克服单个蓝牙设备无法同时向多个目标设备发起寻呼的限制,实现主蓝牙设备向一个目标设备发起寻呼,与此并行的,副蓝牙设备作为主蓝牙设备的代理向另一个目标设备发起寻呼,从而实现并行寻呼两个目标设备,缩短建立多个蓝牙链路所需的耗时,提升效率。
另外,对于上文介绍的两种方式,如果由副蓝牙设备执行上述步骤S3向第二目标设备发送主设备寻呼响应,那么主蓝牙设备执行的步骤相对较少,由副蓝牙设备尽可能多地分担步骤,从而充分利用副蓝牙设备的处理资源,尽可能地减少主蓝牙设备的处理量;如果由主蓝牙设备执行上述步骤S3向第二目标设备发送主设备寻呼响应,那么上文介绍的主蓝牙设备的相关信息可以不必提供给副蓝牙设备,有助于降低主副蓝牙设备之间的信令开销。
图6示出了本申请另一个实施例提供的建立蓝牙链路的方法的流程图。
在本实施例中,主蓝牙设备为主蓝牙耳机,副蓝牙设备为副蓝牙耳机。以方法应用于图4所示的方案实施环境中进行举例说明。其中,预置条件包括:手机#A和耳机已经配对,手机#A蓝牙打开或者关闭;手机#B和耳机已经配对,且手机#B蓝牙打开或者关闭;左耳机和右耳机均在耳机盒内;耳机盒关盒;左耳机和右耳机之间没有蓝牙连接;左耳机/右耳机和手机(包括手机#A和手机#B)之间没有蓝牙连接。用户使用场景为:耳机盒开盒,耳机自动回连手机#A和手机#B。
为了方便流程分析,将每个耳机分成两个部分:主程序(Host)和控制器(Controller);其中,主程序是上层的软件,控制器是底层的硬件模块,负责处理蓝牙技术无线信号的发送和接收。
如图6所示,该方法可以包括以下几个步骤(601~614):
步骤601,用户打开耳机盒,耳机盒向左耳机和右耳机分别发送开盒事件。
可选地,耳机盒向左耳机的主程序和右耳机的主程序,分别发送开盒事件。
步骤602,左耳机和右耳机之间建立连接,执行角色仲裁和合并PDL(Paired  Device List,配对设备列表)。
角色仲裁的目的是确定两个耳机之间的角色。可选地,角色仲裁的结果假设为左耳机担任主要角色(即左耳机为主蓝牙设备),右耳机担任次要角色(即右耳机为副蓝牙设备)。
以TWS耳机为例,角色仲裁的过程可以如下:左耳机将自己的状态信息发给右耳机,状态信息包括:(a)是否在耳机的充电盒内,(b)是否连接了手机,(c)是否正在进行通话业务,(d)是否正在进行音乐业务等。右耳机将结合自己的状态信息和左耳机的状态信息,确定自己的角色。右耳机将自己的角色信息回复给左耳机。需要说明的是,对于不同的蓝牙设备,角色仲裁的过程可能会有所不同,本申请对此不作限定。
合并PDL的目的是将两个耳机的PDL合并在一起。由于两个耳机可以单独使用,那么有可能两个耳机配对了不同的设备,比如左耳机配对了手机#A,并且保存了手机#A的地址和密钥,右耳机配对了手机#B,并保存了手机#B的地址和密钥。此过程完成之后,左耳机和右耳机将都保存手机#A的地址和密钥以及手机#B的地址和密钥。
以TWS耳机为例,合并PDL的过程可以如下:左耳机将自己的配对记录发给右耳机,右耳机合并PDL,并保存合并之后的PDL,右耳机将合并之后的PDL发给左耳机,左耳机保存合并之后的PDL。需要说明的是,对于不同的蓝牙设备,合并PDL的过程可能会有所不同,本申请对此不作限定。
如果合并之后的PDL中包含的配对设备的数量小于2(表示为PDL<2),则主耳机(如左耳机)最多仅需连接一个目标设备;如果合并之后的PDL中包含的配对设备的数量大于或等于2(表示为PDL≥2),则主耳机(如左耳机)至少需要连接两个目标设备。
图6所示的是PDL≥2的流程,其中手机#A是主耳机(如左耳机)管理连接状态,并且由主耳机向手机#A发起寻呼,手机#B是主耳机(如左耳机)管理连接状态,但是以副耳机(如右耳机)为代理向手机#B发起寻呼。
手机#A的蓝牙链路建立过程包括步骤603~605。
步骤603,左耳机的主程序向左耳机的控制器发送连接创建命令。
例如,该连接创建命令可以是标准的HCI_Create_Connection command。
步骤604,左耳机的控制器与手机#A之间执行上述步骤S1~S6的过程,建立左耳机与手机#A之间的蓝牙链路。
步骤605,在蓝牙链路建立完成之后,左耳机的控制器向左耳机的主程序发送连接完成事件。
例如,该连接完成事件可以是标准的HCI_Connection_Complete event。
手机#B的蓝牙链路建立过程包括步骤606~614。
步骤606,左耳机的主程序向右耳机的主程序发送连接通知,该连接通知用于指示右耳机作为左耳机的代理,向手机#B发起寻呼。
步骤607,右耳机的主程序向右耳机的控制器发送连接创建命令。
可选地,该连接创建命令可以是标准的HCI_Create_Connection command或 者私有的Create_Connection command。
步骤608,右耳机的控制器向手机#B发起寻呼。
步骤609,若寻呼手机#B成功,则右耳机的控制器向右耳机的主程序发送寻呼成功事件。
可选地,该寻呼成功事件可以是Page_Complete Event-Success或Vendor_Connection_Complete Event–Page Success。
步骤610,若寻呼手机#B失败,则右耳机的控制器向右耳机的主程序发送寻呼失败事件。
可选地,该寻呼失败事件可以是Page_Complete Event-Timeout或Vendor_Connection_Complete Event–Page Timeout。
步骤611,右耳机的主程序向左耳机的主程序发送连接结果。
可选地,在右耳机的主程序接收到寻呼成功事件的情况下,右耳机的主程序向左耳机的主程序发送连接成功结果(也可称为寻呼成功通知),并携带连接信息,该连接信息包括时钟同步信息,该时钟同步信息用于使得左耳机与手机#B在相同的频点进行通信;在右耳机的主程序接收到寻呼失败事件的情况下,右耳机的主程序向左耳机的主程序发送连接失败结果(也可称为寻呼失败通知)。可选地,连接信息还可以包括地址信息、设备类型等信息,本申请实施例对此不作限定。
步骤612,右耳机的控制器向左耳机的控制器发送寻呼完成指示。
可选地,该寻呼完成指示可以是Page_Complete indication。
步骤613,左耳机的控制器与手机#B之间执行上述步骤5-6的过程,建立左耳机与手机#B之间的蓝牙链路。
例如,左耳机和右耳机之间交换特性信息,然后发送LMP建立完成消息。
步骤614,在蓝牙链路建立完成之后,左耳机的控制器向左耳机的主程序发送连接完成事件。
例如,该连接完成事件可以是Connection_Complete event。
需要说明的是,本实施例中涉及的一些消息或者事件的名称,仅是示例性和解释性的,该名称可以按照某种规范或需求进行设定,本申请对此不作限定。
另外,在本实施例中,仅以副耳机(即右耳机)执行上述步骤S3向手机#B发送主设备寻呼响应为例,即副耳机(即右耳机)执行步骤S1~S4且主耳机(即左耳机)接续执行步骤S5~S6,最终建立主耳机(即左耳机)与手机#B之间的蓝牙链路。在一些其他实施例中,也可以由主耳机(即左耳机)执行上述步骤S3向手机#B发送主设备寻呼响应,即副耳机(即右耳机)执行步骤S1~S2且主耳机(即左耳机)接续执行步骤S3~S6,最终建立主耳机(即左耳机)与手机#B之间的蓝牙链路。有关这两种方式的具体介绍说明,可参见上文实施例,此处不再赘述。
采用本申请提供的技术方案,通过自定义的私有指令(主耳机向副耳机发送的连接通知),将连接的需求发给副耳机,实现两个目标设备(如两个手机)的并行连接,和相关技术的串行连接方案相比,能够获得5s~10s的正向收益, 提升用户体验。
需要说明的是,在上述方法实施例中,仅从主蓝牙设备和副蓝牙设备交互的角度,对本申请技术方案进行了介绍说明。上述有关主蓝牙设备执行的步骤,可以单独实现成为主蓝牙设备侧的蓝牙链路建立方法,上述有关副蓝牙设备执行的步骤,可以单独实现成为副蓝牙设备侧的蓝牙链路建立方法。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
图7示出了本申请一个实施例提供的在主蓝牙设备中建立蓝牙链路的装置的框图。该装置具有实现上述主蓝牙设备侧的方法示例的功能,所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以是上文介绍的主蓝牙设备,也可以设置在主蓝牙设备中。该装置700可以包括:连接通知发送模块710、连接信息接收模块720和蓝牙链路建立模块730。
连接通知发送模块710,用于向副蓝牙设备发送连接通知,所述连接通知用于指示所述副蓝牙设备作为主蓝牙设备的代理,向第二目标设备发起寻呼。
连接信息接收模块720,用于接收来自所述副蓝牙设备的连接信息,所述连接信息用于供所述主蓝牙设备与所述第二目标设备进行接续通信。
蓝牙链路建立模块730,用于基于所述连接信息与所述第二目标设备建立第二蓝牙链路。
在示例性实施例中,所述蓝牙链路建立模块730,用于:
基于所述连接信息确定目标频点;
在所述目标频点向所述第二目标设备发送LMP特性交换请求,所述LMP特性交换请求中包括所述主蓝牙设备的特性信息;
接收来自所述第二目标设备的LMP特性交换响应,所述LMP特性交换响应中包括所述第二目标设备的特性信息;
保存所述第二目标设备的特性信息,并向所述第二目标设备发送LMP建立完成消息,所述LMP建立完成消息用于指示所述第二蓝牙链路建立完成。
在示例性实施例中,所述蓝牙链路建立模块730,用于:
基于所述连接信息确定目标频点;
在所述目标频点向所述第二目标设备发送主设备寻呼响应;
若接收到来自所述第二目标设备的从设备第二寻呼响应,则向所述第二目标设备发送LMP特性交换请求,所述LMP特性交换请求中包括所述主蓝牙设备的特性信息;
接收来自所述第二目标设备的LMP特性交换响应,所述LMP特性交换响应中包括所述第二目标设备的特性信息;
保存所述第二目标设备的特性信息,并向所述第二目标设备发送LMP建立完成消息,所述LMP建立完成消息用于指示所述第二蓝牙链路建立完成。
在示例性实施例中,所述连接信息包括时钟同步信息,所述时钟同步信息 用于使得所述主蓝牙设备与所述第二目标设备在相同的频点进行通信。
在示例性实施例中,所述装置700还包括:失败通知接收模块,用于接收来自所述副蓝牙设备的寻呼失败通知,所述寻呼失败通知用于指示所述副蓝牙设备寻呼所述第二目标设备失败。
在示例性实施例中,所述装置700还包括寻呼发起模块,用于向第一目标设备发起寻呼。
所述蓝牙链路建立模块730,还用于若寻呼所述第一目标设备成功,则与所述第一目标设备建立第一蓝牙链路。
其中,所述第二蓝牙链路的建立过程与所述第一蓝牙链路的建立过程并行执行。
在示例性实施例中,所述主蓝牙设备为主蓝牙耳机,所述副蓝牙设备为副蓝牙耳机。
图8示出了本申请另一个实施例提供的在副蓝牙设备中建立蓝牙链路的装置的框图。该装置具有实现上述副蓝牙设备侧的方法示例的功能,所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以是上文介绍的副蓝牙设备,也可以设置在副蓝牙设备中。该装置800可以包括:连接通知接收模块810、寻呼发起模块820和连接信息发送模块830。
连接通知接收模块810,用于接收来自主蓝牙设备的连接通知,所述连接通知用于指示副蓝牙设备作为所述主蓝牙设备的代理,向第二目标设备发起寻呼。
寻呼发起模块820,用于向所述第二目标设备发起寻呼。
连接信息发送模块830,用于若寻呼所述第二目标设备成功,则向所述主蓝牙设备发送连接信息,所述连接信息用于供所述主蓝牙设备与所述第二目标设备进行接续通信,以建立所述主蓝牙设备与所述第二目标设备之间的第二蓝牙链路。
在示例性实施例中,所述寻呼发起模块820,用于:
向所述第二目标设备发送寻呼消息;
若接收到来自所述第二目标设备的从设备第一寻呼响应,则向所述第二目标设备发送主设备寻呼响应;
若接收到来自所述第二目标设备的从设备第二寻呼响应,则确定寻呼所述第二目标设备成功。
在示例性实施例中,所述寻呼发起模块820,用于:
向所述第二目标设备发送寻呼消息;
若接收到来自所述第二目标设备的从设备第一寻呼响应,则确定寻呼所述第二目标设备成功。
在示例性实施例中,所述连接信息包括时钟同步信息,所述时钟同步信息用于使得所述主蓝牙设备与所述第二目标设备在相同的频点进行通信。
在示例性实施例中,所述装置800还包括:失败通知发送模块,用于若寻呼所述第二目标设备失败,则向所述主蓝牙设备发送寻呼失败通知,所述寻呼 失败通知用于指示所述副蓝牙设备寻呼所述第二目标设备失败。
在示例性实施例中,所述第二蓝牙链路的建立过程与第一蓝牙链路的建立过程并行执行,所述第一蓝牙链路是所述主蓝牙设备与第一目标设备之间的蓝牙链路。
在示例性实施例中,所述主蓝牙设备为主蓝牙耳机,所述副蓝牙设备为副蓝牙耳机。
需要说明的是,上述实施例提供的装置,在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图9示出了本申请一个实施例提供的蓝牙设备的结构框图。该蓝牙设备可用于实现上述蓝牙链路建立方法的功能。该蓝牙设备90可以包括:处理器91、接收器92、发射器93、存储器94和总线95。
处理器91包括一个或者一个以上处理核心,处理器101通过运行软件程序以及模块,从而执行各种功能应用以及信息处理。
接收器92和发射器93可以实现为一个通信组件,该通信组件可以是一块通信芯片。
存储器94通过总线95与处理器91相连。
存储器94可用于存储计算机程序,处理器91用于执行该计算机程序,以实现上述方法实施例中的各个步骤。
此外,存储器94可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,易失性或非易失性存储设备包括但不限于:RAM(Random-Access Memory,随机存储器)和ROM(Read-Only Memory,只读存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦写可编程只读存储器)、闪存或其他固态存储器技术,CD-ROM(Compact Disc Read-Only Memory,只读光盘)、DVD(Digital Video Disc,高密度数字视频光盘)或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。
在示例性实施例中,还提供了一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序在被蓝牙设备的处理器执行时,以实现上述建立蓝牙链路的方法。可选地,该计算机可读存储介质可以包括:ROM、RAM、SSD(Solid State Drives,固态硬盘)或光盘等。其中,随机存取记忆体可以包括ReRAM(Resistance Random Access Memory,电阻式随机存取记忆体)和DRAM(Dynamic Random Access Memory,动态随机存取存储器)。
在示例性实施例中,还提供了一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中。蓝牙设备的 处理器从所述计算机可读存储介质中读取所述计算机指令,所述处理器执行所述计算机指令,使得所述蓝牙设备执行上述建立蓝牙链路的方法。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。另外,本文中描述的步骤编号,仅示例性示出了步骤间的一种可能的执行先后顺序,在一些其它实施例中,上述步骤也可以不按照编号顺序来执行,如两个不同编号的步骤同时执行,或者两个不同编号的步骤按照与图示相反的顺序执行,本申请实施例对此不作限定。
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (21)

  1. 一种在主蓝牙设备中建立蓝牙链路的方法,所述方法包括:
    向副蓝牙设备发送连接通知,所述连接通知用于指示所述副蓝牙设备作为所述主蓝牙设备的代理,向第二目标设备发起寻呼;
    接收来自所述副蓝牙设备的连接信息,所述连接信息用于供所述主蓝牙设备与所述第二目标设备进行接续通信;
    基于所述连接信息与所述第二目标设备建立第二蓝牙链路。
  2. 根据权利要求1所述的方法,其中,所述基于所述连接信息与所述第二目标设备建立第二蓝牙链路,包括:
    基于所述连接信息确定目标频点;
    在所述目标频点向所述第二目标设备发送链路管理协议LMP特性交换请求,所述LMP特性交换请求中包括所述主蓝牙设备的特性信息;
    接收来自所述第二目标设备的LMP特性交换响应,所述LMP特性交换响应中包括所述第二目标设备的特性信息;
    保存所述第二目标设备的特性信息,并向所述第二目标设备发送LMP建立完成消息,所述LMP建立完成消息用于指示所述第二蓝牙链路建立完成。
  3. 根据权利要求1所述的方法,其中,所述基于所述连接信息与所述第二目标设备建立第二蓝牙链路,包括:
    基于所述连接信息确定目标频点;
    在所述目标频点向所述第二目标设备发送主设备寻呼响应;
    若接收到来自所述第二目标设备的从设备第二寻呼响应,则向所述第二目标设备发送LMP特性交换请求,所述LMP特性交换请求中包括所述主蓝牙设备的特性信息;
    接收来自所述第二目标设备的LMP特性交换响应,所述LMP特性交换响应中包括所述第二目标设备的特性信息;
    保存所述第二目标设备的特性信息,并向所述第二目标设备发送LMP建立完成消息,所述LMP建立完成消息用于指示所述第二蓝牙链路建立完成。
  4. 根据权利要求1所述的方法,其中,所述连接信息包括时钟同步信息,所述时钟同步信息用于使得所述主蓝牙设备与所述第二目标设备在相同的频点进行通信。
  5. 根据权利要求1所述的方法,其中,所述方法还包括:
    接收来自所述副蓝牙设备的寻呼失败通知,所述寻呼失败通知用于指示所述副蓝牙设备寻呼所述第二目标设备失败。
  6. 根据权利要求1所述的方法,其中,所述方法还包括:
    向第一目标设备发起寻呼;
    若寻呼所述第一目标设备成功,则与所述第一目标设备建立第一蓝牙链路;
    其中,所述第二蓝牙链路的建立过程与所述第一蓝牙链路的建立过程并行执行。
  7. 根据权利要求1至6任一项所述的方法,其中,所述主蓝牙设备为主蓝牙耳机,所述副蓝牙设备为副蓝牙耳机。
  8. 一种在副蓝牙设备中建立蓝牙链路的方法,所述方法包括:
    接收来自主蓝牙设备的连接通知,所述连接通知用于指示所述副蓝牙设备作为所述主蓝牙设备的代理,向第二目标设备发起寻呼;
    向所述第二目标设备发起寻呼;
    若寻呼所述第二目标设备成功,则向所述主蓝牙设备发送连接信息,所述连接信息用于供所述主蓝牙设备与所述第二目标设备进行接续通信,以建立所述主蓝牙设备与所述第二目标设备之间的第二蓝牙链路。
  9. 根据权利要求8所述的方法,其中,所述向所述第二目标设备发起寻呼,包括:
    向所述第二目标设备发送寻呼消息;
    若接收到来自所述第二目标设备的从设备第一寻呼响应,则向所述第二目标设备发送主设备寻呼响应;
    若接收到来自所述第二目标设备的从设备第二寻呼响应,则确定寻呼所述第二目标设备成功。
  10. 根据权利要求8所述的方法,其中,所述向所述第二目标设备发起寻呼,包括:
    向所述第二目标设备发送寻呼消息;
    若接收到来自所述第二目标设备的从设备第一寻呼响应,则确定寻呼所述第二目标设备成功。
  11. 根据权利要求8所述的方法,其中,所述连接信息包括时钟同步信息,所述时钟同步信息用于使得所述主蓝牙设备与所述第二目标设备在相同的频点进行通信。
  12. 根据权利要求8所述的方法,其中,所述方法还包括:
    若寻呼所述第二目标设备失败,则向所述主蓝牙设备发送寻呼失败通知,所述寻呼失败通知用于指示所述副蓝牙设备寻呼所述第二目标设备失败。
  13. 根据权利要求8所述的方法,其中,所述第二蓝牙链路的建立过程与第 一蓝牙链路的建立过程并行执行,所述第一蓝牙链路是所述主蓝牙设备与第一目标设备之间的蓝牙链路。
  14. 根据权利要求8至13任一项所述的方法,其中,所述主蓝牙设备为主蓝牙耳机,所述副蓝牙设备为副蓝牙耳机。
  15. 一种在主蓝牙设备中建立蓝牙链路的装置,所述装置包括:
    连接通知发送模块,用于向副蓝牙设备发送连接通知,所述连接通知用于指示所述副蓝牙设备作为所述主蓝牙设备的代理,向第二目标设备发起寻呼;
    连接信息接收模块,用于接收来自所述副蓝牙设备的连接信息,所述连接信息用于供所述主蓝牙设备与所述第二目标设备进行接续通信;
    蓝牙链路建立模块,用于基于所述连接信息与所述第二目标设备建立第二蓝牙链路。
  16. 根据权利要求15所述的装置,其中,所述蓝牙链路建立模块用于:
    基于所述连接信息确定目标频点;
    在所述目标频点向所述第二目标设备发送链路管理协议LMP特性交换请求,所述LMP特性交换请求中包括所述主蓝牙设备的特性信息;
    接收来自所述第二目标设备的LMP特性交换响应,所述LMP特性交换响应中包括所述第二目标设备的特性信息;
    保存所述第二目标设备的特性信息,并向所述第二目标设备发送LMP建立完成消息,所述LMP建立完成消息用于指示所述第二蓝牙链路建立完成。
  17. 一种在副蓝牙设备中建立蓝牙链路的装置,所述装置包括:
    连接通知接收模块,用于接收来自主蓝牙设备的连接通知,所述连接通知用于指示所述副蓝牙设备作为所述主蓝牙设备的代理,向第二目标设备发起寻呼;
    寻呼发起模块,用于向所述第二目标设备发起寻呼;
    连接信息发送模块,用于若寻呼所述第二目标设备成功,则向所述主蓝牙设备发送连接信息,所述连接信息用于供所述主蓝牙设备与所述第二目标设备进行接续通信,以建立所述主蓝牙设备与所述第二目标设备之间的第二蓝牙链路。
  18. 根据权利要求17所述的装置,其中,所述寻呼发起模块用于:
    向所述第二目标设备发送寻呼消息;
    若接收到来自所述第二目标设备的从设备第一寻呼响应,则向所述第二目标设备发送主设备寻呼响应;
    若接收到来自所述第二目标设备的从设备第二寻呼响应,则确定寻呼所述第二目标设备成功。
  19. 一种蓝牙设备,所述蓝牙设备包括处理器和存储器,所述存储器中存储有计算机程序,所述计算机程序由所述处理器执行,以实现如权利要求1至7任一项所述的方法,或者如权利要求8至14任一项所述的方法。
  20. 一种计算机可读存储介质,所述存储介质中存储有计算机程序,所述计算机程序由处理器执行,以实现如权利要求1至7任一项所述的方法,或者如权利要求8至14任一项所述的方法。
  21. 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中,所述计算机指令由处理器加载并执行以实现如权利要求1至7任一项所述的方法,或者如权利要求8至14任一项所述的方法。
PCT/CN2022/085146 2021-05-24 2022-04-02 建立蓝牙链路的方法、装置、设备及存储介质 WO2022247470A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/515,990 US20240090049A1 (en) 2021-05-24 2023-11-21 Method and apparatus for establishing bluetooth link, device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110565801.2 2021-05-24
CN202110565801.2A CN115396856A (zh) 2021-05-24 2021-05-24 建立蓝牙链路的方法、装置、设备及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/515,990 Continuation US20240090049A1 (en) 2021-05-24 2023-11-21 Method and apparatus for establishing bluetooth link, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2022247470A1 true WO2022247470A1 (zh) 2022-12-01

Family

ID=84114165

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/085146 WO2022247470A1 (zh) 2021-05-24 2022-04-02 建立蓝牙链路的方法、装置、设备及存储介质

Country Status (3)

Country Link
US (1) US20240090049A1 (zh)
CN (1) CN115396856A (zh)
WO (1) WO2022247470A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116761110A (zh) * 2023-08-18 2023-09-15 江西斐耳科技有限公司 一种多点蓝牙耳机控制方法、系统、存储介质以及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341516A (zh) * 2015-07-06 2017-01-18 中兴通讯股份有限公司 一种多点连接控制方法、装置、终端及多点蓝牙耳机
CN110191442A (zh) * 2019-04-18 2019-08-30 华为技术有限公司 一种蓝牙连接方法、设备及系统
US20200322788A1 (en) * 2019-04-04 2020-10-08 Qualcomm Incorporated Address management for bluetooth devices
CN112055349A (zh) * 2020-09-18 2020-12-08 恒玄科技(上海)股份有限公司 一种无线通信方法及蓝牙设备
CN112399390A (zh) * 2019-08-14 2021-02-23 华为技术有限公司 一种蓝牙回连的方法及相关装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106341516A (zh) * 2015-07-06 2017-01-18 中兴通讯股份有限公司 一种多点连接控制方法、装置、终端及多点蓝牙耳机
US20200322788A1 (en) * 2019-04-04 2020-10-08 Qualcomm Incorporated Address management for bluetooth devices
CN110191442A (zh) * 2019-04-18 2019-08-30 华为技术有限公司 一种蓝牙连接方法、设备及系统
CN112399390A (zh) * 2019-08-14 2021-02-23 华为技术有限公司 一种蓝牙回连的方法及相关装置
CN112055349A (zh) * 2020-09-18 2020-12-08 恒玄科技(上海)股份有限公司 一种无线通信方法及蓝牙设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116761110A (zh) * 2023-08-18 2023-09-15 江西斐耳科技有限公司 一种多点蓝牙耳机控制方法、系统、存储介质以及设备
CN116761110B (zh) * 2023-08-18 2023-11-14 江西斐耳科技有限公司 一种多点蓝牙耳机控制方法、系统、存储介质以及设备

Also Published As

Publication number Publication date
CN115396856A (zh) 2022-11-25
US20240090049A1 (en) 2024-03-14

Similar Documents

Publication Publication Date Title
TWI828840B (zh) 在藍芽真無線身歷聲(tws)耳塞式耳機之間的快速角色切換
EP3893109B1 (en) Method and device for connecting bluetooth devices
JP6585235B2 (ja) アクセサリデバイスのための最適化されたBluetoothスケジューリング
US11115811B2 (en) Address management for Bluetooth devices
JP6254189B2 (ja) アプリケーションサービスプラットフォーム(asp)ピアツーピア(p2p)グループを設定する機器、システム、及び方法
WO2020164349A1 (zh) 数据传输控制方法及相关产品
WO2018032455A1 (zh) 一种蓝牙通信的方法及终端
TWI385975B (zh) 基礎建設網路中之個人區域網路實施技術
WO2021121308A1 (zh) 一种多路径传输的方法及设备
CN116711449A (zh) 用于多链路对等通信的通信装置和通信方法
JP2017513309A (ja) 無線通信システムにおけるデータ送信率調節方法及び装置
WO2012083080A2 (en) Wireless network interface with infrastructure and direct modes
JP2002125268A (ja) 無線通信接続先特定方法
US20210282207A1 (en) Method for supporting multiple links in bluetooth network environment and electronic device thereof
US10887051B2 (en) Real time MIC recovery
US20240090049A1 (en) Method and apparatus for establishing bluetooth link, device, and storage medium
WO2019062621A1 (zh) 一种进行重复传输的方法和设备
CN115244881A (zh) 用于低能量音频的广播中继微微网
JP2017511631A (ja) ショート送信要求フレーム
JP2017515325A (ja) ショート送信要求フレーム
TW201735711A (zh) 基於設備到設備的通訊方法和終端
WO2021239032A1 (zh) 蓝牙协议连接方法、装置、存储介质及相关设备
WO2022116745A1 (zh) 事件处理方法和装置
JP2008520162A (ja) 無線lanステーション、及び、無線lanステーションをインフラストラクチャ・モードと独立(アドホック)モードで同時に動作させる方法
CN115669051A (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: 22810203

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE