Method, device, Bluetooth chip and equipment for establishing a Bluetooth link
By providing Bluetooth link parameters in the slave device and adjusting the scheduling time point of the master device, the problem of scheduling conflicts in multiple Bluetooth link scenarios is solved, bandwidth and utilization are improved, and business continuity is ensured.
Patent Information
- Application Number
- CN202110621098.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-03
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-06-03
AI Technical Summary
In a multi-Bluetooth link scenario, existing technology cannot effectively avoid scheduling conflicts, leading to service interruption, and low multi-link bandwidth and air interface utilization.
By providing the link parameters of the established Bluetooth link in the slave device, the master device to be connected can adjust the link parameters, avoid scheduling conflicts between multiple Bluetooth links, and reasonably plan the scheduling time during the link establishment phase. point to avoid conflicts.
Scheduling conflicts between multiple Bluetooth links are effectively avoided, multi-link bandwidth and air interface utilization are improved, and business continuity is ensured.
Smart Images

Figure CN115442778B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of Bluetooth technology, and in particular to a method, apparatus, Bluetooth chip and device for establishing a Bluetooth link. Background Art
[0002] Bluetooth Low Energy (BLE), as a Bluetooth technology evolved from Bluetooth classic (BT), has lower cost and power consumption.
[0003] Moreover, compared with classic Bluetooth devices, BLE devices support establishing more Bluetooth links at the same time. For example, classic Bluetooth devices support establishing up to 7 Bluetooth links at the same time, while BLE devices support establishing more than 7 Bluetooth links at the same time. Summary of the invention
[0004] The present application provides a method, apparatus, Bluetooth chip and device for establishing a Bluetooth link. The technical solution is as follows:
[0005] On the one hand, an embodiment of the present application provides a method for establishing a Bluetooth link in a slave device, the method comprising:
[0006] Establishing at least one first Bluetooth link with at least one first master device;
[0007] Sending the first link parameter of each of the first Bluetooth links to the second master device;
[0008] receiving a link establishment request from the second master device, the link establishment request being used to request to establish a second Bluetooth link with the slave device, the link establishment request including a second link parameter of the second Bluetooth link, the second link parameter being determined by the second master device based on the first link parameter; and
[0009] The second Bluetooth link is established with the second master device based on the second link parameter, wherein a scheduling time point of the second master device on the second Bluetooth link is different from a scheduling time point of the first master device on each of the first Bluetooth links.
[0010] On the other hand, an embodiment of the present application provides a method for establishing a Bluetooth link in a master device, the method comprising:
[0011] Receiving first link parameters of each first Bluetooth link from a slave device, the slave device establishing at least one first Bluetooth link with at least one first master device;
[0012] determining a second link parameter of a second Bluetooth link based on the first link parameter, the second Bluetooth link being located between the slave device and the second master device; and
[0013] A link establishment request including the second link parameters is sent to the slave device, so that the slave device establishes the second Bluetooth link with the second master device based on the second link parameters, wherein a scheduling time point of the second master device on the second Bluetooth link is different from a scheduling time point of the first master device on each of the first Bluetooth links.
[0014] On the other hand, an embodiment of the present application provides an apparatus for establishing a Bluetooth link in a slave device, the apparatus comprising:
[0015] A first establishing module, configured to establish at least one first Bluetooth link with at least one first master device;
[0016] A parameter providing module, used for sending the first link parameter of each of the first Bluetooth links to the second master device;
[0017] a request receiving module, configured to receive a link establishment request from the second master device, wherein the link establishment request is used to request to establish a second Bluetooth link with the slave device, wherein the link establishment request includes a second link parameter of the second Bluetooth link, and the second link parameter is determined by the second master device based on the first link parameter; and
[0018] A second establishing module is used to establish the second Bluetooth link with the second master device based on the second link parameters, wherein the scheduling time point of the second master device on the second Bluetooth link is different from the scheduling time point of the first master device on each of the first Bluetooth links.
[0019] On the other hand, an embodiment of the present application provides an apparatus for establishing a Bluetooth link in a master device, the apparatus comprising:
[0020] A parameter acquisition module, configured to receive first link parameters of each first Bluetooth link from a slave device, wherein the slave device establishes at least one first Bluetooth link with at least one first master device;
[0021] A second parameter determination module is configured to determine a second link parameter of a second Bluetooth link based on the first link parameter, wherein the second Bluetooth link is located between the slave device and the second master device; and
[0022] A request sending module is used to send a link establishment request including the second link parameters to the slave device, so that the slave device establishes the second Bluetooth link with the second master device based on the second link parameters, wherein the scheduling time point of the second master device on the second Bluetooth link is different from the scheduling time point of the first master device on each of the first Bluetooth links.
[0023] On the other hand, an embodiment of the present application provides a Bluetooth chip, which includes a programmable logic circuit and / or program instructions. When the Bluetooth chip is running, it is used to implement the method for establishing a Bluetooth link in a slave device as described in the above aspects, or to implement the method for establishing a Bluetooth link in a master device as described in the above aspects.
[0024] On the other hand, an embodiment of the present application provides an electronic device with Bluetooth function, wherein the electronic device is provided with a Bluetooth chip as described in the above aspect.
[0025] On the other hand, an embodiment of the present application provides a computer-readable storage medium, in which at least one program code is stored. The program code is loaded and executed by a Bluetooth chip to implement the method for establishing a Bluetooth link in a slave device as described in the above aspects, or the method for establishing a Bluetooth link in a master device.
[0026] On the other hand, an embodiment of the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The Bluetooth chip of the electronic device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the electronic device executes the method for establishing a Bluetooth link in a slave device or the method for establishing a Bluetooth link in a master device provided in various optional implementations of the above aspects.
[0027] The technical solution provided in the embodiments of the present application can bring the following beneficial effects:
[0028] When the first Bluetooth link is established between the slave device and the first master device and a second Bluetooth link needs to be established with the second master device, the slave device provides the first link parameters corresponding to the first Bluetooth link to the second master device, so that the second master device can determine, based on the first link parameters, the second link parameters to be used when there is no scheduling conflict between the second Bluetooth link and the established first Bluetooth link (that is, the scheduling time point on the second Bluetooth link is different from the scheduling time point on each first Bluetooth link), and sends a link establishment request to the slave device based on the second link parameters, thereby establishing a second Bluetooth link with the slave device; using the solution provided in the embodiment of the present application, the slave device pre-provides link information of the established Bluetooth link, so that the master device to be connected can adjust the link parameters during the link establishment phase to avoid scheduling conflicts between multiple Bluetooth links, thereby avoiding service interruptions caused by scheduling conflicts between multiple Bluetooth links, and helping to improve multi-link bandwidth and air interface utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 A schematic diagram showing an implementation environment provided by an exemplary embodiment of the present application is shown;
[0031] Figure 2 It is a schematic diagram of a master device scheduling conflict process in a multi-link scenario in the related art;
[0032] Figure 3 A flowchart of a method for establishing a Bluetooth link provided by an exemplary embodiment of the present application is shown;
[0033] Figure 4 A flowchart of a method for establishing a Bluetooth link provided by another exemplary embodiment of the present application is shown;
[0034] Figure 5 is a schematic diagram of an implementation of a Bluetooth broadcast transmission process shown in an exemplary embodiment of the present application;
[0035] Figure 6 is a schematic diagram of a first link parameter in a load shown in an exemplary embodiment of the present application;
[0036] Figure 7 is a schematic diagram of a first master device and a second master device corresponding to respective scheduling time points, shown in an exemplary embodiment of the present application;
[0037] Figure 8 is a timing diagram of a Bluetooth link establishment process shown in an exemplary embodiment of the present application;
[0038] Fig. 9 A structural block diagram of an apparatus for establishing a Bluetooth link in a slave device provided by an embodiment of the present application is shown;
[0039] Fig.10 A structural block diagram of an apparatus for establishing a Bluetooth link in a master device provided by another embodiment of the present application is shown;
[0040] Fig.11 A structural block diagram of an electronic device with Bluetooth function provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0041] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0042] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application, wherein the implementation environment includes multiple master devices 110 (master) and slave devices 120 (slave).
[0043] The master device 110 and the slave device 120 are both electronic devices with Bluetooth function. In a possible implementation, the master device 110 and the slave device 120 are both BLE devices. The master device 110 is in master mode, and the slave device 120 is in slave mode. The electronic device working in the master mode can actively search for other Bluetooth devices around and select the Bluetooth device to be connected, while the electronic device working in the slave mode can only be searched by other electronic devices but cannot actively search.
[0044] In some embodiments, the master device 110 may be a smartphone, a tablet computer, a wearable device, a personal computer, etc., and the slave device 120 may be a smart speaker, a Bluetooth headset, a television, a smartphone, etc. Figure 1 The description is made by taking the example that both the master device 110 and the slave device 120 are smartphones, but this is not a limitation.
[0045] In the embodiment of the present application, the slave device 120 can simultaneously establish Bluetooth links with multiple master devices 110. The Bluetooth link can be an ACL (Asynchronous Connection Less) link (mainly used for packet data transmission). Figure 1As shown, a first Bluetooth link is established between the slave device 120 and the first master device 111, and a second Bluetooth link is established between the slave device 120 and the second master device 112. The slave device 120 transmits data with the first master device 111 via the first Bluetooth link, and the slave device 120 transmits data with the second master device 112 via the second Bluetooth link.
[0046] It should be noted that the above embodiment is only described by taking the example of establishing a Bluetooth link between a slave device and two master devices. In other possible implementations, the slave device may establish a Bluetooth link with at least three master devices, and this embodiment does not constitute a limitation to this.
[0047] In the related art, each master device that establishes a Bluetooth link with a slave device determines its own scheduling time point and performs periodic scheduling to achieve data transmission between the slave devices, wherein the scheduling time point is determined based on the initial scheduling time point and the scheduling interval.
[0048] Indicatively, Figure 2 As shown, the slave device establishes a first Bluetooth link with the first master device and a second Bluetooth link with the second master device. The initial scheduling time point of the first master device is T0. Based on the first scheduling interval, the first master device sends and receives data with the slave device at time T0, time T1 and time T2 respectively; the initial scheduling time point of the second master device is T3. Based on the second scheduling interval, the second master device sends and receives data with the slave device at time T3, time T4 and time T5 respectively.
[0049] However, since the first master device and the second master device are unaware of each other's scheduling time points, when the scheduling time points of the first master device and the second master device coincide, a scheduling conflict will occur. When a scheduling conflict occurs, the slave device will choose to transmit data with the master device through one of the Bluetooth links based on factors such as the master device's priority and transceiver performance.
[0050] Indicatively, Figure 2 As shown, the scheduling time point T1 of the first master device coincides with the scheduling time point T4 of the second master device. Since the priority of the first master device is higher than that of the second master device, the slave device chooses to transmit data with the first master device through the first Bluetooth link, and the service between the slave device and the second master device is interrupted due to the scheduling conflict.
[0051] In the embodiment of the present application, the slave device pre-provides the link parameters of the established Bluetooth link, so that the master device to be connected can determine the scheduling time point of the connected master device based on the link parameters, and avoid scheduling conflicts with the connected master device by adjusting the link parameters, and then establish a Bluetooth link with the slave device based on the adjusted link parameters, thereby avoiding interruption of services between the slave device and the master device due to scheduling conflicts in a multi-link scenario; and, by reasonably planning the scheduling time points of each master device, the multi-link bandwidth and air interface utilization can be improved.
[0052] Please refer to Figure 3 , which shows a flowchart of a method for establishing a Bluetooth link provided by an exemplary embodiment of the present application. In this embodiment, the method is used for Figure 1 Taking the implementation environment shown in FIG. 1 as an example, the method includes:
[0053] Step 301: A slave device establishes at least one first Bluetooth link with at least one first master device.
[0054] In this embodiment, the first master device refers to a master device that has established a Bluetooth link with the slave device.
[0055] In a possible implementation, the slave device establishes a first Bluetooth link with each first master device in turn, and there is no scheduling conflict between the first Bluetooth links. When the slave device establishes a Bluetooth link with the first first master device, the first master device sends a link establishment request containing its own scheduling interval to the slave device, and the slave device establishes the first first Bluetooth link with the first master device according to the link establishment request. When establishing a Bluetooth link with a subsequent first master device, in order to avoid scheduling conflicts, the slave device needs to instruct the subsequent first master device to adjust its own link parameters based on the link parameters of the connected master device through a link parameter sharing mechanism, and establish a first Bluetooth link.
[0056] Step 302: The slave device sends the first link parameters of each first Bluetooth link to the second master device.
[0057] Regarding the specific method of providing the first link parameter, optionally, the slave device may send the first link parameter to the second master device by broadcasting a data packet, wherein the broadcast method may include Bluetooth broadcast, Near Field Communication (NFC) broadcast, WiFi broadcast, etc., which is not limited in this embodiment.
[0058] In a possible implementation, in response to the master device connection instruction, the slave device turns on the broadcast function, or the slave device keeps the broadcast function turned on and broadcasts a Bluetooth data packet (including the first link parameters of each first Bluetooth link) on the broadcast channel. The master device connection instruction can be triggered by a user, such as after the user turns on the Bluetooth discovery function of the slave device (after turning on the Bluetooth discovery function, it can be discovered by other Bluetooth devices), the slave device turns on the broadcast function.
[0059] In some embodiments, the Bluetooth data packet is an extended advertising (AE ADV), and the first link parameter is written into a payload of the AE ADV.
[0060] In order to ensure the accuracy of the first link parameters in the Bluetooth data packet, optionally, each time the first master device completes scheduling, the slave device needs to update the first link parameters and update the updated first link parameters to the Bluetooth data packet.
[0061] Step 303: The second master device receives the first link parameters of each first Bluetooth link from the slave device.
[0062] In this embodiment, the second master device refers to a master device that has not yet established a Bluetooth link with the slave device.
[0063] In a possible implementation, when the second master device needs to establish a Bluetooth link with the slave device, the second master device receives a Bluetooth data packet sent by the slave device on a broadcast channel, and parses the first link parameters of each first Bluetooth link from the Bluetooth data packet.
[0064] In some embodiments, when the Bluetooth data packet is an extended advertising (AE ADV), the second master device performs an AE extended scan (Extended Scan) on the advertising channel, thereby receiving the AE ADV sent by the slave device.
[0065] In addition to obtaining the first link parameters through Bluetooth communication, the second master device can also obtain the first link parameters through methods other than Bluetooth communication, such as performing NFC communication with the slave device through an NFC component and obtaining the first link parameters, or obtaining the first link parameters through a WiFi connection with the slave device (i.e., receiving the first link parameters sent by the slave device through WiFi or NFC). The embodiments of the present application are not limited to this.
[0066] Step 304: The second master device determines a second link parameter of a second Bluetooth link based on the first link parameter, where the second Bluetooth link is between the slave device and the second master device.
[0067] In a possible implementation, if the first link parameter is obtained by parsing the Bluetooth data packet, the second master device determines that the slave device has established a Bluetooth link with other master devices, and needs to determine its own second link parameter based on the first link parameter. If the first link parameter is not obtained by parsing the Bluetooth data packet, the second master device determines that the slave device has not established a Bluetooth link with other master devices, and thus directly establishes a Bluetooth link with the slave device based on its own scheduling interval request.
[0068] In some embodiments, the second master device determines the scheduling time points of each first master device based on the first link parameters, thereby determining the second link parameters of the second Bluetooth link based on the principle of avoiding the scheduling time points of the second master device to coincide with the scheduling time points of the first master device. The specific method for determining the second link parameters will be described in detail in the following embodiments.
[0069] Step 305: The second master device sends a link establishment request including a second link parameter to the slave device, where the link establishment request is used to request to establish a second Bluetooth link with the slave device.
[0070] Further, the second master device generates a link establishment request based on the determined second link parameter, and sends the link establishment request to the slave device, requesting to establish a second Bluetooth link with the slave device, wherein during the process of requesting to establish the Bluetooth link, the second master device is in an initiator state (Initiator).
[0071] Step 306: The slave device receives a link establishment request from the second master device.
[0072] Correspondingly, the slave device receives the link establishment request sent by the second master device, and parses the second link parameters contained therein, so as to accept the scheduling of the second master device based on the second link parameters after completing the establishment of the second Bluetooth link.
[0073] Step 307: The slave device establishes a second Bluetooth link with the second master device based on the second link parameters, wherein the scheduling time point of the second master device on the second Bluetooth link is different from the scheduling time point of the first master device on each first Bluetooth link.
[0074] In a possible implementation, after the slave device establishes a second Bluetooth link with the second master device, the scheduling time point of the second master device is determined based on the second link parameter (i.e., the scheduling mode of the second master device is determined), and the second master device scheduling is received based on the scheduling time point. Since the scheduling time points of the second master device and each first master device do not overlap, there is no scheduling conflict between the Bluetooth links.
[0075] Optionally, after the second Bluetooth link is established, the slave device stops broadcasting Bluetooth data packets.
[0076] Optionally, after the Bluetooth link is established, the second master device becomes the first master device. Accordingly, the slave device stores the second link parameters corresponding to the second master device. When broadcasting the Bluetooth data packet again subsequently, the link parameters need to be added to the Bluetooth data packet.
[0077] To summarize, in the embodiment of the present application, when the first Bluetooth link is established between the slave device and the first master device and a second Bluetooth link needs to be established with the second master device, the slave device provides the first link parameters corresponding to the first Bluetooth link to the second master device, so that the second master device can determine the second link parameters to be used when there is no scheduling conflict between the second Bluetooth link and the established first Bluetooth link (that is, the scheduling time point on the second Bluetooth link is different from the scheduling time point on each first Bluetooth link) based on the first link parameters, and sends a link establishment request to the slave device based on the second link parameters, and then establishes a second Bluetooth link with the slave device; using the solution provided in the embodiment of the present application, the slave device pre-provides link information of the established Bluetooth link, so that the master device to be connected can adjust the link parameters during the link establishment stage to avoid scheduling conflicts between multiple Bluetooth links, avoid business interruptions caused by scheduling conflicts between multiple Bluetooth links, and help to improve multi-link bandwidth and air interface utilization.
[0078] For the first master device that has established a Bluetooth link, after the scheduling is completed at the initial scheduling time point, the first master device is scheduled according to a fixed scheduling interval. Therefore, the second master device can avoid scheduling conflicts with the first master device by adjusting the scheduling offset (Offset) between its own initial scheduling time point and the scheduling time point of the first master device, as well as its own scheduling interval (Interval). The following is an exemplary embodiment for illustration.
[0079] Please refer to Figure 4 , which shows a flowchart of a method for establishing a Bluetooth link provided by another exemplary embodiment of the present application. In this embodiment, the method is used for Figure 1 Taking the implementation environment shown in FIG. 1 as an example, the method includes:
[0080] Step 401: A slave device establishes at least one first Bluetooth link with at least one first master device.
[0081] The implementation of this step may refer to the above step 301, and this embodiment will not be described in detail here.
[0082] Step 402: The slave device obtains a first scheduling interval corresponding to each first Bluetooth link, where the first scheduling interval is a time interval between adjacent scheduling time points when the first master device schedules the slave device on the first Bluetooth link according to the scheduling time point.
[0083] In a possible implementation, before each master device establishes a Bluetooth link with a slave device, it will provide its own scheduling interval to the slave device so that the slave device periodically accepts the master device scheduling based on the scheduling interval. Accordingly, the slave device stores the scheduling intervals of each master device with which a Bluetooth link has been established. When it is necessary to broadcast the first link parameters, the slave device obtains the first scheduling interval corresponding to each first master device.
[0084] Step 403: The slave device determines a sending timing offset of the Bluetooth data packet relative to each first Bluetooth link. The sending timing offset is used to represent the offset between the moment when the slave device broadcasts the Bluetooth data packet and the corresponding scheduling time point of the first master device.
[0085] If only the first scheduling interval is used as the first link parameter, the second master device can only determine the time interval between adjacent scheduling time points, but cannot determine the exact time point of each scheduling, and thus cannot avoid scheduling conflicts. Therefore, the first link parameter also needs to include a parameter for determining at least one accurate scheduling time point.
[0086] Since the slave device needs to broadcast the Bluetooth data packet when each first master device is not scheduling based on the scheduling status of each first master device, there is a certain deviation between the sending time of the Bluetooth data packet and the scheduling time of each first master device. In order for the second master device to use the broadcast time of the Bluetooth data packet as the time starting point, and thus determine the scheduling time point of each first master device based on the first link parameters, the slave device needs to determine the sending timing offset of the Bluetooth data packet relative to each first Bluetooth link. In a possible implementation, this step may include the following steps.
[0087] 1. Determine the first scheduling time point corresponding to each first Bluetooth link.
[0088] Since the slave device knows the scheduling mode of the master device, the slave device can determine the first scheduling time point corresponding to the first Bluetooth link, wherein the first scheduling time point can be the time point of the most recent scheduling.
[0089] Indicative, such as Figure 5 As shown, when a first Bluetooth link is established between the slave device and the first master device, the slave device determines that a first scheduling time point corresponding to the first Bluetooth link is t0.
[0090] 2. Determine the sending timing offset based on each first scheduling time point and the broadcast time point of the Bluetooth data packet.
[0091] As the sender of the Bluetooth data packet, the slave device can determine the broadcast time point of the Bluetooth data packet based on the scheduling of each first master device, so the slave device can further calculate the transmission timing offset of the Bluetooth data packet relative to each first Bluetooth link according to the first scheduling time point and the broadcast time point of the Bluetooth data packet (a certain time point in the future). Wherein, the transmission timing offset = broadcast time point - first scheduling time point.
[0092] Indicatively, Figure 5 As shown, the slave device determines the broadcast time point of the Bluetooth data packet as t1 based on the scheduling of the first master device, and further determines the sending timing offset as t1-t0.
[0093] Step 404: The slave device determines the first scheduling interval and the transmission timing offset as first link parameters, and broadcasts a Bluetooth data packet according to the first link parameters.
[0094] Furthermore, the slave device determines the first scheduling interval and the sending timing offset corresponding to each first Bluetooth link as the first link parameter, and broadcasts a Bluetooth data packet containing the first link data. In a possible implementation, this step may include the following steps.
[0095] 1. Generate at least one set of link information based on the link identifiers of the first Bluetooth links and the first link parameters.
[0096] In order to enable the second master device to distinguish the first link parameters corresponding to different first Bluetooth links, the slave device uses the link identifier of the first Bluetooth link and the first link parameter as a set of link information, that is, each set of link information is a triple consisting of a link identifier, a transmission timing offset, and a first scheduling interval. The link identifier is used to uniquely represent a Bluetooth link.
[0097] 2. Broadcast a Bluetooth data packet containing at least one set of link information.
[0098] In a possible implementation, the slave device writes at least one set of link information into the payload of the Bluetooth data packet. Figure 6 As shown, when the Bluetooth data packet is AE ADV, the maximum payload length of the extended broadcast is 251 bytes, and each group of link information occupies 6 bytes, of which the link identifier (handle) occupies 2 bytes, the sending timing offset occupies 2 bytes, and the first scheduling interval occupies 2 bytes. This embodiment is only described by taking the above byte length as an example, but it does not constitute a limitation thereto.
[0099] Further, when a predetermined broadcast time point is reached, the slave device broadcasts a Bluetooth data packet.
[0100] In a possible implementation, the slave device sends ADV_EXT_IND on the primary advertising channel, indicating that AUX_ADV_IND is sent through the secondary advertising channel, and sends AUX_ADV_IND including the first link parameter on the secondary advertising channel. After receiving ADV_EXT_IND on the primary advertising channel, the second master device further receives AUX_ADV_IND on the secondary advertising channel.
[0101] Indicatively, Figure 5 As shown, at time t1, the slave device sends ADV_EXT_IND (extended broadcast) through the main broadcast channel (channels 37, 38, and 39), and sends AUX_ADV_IND (auxiliary broadcast) on the secondary broadcast channel after a certain time offset.
[0102] Step 405: The second master device receives the Bluetooth data packet broadcasted by the slave device.
[0103] In a possible implementation, after receiving ADV_EXT_IND on the primary broadcast channel, the second master device parses the offset contained in ADV_EXT_IND, and determines the receiving window of AUX_ADV_IND on the secondary broadcast channel based on the offset, thereby receiving AUX_ADV_IND within the receiving window and parsing the first link parameters contained therein.
[0104] Indicatively, Figure 5 As shown, the offset between ADV_EXT_IND in the main broadcast channel 37 and AUX_ADV_IND in the secondary broadcast channel is offset 1, the offset between ADV_EXT_IND in the main broadcast channel 38 and AUX_ADV_IND in the secondary broadcast channel is offset 2, and the offset between ADV_EXT_IND in the main broadcast channel 39 and AUX_ADV_IND in the secondary broadcast channel is offset 3. When the second main device receives ADV_EXT_IND in the main broadcast channel 38, it parses to obtain offset 1 and determines the receiving window of AUX_ADV_IND, thereby receiving AUX_ADV_IND in the receiving window.
[0105] Optionally, when the first link parameter is written into the payload of the Bluetooth data packet in the form of a link information group, the second master device reads at least one set of link information from the payload of the Bluetooth data packet, each set of link information includes a link identifier of the first Bluetooth link and the first link parameter, and the number of link information groups is the same as the number of first Bluetooth links.
[0106] Step 406: The second master device determines a first scheduling time point corresponding to each first Bluetooth link based on the broadcast time point and the sending timing offset of the Bluetooth data packet.
[0107] After the second master device parses the Bluetooth data packet to obtain the sending timing offset of each first Bluetooth link, it can use the broadcast time point of the Bluetooth data packet as the starting time point to determine the first scheduling time point corresponding to each first Bluetooth link, wherein the first scheduling time point can be the most recent scheduling time point before the Bluetooth data packet broadcast time on each first Bluetooth link.
[0108] Illustratively, when the sending timing offset of the first Bluetooth link is Offset0, and the broadcast time point of the Bluetooth data packet is T, the first scheduling time point T0 of the first Bluetooth link is T-Offset0.
[0109] Step 407: Determine a first scheduling time point sequence corresponding to each first Bluetooth link based on the first scheduling time point and the first scheduling interval.
[0110] Since the master device is periodically scheduled according to the scheduling interval, after determining the first scheduling time point of the first master device, the second master device can determine the first scheduling time point sequence corresponding to the first Bluetooth link based on the first scheduling time point and the first scheduling interval, wherein the first scheduling time point sequence is a time point sequence with the first scheduling time point as the starting point and the first scheduling interval as the interval.
[0111] Illustratively, when the first scheduling time point of the first Bluetooth link is T0, and the scheduling interval of the first Bluetooth link is Interval1, the first scheduling time point sequence corresponding to the first Bluetooth link can be expressed as:
[0112] T1=T0+num1*Interval1
[0113] Among them, num1 is a natural number.
[0114] Step 408: The second master device determines a second scheduling interval and a scheduling offset based on the first scheduling time point sequence.
[0115] In order to avoid the scheduling time point of the second master device from overlapping with the scheduling time point of the first master device, the second master device ensures that the second scheduling time point sequence corresponding to the second Bluetooth link does not overlap with the first scheduling time point sequence by adjusting its own second scheduling interval and scheduling offset based on the first scheduling time point sequence, wherein the second scheduling interval is the time interval between adjacent scheduling time points when the second master device performs scheduling, and the scheduling offset is used to characterize the offset between the scheduling time point of the second master device and the scheduling time point corresponding to the first master device.
[0116] Illustratively, when the scheduling interval of the second Bluetooth link is Interval2, and the scheduling offset between the second Bluetooth link and the first Bluetooth link is Offset, the second scheduling time point sequence corresponding to the second Bluetooth link can be expressed as:
[0117] T2=T1+Offset+num2*Interval2
[0118] Among them, num2 is a natural number.
[0119] In a possible implementation, based on the expression of the first scheduling time point sequence and the second scheduling time point sequence, the second master device adjusts the Offset and Interval2 until T1≠T2.
[0120] Optionally, in order to simplify the adjustment process, the second master device sets the second scheduling interval to the first scheduling interval, and adjusts the scheduling offset so that the first scheduling time point sequence and the second scheduling time point sequence do not overlap.
[0121] It should be noted that, when there are multiple first Bluetooth links, the second master device needs to ensure that the second scheduling time point sequence does not overlap with each first scheduling time point sequence.
[0122] Step 409: The second master device determines a second scheduling interval and a scheduling offset as second link parameters.
[0123] Further, the second master device determines the second scheduling interval and the scheduling offset as the second link parameter (Interval2, Offset).
[0124] Step 410: The second master device sends a link establishment request including second link parameters to the slave device.
[0125] Step 411: The slave device receives a link establishment request from the second master device.
[0126] The implementation of the above steps 410 to 411 may refer to steps 305 to 306, and will not be described in detail in this embodiment.
[0127] Step 412: The slave device performs scheduling conflict detection on the second Bluetooth link and the first Bluetooth link based on the second link parameter and the first link parameter.
[0128] Since the first link parameter and the second link parameter may deviate during the transmission or analysis process, in order to ensure that there is no scheduling conflict between the established second Bluetooth link and the first Bluetooth link, the slave device needs to perform scheduling conflict detection on the second Bluetooth link and the first Bluetooth link based on the second link parameter and the first link parameter. In a possible implementation, the slave device determines the scheduling time point of each first Bluetooth link based on the first link parameter, and determines the scheduling time point of the second Bluetooth link based on the second link parameter, so as to detect whether there is overlap between the scheduling time points of the two. If there is overlap, it is determined that the scheduling conflict detection has not been passed. If there is no overlap, it is determined that the scheduling conflict detection has been passed.
[0129] Step 413: In response to the absence of scheduling conflict, the slave device establishes a second Bluetooth link with the second master device based on the second link parameters.
[0130] When the scheduling conflict detection is passed, the slave device establishes a second Bluetooth link with the second master device. The implementation manner of this step can refer to the above step 307, and this embodiment will not be repeated here.
[0131] Indicatively, Figure 7 As shown, the second master device determines that the scheduling time points of the first master device are T0, T0+Interval1, T0+2*Interval1…, thereby determining its own second scheduling interval Interval2 and scheduling offset Offset. Based on Interval2 and Offset, the second master device performs scheduling at these scheduling time points T0+Offset, T0+Offset+Interval2, T0+Offset+2*Interval2…. Moreover, since Interval2=Interval1, the scheduling time points of the first master device and the second master device are staggered and do not overlap, thereby avoiding scheduling conflicts.
[0132] In combination with the method provided in the above embodiment, in an illustrative example, Figure 8As shown, ACL1 (first Bluetooth link) is first established between the first master device and the slave device. When the slave device needs to establish ACL2 (second Bluetooth link) with the second master device, the slave device calculates the sending timing deviation Offset0 between the broadcast and ACL1, and obtains the Interval1 of the first master device, thereby starting the AE broadcast and sending AE ADV (including Offset0 and Interval1) to the second master device. After receiving the AE ADV, the second master device parses the Offset0 and Interval1 therein, and calculates the offset and Interval1 of ACL2 with AE ADV as the starting time point, thereby sending a link establishment request (including Offset and Interval2) to the slave device. Based on the link establishment request, the slave device establishes ACL2 with the second master device and stops broadcasting.
[0133] In this embodiment, the slave device broadcasts a Bluetooth data packet containing the first link parameters, so that the second master device to be connected can adjust its own second link parameters based on the first link parameters after receiving and parsing the first link parameters in the Bluetooth data packet, so as to avoid scheduling conflicts with the first Bluetooth link; and, by using the first scheduling interval of the first Bluetooth link and the sending timing deviation between the first scheduling interval and the Bluetooth data packet broadcast time point as the first link parameters, the second master device can determine the scheduling time points of each first Bluetooth link with the broadcast time of the Bluetooth data packet as the starting time point, and then determine the scheduling time point sequence corresponding to each first Bluetooth link, which, on the one hand, reduces the number of bytes occupied by the transmission of the first link parameters, and on the other hand, improves the accuracy of the determined scheduling time points.
[0134] In addition, the above embodiment is only illustrated by broadcasting Bluetooth data packets as an example. When the first link parameters are provided to the second master device through WiFi or NFC, the slave device can determine the sending timing offset based on the sending time of the WiFi data packet or NFC data packet, and write the sending timing offset as the first link parameter into the WiFi data packet or NFC data packet. This embodiment will not be described in detail here.
[0135] It should be noted that in the above embodiment, the steps with the slave device as the execution subject can be independently implemented as a method for establishing a Bluetooth link in the slave device, and the steps with the second master device as the execution subject can be independently implemented as a method for establishing a Bluetooth link in the master device, which will not be repeated in this embodiment.
[0136] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0137] Please refer to Fig. 9, which shows a structural block diagram of an apparatus for establishing a Bluetooth link in a slave device provided by an embodiment of the present application. The apparatus may include:
[0138] A first establishing module 901, configured to establish at least one first Bluetooth link with at least one first master device;
[0139] A parameter providing module 902, configured to send the first link parameter of each of the first Bluetooth links to the second master device;
[0140] a request receiving module 903, configured to receive a link establishment request from the second master device, wherein the link establishment request is used to request to establish a second Bluetooth link with the slave device, wherein the link establishment request includes a second link parameter of the second Bluetooth link, and the second link parameter is determined by the second master device based on the first link parameter; and
[0141] The second establishing module 904 is used to establish the second Bluetooth link with the second master device based on the second link parameters, wherein the scheduling time point of the second master device on the second Bluetooth link is different from the scheduling time point of the first master device on each of the first Bluetooth links.
[0142] Optionally, the parameter providing module 902 is used to:
[0143] A broadcast unit is used to broadcast a data packet containing the first link parameter, wherein the broadcast mode includes at least one of Bluetooth broadcast, WiFi broadcast and NFC broadcast.
[0144] Optionally, the broadcast unit is used to:
[0145] Acquire a first scheduling interval corresponding to each of the first Bluetooth links, where the first scheduling interval is a time interval between adjacent scheduling time points when the first master device schedules a slave device on the first Bluetooth link according to a scheduling time point;
[0146] Determine a sending timing offset of the data packet relative to each of the first Bluetooth links, wherein the sending timing offset is used to represent an offset between a time when the slave device broadcasts the data packet and a corresponding scheduling time point of the first master device; and
[0147] The first scheduling interval and the sending timing offset are determined as the first link parameters, and the data packet is broadcast according to the first link parameters.
[0148] When determining the transmission timing offset of the data packet relative to each of the first Bluetooth links, the broadcast unit is specifically configured to:
[0149] Determine a first scheduling time point corresponding to each of the first Bluetooth links; and
[0150] The sending timing offset is determined based on each of the first scheduling time points and the broadcast time point of the data packet.
[0151] When broadcasting the data packet according to the first link parameter, the broadcasting unit is specifically configured to:
[0152] generating at least one set of link information based on the link identifiers of the respective first Bluetooth links and the first link parameters; and
[0153] The data packet containing at least one set of link information is broadcasted, and the number of the sets of link information is the same as the number of the first Bluetooth links.
[0154] Optionally, the second link parameters include a second scheduling interval and a scheduling offset corresponding to the second Bluetooth link, and the scheduling offset is used to represent the offset between a scheduling time point of the second master device and a scheduling time point corresponding to at least one of the first master devices.
[0155] Optionally, the second establishing module 904 is used to:
[0156] Based on the second link parameter and the first link parameter, performing scheduling conflict detection on the second Bluetooth link and the first Bluetooth link; and
[0157] In response to the absence of a scheduling conflict, establishing the second Bluetooth link with the second master device based on the second link parameters.
[0158] Please refer to Fig.10 , which shows a structural block diagram of an apparatus for establishing a Bluetooth link in a master device provided by another embodiment of the present application. The apparatus may include:
[0159] The parameter acquisition module 1001 is used to receive the first link parameters of each first Bluetooth link from the slave device, and the slave device establishes at least one first Bluetooth link with at least one first master device;
[0160] A second parameter determination module 1002 is configured to determine a second link parameter of a second Bluetooth link based on the first link parameter, wherein the second Bluetooth link is located between the slave device and the second master device; and
[0161] The request sending module 1003 is used to send a link establishment request including the second link parameters to the slave device, so that the slave device establishes the second Bluetooth link with the second master device based on the second link parameters, wherein the scheduling time point of the second master device on the second Bluetooth link is different from the scheduling time point of the first master device on each of the first Bluetooth links.
[0162] Optionally, the parameter acquisition module 1001 includes:
[0163] A receiving unit is used to receive a data packet broadcasted by the slave device, wherein the data packet includes the first link parameters of each of the first Bluetooth links, wherein the broadcasting mode includes at least one of Bluetooth broadcasting, WiFi broadcasting and NFC broadcasting.
[0164] Optionally, the second parameter determination module 1002 includes:
[0165] a first determining unit, configured to determine a second scheduling interval and a scheduling offset corresponding to the second Bluetooth link based on the first link parameter, wherein the second scheduling interval is a time interval between adjacent scheduling time points when the second master device schedules the slave device on the second Bluetooth link according to the scheduling time point, and the scheduling offset is used to represent an offset between a scheduling time point of the second master device and a scheduling time point corresponding to the first master device; and
[0166] The second determining unit is configured to determine the second scheduling interval and the scheduling offset as the second link parameters.
[0167] Optionally, the first link parameter includes a first scheduling interval and a sending timing offset, the first scheduling interval being the time interval between adjacent scheduling time points when the first master device schedules the slave device on the first Bluetooth link according to the scheduling time point, and the sending timing offset is used to characterize the offset between the moment when the slave device broadcasts the data packet and the corresponding scheduling time point of the first master device;
[0168] The first determining unit is configured to:
[0169] Determine a first scheduling time point corresponding to each of the first Bluetooth links based on the broadcast time point of the data packet and the sending timing offset;
[0170] Based on the first scheduling time point and the first scheduling interval, determining a first scheduling time point sequence corresponding to each of the first Bluetooth links, wherein the first scheduling time point sequence is a time point sequence starting from the first scheduling time point and intervals of the first scheduling interval; and
[0171] Based on the first scheduling time point sequence, the second scheduling interval and the scheduling offset are determined, wherein when the second scheduling interval and the scheduling offset are used, the second scheduling time point sequence corresponding to the second Bluetooth link does not overlap with the first scheduling time point sequence.
[0172] Optionally, the first scheduling time point sequence is expressed as: T1=T0+num1*Interval1;
[0173] The second scheduling time point sequence is expressed as: T2 = T1 + Offset + num2 * Interval2;
[0174] T0 is the first scheduling time point, Interval1 is the first scheduling interval, Offset is the scheduling offset, Interval2 is the second scheduling interval, and num1 and num2 are natural numbers.
[0175] Optionally, the first link parameter is included in the data packet;
[0176] The device also includes:
[0177] The reading module is used to read at least one group of link information from the data packet, each group of the link information includes the link identifier of the first Bluetooth link and the first link parameter, and the number of groups of the link information is the same as the number of the first Bluetooth links.
[0178] Please refer to Fig.11 , which shows a block diagram of an electronic device with Bluetooth function provided by an exemplary embodiment of the present application. The electronic device 1100 may be a smart phone, a tablet computer, a wearable device, etc. The electronic device 1100 in the present application may include one or more of the following components: a processor 1110, a memory 1120, and a Bluetooth chip 1130.
[0179] The processor 1110 may include one or more processing cores. The processor 1110 uses various interfaces and lines to connect the various parts of the entire electronic device 1100, and executes various functions and processes data of the electronic device 1100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1120, and calling data stored in the memory 1120. Optionally, the processor 1110 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1110 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), a neural network processor (Neural-network Processing Unit, NPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the NPU is used to implement artificial intelligence (Artificial Intelligence, AI) functions; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 1110, but may be implemented by a separate chip.
[0180] The memory 1120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1120 includes a non-transitory computer-readable storage medium. The memory 1120 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data (such as audio data, a phone book), etc., created according to the use of the electronic device 1100.
[0181] The Bluetooth chip 1130 is a component for implementing Bluetooth functions. The Bluetooth chip 1130 includes two parts, the Host and the Controller (corresponding to different Bluetooth protocol stacks). The Host and the Controller can run on the same chip (single-chip architecture) or on different chips (dual-chip architecture). For example, the Host runs on the processor, and the Controller runs on the Bluetooth module; or, both the Host and the Controller run on the Bluetooth chip 1130. The device adding method provided in the embodiment of the present application is implemented by the Bluetooth chip 1130 by executing instructions.
[0182] In addition, those skilled in the art can understand that the structure of the electronic device 1100 shown in the above figures does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the electronic device 1100 also includes a display screen, a sensor, a speaker, a microphone, a power supply, and other components, which will not be described in detail here.
[0183] An embodiment of the present application also provides a Bluetooth chip, which includes a programmable logic circuit and / or program instructions. When the Bluetooth chip is running, it is used to implement the method for establishing a Bluetooth link in a slave device as described in the above aspects, or to implement the method for establishing a Bluetooth link in a master device as described in the above aspects.
[0184] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one program code, and the program code is loaded and executed by a Bluetooth chip to implement the method of establishing a Bluetooth link in a slave device as described in the above embodiments, or the method of establishing a Bluetooth link in a master device.
[0185] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. The Bluetooth chip of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the method for establishing a Bluetooth link in a slave device or the method for establishing a Bluetooth link in a master device provided in various optional implementations of the above aspects.
[0186] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.
[0187] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for establishing a Bluetooth link in a slave device, characterized in that: The method comprises: Establishing at least one first Bluetooth link with at least one first master device; Broadcasting a data packet including first link parameters of each of the first Bluetooth links to a second master device; receiving a link establishment request from the second master device, the link establishment request being used to request to establish a second Bluetooth link with the slave device, the link establishment request including a second link parameter of the second Bluetooth link, the second link parameter being determined by the second master device based on the first link parameter; and establishing the second Bluetooth link with the second master device based on the second link parameter, wherein a scheduling time point of the second master device on the second Bluetooth link is different from a scheduling time point of the first master device on each of the first Bluetooth links; The second link parameter of the second Bluetooth link is added to the data packet.
2. The method according to claim 1, characterized in that The method of broadcasting a data packet including the first link parameters of each of the first Bluetooth links to the second master device includes: Broadcast the data packet including the first link parameter, wherein the broadcasting method includes at least one of Bluetooth broadcasting, WiFi broadcasting, and NFC broadcasting.
3. The method according to claim 2, characterized in that The broadcasting of the data packet containing the first link parameter comprises: Acquire a first scheduling interval corresponding to each of the first Bluetooth links, where the first scheduling interval is a time interval between adjacent scheduling time points when the first master device schedules a slave device on the first Bluetooth link according to a scheduling time point; Determine a sending timing offset of the data packet relative to each of the first Bluetooth links, wherein the sending timing offset is used to represent an offset between a time when the slave device broadcasts the data packet and a corresponding scheduling time point of the first master device; and The first scheduling interval and the sending timing offset are determined as the first link parameters, and the data packet is broadcast according to the first link parameters.
4. The method according to claim 3, characterized in that The determining the sending timing offset of the data packet relative to each of the first Bluetooth links comprises: Determine a first scheduling time point corresponding to each of the first Bluetooth links; and The sending timing offset is determined based on each of the first scheduling time points and the broadcast time point of the data packet.
5. The method according to claim 3, characterized in that: The broadcasting of the data packet according to the first link parameter comprises: generating at least one set of link information based on the link identifiers of the respective first Bluetooth links and the first link parameters; and The data packet containing at least one set of link information is broadcasted, and the number of the sets of link information is the same as the number of the first Bluetooth links.
6. The method according to any one of claims 1 to 5, characterized in that: The second link parameters include a second scheduling interval and a scheduling offset corresponding to the second Bluetooth link, and the scheduling offset is used to represent the offset between a scheduling time point of the second master device and a scheduling time point corresponding to at least one of the first master devices.
7. The method according to any one of claims 1 to 5, characterized in that: The establishing the second Bluetooth link with the second master device based on the second link parameter includes: Based on the second link parameter and the first link parameter, performing scheduling conflict detection on the second Bluetooth link and the first Bluetooth link; and In response to the absence of a scheduling conflict, establishing the second Bluetooth link with the second master device based on the second link parameters.
8. A method for establishing a Bluetooth link in a master device, characterized in that: The method comprises: receiving a data packet including first link parameters of each first Bluetooth link broadcasted by a slave device, wherein the slave device establishes at least one first Bluetooth link with at least one first master device; determining a second link parameter of a second Bluetooth link based on the first link parameter, the second Bluetooth link being located between the slave device and a second master device; and A link establishment request including the second link parameters is sent to the slave device, so that the slave device establishes the second Bluetooth link with the second master device based on the second link parameters, wherein a scheduling time point of the second master device on the second Bluetooth link is different from a scheduling time point of the first master device on each of the first Bluetooth links, and the slave device is used to add the second link parameters of the second Bluetooth link to the data packet.
9. The method according to claim 8, characterized in that The receiving a data packet containing first link parameters of each first Bluetooth link broadcasted by the slave device comprises: Receive a data packet broadcasted by the slave device, wherein the data packet includes the first link parameters of each of the first Bluetooth links, wherein the broadcasting method includes at least one of Bluetooth broadcasting, WiFi broadcasting, and NFC broadcasting.
10. The method according to claim 8, characterized in that The determining a second link parameter of the second Bluetooth link based on the first link parameter includes: Determine a second scheduling interval and a scheduling offset corresponding to the second Bluetooth link based on the first link parameter, wherein the second scheduling interval is a time interval between adjacent scheduling time points when the second master device schedules the slave device on the second Bluetooth link according to the scheduling time point, and the scheduling offset is used to represent the offset between the scheduling time point of the second master device and the scheduling time point corresponding to the first master device; and The second scheduling interval and the scheduling offset are determined as the second link parameters.
11. The method according to claim 10, characterized in that The first link parameter includes a first scheduling interval and a sending timing offset, wherein the first scheduling interval is a time interval between adjacent scheduling time points when the first master device schedules the slave device on the first Bluetooth link according to the scheduling time point, and the sending timing offset is used to represent the offset between the moment when the slave device broadcasts the data packet and the corresponding scheduling time point of the first master device; The determining, based on the first link parameter, a second scheduling interval and a scheduling offset corresponding to the second Bluetooth link includes: Determine a first scheduling time point corresponding to each of the first Bluetooth links based on the broadcast time point of the data packet and the sending timing offset; Based on the first scheduling time point and the first scheduling interval, determining a first scheduling time point sequence corresponding to each of the first Bluetooth links, wherein the first scheduling time point sequence is a time point sequence starting from the first scheduling time point and intervals of the first scheduling interval; and Based on the first scheduling time point sequence, the second scheduling interval and the scheduling offset are determined, wherein when the second scheduling interval and the scheduling offset are used, the second scheduling time point sequence corresponding to the second Bluetooth link does not overlap with the first scheduling time point sequence.
12. The method according to claim 11, characterized in that The first scheduling time point sequence is expressed as: T1=T0+num1*Interval1; The second scheduling time point sequence is expressed as: T2 = T1 + Offset + num2 * Interval2; T0 is the first scheduling time point, Interval1 is the first scheduling interval, Offset is the scheduling offset, Interval2 is the second scheduling interval, and num1 and num2 are natural numbers.
13. The method according to any one of claims 9 to 12, characterized in that: The first link parameter is included in the data packet; Before determining the second link parameter of the second Bluetooth link based on the first link parameter, the method further includes: At least one group of link information is read from the data packet, each group of the link information includes a link identifier of the first Bluetooth link and the first link parameter, and the number of groups of the link information is the same as the number of the first Bluetooth links.
14. An apparatus for establishing a Bluetooth link in a slave device, characterized in that: The device comprises: A first establishing module, configured to establish at least one first Bluetooth link with at least one first master device; A parameter providing module, configured to broadcast a data packet including first link parameters of each of the first Bluetooth links to the second master device; a request receiving module, configured to receive a link establishment request from the second master device, wherein the link establishment request is used to request to establish a second Bluetooth link with the slave device, wherein the link establishment request includes a second link parameter of the second Bluetooth link, and the second link parameter is determined by the second master device based on the first link parameter; and a second establishing module, configured to establish the second Bluetooth link with the second master device based on the second link parameter, wherein a scheduling time point of the second master device on the second Bluetooth link is different from a scheduling time point of the first master device on each of the first Bluetooth links; The second link parameter of the second Bluetooth link is added to the data packet.
15. An apparatus for establishing a Bluetooth link in a master device, characterized in that: The device comprises: A parameter acquisition module, configured to receive a data packet containing first link parameters of each first Bluetooth link broadcasted by a slave device, wherein the slave device establishes at least one first Bluetooth link with at least one first master device; A second parameter determination module is configured to determine a second link parameter of a second Bluetooth link based on the first link parameter, wherein the second Bluetooth link is located between the slave device and a second master device; and A request sending module is used to send a link establishment request including the second link parameters to the slave device, so that the slave device establishes the second Bluetooth link with the second master device based on the second link parameters, wherein the scheduling time point of the second master device on the second Bluetooth link is different from the scheduling time point of the first master device on each of the first Bluetooth links, and the slave device is used to add the second link parameters of the second Bluetooth link to the data packet.
16. A Bluetooth chip, characterized in that: The Bluetooth chip includes a programmable logic circuit and / or program instructions, which, when running, is used to implement the method for establishing a Bluetooth link in a slave device as described in any one of claims 1 to 7, or the method for establishing a Bluetooth link in a master device as described in any one of claims 8 to 13.
17. An electronic device with Bluetooth function, characterized in that: The electronic device is provided with the Bluetooth chip as claimed in claim 16.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, which is loaded and executed by the Bluetooth chip to implement the method for establishing a Bluetooth link in a slave device as described in any one of claims 1 to 7, or the method for establishing a Bluetooth link in a master device as described in any one of claims 8 to 13.
