Bluetooth communication device and data transmission method

By dynamically adjusting the transmission window in the Bluetooth communication device, the problem of too long data transmission time during the firmware update process is solved, more efficient data transmission and lower retransmission times are achieved, ensuring data integrity and success rate.

CN115395988BActive Publication Date: 2024-08-23REALTEK SEMICON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110571544.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-25
Publication Date
2024-08-23
Estimated Expiration
2041-05-25

AI Technical Summary

Technical Problem

In Bluetooth communication devices, during data transmission during the firmware update process, the device to be updated is frequently asked whether it has received the data correctly or retransmitted the data, causing the overall time to be too long.

Method used

By using a dynamically adjusted transmission window mechanism in the Bluetooth network, the complete transmission of data blocks is ensured. If the device to be updated does not receive all data blocks, the missing data blocks will be retransmitted, and the transmission window will be adjusted according to the data block loss. Improve transmission efficiency.

Benefits of technology

It effectively reduces the overall time of firmware update, ensures the integrity and success rate of data transmission, reduces the number of retransmissions, and improves transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115395988B
    Figure CN115395988B
Patent Text Reader

Abstract

The present application provides a Bluetooth communication device and a data transmission method, the data transmission method comprising the following operations: starting to transmit multiple data blocks in a first data segment in an image file to a first device via a Bluetooth network; when the number of at least one first data block among the data blocks that has been transmitted to the first device is equal to a transmission window, confirming whether the first device has received all of at least one first data block to update data block loss data; if the first device has received all of at least one first data block, dynamically adjusting the transmission window according to the data block loss data to continue transmitting the remaining data blocks among the data blocks or the second data segment in the image file; and if the first device has not received all of at least one first data block, retransmitting the data blocks that the first device has not previously received to the first device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a Bluetooth communication device, and more particularly to a Bluetooth communication device and a data transmission method for executing a firmware update procedure in a Bluetooth mesh network system. Background Art

[0002] In existing Bluetooth communication devices, multiple devices can exchange data and / or transmit image files via the Bluetooth network to complete the device firmware update. However, during the image file transmission process, if too many requests are sent to inquire whether the device to be updated has received the data correctly, or too many data retransmissions are made, the overall firmware update time will be too long. Summary of the invention

[0003] In some embodiments, the Bluetooth communication device includes a wireless transceiver circuit, at least one memory circuit, and at least one processor circuit. The wireless transceiver circuit is used to couple to a first device via a Bluetooth network. The at least one memory circuit is used to store program code and data block loss data. At least one processor circuit is used to execute the program code to start transmitting multiple data blocks in a first data segment in an image file to the first device; when the number of at least one first data block among the data blocks that has been transmitted to the first device is not less than a transmission window, confirm whether the first device has received all of the at least one first data block to update the data block loss data; if the first device has received all of the at least one first data block, dynamically adjust the transmission window according to the data block loss data to continue transmitting the remaining data blocks among the data blocks or a second data segment in the image file to the first device; and if the first device has not received all of the at least one first data block, retransmit at least one second data block to the first device, wherein the at least one second data block is a data block among the at least one first data block that has not been received by the first device.

[0004] In some embodiments, the data transmission method includes the following operations: starting to transmit multiple data blocks in a first data segment in an image file to a first device via a Bluetooth network; when the number of at least one first data block among the data blocks that has been transmitted to the first device is equal to a transmission window, confirming whether the first device has received all of the at least one first data block to update the data block loss data; if the first device has received all of the at least one first data block, dynamically adjusting the transmission window according to the data block loss data to continue transmitting the remaining data blocks among the data blocks or transmitting a second data segment in the image file; and if the first device has not received all of the at least one first data block, retransmitting at least one second data block to the first device, wherein the at least one second data block is a data block among the at least one first data block that has not been received by the first device.

[0005] The features, implementation and technical effects of the present disclosure are described in detail below with reference to the accompanying drawings as preferred embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Figure 1A A schematic diagram of a network system drawn according to some embodiments of the present disclosure;

[0007] Figure 1B A flowchart of a firmware update method drawn according to some embodiments of the present disclosure;

[0008] Figure 1C A schematic diagram of a split image file drawn according to some embodiments of the present disclosure;

[0009] Figure 2 A flowchart of a data transmission method drawn according to some embodiments of the present disclosure;

[0010] Figure 3A and Figure 3B According to some embodiments of the present disclosure Figure 2 A flowchart of multiple steps corresponding to multiple operations;

[0011] Figure 3C According to some embodiments of the present disclosure Figure 3B A flowchart of a step in;

[0012] Figure 3D According to some embodiments of the present disclosure Figure 3A A flowchart of an operation in; and

[0013] Figure 4 This is a schematic diagram of a Bluetooth communication device drawn according to some embodiments of the present disclosure.

[0014] Explanation of symbols

[0015] 100: Network system

[0016] 101-107: Electronic devices

[0017] 110: Firmware Update Method

[0018] 200: Data transmission method

[0019] 400: Bluetooth communication device

[0020] 410: Wireless transceiver circuit

[0021] 420: At least one memory circuit

[0022] 430: At least one processor circuit

[0023] BT: Bluetooth network

[0024] D1: Image file

[0025] DM: Data block lost data

[0026] i: first count value

[0027] n: numeric value

[0028] N: Data

[0029] PP: Program code

[0030] S111~S114,S201~S204: Operation

[0031] S301~S312: Steps

[0032] S301_1~S301_3, S306_1~S306_4: Sub-steps

[0033] TH: Threshold

[0034] W: Transmission Window

[0035] W int : Initial value

[0036] q: preset speed

[0037] y: second count value

[0038] z: value DETAILED DESCRIPTION

[0039] All words used herein have their ordinary meanings. The definitions of the above words in commonly used dictionaries and the use examples of any words discussed herein in the content of this disclosure are only illustrative and should not limit the scope and meaning of this disclosure. Similarly, this disclosure is not limited to the various embodiments shown in this specification.

[0040] As used herein, "coupled" or "connected" may refer to two or more elements making physical or electrical contact directly or indirectly, or two or more elements operating or acting on each other. As used herein, the term "circuitry" may be a single system formed by at least one circuit, and the term "circuit" may be a device that is connected in a certain manner by at least one transistor and / or at least one active and passive element to process signals.

[0041] As used herein, the term "and / or" includes any combination of one or more of the listed associated items. In this article, the words first, second, third, etc. are used to describe and distinguish each element. Therefore, the first element in this article can also be called the second element without departing from the original intention of the present disclosure. For ease of understanding, similar elements in the various drawings will be designated with the same reference numerals.

[0042] Figure 1A Schematic diagram of a network system 100 drawn according to some embodiments of the present disclosure. The network system 100 includes multiple electronic devices 101-107. In some embodiments, the multiple electronic devices 101-107 are coupled to each other via a Bluetooth network BT (the connection lines are represented by dotted lines) to transmit data and / or instructions to each other. In some embodiments, each of the multiple electronic devices 101-107 can be a device that supports Bluetooth low energy (BLE) technology. For example, each of the multiple electronic devices 101-107 (for example, electronic device 102) can be Figure 4 The Bluetooth communication device 400. In some embodiments, the Bluetooth network BT may be a Bluetooth mesh network.

[0043] Figure 1B FIG. 1 is a flowchart of a firmware update method 110 according to some embodiments of the present disclosure. The firmware update method 110 may be Figure 1A In some embodiments, the network system 100 may perform a device firmware update (DFU) according to the Bluetooth mesh network model version 1.0.1 (or its subsequent version) standard established by the Bluetooth Special Interest Group (SIG) (its relevant specification was published on July 13, 2017). For example, the network system 100 may perform the firmware update method 110 according to the firmware distribution model, firmware update model, and binary large object transfer model in the R06 draft proposed by the Bluetooth Special Interest Group (SIG) on May 29, 2020.

[0044] In operation S111, firmware publishing is performed to obtain information of other devices in the Bluetooth network and identify the electronic device whose firmware needs to be updated (referred to as the device to be updated). Figure 1AThe electronic device 101 in the figure can be operated as an initiator node, and the electronic device 102 can be operated as a distributor node. The electronic device 101 can perform firmware release through the firmware release model to obtain the device information and firmware version of each of the other nodes (for example, multiple electronic devices 103~107) in the Bluetooth network BT through the electronic device 102. In this example, the electronic device 101 can confirm that the firmware of the multiple electronic devices 103~105 needs to be updated according to the firmware version of each of the multiple electronic devices 103~107. Therefore, the electronic device 101 identifies the multiple electronic devices 103~105 (that is, the multiple devices to be updated) as updating nodes, and the remaining electronic devices 106~107 are not software to be updated. In some embodiments, the electronic device 101 can directly transmit the image file (image) D1 containing the new firmware through the firmware release model (such as Figure 1A In some embodiments, the electronic device 101 may transmit information about a specific link to the electronic device 102 through a firmware release model, and the electronic device 102 may access the specific link via the Internet to obtain the image file D1.

[0045] In operation S112, the device to be updated is notified to start the firmware update procedure. For example, the electronic device 102 may notify the plurality of electronic devices 103-105 to start the firmware update procedure through the firmware update model.

[0046] In operation S113, the image file is transmitted to the device to be updated. In operation S114, the image file is installed to update the original firmware. For example, the electronic device 102 can confirm the transmission capabilities of multiple electronic devices 103-105 through a binary large object transmission model to determine the size of the data segment (block) used in the transmission process, the number of data segments (hereinafter referred to as the value M), the size of the data chunk (chunk) and the number of data chunks (hereinafter referred to as the value N). Figure 1C , Figure 1CA schematic diagram of splitting the image file D1 is drawn according to some embodiments of the present disclosure. In some embodiments, the electronic device 102 can split the image file D1 into M data segments according to the size of the data segments, and split each data segment into N data blocks according to the size of the data blocks, wherein each of the numerical value M and the numerical value N is a positive integer greater than 1, and the minimum transmission unit in the process of transmitting the image file D1 is a data block. Through the binary large object transmission model, the electronic device 102 can transmit N data blocks belonging to the same data segment to the device to be updated. After the electronic device 102 confirms that the electronic device to be updated has correctly received all the data blocks in the data segment, the electronic device 102 can start transmitting multiple data blocks of the next data segment to the device to be updated. By repeating the above operations, the device to be updated can install the image file D1 after receiving all the data segments of the image file D1 to update its firmware. The setting method of operation S113 will be referred to later. Figure 2 or Figure 3A illustrate.

[0047] The detailed operations of the firmware release model, firmware update model, and binary large object transmission model can be referred to the specifications of the relevant communication standards, and will not be repeated here. In some embodiments, the electronic device 102 can execute in push mode Figure 2 The data transmission method 200 is used to transmit the image file D1 to the device to be updated. In this way, the image file D1 can be transmitted efficiently and the integrity of the image file D1 received by the device to be updated can be ensured, so as to reduce the overall time of updating the firmware. In addition, Figure 1A The number of electronic devices (7) shown in FIG. 1 is for example only, and the present disclosure is not limited thereto.

[0048] Figure 2 FIG. 2 is a flow chart of a data transmission method 200 according to some embodiments of the present disclosure. In some embodiments, the data transmission method 200 may be: Figure 1A In some embodiments, the data transmission method 200 may be equivalent to Figure 1B Operation S113 in .

[0049] In operation S201, a plurality of data blocks in the data segment of the image file are transmitted to the device to be updated. In operation S202, when the number of at least one first data block among the data blocks that has been transmitted to the device to be updated is equal to the transmission window (e.g., Figure 4 When the transmission window W is set to W, it is confirmed whether the device to be updated has received all of the at least one first data block. If the device to be updated has received all of the at least one first data block, operation S203 is performed. Alternatively, if the device to be updated has not received all of the at least one first data block, operation S204 is performed. In operation S203, the update data block is missing data (for example, Figure 4 The data block loss data DM) is obtained, and the transmission window is dynamically adjusted according to the data block loss data to continue to transmit the remaining data blocks of the data blocks or multiple data blocks in the next data segment of the image file to the device to be updated. In operation S204, at least one second data block is retransmitted to the device to be updated, wherein the at least one second data block is a data block of the at least one first data block that is not received by the device to be updated.

[0050] The above-mentioned multiple operations of the data transmission method 200 are only examples and are not limited to being executed in the order in this example. Without violating the operation mode and scope of each embodiment of the present disclosure, the various operations under the data transmission method 200 can be appropriately added, replaced, omitted or executed in a different order (for example, they can be executed simultaneously or partially simultaneously).

[0051] For further explanation of the data transmission method 200, please refer to Figure 3A and Figure 3B , Figure 3A and Figure 3B According to some embodiments of the present disclosure, Figure 2 A flowchart of multiple steps corresponding to multiple operations in a process. Figure 3A and Figure 3B It includes multiple steps S301 to S312. Figure 3A In the above, multiple steps S301 to S305 correspond to Figure 2 Operation S201 and operation S202, multiple steps S306 to S308 correspond to Figure 2 Operation S203. Figure 3B In the above, multiple steps S309 to S312 correspond to Figure 2 Operation S204.

[0052] In step S301, the transmission window is set to an initial value (e.g. Figure 4 The initial value W int In some embodiments, before starting to transmit the image file D1, the electronic device 102 may determine an initial value W of the transmission window W. int , where the transmission window W is the number of data blocks that can be transmitted in one transmission cycle. In some embodiments, the transmission cycle is the period from the start of transmitting i data blocks to confirming whether the device to be updated has received the i data blocks. For example, if the initial value of the transmission window W is W int is 3, within a transmission cycle, the electronic device 102 can continuously transmit 3 data blocks and confirm whether the device to be updated has received the 3 data blocks.

[0053] In step S302, if the value of the transmission window is updated, use the new transmission window and reset the first count value (labeled as i) to 1, or if this is the initial transmission, use the current transmission window and reset the first count value i to 1. For example, if the electronic device 102 updates the transmission window W after executing step S306, the electronic device 102 can use the updated transmission window W to transmit the remaining data blocks and increment the first count value i by 1. Alternatively, if this is the initial transmission (i.e., when transmitting the first data block of the image file D1), the electronic device 102 can start transmitting the data blocks using the transmission window W with the initial value W int and set the first count value i to 1.

[0054] In step S303, transmit the data blocks corresponding to the same data segment to the device to be updated. In step S304, confirm whether the number of the transmitted data blocks (i.e., the aforementioned at least one first data block) (labeled as the value n) is less than the value N (labeled as n < N) and confirm whether the current first count value i is less than the transmission window (labeled as i < W). If the number of the transmitted data blocks is less than the value N and the first count value i is less than the transmission window W, update the value n to n + 1 and update the first count value i to i + 1, and execute step S303 to continue transmitting the data blocks. If the number of the transmitted data blocks is not less than the value N or the first count value is not less than the transmission window, execute step S305.

[0055] As previously described, each data segment of the image file D1 can be split into N data blocks, so the value N represents the number of all data blocks included in one data segment. In an example, the value N is 5, and this is the initial transmission, so the first count value i is 1 and the value of the transmission window W is the initial value W int (e.g., 5). The electronic device 102 can transmit the first data block of the first data segment in the image file D1 to the device to be updated (i.e., step S303). After transmitting the first data block, the electronic device 102 confirms that the current number of transmitted data blocks is 1 (i.e., n = 1), and confirms that n is less than N (i.e., 1 < 5) and the first count value i is also less than the transmission window W (i.e., 1 < 5) (i.e., step S304). Under this condition, the electronic device 102 can update the value n to n + 1, and update the first count value i to i + 1, and execute step S302 again to continue transmitting the second data block of the first data segment to the device to be updated. By repeating the above steps, when the electronic device 102 finishes transmitting the fifth data block, the electronic device 102 confirms that the current number of transmitted data blocks is 5 (i.e., n = 5), and confirms that n is not less than N (i.e., 5 ≧ 5). Under this condition, it means that the electronic device 102 has transmitted all the data blocks in the first data segment to the device to be updated, so the electronic device 102 can execute step S305.

[0056] Alternatively, in another example, the value N is 5, and this transmission is the initial transmission, so the first count value i is 1 and the value of the transmission window is the initial value W int (For example, 3). After the electronic device 102 has transmitted the third data block, the electronic device 102 confirms that the number of data blocks currently transmitted is 3 (i.e., n=3), and confirms that n is not less than N (i.e., 3 is not less than 5) and the first count value i is not less than the transmission window W (i.e., 3≧3) (i.e., step S304). Under this condition, it means that the number of data blocks that the electronic device 102 can transmit in a single transmission cycle has reached the upper limit, so the electronic device 102 can execute step S305.

[0057] In step S305, it is confirmed whether the device to be updated has received all the data blocks previously transmitted. If the device to be updated has received all the data blocks previously transmitted, step S306 is executed. Alternatively, if the device to be updated has not received all the data blocks previously transmitted, step S307 is executed. Figure 3B . For example, through steps S301 to S304, the electronic device 102 may transmit three data blocks in the first data segment to the device to be updated (for example, the electronic device 103). After transmitting the three data blocks, the electronic device 102 may issue a request to inquire whether the electronic device 103 has correctly received the aforementioned three data blocks. If the electronic device 103 responds that all three data blocks have been received, the electronic device 102 may update the data block missing data DM and execute step S306. Alternatively, if the electronic device 103 responds that at least one of the three data blocks (i.e., the aforementioned at least one second data block) has not been received, the electronic device 102 may execute step S309.

[0058] In step S306, the data block loss data is updated, and the transmission window is dynamically adjusted according to the data block loss data to update the value of the transmission window. Figure 3C In step S307, it is confirmed whether the value n is less than the value N. If the value n is less than the value N, step S302 is executed. Alternatively, if the value n is not less than the value N, step S308 is executed. In step S308, the data block in the next data segment is transmitted.

[0059] As previously described, a single data segment of the image file D1 can be divided into N data blocks. If the value n is less than the value N, it means that there are still remaining data blocks in the data segment currently being transmitted that have not been transmitted, so the electronic device 102 can execute step S302 and continue to transmit the remaining data blocks based on the updated transmission window. Alternatively, if the value n is not less than the value N, it means that the data segment currently being transmitted has been transmitted, so the electronic device 102 can execute step S308 to continue to transmit the next data segment in the image file D1 based on the updated transmission window.

[0060] Continue to refer to Figure 3B In step S309, the data block information not received by the device to be updated is obtained, and the data block information and the number of retransmissions are updated to the data packet loss data. For example, if the electronic device 103 reports that the first data block and the third data block have not been received and the electronic device 104 reports that the second data block has not been received, the electronic device 102 can record the above information and the number of times the data blocks have been retransmitted to the corresponding electronic device as the data packet loss data DM.

[0061] In step S310, the second count value (denoted as y) is subtracted by 1 (i.e., y=y-1). The second count value y is used to indicate the upper limit of the number of retransmissions. In step S311, it is confirmed whether the second count value is greater than 0 (denoted as y>0). If the second count value y is greater than 0, it means that the number of retransmissions has not reached the upper limit, so step S312 can be executed. Alternatively, if the second count value y is not greater than 0, it means that the number of retransmissions has reached the upper limit and the transmission has failed. In step S312, the data blocks that the device to be updated has not received are retransmitted to the device to be updated, and the execution Figure 3A Step S305.

[0062] By repeatedly executing Figure 3A and Figure 3B By performing the steps in the above, the electronic device 102 can more efficiently transmit the image file D1 to the multiple electronic devices 103-105. In this way, the multiple electronic devices 103-105 can receive and install the image file D1 to update their own firmware.

[0063] Figure 3C According to some embodiments of the present disclosure, Figure 3B In some embodiments, Figure 3B The step S306 in the embodiment includes a plurality of sub-steps S306_1 to S306_4.

[0064] In sub-step S306_1, the number of at least one second data block or the number of retransmissions of the at least one second data block is obtained according to the data block loss data. The at least one second data block is the data block retransmitted in step S312 (ie, the data block not received by the device to be updated recorded in step S309).

[0065] In sub-step S306_2, it is confirmed whether at least one of the number of at least one second data block or the number of retransmissions of the at least one second data block is greater than or equal to a critical value. If at least one of the number of at least one second data block or the number of retransmissions of the at least one second data block is greater than or equal to the critical value, sub-step S306_3 is executed. Alternatively, if at least one of the number of at least one second data block or the number of retransmissions of the at least one second data block is less than the critical value, sub-step S306_4 is executed.

[0066] In sub-step S306_3, if the current value of the transmission window is not 1, a first value is determined and the first value is subtracted from the current value of the transmission window to update the transmission window, wherein the larger the number of at least one second data block or the number of retransmissions of the at least one second data block, the larger the first value.

[0067] For example, if the number of at least one second data block is greater than or equal to a critical value (e.g. Figure 4 The electronic device 102 may determine that the transmission quality of the Bluetooth network BT is poor, and thus may set a larger first value (e.g. Figure 4 The electronic device 102 can reduce the transmission window W by the value z. In other words, when the transmission quality of the Bluetooth network BT is poor, the electronic device 102 can dynamically reduce the transmission window W to increase the transmission quality. Figure 3A The number of executions of step S305 is used to ensure the transmission success rate of the data block.

[0068] In sub-step S306_4, if the current value of the transmission window is less than the number of all data blocks in a single data segment (ie, value N), a first value is determined and the current value of the transmission window is increased by the first value (eg, Figure 4 The transmission window is updated by using a value z of the at least one second data block, wherein the smaller at least one of the number of the at least one second data block or the number of retransmissions of the at least one second data block is, the larger the first value is.

[0069] For example, if the number of at least one second data block is less than the critical value, the electronic device 102 can determine that the transmission quality of the Bluetooth network BT is stable, so a larger value z can be set. The electronic device 102 can add the current value of the transmission window to the value z. In other words, when the transmission quality of the Bluetooth network BT is preferred, the electronic device 102 can dynamically increase the transmission window W to reduce Figure 3A The efficiency of data transmission can be improved by increasing the number of executions of step S305.

[0070] The above description is only based on the number of at least one second data block as an example, but the present disclosure is not limited thereto. In other embodiments, the electronic device 102 may adjust the transmission window W by comparing the number of retransmissions of at least one second data block with a critical value. Alternatively, the electronic device 102 may adjust the transmission window W based on both the number of at least one second data block and the number of retransmissions thereof. For example, in other embodiments, the electronic device 102 may compare the sum of the number of at least one second data block and the number of retransmissions of at least one second data block with a critical value to adjust the transmission window W.

[0071] Figure 3D According to some embodiments of the present disclosure, Figure 3A In some embodiments, step S301 includes a plurality of sub-steps S301_1 to S301_3.

[0072] In sub-step S301_1, it is confirmed whether the transmission speed of the Bluetooth network is greater than or equal to a preset speed. If the transmission speed of the Bluetooth network is greater than or equal to the preset speed, sub-step S301_2 is executed. Alternatively, if the transmission speed of the Bluetooth network is less than the preset speed, sub-step S301_3 is executed.

[0073] In sub-step S301_2, the initial value of the transmission window is set to a first preset value. In sub-step S301_3, the initial value of the transmission window is set to a second preset value, wherein the first preset value is greater than the second preset value. For example, before starting to transmit a data block, the electronic device 102 may obtain relevant information about the current environment through the application layer to determine whether the transmission speed of the Bluetooth network BT is greater than or equal to a preset speed (e.g., Figure 4 If the transmission speed of the Bluetooth network BT is greater than or equal to the preset speed, it means that the current transmission quality of the Bluetooth network BT is stable. The electronic device 102 can set the initial value W of the transmission window. int is a larger first preset value. In some embodiments, the first preset value may be the number of all data blocks in a single data segment (ie, the aforementioned value N). In this way, the electronic device 102 may try to transmit the data blocks with the highest efficiency.

[0074] Alternatively, if the transmission speed of the Bluetooth network BT is less than the preset speed q. Under this condition, it means that the current transmission quality of the Bluetooth network BT is poor, and the electronic device 102 can set the initial value of the transmission window to a smaller second preset value. In some embodiments, the second preset value can be 1. In this way, the electronic device 102 can try to transmit the data block with the lowest efficiency to improve the success rate of the data block transmission.

[0075] Through the above configuration, the electronic device 102 can determine whether to execute the fast start (ie, sub-step S301_2 ) or the slow start (ie, sub-step S301_3 ) of the binary large object transmission model according to the current transmission quality of the Bluetooth network BT.

[0076] In some related technologies, the electronic device will immediately ask the device to be updated whether it has received a data block after sending it. In this way, although the data success rate can be ensured, the overall transmission time will be greatly increased. In other related technologies, the electronic device will ask the device to be updated whether it has received the data blocks after sending all the data blocks in a data segment. In this way, if the current transmission quality of the Bluetooth network is poor and the number of data blocks that the device to be updated has not received is too large, it may take more time to retransmit the data blocks.

[0077] Compared to the above technology, in some embodiments of the present disclosure, the electronic device 102 can use the transmission window to set the number of data blocks transmitted in one transmission cycle, and dynamically adjust the transmission window according to the transmission quality of the Bluetooth network BT. In this way, the overall transmission time can be effectively reduced and a certain transmission success rate can be maintained.

[0078] Above FIG. 3A to FIG. 3D The steps in the example are only examples and are not limited to being executed in the order in which they are shown. Without violating the operation mode and scope of the embodiments of the present disclosure, FIG. 3A to FIG. 3D The multiple steps in can be appropriately added, replaced, omitted or performed in a different order. FIG. 3A to FIG. 3D The multiple steps in may be performed simultaneously or partially simultaneously.

[0079] Figure 4 FIG. 4 is a schematic diagram of a Bluetooth communication device 400 according to some embodiments of the present disclosure. In some embodiments, Figure 1A The electronic device 102 may be implemented by a Bluetooth communication device 400. The Bluetooth communication device 400 includes a wireless transceiver circuit 410, at least one memory circuit 420, and at least one processor circuit 430. The wireless transceiver circuit 410 may be implemented by a Bluetooth communication device 400. Figure 1A The Bluetooth network BT in the wireless transceiver circuit 410 is coupled to multiple electronic devices 101 and 103-107 to transmit the image file D1 and / or other data and instructions. In some embodiments, the wireless transceiver circuit 410 includes a data transmitter circuit (not shown) and a data receiver circuit (not shown) supporting the Bluetooth mesh network.

[0080] At least one processor circuit 430 is coupled to the wireless transceiver circuit 410 and the at least one memory circuit 420. In various embodiments, the at least one processor circuit 430 may be a central processing unit (CPU), an application-specific integrated circuit (Application-specific integrated circuit), a multiprocessor, a pipelined processor, a distributed processing system, etc. Various circuits or units used to implement the at least one processor circuit 430 are all within the scope of the present disclosure.

[0081] In some embodiments, at least one memory circuit 420 may be used to store the aforementioned image file D1, the packet loss data DM, and information about the first count value i, the transmission window W, and the initial value W. int , value n, value N, second count value y, threshold value TH, value z and / or preset speed q. In some embodiments, at least one memory circuit 420 further stores program code PP. At least one processor circuit 430 can execute program code PP stored in at least one memory circuit 420 to perform firmware update (e.g., Figure 1B and / or Figure 2 multiple operations in ).

[0082] In some embodiments, at least one memory circuit 420 may be a non-transitory computer readable storage medium. In some embodiments, the computer readable storage medium may be an electrical, magnetic, optical, infrared, and / or semiconductor device. For example, the computer readable storage medium includes semiconductor or solid-state memory, magnetic tape, removable computer disk, random access memory (RAM), read-only memory (ROM), hard disk, and / or optical disk. In embodiments using optical disks, the computer readable storage medium may include a compact disk-read only memory (CD-ROM), a compact disk-rewritable (CD-R / W), and / or a digital video disk (DVD).

[0083] The above configuration of the Bluetooth communication device 400 is for example only, and the present disclosure is not limited thereto. Various types of Bluetooth communication devices are within the scope of the present disclosure.

[0084] In summary, the Bluetooth communication device and data transmission method in some embodiments of the present disclosure can utilize dynamically adjusted transmission windows to dynamically adjust the transmission efficiency according to the current network quality during the process of transmitting firmware data to the software to be updated, thereby reducing the overall transmission time and ensuring a certain transmission success rate.

[0085] Although the embodiments of the present disclosure are described above, these embodiments are not intended to limit the present disclosure. Those skilled in the art may make changes to the technical features of the present disclosure based on the explicit or implicit contents of the present disclosure. All these changes may fall within the scope of patent protection sought by the present disclosure. In other words, the scope of patent protection of the present disclosure shall be based on what is defined in the claims of this specification.

Claims

1. A Bluetooth communication device, comprising: a wireless transceiver circuit for coupling to a first device via a Bluetooth network; At least one memory circuit for storing a program code and a data block loss data ; as well as At least one processor circuit is used to execute the program code to: Start transmitting a plurality of data blocks in a first data segment in an image file to the first device; When the number of at least one first data block transmitted to the first device among the plurality of data blocks is not less than a transmission window, confirming whether the first device has received all of the at least one first data block to update the data block loss data, wherein the transmission window is the number of data blocks that can be transmitted in one transmission cycle; If the first device has received all of the at least one first data block, dynamically adjusting the transmission window according to the updated data block loss data to continue transmitting the remaining data blocks of the plurality of data blocks or a second data segment of the image file to the first device; as well as If the first device does not receive all of the at least one first data block, retransmit at least one second data block to the first device, wherein the at least one second data block is a data block of the at least one first data block that is not received by the first device.

2. The Bluetooth communication device as claimed in claim 1, wherein the at least one processor circuit is used to obtain a number of the at least one second data block or a retransmission number of transmitting the at least one second data block according to the data block loss data, and dynamically adjust the transmission window according to at least one of the number or the retransmission number.

3. The Bluetooth communication device as claimed in claim 2, wherein if at least one of the number or the number of retransmissions is greater than or equal to a critical value and a current value of the transmission window is not 1, the at least one processor circuit is used to subtract a first value from the current value to update the transmission window. 4 . The Bluetooth communication device as claimed in claim 3 , wherein the larger the at least one of the number or the number of retransmissions is, the larger the first value is.

5. The Bluetooth communication device as claimed in claim 2, wherein if at least one of the number or the number of retransmissions is lower than a critical value and a current value of the transmission window is less than a number of the plurality of data blocks, the at least one processor circuit is configured to increase the current value by a first value to update the transmission window. 6 . The Bluetooth communication device as claimed in claim 5 , wherein the first value is larger if at least one of the number or the number of retransmissions is smaller.

7. The Bluetooth communication device as described in claim 1, wherein the at least one processor circuit is further used to set an initial value of the transmission window to a first preset value or a second preset value according to a transmission speed of the Bluetooth network before starting to transmit the first data segment, wherein the first preset value is greater than the second preset value.

8. The Bluetooth communication device as claimed in claim 7, wherein when the transmission speed is greater than or equal to a preset speed, the at least one processor circuit is used to set the initial value to the first preset value, and the first preset value is a number of the plurality of data blocks. 9 . The Bluetooth communication device as claimed in claim 7 , wherein when the transmission speed is lower than a preset speed, the at least one processor circuit is configured to set the initial value to the second preset value, and the second preset value is 1.

10. A data transmission method, comprising: Starting to transmit a plurality of data blocks in a first data segment in an image file to a first device via a Bluetooth network; When the number of at least one first data block transmitted to the first device among the plurality of data blocks is equal to a transmission window, confirming whether the first device has received all of the at least one first data block to update the data block loss data, wherein the transmission window is the number of data blocks that can be transmitted in one transmission cycle; If the first device has received all of the at least one first data block, dynamically adjusting the transmission window according to the updated data block loss data to continue transmitting the remaining data blocks of the plurality of data blocks or transmitting a second data segment in the image file; and If the first device does not receive all of the at least one first data block, retransmit at least one second data block to the first device, wherein the at least one second data block is a data block of the at least one first data block that is not received by the first device.