Method, device, electronic device and storage medium for updating Bluetooth connection parameters

By determining the instantaneous and receiving time nodes in the Bluetooth device and calculating the accurate update time node, the disconnection problem caused by the update of Bluetooth connection parameters is solved, and the user experience and calculation accuracy are improved.

CN114363873BActive Publication Date: 2025-07-11GUANGZHOU ANYKA MICROELECTRONICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111641861.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-07-11
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

The existing Bluetooth connection parameter update method causes the BLE connection to be disconnected when the instantaneous time node of the receiving packet does not match the direct update time, which affects the user experience.

Method used

By determining the instantaneous time node and the receiving time node, the update time node is calculated based on the relationship between these two time nodes, and the parameters are updated using a suitable update time node to avoid communication interruption.

Benefits of technology

Ensure that the Bluetooth device does not have connection disconnection during parameter update, improve user experience, and improve calculation accuracy, and avoid anchor point calculation errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114363873B_ABST
    Figure CN114363873B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, apparatus, electronic device and storage medium for updating Bluetooth connection parameters. The method includes: when receiving update parameters, respectively determining an instantaneous time node and a reception time node, where the instantaneous time node is an LE connection event count value starting from 0, and the reception time node is the time point when the first data packet is received for each LE connection event; determining an update time node according to the time relationship between the instantaneous time node and the reception time node, and performing an update operation using the update parameters. The present invention can, after receiving the update parameters required for updating, respectively obtain the instantaneous time node and the reception time node, and determine an accurate update time based on the time sequence of the two time nodes, so as to ensure that the device accurately switches to the new connection parameters, avoid the disconnection of the connection caused by parameter update, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of updating Bluetooth connection parameters, and particularly to a method, device, electronic device and storage medium for updating Bluetooth connection parameters. Background Art

[0002] As the standard protocol of Bluetooth Low Energy (BLE) is evolving continuously, the BLE technology can be used as a decentralized piconet ad-hoc network, and can achieve fast, simple and secure instant communication and data interaction between devices, enabling it to meet more application requirements and usage scenarios, such as wide applications in fields such as smart home, smart mall and beacon in industrial production automation management.

[0003] Since Bluetooth devices are a time-division multiplexing ad-hoc network, in order to handle the communication relationship with each connected device well, or negotiate and adjust connection parameters according to the current data communication situation, it is necessary to update the connection parameters during use to maintain the stability and quality of the normal connection between BLE devices. The currently commonly used method for updating connection parameters is: sending an update data packet to the communication device, so that the communication device can use the update data packet for real-time update.

[0004] However, the currently commonly used update method has the following technical problems: If the update is directly performed using the update data packet at the instantaneous time node of receiving the data packet, if the update time is not properly handled (for example, the update time cannot be connected to the communication interaction time), it will cause the BLE connection to be disconnected, resulting in the interruption of the current communication and affecting the user experience. Summary of the Invention

[0005] The present invention provides a method, device, electronic device and storage medium for updating Bluetooth connection parameters. The method can respectively determine the instantaneous time node and the receiving time node after receiving the update data packet, and select a suitable update time node based on the instantaneous time node and the receiving time node to avoid the situation of communication interruption.

[0006] In a first aspect of an embodiment of the present invention, a method for updating Bluetooth connection parameters is provided. The method includes:

[0007] When receiving the update parameters, respectively determine the instantaneous time node and the receiving time node, where the instantaneous time node is the LE connection event count value starting from 0, and the receiving time node is the time point when the data packet is first received for each LE connection event;

[0008] Determine the update time node according to the time relationship between the instantaneous time node and the receiving time node, and perform the update operation using the update parameters.

[0009] In a possible implementation of the first aspect, determining the update time node according to the time relationship between the instantaneous time node and the reception time node includes:

[0010] If the reception time node is before the instantaneous time node, the update time node is calculated as shown in the following formula:

[0011] ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan1 +ε1) / ConnInterval old ;

[0012] where Δ TimeSpan1 = CurAPClk–LastAPClk;

[0013] ConnEventCounter is the connection event count value of the reception time node;

[0014] ConnEventCounterLast is the connection event count value of the previous time node, Δ TimeSpan1 is the time interval between the reception time node and the previous reception time node, and the previous time node is the time node that received the data packet before the reception time node;

[0015] ConnInterval old is the connection interval before the connection parameter update, and ε1 is the increased tolerance margin value.

[0016] In a possible implementation of the first aspect, determining the update time node according to the time relationship between the instantaneous time node and the reception time node includes:

[0017] If the reception time node is the same as the instantaneous time node or the reception time node is after the instantaneous time node, the update time node is calculated as shown in the following formula:

[0018] ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan2 +ε2) / ConnInterval new +1;

[0019] where Δ TimeSpan2 = CurAPClk–InstantClk;

[0020] ConnInterval new is the connection interval after the connection parameter update, Δ TimeSpan2is the time interval between the reception time node and the instantaneous time node. InstantClk is to synchronize the reception time node to the starting position of the window size of the first connection event after the connection parameter update, and ε2 is the increased tolerance margin value.

[0021] In a possible implementation manner of the first aspect, the method further includes:

[0022] Obtain a previous time node, where the previous time node is the time node for receiving a data packet before the reception time node;

[0023] If the previous time node is before the instantaneous time node, then normalize the instantaneous time node to the starting time point of the last connection event for frame arrangement;

[0024] The normalization calculation is shown as the following formula:

[0025] ConnEventCounter = ConnEventCounterLast + (Δ TimeSpan3 + ε3) / ConnInterval old ;

[0026] where, Δ TimeSpan3 = InstantClk - WindowOffset - ConnInterval old – uLastAPClock;

[0027] Δ TimeSpan3 is the time interval between the starting time point of the last connection event for software frame arrangement before the instantaneous time node normalized to the connection parameter update and the previous time node. WindowOffset is the offset window of the starting time of the instantaneous time node, and ε3 is the increased tolerance margin value.

[0028] A second aspect of the embodiments of the present invention provides a device for updating Bluetooth connection parameters. The device includes: a determination module, configured to determine an instantaneous time node and a reception time node respectively when receiving update parameters, where the instantaneous time node is the LE connection event count value starting from 0, and the reception time node is the time point when a data packet is received for the first time in each LE connection event;

[0029] An update module, configured to determine an update time node according to the time relationship between the instantaneous time node and the reception time node, and perform an update operation by using the update parameters.

[0030] In a possible implementation manner of the second aspect, the update module is further configured to:

[0031] If the receiving time node is before the instantaneous time node, the calculation of the update time node is as shown in the following formula:

[0032] ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan1 + ε1) / ConnInterval old ;

[0033] where, Δ TimeSpan1 = CurAPClk – LastAPClk;

[0034] ConnEventCounter is the connection event count value of the receiving time node;

[0035] ConnEventCounterLast is the connection event count value of the previous time node, Δ TimeSpan1 is the time interval between the receiving time node and the previous receiving time node, and the previous time node is the time node for receiving the data packet before the receiving time node;

[0036] ConnInterval old is the connection interval before the connection parameter update, and ε1 is the increased tolerance margin value.

[0037] In a possible implementation manner of the second aspect, the update module is further configured to:

[0038] If the receiving time node is the same as the instantaneous time node or the receiving time node is after the instantaneous time node, the calculation of the update time node is as shown in the following formula:

[0039] ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan2 + ε2) / ConnInterval new + 1;

[0040] where, Δ TimeSpan2 = CurAPClk – InstantClk;

[0041] ConnInterval new is the connection interval after the connection parameter update, Δ TimeSpan2 is the time interval between the receiving time node and the instantaneous time node, InstantClk is the starting position of synchronizing the receiving time node to the window size of the first connection event after the connection parameter update, and ε2 is the increased tolerance margin value.

[0042] In a possible implementation of the second aspect, the apparatus further includes:

[0043] A prior time module, configured to obtain a prior time node, where the prior time node is a time node at which a data packet is received before the reception time node;

[0044] A normalization processing module, configured to normalize the instantaneous time node to the start time point of the connection event of the last frame arrangement if the prior time node is before the instantaneous time node;

[0045] The normalization calculation is shown in the following formula:

[0046] ConnEventCounter = ConnEventCounterLast + (Δ TimeSpan3 + ε3) / ConnInterval old ;

[0047] where, Δ TimeSpan3 = InstantClk - WindowOffset - ConnInterval old – uLastAPClock;

[0048] Δ TimeSpan3 is the time interval between the start time point of the connection event of the last software frame arrangement before normalizing to the instantaneous time node of the connection parameter update and the prior time node, WindowOffset is the offset window of the start time of the instantaneous time node, and ε3 is the increased tolerance margin value.

[0049] Compared with the prior art, the method and apparatus for updating Bluetooth connection parameters provided by the embodiments of the present invention have the beneficial effects that: after receiving the update parameters required for the update, the present invention can respectively obtain the instantaneous time node and the reception time node, and determine the accurate update time based on the time sequence of the two time nodes, so as to ensure that the device accurately switches to the new connection parameters, avoid the disconnection of the connection caused by parameter update, improve the user experience, and in addition, the ConnEventCounter value calculated based on the anchor point will not have a calculation error problem during cross-border, which can further improve the calculation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 is a schematic flowchart of a method for updating Bluetooth connection parameters provided by an embodiment of the present invention;

[0051] Figure 2 is a schematic diagram of the connection event time sequence provided by an embodiment of the present invention;

[0052] Figure 3It is a schematic diagram of the time relationship between the instantaneous time node and the receiving time node provided by an embodiment of the present invention;

[0053] Figure 4 It is a schematic diagram of the time relationship between the instantaneous time node and the receiving time node provided by an embodiment of the present invention;

[0054] Figure 5 It is a schematic diagram of the time relationship between the instantaneous time node and the receiving time node provided by an embodiment of the present invention;

[0055] Figure 6 It is a schematic structural diagram of an update device for Bluetooth connection parameters provided by an embodiment of the present invention. Detailed implementation manners

[0056] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0057] The currently commonly used update method has the following technical problems: If the update is directly performed using the update data packet at the instantaneous time node of receiving the data packet, if the update time is not properly processed (for example, the update time cannot be connected to the communication interaction time), it will cause the disconnection of the BLE connection, resulting in the interruption of the current communication and affecting the user experience.

[0058] To solve the above problems, the following specific embodiments will be used to introduce and explain in detail an update method for Bluetooth connection parameters provided by the embodiments of the present application.

[0059] Refer to Figure 1 , which shows a schematic flowchart of an update method for Bluetooth connection parameters provided by an embodiment of the present invention.

[0060] Among them, by way of example, the update method for the Bluetooth connection parameters may include:

[0061] S11. When receiving the update parameters, determine the instantaneous time node and the receiving time node respectively, where the instantaneous time node is the LE connection event count value starting from 0, and the receiving time node is the time point when the data packet is first received for each LE connection event.

[0062] In one embodiment, the states of the link layer of a low-power Bluetooth device include standby, advertising, scanning, initiating, and connection. These states can coexist on a single BLE device. For example, a BLE device can simultaneously have three different operating states: scanning, advertising, and connection. Moreover, in the connection state, it can maintain connections with multiple different BLE devices simultaneously.

[0063] In the connected state, update parameters for updates can be received at any time. After receiving the update parameters, two time nodes can be determined respectively: an instantaneous time node and a reception time node.

[0064] Among them, the instantaneous time node can be the LE connection event count value starting from 0, and the reception time node is the time point when the first data packet is received for each LE connection event.

[0065] It should be noted that for a BLE device in the connected state, connection parameter update is a basic operation process. Optionally, its update trigger operation can be actively initiated by the master or slave device for negotiation based on the BLE device communication situation, and finally the master device decides the time point and connection parameters for connection parameter update. The connection parameters include connection interval, connection link timeout length, and the latency of the slave device, so as to achieve the purpose of efficient and optimal power consumption Bluetooth BLE communication.

[0066] Refer to Figure 2 , which shows a schematic diagram of the connection event timing provided by an embodiment of the present invention.

[0067] In one embodiment, each Master device designates an instantaneous time node (also known as the Instant time point) according to the BLE data communication situation. This Instant time point is actually the LE connection event count value starting from 0. Before the Instant time point, communication is carried out using the old connection parameters; starting from the Instant time point, communication is carried out using the new connection parameters.

[0068] Refer to Figure 2 , the reception time node (also known as the anchor position node) refers to the time point when the first data packet is received after the Instant time point.

[0069] Through the two time nodes, the time when the current communication protocol receives the first data packet can be determined, and thus a suitable update time can be adapted according to the time of receiving the data packet to avoid communication interruption.

[0070] S12. Determine an update time node based on the time relationship between the instantaneous time node and the received time node, and perform an update operation using the update parameter.

[0071] In one embodiment, the order of the instantaneous time node and the received time node can be compared, so that the update time node can be determined according to the order of the two time nodes for accurate update operations.

[0072] Refer to Figure 3 , which shows a schematic diagram of the time relationship between the instantaneous time node and the received time node provided by an embodiment of the present invention.

[0073] In an alternative embodiment, step S12 may include the following sub-steps:

[0074] Sub-step S121. If the received time node is before the instantaneous time node, the calculation of the update time node is as follows:

[0075] ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan1 +ε1) / ConnInterval old ;

[0076] Where, Δ TimeSpan1 = CurAPClk–LastAPClk;

[0077] ConnEventCounter is the connection event count value of the received time node;

[0078] ConnEventCounterLast is the connection event count value of the previous time node, Δ TimeSpan1 is the time interval between the received time node CurAPClk and the previous received time node LastAPClk, and the previous time node is the time node that received the data packet before the received time node;

[0079] ConnInterval old is the connection interval before the connection parameter update, and ε1 is the added tolerance margin value.

[0080] Optionally, ε1 generally does not exceed ConnInterval old / 2 to avoid calculation errors of the connection event count value due to clock errors.

[0081] For example, ConnInterval oldConnEventCounter is 30, ConnEventCounterLast is 5, CurAPClk is 200, LastAPClk is 140. Taking ε1 as 15, the ConnEventCounter of the calculated current anchor time is 7.

[0082] Refer to Figure 4 , which shows a schematic diagram of the time relationship between the instantaneous time node and the reception time node provided by an embodiment of the present invention.

[0083] In an optional embodiment, step S12 may include the following sub-steps:

[0084] Sub-step S122: If the reception time node is the same as the instantaneous time node or the reception time node is after the instantaneous time node, the calculation of the updated time node is shown as follows:

[0085] ConnEventCounter = ConnEventCounterLast + (Δ TimeSpan2 + ε2) / ConnInterval new + 1;

[0086] Where, Δ TimeSpan2 = CurAPClk – InstantClk;

[0087] ConnInterval new is the connection interval after the connection parameter update, Δ TimeSpan2 is the time interval between the reception time node CurAPClk and the instantaneous time node InstantClk. InstantClk is to synchronize the reception time node to the start position of the window size of the first connection event after the connection parameter update, as Figure 4 shown. ε2 is the increased fault tolerance margin value.

[0088] Optionally, ε2 generally does not exceed ConnInterval new / 2 to avoid incorrect connection event count values due to clock errors.

[0089] It should be noted that since the BLE connection event count value is continuous during the connection between BLE devices, 1 needs to be added.

[0090] In addition, since the instantaneous time node InstantClk is the start time point of the window size, and the reception time node CurAPClk may be at any position within the window size, corresponding judgment processing is required to avoid calculation errors, especially for connection events with small intervals.

[0091] For example, InstantClk is 30, window size is 5, ConnInterval new is 6, CurAPClk is 34. At this time, the selection of the error tolerance value ε2 is crucial. If ε2 is selected as 2, an incorrect ConnEventCounter will be calculated. Therefore, after the connection parameter update instant time node and before the first connection event anchor point is found, ε2 should be selected as a value as small as possible at this time. After the first connection event anchor point is completed, ε2 can be selected as any value not exceeding ConnInterval new / 2.

[0092] Referring to Figure 5 , a schematic diagram showing the time relationship between the instant time node and the reception time node provided by an embodiment of the present invention is shown.

[0093] In an optional embodiment, after sub-step S122, the method may further include:

[0094] Sub-step S123, obtaining a prior time node, where the prior time node is the time node for receiving a data packet before the reception time node.

[0095] Sub-step S124, if the prior time node is before the instant time node, then normalize the instant time node to the start time point of the connection event of the last frame arrangement.

[0096] The normalization calculation is shown as follows:

[0097] ConnEventCounter = ConnEventCounterLast + (Δ TimeSpan3 + ε3) / ConnInterval old ;

[0098] where, Δ TimeSpan3 = InstantClk - WindowOffset - ConnInterval old – uLastAPClock;

[0099] Δ TimeSpan3 is the time interval between the start time point of the connection event of the last software frame arrangement before normalizing to the connection parameter update instant time node and the prior time node, and ε3 is the increased error tolerance margin value.

[0100] If the prior time node is before the instantaneous time node, since the instantaneous time node is not an actual anchor point, it is necessary to normalize the instantaneous time node to the start time point of the connection event of the last software frame arrangement, so that the instantaneous time node can be converted into an actual anchor point.

[0101] It should be noted that ε3 generally does not exceed ConnInterval old / 2 to avoid incorrect calculation of the connection event count value due to clock error. WindowOffset is the offset window of the start time of the instantaneous time node, and then the master device can send the first data packet after the connection parameter update within the window size.

[0102] In this embodiment, the embodiment of the present invention provides a method for updating Bluetooth connection parameters, and its beneficial effects are as follows: After receiving the update parameters required for the update, the present invention can respectively obtain the instantaneous time node and the reception time node, and determine the accurate update time based on the time sequence of the two time nodes, so as to ensure that the device accurately switches to the new connection parameters to avoid the situation of connection disconnection caused by parameter update, improve the user experience. In addition, the ConnEventCounter value calculated based on the anchor point will not have a calculation error problem when crossing boundaries, which can further improve the calculation accuracy.

[0103] The embodiment of the present invention also provides an apparatus for updating Bluetooth connection parameters. Refer to Figure 6 , which shows a schematic structural diagram of an apparatus for updating Bluetooth connection parameters provided by an embodiment of the present invention.

[0104] Among them, by way of example, the apparatus for updating Bluetooth connection parameters may include:

[0105] A determination module 201, configured to determine an instantaneous time node and a reception time node respectively when receiving update parameters, where the instantaneous time node is the LE connection event count value starting from 0, and the reception time node is the time point when the first data packet is received for each LE connection event;

[0106] An update module 202, configured to determine an update time node according to the time relationship between the instantaneous time node and the reception time node, and perform an update operation using the update parameters.

[0107] Optionally, the update module is further configured to:

[0108] If the reception time node is before the instantaneous time node, the calculation of the update time node is shown in the following formula:

[0109] ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan1 +ε1) / ConnInterval old ;

[0110] where, Δ TimeSpan1 = CurAPClk – LastAPClk;

[0111] ConnEventCounter is the connection event count value at the receiving time node;

[0112] ConnEventCounterLast is the connection event count value at the previous time node, Δ TimeSpan1 is the time interval between the receiving time node and the previous receiving time node, and the previous time node is the time node for receiving a data packet before the receiving time node;

[0113] ConnInterval old is the connection interval before the connection parameter update, and ε1 is the increased tolerance margin value.

[0114] Optionally, the update module is further configured to:

[0115] If the receiving time node is the same as the instantaneous time node or the receiving time node is after the instantaneous time node, then the calculation of the update time node is as shown in the following formula:

[0116] ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan2 +ε2) / ConnInterval new +1;

[0117] where, Δ TimeSpan2 = CurAPClk – InstantClk;

[0118] ConnInterval new is the connection interval after the connection parameter update, Δ TimeSpan2 is the time interval between the receiving time node and the instantaneous time node, InstantClk is the starting position of the window size that synchronizes the receiving time node to the first connection event after the connection parameter update, and ε2 is the increased tolerance margin value.

[0119] Optionally, the device further includes:

[0120] A previous time module, configured to obtain a previous time node, where the previous time node is the time node for receiving a data packet before the receiving time node;

[0121] A normalization processing module, configured to normalize the instantaneous time node to the start time point of the connection event of the last frame arrangement if the prior time node is before the instantaneous time node;

[0122] The normalization calculation is shown in the following formula:

[0123] ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan3 + ε3) / ConnInterval old ;

[0124] where, Δ TimeSpan3 = InstantClk - WindowOffset - ConnInterval old – uLastAPClock;

[0125] Δ TimeSpan3 is the time interval between the start time point of the connection event of the last software frame arrangement before normalizing to the instantaneous time node of the connection parameter update and the prior time node, WindowOffset is the offset window of the start time of the instantaneous time node, and ε3 is the added fault tolerance margin value.

[0126] Furthermore, an embodiment of the present application further provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, the method for updating Bluetooth connection parameters as described in the above embodiment is implemented.

[0127] Furthermore, an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause a computer to execute the method for updating Bluetooth connection parameters as described in the above embodiment.

[0128] The above is the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.

Claims

1. A method for updating Bluetooth connection parameters, characterized in that, The method includes: When receiving update parameters, respectively determining an instantaneous time node and a reception time node, where the instantaneous time node is an LE connection event count value starting from 0, and the reception time node is the time point when a data packet is first received in each LE connection event; Determining an update time node according to the time relationship between the instantaneous time node and the reception time node, and performing an update operation using the update parameters; The determining the update time node according to the time relationship between the instantaneous time node and the reception time node includes: If the reception time node is before the instantaneous time node, the calculation of the update time node is as shown in the following formula: ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan1 +ε1) / ConnInterval old ; where, Δ TimeSpan1 = CurAPClk – LastAPClk; ConnEventCounter is the connection event count value of the reception time node; ConnEventCounterLast is the connection event count value at the previous time node, Δ TimeSpan1 is the time interval between the receiving time node and the previous receiving time node, and the previous time node is the time node for receiving a data packet before the receiving time node; ConnInterval old is the connection interval before the connection parameter update, and ε1 is the increased fault tolerance margin value.

2. The method for updating Bluetooth connection parameters according to claim 1, wherein The determining the update time node according to the time relationship between the instantaneous time node and the reception time node includes: If the reception time node is the same as the instantaneous time node or the reception time node is after the instantaneous time node, the calculation of the update time node is as shown in the following formula: ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan2 +ε2) / ConnInterval new +1; where Δ TimeSpan2 = CurAPClk – InstantClk; ConnInterval new is the connection interval after the connection parameter update, Δ TimeSpan2 is the time interval between the reception time node and the instantaneous time node. InstantClk synchronizes the reception time node to the starting position of the window size of the first connection event after the connection parameter update, and ε2 is the increased fault tolerance margin value.

3. The method for updating Bluetooth connection parameters according to claim 2, characterized in that, After the step of determining the update time node, the method further includes: Obtaining a prior time node, where the prior time node is the time node when a data packet is received before the reception time node; If the prior time node is before the instantaneous time node, normalizing the instantaneous time node to the start time point of the connection event of the last frame arrangement; The normalization calculation is as shown in the following formula: ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan3 +ε3) / ConnInterval old ; where, Δ TimeSpan3 = InstantClk - WindowOffset - ConnInterval old – uLastAPClock; Δ TimeSpan3 is the time interval between the start time point of the connection event that is normalized to the start time point of the last software frame arrangement before the connection parameter update instant time node and the prior time node, WindowOffset is the offset window of the start time of the instant time node, and ε3 is the increased fault tolerance margin value.

4. A device for updating Bluetooth connection parameters, characterized in that, The device includes: A determination module, configured to, when receiving update parameters, respectively determine an instantaneous time node and a reception time node, where the instantaneous time node is an LE connection event count value starting from 0, and the reception time node is the time point when a data packet is first received in each LE connection event; An update module, configured to determine an update time node according to the time relationship between the instantaneous time node and the reception time node, and perform an update operation using the update parameters; The update module is further configured to: If the reception time node is before the instantaneous time node, the calculation of the update time node is as shown in the following formula: ConnEventCounter = ConnEventCounterLast + (Δ TimeSpan1 + ε1) / ConnInterval old ; where Δ TimeSpan1 = CurAPClk – LastAPClk; ConnEventCounter is the connection event count value of the reception time node; ConnEventCounterLast is the connection event count value at the previous time node, and Δ TimeSpan1 is the time interval between the receiving time node and the previous receiving time node, and the previous time node is the time node when a data packet was received before the receiving time node; ConnInterval old It is the connection interval before the connection parameter update, and ε1 is the increased fault tolerance margin value.

5. The updating device for Bluetooth connection parameters according to claim 4, characterized in that, The update module is further configured to: If the reception time node is the same as the instantaneous time node or the reception time node is after the instantaneous time node, the calculation of the update time node is as shown in the following formula: ConnEventCounter = ConnEventCounterLast+(Δ TimeSpan2 +ε2) / ConnInterval new +1; where Δ TimeSpan2 = CurAPClk – InstantClk; ConnInterval new The connection interval after connection parameter update, Δ TimeSpan2 The time interval between the reception time node and the instantaneous time node. InstantClk synchronizes the reception time node to the start position of the window size of the first connection event after connection parameter update, and ε2 is the increased fault tolerance margin value.

6. The updating device for Bluetooth connection parameters according to claim 5, wherein The device further includes: A prior time module, configured to obtain a prior time node, where the prior time node is the time node when a data packet is received before the reception time node; A normalization processing module, configured to, if the prior time node is before the instantaneous time node, normalize the instantaneous time node to the start time point of the connection event of the last frame arrangement; The normalization calculation is as shown in the following formula: ConnEventCounter = ConnEventCounterLast + (Δ TimeSpan3 + ε3) / ConnInterval old ; where, Δ TimeSpan3 = InstantClk - WindowOffset - ConnInterval old – uLastAPClock; Δ TimeSpan3 is the time interval between the connection event start time point of the last software frame arrangement before the connection parameter update instant time node is normalized and the prior time node. WindowOffset is the offset window of the start time of the instant time node, and ε3 is the increased fault tolerance margin value.

7. An electronic device, comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that when the processor executes the program, it implements the method for updating Bluetooth connection parameters as described in any one of claims 1-3.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to execute the method for updating Bluetooth connection parameters according to any one of claims 1-3.

Citation Information

Patent Citations

  • Data transmission method of Bluetooth system

    CN113115284A