Method and system for reducing low-power-consumption Bluetooth transmission packet loss and improving transmission efficiency
By adjusting transmission parameters in real time according to the situation of the Bluetooth low-power peripherals, the lack of traffic control of Bluetooth low-power devices is solved, and the effect of reducing packet loss rate, improving transmission efficiency and reducing communication power consumption is achieved.
Patent Information
- Application Number
- CN202411652397.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-25
AI Technical Summary
Existing low-power Bluetooth devices have shortcomings in flow control, which can easily lead to data loss, delay and increased energy consumption.
By calculating the byte size, number of sends, intervals per sending each time, and adaptively updating the connection parameters of the Bluetooth device according to the own situation of the low-power Bluetooth peripheral device in real time (Bluetooth signal strength, remaining space in the memory buffer, and the number of current scheduled task queues) to reduce packet loss and improve transmission efficiency.
It effectively reduces the packet loss rate of peripheral Bluetooth devices, improves transmission efficiency, reduces communication power consumption, and meets the throughput and delay requirements of Bluetooth peripheral devices.
Smart Images

Figure CN119521186A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of low-power Bluetooth data transmission, and in particular to a method and system for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency. Background Art
[0002] With the development of wireless communication technology, low-power Bluetooth technology, as a short-range wireless communication standard, is widely used in data transmission between various devices. However, existing low-power Bluetooth devices have some shortcomings in flow control, which can easily cause problems such as data loss, delay and increased energy consumption. Therefore, it is particularly important to propose an improved low-power Bluetooth flow control technology. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a method and system for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency. The connection parameters of the Bluetooth device are adaptively updated according to the situation of the low-power Bluetooth peripheral device, which can effectively reduce the packet loss of the peripheral Bluetooth device, improve transmission efficiency, and reduce communication power consumption.
[0004] In a first aspect, the present invention provides a method for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency, which is used in a central device, and the method comprises: Construct a data instruction, a first control instruction and a second control instruction; the data instruction is used to send data; the first control instruction is used by the central device to start transmission and inform the peripheral device of the current MTU of the central device; the second control instruction is used by the peripheral device to notify the central device to adjust the number of data bytes sent each time, the number of times sent, and the interval between each send; After establishing a Bluetooth connection with a peripheral device, obtaining the current MTU and then sending it to the peripheral device via a first control instruction; After receiving the second control instruction of the peripheral device, data is sent through the data instruction according to the byte size to be sent each time, the number of times of sending, and the interval between each sending. After the data sending is completed, the next second control instruction is received.
[0005] In a second aspect, the present invention provides a method for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency, which is used in a peripheral device, and the method comprises: Construct a data instruction, a first control instruction and a second control instruction; the data instruction is used to send data; the first control instruction is used by the central device to start transmission and inform the peripheral device of the current MTU of the central device; the second control instruction is used by the peripheral device to notify the central device to adjust the number of data bytes sent each time, the number of times sent, and the interval between each send; After receiving the first control instruction from the central device, the size of the bytes to be sent each time, the number of times of sending, and the interval between each sending are calculated according to the MTU, the Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues, and then sent to the central device through the second control instruction; The receiving center device sends data through a data instruction, and sends a second control instruction again after the data reception is completed.
[0006] In a third aspect, the present invention provides a method for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency, for a central device and at least one peripheral device, the method comprising: Construct a data instruction, a first control instruction and a second control instruction; the data instruction is used to send data; the first control instruction is used by the central device to start transmission and inform the peripheral device of the current MTU of the central device; the second control instruction is used by the peripheral device to notify the central device to adjust the number of data bytes sent each time, the number of times sent, and the interval between each send; After the central device establishes a Bluetooth connection with the peripheral device, the current MTU is obtained and then sent to the peripheral device through a first control instruction; After the peripheral device receives the first control instruction from the central device, it calculates the size of bytes to be sent each time, the number of times of sending, and the interval between each sending according to the MTU, the Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues, and then sends them to the central device through the second control instruction; After the central device receives the second control instruction of the peripheral device, it sends data through the data instruction according to the size of bytes to be sent each time, the number of times of sending, and the interval between each sending, and waits for receiving the next second control instruction after the data is sent; The peripheral device receives the data sent by the central device through the data instruction, and sends the second control instruction again after the data reception is completed.
[0007] In a fourth aspect, the present invention provides a system for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency, comprising a central device and at least one peripheral device; The central device is used to establish a Bluetooth connection with the peripheral device, obtain the current MTU and then send it to the peripheral device through a first control instruction; after receiving the second control instruction of the peripheral device, send data through a data instruction according to the size of bytes to be sent each time, the number of times of sending, and the interval between each sending, and wait for receiving the next second control instruction after the data is sent; The peripheral device is used to calculate the byte size to be sent each time, the number of transmissions, and the interval between each transmission based on MTU, Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues after receiving the first control instruction from the central device, and then send them to the central device through the second control instruction; receive data sent by the central device through the data instruction, and send the second control instruction again after the data reception is completed.
[0008] The technical solution provided in the embodiments of the present invention has at least the following technical effects: By calculating the size of bytes to be sent each time, the number of times they are sent, and the interval between each transmission in real time based on the current low-power Bluetooth peripheral device's own conditions (its own Bluetooth RSSI signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues), the connection parameters of the Bluetooth device are updated adaptively. This can not only meet the throughput and latency requirements of Bluetooth peripheral devices, but also effectively reduce the communication power consumption caused by frequent retries after the peripheral Bluetooth device loses packets. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 A communication timing diagram between a central device and a peripheral device according to an embodiment of the present invention; Figure 2 A timing diagram of control instructions between a central device and a peripheral device according to an embodiment of the present invention; Figure 3 This is an execution flow chart of the central device of the first embodiment of the present invention; Figure 4 This is an execution flow chart of a peripheral device according to Embodiment 2 of the present invention; Figure 5 This is an execution flow chart of the central device and the peripheral device of the third embodiment of the present invention; Figure 6 Schematic diagram of the framework of the system of embodiment 4 of the present invention. DETAILED DESCRIPTION
[0010] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0011] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0012] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0013] First, the nouns in the embodiments of the present application are explained: Central device, peripheral device: During the process of establishing a physical connection via low-power Bluetooth, the device that actively initiates the connection is called the central device, while the device that passively receives the connection is called the peripheral device. In the scenario of this embodiment, the central device refers to the Bluetooth of a mobile phone.
[0014] MTU: refers to the maximum amount of data that can be transmitted in a Bluetooth data packet. The size of each data packet sent must be strictly constrained according to the size of the MTU. If this is not done, it is likely that the remote reception will be wrong. In the scenario of this embodiment, it refers to the maximum number of bytes that the mobile phone can currently transmit in a Bluetooth data packet.
[0015] RSSI: It is the abbreviation of received signal strength indication, which refers to the measurement of the signal strength received by the wireless device. In Bluetooth communication, it represents the strength of the signal received by the Bluetooth device, which directly affects the communication quality and distance.
[0016] The technical solution in the embodiment of the present application has the following general idea: The inventor found that many Bluetooth transmission solutions on the market only consider the factor of signal strength, and do not comprehensively consider the actual processing capacity of peripheral devices. Compared with traditional Bluetooth, low-power Bluetooth has a low transmission rate and a small amount of data sent at a time, which makes data transmission more unstable than the high rate and large data volume of traditional Bluetooth. In daily life, the mobile phone end, as a low-power Bluetooth central device, often communicates with other peripheral devices. However, whether the data sent by the central device to the peripheral device can be processed does not only depend on the Bluetooth signal strength. Compared with the powerful computing performance, large memory cache and large data throughput capacity of the mobile phone end, the chip computing performance of the peripheral device is weak, and the memory data buffer is small. In addition, the peripheral device must take into account data transmission, data calculation, and task scheduling at the same time. In the case of frequent data transmission and time-consuming tasks, when the peripheral device processes data transmission, due to its own poor computing power, the peripheral device cannot process the data in the memory buffer in time, resulting in the accumulation of received data and the inability to store more received data, which ultimately leads to data loss. In order to solve the problem of packet loss, the central device end has to frequently retry to send data, which indirectly leads to data delay and increased power consumption caused by frequent retries. When the RSSI of the connection signal between the central device and the peripheral device is poor, frequent data interaction with the signal when the signal is strong will also increase the probability of data loss.
[0017] Therefore, based on the reference Bluetooth signal strength, this application adds a comprehensive consideration of other key factors that actually affect the efficiency of data transmission and reception of peripheral devices: the task processing volume of the peripheral device (current task queue) and the remaining buffer space for receiving data. This application provides a method for adaptively updating the connection parameters of the Bluetooth device by calculating the size of bytes to be sent each time, the number of times to send, and the interval between each transmission in real time according to the current low-power Bluetooth peripheral device's own situation (its own Bluetooth RSSI signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues). It can not only meet the throughput and latency requirements of Bluetooth peripheral devices, but also effectively reduce the communication power consumption caused by frequent retries after the peripheral Bluetooth device loses packets.
[0018] To achieve this goal, two communication instructions are defined: 1. Data instruction, in this embodiment, starts with 0xFA byte and ends with 0xFA byte, and is used to send actual data.
[0019] 2. Control instructions, in this embodiment, start with 0xFC bytes and end with 0xFC bytes.
[0020] If the control command is issued by the central device, it is used to start transmission and inform the peripheral device of the current MTU (Maximum Transmission Unit) of the central device, which is defined as the first control command; If the control instruction is issued by the peripheral device, it is used to notify the central device to adjust the number of data bytes sent each time, the number of times of sending, and the interval between each sending when sending data next, and it is defined as the second control instruction.
[0021] For example, the mobile phone as the central device obtains the current MTU size of the mobile phone before establishing a connection. When the central device establishes a connection with the peripheral device, the central device first sends the first control instruction (with MTU). The peripheral device calculates a reasonable data based on the MTU size given by the mobile phone, the current Bluetooth signal strength (RSSI) of the peripheral device, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues: the size of bytes that the central device should send each time, the number of times it should send, and the interval between each transmission.
[0022] The peripheral device puts the calculated data in the second control instruction and returns it to the central device. The central device adjusts the number of bytes sent each time, the sending interval, and the number of consecutive sending instructions according to the values given by the peripheral device. After the sending is completed, the central device waits for the next control instruction from the peripheral device. When the control instruction from the peripheral device arrives, it continues to send data. See Figure 1 .
[0023] For example, the mobile phone as the central device obtains the current MTU of 512 bytes. The peripheral device calculates that the central device should send 100 times in a 30ms interval, 260 bytes each time, based on the mobile phone MTU, the current Bluetooth connection signal strength RSSI, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues. Figure 2 shown.
[0024] 1. The central device sends the control command FC0200FC (with the current mobile phone MTU--512 bytes) to query the current transmission status.
[0025] 2. The peripheral device performs calculations and returns the control instruction FC0104001E0064FC (send 260 bytes each time, 30ms interval, and send 100 times in succession), requiring the central device to transmit according to the given requirements.
[0026] 3. The central device sends a data instruction FA...FA, and after completing the data interaction with the peripheral device, it waits for the control instruction of the peripheral device.
[0027] 4. The peripheral device recalculates and still returns the control instruction FC0104001E0064FC based on the calculation result.
[0028] 5. Return to step 3.
[0029] It has been verified in practice that under the same Bluetooth 5.0 low-power Bluetooth, the RSSI signal strength is maintained at a good RSSI-50, the device chip is in a non-extreme processing state, and 1MB of data is sent: 1. Implementation of this solution: It takes 72 seconds to transmit data, and the packet loss rate is 0% 2. Not implementing this solution: 102s, packet loss rate 15% When the peripheral device chip is in a busy task processing state, send 1MB of data: 1. Implementation of this solution: It takes 98 seconds to transmit data, and the packet loss rate is 0% 2. Without implementing this solution: 181s, packet loss rate 46%.
[0030] It can be seen that the method of the present application greatly reduces low-power Bluetooth transmission packet loss and improves transmission efficiency.
[0031] Embodiment 1 This embodiment provides a method for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency, such as Figure 3 As shown, for a central device, the method includes: Construct a data instruction, a first control instruction and a second control instruction; the data instruction is used to send data; the first control instruction is used by the central device to start transmission and inform the peripheral device of the current MTU of the central device; the second control instruction is used by the peripheral device to notify the central device to adjust the number of data bytes sent each time, the number of times sent, and the interval between each send; After establishing a Bluetooth connection with a peripheral device, obtaining the current MTU and then sending it to the peripheral device via a first control instruction; After receiving the second control instruction of the peripheral device, data is sent through the data instruction according to the byte size to be sent each time, the number of times of sending, and the interval between each sending. After the data sending is completed, the next second control instruction is received.
[0032] Embodiment 2 This embodiment provides a method for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency, which is used in peripheral devices such as Figure 4 As shown, the method includes: Construct a data instruction, a first control instruction and a second control instruction; the data instruction is used to send data; the first control instruction is used by the central device to start transmission and inform the peripheral device of the current MTU of the central device; the second control instruction is used by the peripheral device to notify the central device to adjust the number of data bytes sent each time, the number of times sent, and the interval between each send; After receiving the first control instruction from the central device, the size of the bytes to be sent each time, the number of times of sending, and the interval between each sending are calculated according to the MTU, the Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues, and then sent to the central device through the second control instruction; The receiving center device sends data through a data instruction, and sends a second control instruction again after the data reception is completed.
[0033] Preferably, after the data is received, the size of the bytes to be sent each time, the number of times the data is sent, and the interval between each data transmission are calculated again based on the MTU, the Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues, and then sent to the central device through the second control instruction, and then wait for the data receiving instruction. In this way, each data transmission can be transmitted with the current optimal parameters, further improving the transmission efficiency.
[0034] In this embodiment, the following formula is used to calculate the size of bytes to be sent each time, the number of times of sending, and the interval between each sending: Byte size: Size = min(max(MTU + (RSSI+50) × 8, 50), MTU Wherein, MTU is the MTU obtained in the first control instruction, RSSI is the low-power Bluetooth signal strength, and the value range is -100 ~ 0, the larger the number, the stronger the signal; min(a, b) represents the minimum value of a and b, and max(a, b) represents the maximum value of a and b; The unit of Size is byte, and the value range is 50 ~ MTU.
[0035] Number of times sent: Count = Space × 1024 / Size Among them, Space represents the remaining buffer space size in kilobytes, and the value range is 100~500.
[0036] Each sending interval: Duration = max(abs(RSSI) + pow(TaskCount, 3) - 40, 10) Among them, TaskCount represents the number of currently executed task queues, and its value range is 1 to 6; pow(N, M) represents N raised to the power of M, and abs represents the absolute value function.
[0037] The unit of Duration is milliseconds (ms), and the minimum value is 10ms.
[0038] Embodiment 3 This embodiment provides a method for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency, for a central device and at least one peripheral device, such as Figure 5 As shown, the method includes: Construct a data instruction, a first control instruction and a second control instruction; the data instruction is used to send data; the first control instruction is used by the central device to start transmission and inform the peripheral device of the current MTU of the central device; the second control instruction is used by the peripheral device to notify the central device to adjust the number of data bytes sent each time, the number of times sent, and the interval between each send; After the central device establishes a Bluetooth connection with the peripheral device, the current MTU is obtained and then sent to the peripheral device through a first control instruction; After the peripheral device receives the first control instruction from the central device, it calculates the size of bytes to be sent each time, the number of times of sending, and the interval between each sending according to the MTU, the Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues, and then sends them to the central device through the second control instruction; After the central device receives the second control instruction of the peripheral device, it sends data through the data instruction according to the size of bytes to be sent each time, the number of times of sending, and the interval between each sending, and waits for receiving the next second control instruction after the data is sent; The peripheral device receives the data sent by the central device through the data instruction, and sends the second control instruction again after the data reception is completed.
[0039] Preferably, after the peripheral device completes data reception, the size of the bytes to be sent each time, the number of times they are sent, and the interval between each transmission are recalculated based on the MTU, Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues, and then sent to the central device via a second control instruction, and then wait for the instruction to receive data.
[0040] The method for the peripheral device to calculate the size of bytes to be sent each time, the number of times of sending, and the interval between each sending may be as shown in the second embodiment.
[0041] Based on the same inventive concept, the present application also provides a system corresponding to the method in Example 3, see Example 4 for details.
[0042] Embodiment 4 In this embodiment, a system is provided to reduce low-power Bluetooth transmission packet loss and improve transmission efficiency. Figure 6 As shown, it includes a central device and at least one peripheral device; The central device is used to establish a Bluetooth connection with the peripheral device, obtain the current MTU and then send it to the peripheral device through a first control instruction; after receiving the second control instruction of the peripheral device, send data through a data instruction according to the size of bytes to be sent each time, the number of times of sending, and the interval between each sending, and wait for receiving the next second control instruction after the data is sent; The peripheral device is used to calculate the byte size to be sent each time, the number of transmissions, and the interval between each transmission based on MTU, Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues after receiving the first control instruction from the central device, and then send them to the central device through the second control instruction; receive data sent by the central device through the data instruction, and send the second control instruction again after the data reception is completed.
[0043] Preferably, the peripheral device is also used to recalculate the size of bytes to be sent each time, the number of times to send, and the interval between each transmission based on MTU, Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues after data reception is completed, and then send them to the central device via a second control instruction.
[0044] The method for the peripheral device to calculate the size of bytes to be sent each time, the number of times of sending, and the interval between each sending may be as shown in the second embodiment.
[0045] The present invention adaptively updates the connection parameters of the Bluetooth device for each data transmission in real time according to the current low-power Bluetooth peripheral device's own situation (its own Bluetooth RSSI signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues). It can not only meet the throughput and delay requirements of Bluetooth peripheral devices, but also effectively reduce the communication power consumption caused by frequent retries after the peripheral Bluetooth device loses packets. Under the same Bluetooth 5.0 low-power Bluetooth, the RSSI signal strength is maintained at a good RSSI-50 or so, and the device chip is in a non-limit processing state, sending 1MB of data: implementing this solution: it takes 72s to complete the data transmission, and the packet loss rate is 0%, compared to not implementing this solution: 102s, the packet loss rate is 15%, reducing the low-power Bluetooth transmission packet loss and improving the transmission efficiency. When the peripheral device chip is in a busy task processing state, sending 1MB of data: implementing this solution: it takes 98s to complete the data transmission, and the packet loss rate is 0%, compared to not implementing this solution: 181s, the packet loss rate is 46%, the method of the present application greatly reduces the low-power Bluetooth transmission packet loss and improves the transmission efficiency.
[0046] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0047] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0048] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0049] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0050] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency, characterized in that: For a central device, the method comprises: Construct a data instruction, a first control instruction and a second control instruction; the data instruction is used to send data; the first control instruction is used by the central device to start transmission and inform the peripheral device of the current MTU of the central device; the second control instruction is used by the peripheral device to notify the central device to adjust the number of data bytes sent each time, the number of times sent, and the interval between each send; After establishing a Bluetooth connection with a peripheral device, obtaining the current MTU and then sending it to the peripheral device via a first control instruction; After receiving the second control instruction of the peripheral device, data is sent through the data instruction according to the byte size to be sent each time, the number of times of sending, and the interval between each sending. After the data sending is completed, the next second control instruction is received.
2. A method for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency, characterized in that: For a peripheral device, the method comprises: Construct a data instruction, a first control instruction and a second control instruction; the data instruction is used to send data; the first control instruction is used by the central device to start transmission and inform the peripheral device of the current MTU of the central device; the second control instruction is used by the peripheral device to notify the central device to adjust the number of data bytes sent each time, the number of times sent, and the interval between each send; After receiving the first control instruction from the central device, the size of the bytes to be sent each time, the number of times of sending, and the interval between each sending are calculated according to the MTU, the Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues, and then sent to the central device through the second control instruction; The receiving center device sends data through a data instruction, and sends a second control instruction again after the data reception is completed.
3. The method according to claim 2, characterized in that Also includes: After the data is received, the size of the bytes to be sent each time, the number of times the data is sent, and the interval between each transmission are calculated based on the MTU, the Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues. These are then sent to the central device through the second control instruction, and then the receiving data instruction is waited for.
4. The method according to claim 2 or 3, characterized in that: The following formula is used to calculate the size of bytes to be sent each time, the number of times they are sent, and the interval between each send: Byte size: Size = min(max(MTU + (RSSI+50) × 8, 50), MTU Wherein, MTU is the MTU obtained in the first control instruction, and RSSI is the low-power Bluetooth signal strength; Number of times sent: Count = Space × 1024 / Size Among them, Space represents the remaining buffer space size in kilobytes; Each sending interval: Duration = max(abs(RSSI) + pow(TaskCount, 3) - 40, 10) Among them, TaskCount represents the number of tasks currently being executed in the queue, pow(N, M) represents N raised to the power of M, and abs represents the absolute value function.
5. A method for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency, characterized in that: For a central device and at least one peripheral device, the method comprises: Construct a data instruction, a first control instruction and a second control instruction; the data instruction is used to send data; the first control instruction is used by the central device to start transmission and inform the peripheral device of the current MTU of the central device; the second control instruction is used by the peripheral device to notify the central device to adjust the number of data bytes sent each time, the number of times sent, and the interval between each send; After the central device establishes a Bluetooth connection with the peripheral device, the current MTU is obtained and then sent to the peripheral device through a first control instruction; After the peripheral device receives the first control instruction from the central device, it calculates the size of bytes to be sent each time, the number of times of sending, and the interval between each sending according to the MTU, the Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues, and then sends them to the central device through the second control instruction; After the central device receives the second control instruction of the peripheral device, it sends data through the data instruction according to the size of bytes to be sent each time, the number of times of sending, and the interval between each sending, and waits for receiving the next second control instruction after the data is sent; The peripheral device receives the data sent by the central device through the data instruction, and sends the second control instruction again after the data reception is completed.
6. The method according to claim 5, characterized in that: After the peripheral device completes data reception, it recalculates the size of each byte to be sent, the number of times it is sent, and the interval between each send based on the MTU, Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues. It then sends the data to the central device through the second control instruction, and then waits for the instruction to receive data.
7. The method according to claim 5 or 6, characterized in that: The following formula is used to calculate the size of bytes to be sent each time, the number of times they are sent, and the interval between each send: Byte size: Size = min(max(MTU + (RSSI+50) × 8, 50), MTU Wherein, MTU is the MTU obtained in the first control instruction, and RSSI is the low-power Bluetooth signal strength; Number of times sent: Count = Space × 1024 / Size Among them, Space represents the remaining buffer space size in kilobytes; Each sending interval: Duration = max(abs(RSSI) + pow(TaskCount, 3) - 40, 10) Among them, TaskCount represents the number of tasks currently being executed in the queue, pow(N, M) represents N raised to the power of M, and abs represents the absolute value function.
8. A system for reducing low-power Bluetooth transmission packet loss and improving transmission efficiency, characterized in that: including a central device and at least one peripheral device; The central device is used to establish a Bluetooth connection with the peripheral device, obtain the current MTU and then send it to the peripheral device through a first control instruction; after receiving the second control instruction of the peripheral device, send data through a data instruction according to the size of bytes to be sent each time, the number of times of sending, and the interval between each sending, and wait for receiving the next second control instruction after the data is sent; The peripheral device is used to calculate the byte size to be sent each time, the number of transmissions, and the interval between each transmission based on MTU, Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues after receiving the first control instruction from the central device, and then send them to the central device through the second control instruction; receive data sent by the central device through the data instruction, and send the second control instruction again after the data reception is completed.
9. The system according to claim 8, characterized in that: The peripheral device is also used to recalculate the size of bytes to be sent each time, the number of times of sending, and the interval between each sending based on MTU, Bluetooth signal strength, the size of the remaining space in the memory buffer, and the number of currently scheduled task queues after data reception is completed, and then send them to the central device through a second control instruction.
10. The system according to claim 8 or 9, characterized in that: The following formula is used to calculate the size of bytes to be sent each time, the number of times they are sent, and the interval between each send: Byte size: Size = min(max(MTU + (RSSI+50) × 8, 50), MTU Wherein, MTU is the MTU obtained in the first control instruction, and RSSI is the low-power Bluetooth signal strength; Number of times sent: Count = Space × 1024 / Size Among them, Space represents the remaining buffer space size in kilobytes; Each sending interval: Duration = max(abs(RSSI) + pow(TaskCount, 3) - 40, 10) Among them, TaskCount represents the number of tasks currently being executed in the queue, pow(N, M) represents N raised to the power of M, and abs represents the absolute value function.
Citation Information
Cited By
Data transmission optimization method for low-power-consumption Bluetooth equipment
CN122054112A