Method for Bluetooth equipment to keep master equipment role to be connected with matching machine, computer equipment and Bluetooth equipment

By setting the Bluetooth device to disable role switching mode and active back connection mechanism, the stability and complexity of Bluetooth devices when connecting multiple devices is solved, ensuring that the device always maintains the role of the main device, and achieving the stability of Bluetooth devices and multiple coordinators Connection and call stability.

CN119031348APending Publication Date: 2024-11-26YEALINK (XIAMEN) NETWORK TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411058451.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

When multiple devices are connected simultaneously, the connection scheme design is complex, the stability is uncontrollable, and the main device role and slave device role need to be frequently switched, resulting in poor call stability and high solution design complexity.

Method used

By setting the Bluetooth device to disable role switching mode, it remains state when connected as the main device role, and after completing the pairing data update, it will automatically disconnect and connect to switch as the main device role, ensuring that the Bluetooth device always remains primary when multiple matching machines are connected. Device role.

Benefits of technology

It realizes the stability and call controllability of Bluetooth devices when multiple matching machines are connected at the same time, simplifies the solution logic, is suitable for various Bluetooth devices, meets the needs of multiple devices, and avoids system instability caused by role switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119031348A_ABST
    Figure CN119031348A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Bluetooth, and discloses a method for a Bluetooth device to keep a master device role to be connected with a matching machine, a computer device and the Bluetooth device, and the method comprises the steps: setting a Bluetooth earphone forbidden role switching mode when the Bluetooth device is used as the master device role to be connected with the matching machine, keeping a connection state that the Bluetooth device is connected with the matching machine as a main device role; and when the Bluetooth device is connected with the matching machine as the slave device role, after data information of pairing connection is updated, the Bluetooth device is switched to be in a connection state of connecting the matching machine as the master device role. According to the method, when the Bluetooth device and the multiple matching machines are in communication connection at the same time, it can be ensured that the final Bluetooth device always serves as the main device to be connected with the matching machines, the effects of simultaneous connection of the Bluetooth device and the multiple matching machines and high call stability are achieved, and the scheme is simple in logic, easy to operate and high in practicability. The scene that the Bluetooth device is connected with various types of matching machines at the same time can be covered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Bluetooth technology, and in particular to a method for a Bluetooth device to maintain a master device role and connect to a partner device, a computer device, and a Bluetooth device. Background Art

[0002] At present, most Bluetooth devices (such as Bluetooth headsets) usually only support single-connection application scenarios in order to simplify design and save costs, which makes it impossible to meet the actual needs of Bluetooth devices to establish call connections with two or more other cooperating machines to be connected at the same time. In addition, due to the consideration of different types of devices for some mobile phones, Bluetooth devices are usually required to act as slave devices. However, when the Bluetooth device is in the role of a slave device, since only the master device has the authority to determine the time slot and clock of Bluetooth communication, the SCO scenario design will be more complicated and the cost will be higher. In addition, in the existing Bluetooth device support solution for simultaneous connection with two devices, in order to adapt to different scenarios and devices, the Bluetooth device is often required to switch between the master device role and the slave device role, which means that the Bluetooth device will become more and more complicated in the design of scenarios such as time slot allocation and dual SCO link connection, resulting in poor call stability and further increase in the complexity of the solution design, resulting in poor final implementation of the solution.

[0003] When using a traditional mobile phone, there are not many scenarios where the mobile phone is connected to multiple devices (i.e., multiple cooperating machines), and there is no demand for complex scenarios such as multiple calls and multiple music at the same time. At the same time, because the cost ceiling of mobile phones is higher, it is easier to use more mature Bluetooth solutions, while Bluetooth devices (such as Bluetooth headsets) cannot use more mature Bluetooth solutions like mobile phones due to cost constraints, resulting in poor performance of existing Bluetooth devices (such as Bluetooth headsets) when connected to multiple cooperating machines at the same time.

[0004] With respect to the above-mentioned related technologies, the inventors found that the design of the connection scheme for existing Bluetooth devices to connect to multiple devices at the same time is relatively complicated, and in different application scenarios, the state of the Bluetooth device needs to be continuously switched between the master device role (master) and the slave device role (slave), which causes uncontrollable system and call stability problems. Summary of the invention

[0005] In order to solve the problem that the solution design of a Bluetooth device connecting to multiple cooperating machines is complex and the stability is uncontrollable, the present application provides a method for a Bluetooth device to maintain the role of a master device to connect to a cooperating machine, a computer device and a Bluetooth device.

[0006] In a first aspect, the present application provides a method for a Bluetooth headset to maintain a master device role and connect to a cooperating machine.

[0007] This application is implemented through the following technical solutions:

[0008] A method for a Bluetooth device to maintain a master device role and connect to a cooperating machine comprises the following steps:

[0009] The connection state between the Bluetooth device and the cooperating machine includes the Bluetooth device being connected to the cooperating machine as a master device and the Bluetooth device being connected to the cooperating machine as a slave device, wherein:

[0010] When the Bluetooth device is connected to the cooperating machine as a master device, the Bluetooth device is set to disable the role switching mode to keep the Bluetooth device connected as a master device;

[0011] When the Bluetooth device is connected to the cooperating machine as a slave device, after completing the update of the data information of the pairing connection, the Bluetooth device switches to the connection state of the master device role.

[0012] In a preferred example, the present application can be further configured as follows: the number of the matching machines is at least two.

[0013] In a preferred example, the present application may be further configured as follows: when the Bluetooth device is connected to the cooperating machine as the master device, the step of setting the Bluetooth device to disable the role switching mode and maintaining the connection state of the Bluetooth device as the master device role includes:

[0014] Set the LMP protocol to disable the role switching mode at any time after the baseband paging process is completed;

[0015] Search whether there is a matching machine in a waiting state;

[0016] When there is a cooperating machine in a waiting state, actively sending a connection request instruction to the cooperating machine;

[0017] detecting a response of the matching machine;

[0018] When the cooperating machine responds to and accepts the connection request instruction, it actively establishes a connection with the cooperating machine, and maintains the connection state of the Bluetooth device as the master device role.

[0019] In a preferred example, the present application may be further configured as follows: when the Bluetooth device is connected to the cooperating machine as a slave device, after completing the update of the data information of the pairing connection, the step of switching the Bluetooth device to the connection state of the master device role includes:

[0020] When receiving a connection request instruction actively sent from the cooperating machine, responding to accepting the connection request instruction, passively establishing a connection with the cooperating machine, and the cooperating machine is in a connection state of a master device role;

[0021] Sending a role switching request instruction to the cooperation machine;

[0022] When the cooperating machine responds to and accepts the role switching request instruction and updates the connection state of the cooperating machine to the slave device role, the connection with the cooperating machine is maintained, and the Bluetooth device switches to the connection state of the master device role.

[0023] In a preferred example, the present application can be further configured as follows: it also includes the following steps:

[0024] When the cooperation machine responds that it does not accept the role switching request instruction, maintaining connection with the cooperation machine;

[0025] Updating the key and pairing record with the partner machine;

[0026] After completing the update of the key and pairing record with the cooperating machine, actively disconnecting from the cooperating machine and setting a reconnection mark;

[0027] Based on the reconnection mark and the updated pairing record, actively sending a connection request instruction to the partner machine;

[0028] detecting a response of the matching machine;

[0029] When the cooperating machine responds to and accepts the connection request instruction, it actively establishes a connection with the cooperating machine, and the Bluetooth device switches to the connection state of the master device.

[0030] In a second aspect, the present application provides a Bluetooth device that maintains a master device role and connects to a cooperating machine.

[0031] This application is implemented through the following technical solutions:

[0032] A Bluetooth device that maintains a master device role and connects to a partner device, comprising:

[0033] A status judgment module, used to judge the connection role of the Bluetooth device when the Bluetooth device is connected to the matching machine;

[0034] An active connection module, used for setting the Bluetooth device to disable the role switching mode when the Bluetooth device is connected to the cooperating machine as a master device, so as to maintain the connection state of the Bluetooth device as a master device;

[0035] A role switching module, used for, when the Bluetooth device is connected to the matching machine as a slave device, after completing the update of the data information of the pairing connection, the Bluetooth device switches to the connection state of the master device role;

[0036] Among them, the state judgment module is connected with the active connection module and the role switching module respectively.

[0037] In a preferred example, the present application can be further configured as follows: the active connection module includes:

[0038] an initialization unit, configured to set the LMP protocol to disable the role switching mode from being performed at any time after the baseband paging process is completed;

[0039] A search unit, used to search whether there is a matching machine in a waiting state;

[0040] A first connection request unit, configured to actively send a connection request instruction to a cooperating machine when there is a cooperating machine in a waiting state;

[0041] A detection unit, used to detect the response of the matching machine;

[0042] The first connection unit is used to actively establish a connection with the cooperating machine when the cooperating machine responds to and accepts the request connection instruction, and maintain the connection state of the Bluetooth device as a master device.

[0043] In a preferred example, the present application can be further configured as follows: the role switching module includes:

[0044] A connection establishing unit, configured to, when receiving a connection request instruction actively sent from the cooperating machine, respond to accept the connection request instruction, passively establish a connection with the cooperating machine, and the cooperating machine is in a connection state of a master device role;

[0045] The role switching request unit is used to send a role switching request instruction to the cooperating machine. When the cooperating machine responds to the role switching request instruction and updates the connection state of the cooperating machine to the slave device role, the connection with the cooperating machine is maintained, and the Bluetooth device switches to the connection state of the master device role.

[0046] In a preferred example, the present application can be further configured as follows: the role switching module also includes:

[0047] A second connection unit, configured to maintain connection with the cooperation machine when the cooperation machine responds that it does not accept the role switching request instruction;

[0048] An information updating unit, used for updating the key and pairing record with the cooperating machine;

[0049] A reconnection marking unit, configured to actively disconnect the connection with the cooperating machine and set a reconnection mark after completing the update of the key and pairing record with the cooperating machine;

[0050] An active reconnection unit, configured to actively send a connection request instruction to the cooperating machine based on the reconnection mark and the updated pairing record;

[0051] The third connection unit is used to detect the response of the cooperating machine, and when the cooperating machine responds to and accepts the connection request instruction, actively establishes a connection with the cooperating machine, and the Bluetooth device switches to the connection state of the master device.

[0052] In a third aspect, the present application provides a computer device.

[0053] This application is achieved through the following technical solutions:

[0054] A computer device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of the above-mentioned methods for a Bluetooth device to maintain a master device role and connect to a cooperating machine.

[0055] In summary, compared with the prior art, the technical solution provided by this application has at least the following beneficial effects:

[0056] When the Bluetooth device is connected to the cooperating machine as the master device, the Bluetooth device is set to disable the role switching mode at any time after the baseband paging process is completed, so as to maintain the connection status of the Bluetooth device as the master device; when the Bluetooth device is connected to the cooperating machine as the slave device, after completing the pairing data update with the cooperating machine, the Bluetooth device actively disconnects from the cooperating machine, and then actively reconnects to the cooperating machine, so as to achieve the connection status of the Bluetooth device switching to the master device role, which covers all scenario behaviors of the connection between the Bluetooth device and the cooperating machine to the greatest extent, and achieves that the Bluetooth device can ultimately maintain the connection status of the Bluetooth device as the master device role and connect to each cooperating machine when connecting to multiple cooperating machines at the same time. It is suitable for various Bluetooth devices and meets the multi-device connection requirements of Bluetooth devices. The solution logic is simple and easy to operate; at the same time, the Bluetooth device can ultimately maintain the connection status of the master device role when connecting to each cooperating machine, avoiding the Bluetooth device switching back and forth between the master device role (master) and the slave device role (slave), and ensuring the stability of the system and calls. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 An overall flow chart of a method for a Bluetooth device to maintain a master device role and connect to a partner machine is provided as an exemplary embodiment of the present application.

[0058] Figure 2 A flowchart of a method for a Bluetooth device to maintain a master device role and connect to a cooperating machine is provided as another exemplary embodiment of the present application and is applied to a scenario where the Bluetooth device is connected to a cooperating machine as a master device role.

[0059] Figure 3 A flowchart of a method for a Bluetooth device to maintain a master device role and connect to a cooperating machine, which is provided as another exemplary embodiment of the present application, is applied to a scenario in which the Bluetooth device is connected to a cooperating machine as a slave device role.

[0060] Figure 4 A structural block diagram of a Bluetooth device that maintains a master device role and connects to a partner machine is provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0061] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, those skilled in the art may make modifications to the present embodiment without any creative contribution as needed, but such modifications are protected by the patent law as long as they are within the scope of the claims of the present application.

[0062] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0063] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.

[0064] The connection scheme of existing Bluetooth headsets is as follows:

[0065] Solution 1: Bluetooth headsets only support single connection, not dual connection;

[0066] Solution 2: The Bluetooth headset supports dual connections, and then selects different combinations according to different cooperating devices. Although the purpose of dual connection can be achieved, due to its different combinations, the differences of different cooperating devices need to be considered. In order to adapt to different scenarios, the Bluetooth headset needs to constantly switch between the master device role (master) and the slave device role (slave). This will cause the stability of the overall solution of the Bluetooth headset to be uncontrollable, the call to be unstable, and the complexity of the solution to be greatly increased.

[0067] To this end, the present application is based on software design and is designed for the connection logic and connection sequence between a Bluetooth device and two cooperating machines, or between a Bluetooth device and multiple cooperating machines, to provide a stable solution that supports a Bluetooth device to maintain the master device role and connect to at least two cooperating machines. If the Bluetooth device is in the master device role (master) connected to a cooperating machine, the master device role of the Bluetooth device is maintained without switching roles; if the Bluetooth device is in the slave device role (slave) connected to a cooperating machine, the role of the Bluetooth device is switched to the master role to connect to the cooperating machine, so as to cover all scenarios in which the Bluetooth device is connected to the cooperating machine.

[0068] The embodiments of the present application are further described below in conjunction with the accompanying drawings.

[0069] Reference Figure 1 , an embodiment of the present application provides a method for a Bluetooth device to maintain a master device role and connect to a cooperating machine, and the main steps of the method are described as follows.

[0070] S1: The connection status between the Bluetooth device and the cooperating machine includes the Bluetooth device being connected to the cooperating machine as a master device and the Bluetooth device being connected to the cooperating machine as a slave device;

[0071] S2: When the Bluetooth device is connected to the cooperating machine as the master device, the Bluetooth device is set to disable the role switching mode to keep the Bluetooth device connected as the master device;

[0072] S3: When the Bluetooth device is connected to the partner machine as a slave device, after completing the update of the data information of the pairing connection, the Bluetooth device switches to the connection state of the master device role.

[0073] Preferably, the number of the fitting machines is at least two.

[0074] The connection status of the Bluetooth device when it is connected to a cooperating machine depends on the object that actively initiates the connection. For example, the connection with the cooperating machine is actively triggered from the Bluetooth device, that is, the Bluetooth device actively connects to the cooperating machine. In this case, the Bluetooth device connects to the cooperating machine as a master device; and when the cooperating machine actively connects to the Bluetooth device, the Bluetooth device is passively connected. In this case, the Bluetooth device connects to the cooperating machine as a slave device.

[0075] Preferably, the connection mode between the Bluetooth device and the cooperating machine and the role of the Bluetooth device can be known after the Bluetooth device and the cooperating machine establish a connection.

[0076] The Bluetooth device defaults to our local Bluetooth device, and the matching machine is the matching machine device to be connected to the other end. Preferably, the Bluetooth device can include but is not limited to any one of the local Bluetooth headset, Bluetooth speaker, and Bluetooth watch, and the matching machine can include but is not limited to any one of the mobile phone Bluetooth, PC Bluetooth, and Bluetooth adapter (Bluetooth dongle) of the other end.

[0077] Reference Figure 2 In one embodiment, a method for a Bluetooth device to maintain a master device role and connect to a cooperating machine is applied to a scenario where the Bluetooth device is connected to a cooperating machine as a master device role, and includes the following steps:

[0078] S21: Setting the LMP protocol to disable the role switching mode at any time after the baseband paging process is completed;

[0079] S22: Searching whether there is a matching machine in a waiting state;

[0080] S23: When there is a cooperating machine in a waiting state, actively sending a connection request instruction to the cooperating machine;

[0081] S24: Detecting the response of the matching machine;

[0082] S25: When the cooperating machine responds to the receiving connection instruction, it actively establishes a connection with the cooperating machine, and maintains the connection state of the Bluetooth device as the main device role.

[0083] Specifically, when the Bluetooth device actively connects to the cooperating machine, that is, the Bluetooth device is connected to the cooperating machine as the master device, by setting the disabled role switching, the master device role of the Bluetooth device can be prevented from being switched, so that the Bluetooth device can maintain the connection state of the master device role to connect to the cooperating machine.

[0084] Reference Figure 3 In one embodiment, a method for a Bluetooth device to maintain a master device role and connect to a cooperating machine is applied to a scenario where the Bluetooth device is connected to a cooperating machine as a slave device role, and includes the following steps:

[0085] S31: when receiving a connection request instruction actively sent from the cooperating machine, responding to accept the connection instruction, establishing a connection with the cooperating machine, and the cooperating machine is in the connection state of the master device role;

[0086] S32: Sending a role switching request instruction to the cooperation machine;

[0087] S33: When the cooperating machine responds to and accepts the role switching instruction and updates the connection state of the cooperating machine to the slave device role, the connection with the cooperating machine is maintained, and the Bluetooth device switches to the connection state of the master device role.

[0088] In one embodiment, a method for a Bluetooth device to maintain a master device role and connect to a partner machine further includes the following steps:

[0089] S34: When the cooperation machine responds that it does not accept the role switching instruction, maintaining connection with the cooperation machine;

[0090] S341: Update the key and pairing record with the partner machine;

[0091] S342: After completing the update of the key and pairing record with the cooperating machine, actively disconnecting from the cooperating machine and setting a reconnection mark;

[0092] S343: Based on the reconnection mark and the updated pairing record, actively send a connection request instruction to the cooperating machine;

[0093] S344: Detecting the response of the matching machine;

[0094] S345: When the cooperating machine responds to and accepts the connection instruction, it actively establishes a connection with the cooperating machine, and the Bluetooth device switches to the connection state of the master device.

[0095] Specifically, when the cooperating machine actively connects to the Bluetooth device, that is, the Bluetooth device is connected to the cooperating machine as a slave device. At this time, the connection between the Bluetooth device and the cooperating machine is maintained first. After the key and pairing record are updated, the reconnection mark is set, and the connection with the cooperating machine is actively disconnected. The Bluetooth device actively connects to the cooperating machine based on the reconnection mark, that is, after the data information of the pairing connection is updated, the Bluetooth device switches to connect to the cooperating machine as a master device.

[0096] The following is an example of the specific connection settings between a Bluetooth headset and a matching machine.

[0097] Scenario 1: The steps for the Bluetooth headset to actively connect to the partner machine (the Bluetooth headset is in the master device role) are as follows:

[0098] 1. The Bluetooth headset setting LMP features does not support role switch;

[0099] 2. The cooperating machine is in a connectable state, and the Bluetooth headset actively connects to the cooperating machine. At this time, the Bluetooth headset acts as the master device.

[0100] 3. The cooperating device accepts the connection and establishes a connection between the Bluetooth headset and the cooperating device;

[0101] In scenario 1, after the Bluetooth headset actively connects to the cooperating machine, that is, after the Bluetooth headset is connected to the cooperating machine as the master device, the master device status of the Bluetooth headset will not be switched because the LMP features are set to not support role switch (the function of role switching can be executed at any time after the baseband paging process is completed), and the Bluetooth headset will maintain the master device role and connect to the cooperating machine.

[0102] Scenario 2: The steps for the cooperating machine to actively connect to the Bluetooth headset (the Bluetooth headset is in the slave device role) are as follows:

[0103] 1. The Bluetooth headset is in a connectable state, and the cooperating machine actively connects to the Bluetooth headset. At this time, the Bluetooth headset acts as a slave device;

[0104] 2. When the Bluetooth headset receives the LMP Host Connection Request and replies with LMP Accepted, it also initiates the LMP Role Switch;

[0105] 3. If the cooperating machine accepts the role switch, the Bluetooth headset switches to the master device role and continues to complete the connection between the Bluetooth headset and the cooperating machine;

[0106] 4. If the partner machine does not accept the role switch, the Bluetooth headset and the partner machine will continue to be connected until a profile (A2DP / HFP) is completed, so that both the Bluetooth headset and the partner machine can complete the update of the key and pairing record, which is convenient for the subsequent Bluetooth headset to reconnect. At this time, the Bluetooth headset disconnects the Bluetooth connection with the partner machine and sets the reconnection mark to enable the Bluetooth headset to directly and actively connect to the partner machine;

[0107] 5. The Bluetooth headset starts to actively connect to the cooperating machine according to the reconnection mark, until the Bluetooth headset switches to the main device role and connects to the cooperating machine.

[0108] Scenario 2: When the LMP Host Connection Request is received through the Bluetooth headset and the LMP Accepted message is replied, the LMP Role Switch logic is also initiated to try whether the partner machine allows the Bluetooth headset to switch roles. If not allowed, the current connection between the Bluetooth headset and the partner machine will be maintained until a profile (A2DP / HFP) is completed. That is, at this time, the Bluetooth processes on both the Bluetooth headset and the partner machine have completed the update of the key and pairing records, which is convenient for the subsequent Bluetooth headset to reconnect. If this step is not reached, the Bluetooth headset cannot directly and actively connect to the partner machine. Then the Bluetooth headset actively disconnects from the partner machine and marks the reconnection flag. Then, according to the reconnection flag, the Bluetooth headset starts to actively connect to the partner machine. At this time, the connection state of the Bluetooth headset switches to the master device role (master). The following connection steps are the same as (Scenario 1: The Bluetooth headset actively connects to the partner machine) and will not be repeated here. The connection state of the Bluetooth headset is switched to the master device role (master) and connected to the partner machine.

[0109] Scenario 2 additionally adds a solution design for the scenario where the counterpart machine does not support role switch. At this time, the Bluetooth headset remains connected to the counterpart machine, and actively disconnects from the counterpart machine after updating the key and pairing record with the counterpart machine, and sets a reconnection mark, and actively initiates a reconnection according to the set reconnection mark, so that the Bluetooth headset actively connects to the counterpart machine, so that the connection state of the Bluetooth headset is finally switched to the master device role (master), which can solve the problem that the connection state of the Bluetooth headset cannot be switched to the master device role when the counterpart machine does not support role switch. In the traditional solution, if the other party does not support role switch, the Bluetooth headset can only accept the role of a slave device (slave) to connect to the counterpart machine, which will cause the Bluetooth headset to constantly switch between the slave device role and the master device role due to different role combinations, resulting in uncontrollable stability of the overall solution and greatly increased complexity of the solution. The solution of the present application can improve this problem, and realize that the Bluetooth headset can maintain the master device role (master) to connect to each counterpart machine, and meet the requirements of the Bluetooth headset being connected to multiple counterpart machines at the same time.

[0110] The above scenario 1 or scenario 2 is explained by taking the communication connection between a Bluetooth headset and two cooperating machines as an example, and the Bluetooth headset is connected to each cooperating machine as the main device role; in the specific implementation scenario, the communication connection method between the Bluetooth headset and multiple cooperating machines is similar to the communication connection method between the Bluetooth headset and two cooperating machines, which will not be repeated here.

[0111] The above scenarios 1 and 2 cover all scenario behaviors of Bluetooth headset connection, and realize the stable and controllable function when the Bluetooth headset acts as the master device and connects to multiple cooperating machines at the same time, meeting the requirements of the Bluetooth headset supporting simultaneous connection with multiple cooperating machines. When the Bluetooth headset establishes a connection with each cooperating machine, the Bluetooth headset can ultimately maintain the connection status of the master device role (master). The solution is suitable for all types of headsets, and the solution logic is simple and easy to operate.

[0112] Preferably, in the active connection scenario where the Bluetooth headset of the present application acts as the master device role to connect to the cooperating machine, the Bluetooth headset will forcibly set its own LMP feature to not support role switch. After the setting, the cooperating machine cannot require the Bluetooth headset to switch roles, so that the Bluetooth headset can always be connected to each cooperating machine as the master device role (master).

[0113] Preferably, in the passive connection scenario where the Bluetooth headset of the present application is connected to the cooperating machine as a slave device role, the Bluetooth headset will directly request a role switch when multiple cooperating machines initiate connections. Most types of cooperating machines accept the role switch. When the Bluetooth headset receives the LMP Host Connection Request and replies with LMP Accepted, it also initiates the LMP Role Switch and performs double confirmation with the cooperating machine to determine whether the connection status of the Bluetooth headset can be switched to the master device role.

[0114] In the passive connection scenario where the Bluetooth headset of the present application is connected to the cooperating machine as a slave device, if the cooperating machine does not accept the role switch, such as: the iPhone as a cooperating machine may have a low probability of not accepting the role switch of the Bluetooth headset. At this time, the Bluetooth headset, while maintaining the current connection with the cooperating machine and completing the key and pairing record update with the cooperating machine, actively disconnects the current connection with the cooperating machine and actively initiates a reconnection, switches the connection state of the Bluetooth headset to the master device role, and returns to the logic of the active connection scenario where the Bluetooth headset is connected to the cooperating machine as the master device role. The customer experience is basically imperceptible, and it can better ensure that the Bluetooth headset in the passive connection scenario is ultimately connected to the cooperating machine as the master device role (master).

[0115] In summary, a method for a Bluetooth headset to maintain a master device role and connect to a cooperating machine selects different schemes according to the connection status of the Bluetooth headset when the Bluetooth headset is connected to the cooperating machine, and sets a function to disable the role switching of the Bluetooth headset when the Bluetooth headset actively connects to the cooperating machine, thereby maintaining the connection status of the master device role of the Bluetooth headset; when the Bluetooth headset is passively connected to the cooperating machine, the Bluetooth headset maintains the current connection with the cooperating machine until the Bluetooth headset completes the update of the key and pairing record with the cooperating machine, the Bluetooth headset actively disconnects from the cooperating machine and sets a reconnection mark, and then actively reconnects to the cooperating machine according to the reconnection mark, thereby switching the connection status of the Bluetooth headset to the master device role and connecting with the cooperating machine. This solution implements a design scheme for maintaining the connection status of the Bluetooth headset's master device role when the Bluetooth headset is connected to multiple cooperating machines at the same time. The solution is simple and reliable, covering all scenario behaviors of the Bluetooth headset being connected to multiple cooperating machines at the same time, and realizing the function of stable and controllable calls when the Bluetooth headset is connected as the master device role; and the Bluetooth headset has the advantage of being able to connect to multiple cooperating machines at the same time, and can respond to multiple calls at the same time, and the Bluetooth headset can maintain the master device role of the Bluetooth headset when connected to each cooperating machine, thereby realizing that the Bluetooth headset can be connected to multiple devices at the same time and the calls are stable. The solution logic is simple and easy to operate, and can adapt to various types of Bluetooth headsets, while covering the scenarios where the Bluetooth headset is connected to various types of cooperating machines at the same time.

[0116] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0117] Reference Figure 4 The embodiment of the present application further provides a Bluetooth device that maintains the role of a master device and is connected to a cooperating machine. The Bluetooth device that maintains the role of a master device and is connected to a cooperating machine includes:

[0118] A status judgment module, used to judge the connection role of the Bluetooth device when the Bluetooth device is connected to the matching machine;

[0119] An active connection module, used for setting the Bluetooth device to disable the role switching mode when the Bluetooth device is connected to the cooperating machine as a master device, so as to keep the Bluetooth device connected as a master device;

[0120] A role switching module, used for, when the Bluetooth device is connected to the matching machine as a slave device, after completing the update of the data information of the pairing connection, the Bluetooth device switches to the connection state of the master device role;

[0121] Among them, the state judgment module is connected with the active connection module and the role exchange module respectively.

[0122] Furthermore, the active connection module includes:

[0123] an initialization unit, configured to set the LMP protocol to disable the execution of a role switching mode at any time after the baseband paging process is completed;

[0124] A search unit, used to search whether there is a matching machine in a waiting state;

[0125] A first connection request unit, configured to actively send a connection request instruction to a cooperating machine when there is a cooperating machine in a waiting state;

[0126] A detection unit, used to detect the response of the matching machine;

[0127] The first connection unit is used to establish a connection with the cooperating machine when the cooperating machine responds to the receiving connection instruction, and maintain the connection state of the Bluetooth device as a master device.

[0128] Furthermore, the role switching module includes:

[0129] A connection establishing unit, configured to, when receiving a connection request instruction from the cooperating machine, respond to accept the connection instruction and passively establish a connection with the cooperating machine, wherein the cooperating machine is in a connection state of a master device role;

[0130] The role switching request unit is used to send a role switching request instruction to the cooperation machine, and when the cooperation machine responds to the role switching instruction and updates the connection state of the cooperation machine to the slave device role, the Bluetooth device remains connected with the cooperation machine, and switches to the connection state of the master device role.

[0131] Furthermore, the role switching module also includes:

[0132] A second connection unit, configured to maintain connection with the matching machine when the matching machine responds that it does not accept the connection instruction;

[0133] An information updating unit, used for updating the key and pairing record with the cooperating machine;

[0134] A reconnection marking unit, configured to actively disconnect the connection with the cooperating machine and set a reconnection mark after completing the update of the key and pairing record with the cooperating machine;

[0135] An active reconnection unit, configured to actively send a connection request instruction to the cooperating machine based on the reconnection mark and the updated pairing record;

[0136] The third connection unit is used to detect the response of the cooperating machine, and when the cooperating machine responds to accepting the connection instruction, actively establishes a connection with the cooperating machine, and the Bluetooth device switches to the connection state of the master device.

[0137] The specific definition of a Bluetooth device that maintains a master device role and is connected to a cooperating machine can be found in the above definition of a method for a Bluetooth device to maintain a master device role and be connected to a cooperating machine, which will not be repeated here.

[0138] Each module in the above-mentioned Bluetooth device that maintains the master device role and connects to the matching machine can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0139] This application does not require adaptive hardware design, and can ensure that the Bluetooth device maintains the connection status of the master device role (master). It is suitable for solutions in which the Bluetooth device stably connects to multiple cooperating machines and maintains the master device role (master) in the connection with each cooperating machine.

[0140] In one embodiment, a computer device is provided, which may be a server. The computer device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, any of the above-mentioned methods for a Bluetooth device to maintain the role of a master device and connect to a cooperating machine is implemented.

[0141] In one embodiment, a computer-readable storage medium is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the above-mentioned methods for a Bluetooth device to maintain a master device role and connect to a cooperating machine is implemented.

[0142] In one embodiment, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, any one of the above methods for a Bluetooth device to maintain a master device role and connect to a partner machine is implemented.

[0143] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. When the computer program is executed, it may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0144] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.

Claims

1. A method for a Bluetooth device to maintain the role of a master device and connect to a cooperating machine, characterized in that: The following steps are included: The connection state between the Bluetooth device and the cooperating machine includes the Bluetooth device being connected to the cooperating machine as a master device and the Bluetooth device being connected to the cooperating machine as a slave device, wherein: When the Bluetooth device is connected to the cooperating machine as a master device, the Bluetooth device is set to disable the role switching mode to keep the Bluetooth device connected as a master device; When the Bluetooth device is connected to the cooperating machine as a slave device, after completing the update of the data information of the pairing connection, the Bluetooth device switches to the connection state of the master device role.

2. The method for a Bluetooth device to maintain a master device role and connect to a cooperating machine according to claim 1, characterized in that: The number of the matching machines is at least two.

3. The method for a Bluetooth device to maintain a master device role and connect to a cooperating machine according to claim 1, characterized in that: The step of setting the Bluetooth device to disable the role switching mode and maintaining the connection state of the Bluetooth device as the master device role when the Bluetooth device is connected to the cooperating machine as the master device role includes: Set the LMP protocol to disable the role switching mode at any time after the baseband paging process is completed; Search whether there is a matching machine in a waiting state; When there is a cooperating machine in a waiting state, actively sending a connection request instruction to the cooperating machine; detecting a response of the matching machine; When the cooperating machine responds to and accepts the connection request instruction, it actively establishes a connection with the cooperating machine, and maintains the connection state of the Bluetooth device as the master device role.

4. The method for a Bluetooth device to maintain a master device role and connect to a cooperating machine according to claim 1, characterized in that: When the Bluetooth device is connected to the cooperating machine as a slave device, after completing the update of the data information of the pairing connection, the step of switching the Bluetooth device to the connection state of the master device role includes: When receiving a connection request instruction actively sent from the cooperating machine, responding to accepting the connection request instruction, passively establishing a connection with the cooperating machine, and the cooperating machine is in a connection state of a master device role; Sending a role switching request instruction to the cooperation machine; When the cooperating machine responds to and accepts the role switching request instruction and updates the connection state of the cooperating machine to the slave device role, the connection with the cooperating machine is maintained, and the Bluetooth device switches to the connection state of the master device role.

5. The method for a Bluetooth device to maintain a master device role and connect to a cooperating machine according to claim 4, characterized in that: The following steps are also included: When the cooperation machine responds that it does not accept the role switching request instruction, maintaining connection with the cooperation machine; Updating the key and pairing record with the partner machine; After completing the update of the key and pairing record with the cooperating machine, actively disconnecting from the cooperating machine and setting a reconnection mark; Based on the reconnection mark and the updated pairing record, actively sending a connection request instruction to the partner machine; detecting a response of the matching machine; When the cooperating machine responds to and accepts the connection request instruction, it actively establishes a connection with the cooperating machine, and the Bluetooth device switches to the connection state of the master device.

6. A Bluetooth device that maintains the role of a master device and connects to a partner machine, characterized in that: include, A status judgment module, used to judge the connection status of the Bluetooth device when the Bluetooth device is connected to the matching machine; An active connection module, used for setting the Bluetooth device to disable the role switching mode when the Bluetooth device is connected to the cooperating machine as a master device, so as to maintain the connection state of the Bluetooth device as a master device; A role switching module, used for, when the Bluetooth device is connected to the matching machine as a slave device, after completing the update of the data information of the pairing connection, the Bluetooth device switches to the connection state of the master device role; Among them, the state judgment module is connected with the active connection module and the role switching module respectively.

7. The Bluetooth device for maintaining the master device role and connecting to the cooperating machine according to claim 6, characterized in that: The active connection module includes: an initialization unit, configured to set the LMP protocol to disable the execution of a role switching mode at any time after the baseband paging process is completed; A search unit, used for searching whether there is a matching machine in a waiting state; A first connection request unit, configured to actively send a connection request instruction to a cooperating machine when there is a cooperating machine in a waiting state; A detection unit, used to detect the response of the matching machine; The first connection unit is used to actively establish a connection with the cooperating machine when the cooperating machine responds to and accepts the request connection instruction, and maintain the connection state of the Bluetooth device as a master device.

8. The Bluetooth device for maintaining the master device role and connecting to the cooperating machine according to claim 6, characterized in that: The role switching module includes: A connection establishing unit, configured to, when receiving a connection request instruction actively sent from the cooperating machine, respond to accept the connection request instruction, passively establish a connection with the cooperating machine, and the cooperating machine is in a connection state of a master device role; The role switching request unit is used to send a role switching request instruction to the cooperating machine. When the cooperating machine responds to the role switching request instruction and updates the connection state of the cooperating machine to the slave device role, the connection with the cooperating machine is maintained, and the Bluetooth device switches to the connection state of the master device role.

9. The Bluetooth device for maintaining the master device role and connecting to the cooperating machine according to claim 8, characterized in that: The role switching module also includes: A second connection unit, configured to maintain connection with the cooperation machine when the cooperation machine responds that it does not accept the role switching request instruction; An information updating unit, used for updating the key and pairing record with the cooperating machine; A reconnection marking unit, configured to actively disconnect the connection with the cooperating machine and set a reconnection mark after completing the update of the key and pairing record with the cooperating machine; An active reconnection unit, configured to actively send a connection request instruction to the cooperating machine based on the reconnection mark and the updated pairing record; The third connection unit is used to detect the response of the cooperating machine, and when the cooperating machine responds to and accepts the connection request instruction, actively establishes a connection with the cooperating machine, and the Bluetooth device switches to the connection state of the master device.

10. A computer device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of claims 1 to 5 of the method for a Bluetooth device to maintain the master device role and connect to a cooperating machine.

Citation Information

Patent Citations

  • Television terminal, Bluetooth device return-connection method and computer-readable storage medium

    CN107197346A

  • Connection switching method for wireless Bluetooth headset and multiple devices

    CN113938868A

  • Method and system for role management for complex bluetooth® devices

    US20060072525A1

  • Method and apparatus for performing role management of short-range wireless connections

    US20120302170A1

  • Bluetooth connection method and apparatus, earphone device and computer-readable storage medium

    WO2023035782A1