The present disclosure relates generally to communication systems, and more particularly, to a reliable write command protocol.
Wireless communication systems are widely deployed to provide various telecommunication services such as telephony, video, data, messaging, and broadcasts. In certain wireless communication systems, such as Bluetooth communication systems, several connections or connection intervals are required to transfer a file between devices. In some situations, such as during the transfer of large upgrade data, the connection between devices is interrupted and/or disconnected due to the slow transfer speed between the devices.
The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
The detailed description set forth below in connection with the appended drawings is intended as a description of various configurations and is not intended to represent the only configurations in which the concepts described herein may be practiced. The detailed description includes specific details for the purpose of providing a thorough understanding of various concepts. However, it will be apparent to those skilled in the art that these concepts may be practiced without these specific details. In some instances, well known structures and components are shown in block diagram form in order to avoid obscuring such concepts.
Several aspects of telecommunication systems will now be presented with reference to various apparatus and methods. These apparatus and methods will be described in the following detailed description and illustrated in the accompanying drawings by various blocks, components, circuits, processes, algorithms, etc. (collectively referred to as “elements”). These elements may be implemented using electronic hardware, computer software, or any combination thereof. Whether such elements are implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system.
By way of example, an element, or any portion of an element, or any combination of elements may be implemented as a “processing system” that includes one or more processors. Examples of processors include microprocessors, microcontrollers, graphics processing units (GPUs), central processing units (CPUs), application processors, digital signal processors (DSPs), reduced instruction set computing (RISC) processors, systems on a chip (SoC), baseband processors, field programmable gate arrays (FPGAs), programmable logic devices (PLDs), state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform the various functionality described throughout this disclosure. One or more processors in the processing system may execute software. Software shall be construed broadly to mean instructions, instruction sets, code, code segments, program code, programs, subprograms, software components, applications, software applications, software packages, routines, subroutines, objects, executables, threads of execution, procedures, functions, etc., whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise.
Accordingly, in one or more example embodiments, the functions described may be implemented in hardware, software, or any combination thereof. If implemented in software, the functions may be stored on or encoded as one or more instructions or code on a computer-readable medium. Computer-readable media includes computer storage media. Storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise a random-access memory (RAM), a read-only memory (ROM), an electrically erasable programmable ROM (EEPROM), optical disk storage, magnetic disk storage, other magnetic storage devices, combinations of the aforementioned types of computer-readable media, or any other medium that can be used to store computer executable code in the form of instructions or data structures that can be accessed by a computer.
Under the current BLE standard a device must send a reply at a certain amount of time after the previous reply or command, otherwise the device relinquishes control of that connection interval, and waits for another connection interval before continuing the transfer of data. The reply time may be referred to as an Inter Frame Space (IFS). The IFS may be, for example, 150 us (microseconds). Thus, in this example, the firmware for each of the devices controls the radios in each of the devices such that each reply or “frame” (e.g., a reply to data 120 or a reply to ACK 122) occurs at 150 us from the end of the previous frame. In this example, ACK 122, data 124, and ACK 126 may be examples of replies that are at an IFS of the previous frame. Further, data 128 may be an example of a reply to a previous frame (e.g., ACK 126) that was unable to be at an IFS of that previous frame. Here, because the first device was unable to reply at the appropriate IFS of the first connection interval 110, the first device relinquishes control of the first connection interval 110 and waits for the second connection interval 112 to transmit data 128. Once data 128 is transmitted, interactions continue between the first and second devices as described supra, as shown by ACK 130.
In the background of the first and second devices, each device may include a control chip (e.g., a BLE controller chip) that may contain both a radio (i.e., hardware) and firmware (i.e., software) to control the interactions. The firmware is configured to control the radio to maintain the link between devices. As an example, when an application of the first device needs to transfer data (e.g., data 120), the firmware receives the data to be transferred to the second device from the application. The firmware then stores the data in a buffer and controls the radio to wait until the appropriate time to send the data (e.g., in a connection interval, and at the IFS time of the previous frame). When the radio needs to send the next frame, the radio looks in the buffer to see if there is anything to send. If the buffer is empty, then the radio relinquishes control of the connection interval.
Further, for many devices, a significant amount of time (e.g., 3000 us) may be required to reply to a frame. Thus the BLE devices may not be able to reply at the IFS point and therefore the connection interval is relinquished before replying. An example of the two devices is shown by
Because of the time required to reply to a frame and due to the size of some data transfers, such as firmware upgrades, transferring data between the first wireless device 102 and the second wireless device 104 may be slow. For example, a typical connection interval may have a 30 ms duration, and a transfer rate of data between connected devices may be as low as 100 bytes/second, once an upgrade protocol overhead is taken into to account. In this example, a large file (e.g., 30 Kbytes) having an upgrade data packet size of 20 bytes may require 3-4 connection intervals per packet and may take several minutes to be transferred. Because the transfer is slow, interferences from communications by other devices may interrupt the transfer of data between the connected devices. Further, due to the extended time of downloading large files, power consumption by the devices may be increased.
The present disclosure allows a device to increase the number of commands sent during the connection interval by sending large blocks of data using unreliable commands, such as write commands and notifications, to keep the radio buffer full, and therefore avoid, or reduces the chance of, losing control of the connection interval. Further, the present disclosure provides a sliding window protocol to cap the number of unreliable commands that have not been acknowledged in the network at any given time and to prevent a receiving device from discarding received commands. Moreover, the present disclosure increases the reliability of the system when unreliable commands are used for data transfers by sequentially numbering the unreliable commands, and providing a way to detect, notify, and resend unreliable commands that were discarded or lost.
In this exemplary process, the third wireless device 220 transmits unreliable commands, such as write commands WC 0-WC 5, in a sequential order to the fourth wireless device 240. An unreliable command may be any segment, such as a write command or a notification, that does not require an ACK. Further, an unreliable command may be any segment that does not need to be spaced from another segment due to IFS or need to wait for an ACK in response to the unreliable command. In this application, a write command may be an unreliable command transmitted by a transmitting device (e.g., third wireless device 220) and a notification may be an unreliable command transmitted by a receiving device (e.g., fourth wireless device 240). Further detail regarding segments is described below in reference to
In an embodiment, the third wireless device 220 may be limited to the number of unreliable commands to resend based on the predetermined number of unreliable commands allowed by the send window. For example, using the examples of FIGS. 3 and 4, because WC 0-WC 2 have been acknowledged by corresponding NT 0-NT 2, the third wireless device 220 may resend WC 3-WC 5 because of the out-of-order sequence described above and may also send WC 6-WC 8 as part of a burst transmission including WC 3-WC 5 to the fourth wireless device 240, based on the send window 310 being set to six. In other words, the fourth wireless device 240 may resend commands starting with the first WC that has not received a corresponding ACK (e.g., WC 3) and sends in sequence the next five WCs (e.g., WC 4-WC 8).
For any of the aspects described supra or infra, if more than one of the same unreliable commands (e.g., WC 2) are received by the receiving device, the receiving device may transmit notifications to acknowledge each of the commands, since the previous acknowledgement(s) may have not have been received by the transmitting device. Further, if more than one notification corresponding to the same unreliable command is received by the transmitting device, the transmitting device may ignore the duplicate notifications as the transmitting device has already marked the corresponding unreliable command as acknowledged.
The RWCP header 502 may include a command opcode field 510 and a sequence number field 512. The command opcode field 510 may indicate a type of segment being transmitted or received. In an example, if the RWCP header 502 is an octet, the command opcode field 510 may include two bits to indicate the segment type and the sequence number field 512 may include six bits for indicating the sequence number of the segment. For example, a transmitting device (e.g., the third wireless device 220) may generate a segment (e.g., a write command) having opcode bits of 00 that may indicate data being sent, opcode bits of 01 that may indicate a synchronization (SYN), or start a session, is being requested, or opcode bits of 10 that may indicate a reset (RST), or termination of a session, is being sent. In another example, a receiving device (e.g., the fourth wireless device 240) may generate a segment (e.g., a notification) having opcode bits of 00 that may indicate an ACK of data received, opcode bits of 01 that may indicate an ACK of a SYN received, opcode bits of 10 that may indicate an ACK of a RST received, or opcode bits of 11 that may indicate a gap, which indicates that the received segment was out-of-sequence.
The sequence number field 512 may indicate the sequence order of a current segment being transmitted, a segment being acknowledged, or a segment previously having been acknowledged. For example, for an opcode indicating a request for SYN, the sequence number field 512 may include sequence bits (e.g., 000001) to indicate the first sequence number, and, for an opcode indicating a ACK to a SYN, the sequence number field 512 may include sequence bits (e.g., 000001) corresponding to the SYN. As another example, for an opcode indicating a request for RST or an ACK for a RST, the sequence number field 512 may be null or blank. As another example, for an opcode indicating data is being transmitted, the sequence number field 512 may include sequence bits (e.g., 000100) indicating a current sequence number i, and for an opcode indicating a ACK to data being received, the sequence number field 512 may include sequence bits (e.g., 000100) indicating receipt of the data. As another example, for an opcode indicating a gap, the sequence number field 512 may include sequence bits (e.g., 000011) indicating the last sequence number of a segment that was received in order.
Based on the above description of the RWCP segment 500, the RWCP segment 500 may be bidirectional, meaning a transmitting device (e.g., third wireless device 220) and a receiving device (e.g., fourth wireless device 240) may transmit or receive write commands or notifications. In a first example, a transmitting device may use a write command to send data or send an ACK, and a receiving device may use a notification to send an ACK or send data, however, each segment (e.g., the write command or the notification) may only contain a data portion, or an ACK portion, but not both at the same time, as described above. However, one skilled in the art would recognize that the present application is not limited to this first example, and, in some embodiments, a segment (e.g., the write command or the notification) may include both a data portion and an ACK portion. In a second example, both the transmitting device and the receiving device may transmit and receive data and ACKs at the same time using the commands (e.g., WC and NT) available to them. In this example, a RWCP header may include first and second command opcode fields and first and second sequence number fields. The first command opcode field and the first sequence number field may correspond to data being transmitted by a device, and the second command opcode field and the second sequence number field may correspond to an ACK of data that was received by the device. By using the second example, both the transmitting device and the receiving device may use a same header format that is symmetrical for both devices.
The wireless device 602 may include a processor 604 which controls operation of the wireless device 602. The processor 604 may also be referred to as a central processing unit (CPU). Memory 606, which may include both read-only memory (ROM) and random access memory (RAM), may provide instructions and data to the processor 604. A portion of the memory 606 may also include non-volatile random access memory (NVRAM). The processor 604 typically performs logical and arithmetic operations based on program instructions stored within the memory 606. The instructions in the memory 606 may be executable (by the processor 604, for example) to implement the methods described herein.
The processor 604 may include or be a component of a processing system implemented with one or more processors. The one or more processors may be implemented with any combination of general-purpose microprocessors, microcontrollers, digital signal processors (DSPs), field programmable gate array (FPGAs), programmable logic devices (PLDs), controllers, state machines, gated logic, discrete hardware components, dedicated hardware finite state machines, or any other suitable entities that can perform calculations or other manipulations of information.
The processing system may also include machine-readable media for storing software. Software shall be construed broadly to mean any type of instructions, whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise. Instructions may include code (e.g., in source code format, binary code format, executable code format, or any other suitable format of code). The instructions, when executed by the one or more processors, cause the processing system to perform the various functions described herein.
The wireless device 602 may also include a housing 608, and the wireless device 602 may include a transmitter 610 and/or a receiver 612 to allow transmission and reception of data transmissions between the wireless device 602 and a remote device. The transmitter 610 and the receiver 612 may be combined into a transceiver 614. An antenna 616 may be attached to the housing 608 and electrically coupled to the transceiver 614. The wireless device 602 may also include multiple transmitters, multiple receivers, multiple transceivers, and/or multiple antennas.
The wireless device 602 may also include a signal detector 618 that may be used to detect and quantify the level of signals received by the transceiver 614 or the receiver 612. The signal detector 618 may detect such signals and quantify the detected signals based on total energy, energy per subcarrier per symbol, power spectral density, and other signal measurements. The wireless device 602 may also include a digital signal processor (DSP) 620 for use in processing signals. The DSP 620 may be configured to generate a packet for transmission. In some aspects, the packet may include a PPDU.
The wireless device 602 may further include a user interface 622 in some aspects. The user interface 622 may include a keypad, a microphone, a speaker, and/or a display. The user interface 622 may include any element or component that conveys information to a user of the wireless device 602 and/or receives input from the user.
When the wireless device 602 is implemented as a client or transmitting device, the wireless device 602 may also include a RWCP component 624 that may perform burst segment transmission with a remote device. In one configuration, the wireless device 602 may include means for transmitting a first set of segments of a plurality of segments to a second wireless device. Each of the segments of the first set of segments may be an unreliable command. In another configuration, the wireless device 602 may include means for determining whether a notification corresponding to one or more first segments of the first set of segments has been received from the second wireless device. In a further configuration, the wireless device 602 may include means for determining a second set of segments of the plurality of segments to be transmitted based on whether the notification has been received. In another configuration, the wireless device 602 may include means for transmitting the second set of segments to the second wireless device. In an example, each segment of the second set of segments may be an unreliable command.
In some aspects, the wireless device 602 may include means for sequentially numbering the plurality of segments. The first set of segments and the second set of segments may be transmitted in a sequential order based on the sequential numbering of the plurality of segments.
In some aspects, the means for generating the second set of segments may generate the second set of segments based on a send window. In an example, the means for generating the second set of segments may determine which of the one or more first segments in the first set of segments are within the send window and have not been acknowledged. In an example, the wireless device 602 may include means for varying a size of the send window based on communication congestion between the apparatus and the second wireless device
In some aspects, the means for determining whether a notification has been received may determine that no notification has been received. When no notification has been received, the means for generating the second set of segments may determine a segment that has not been previously acknowledged and is next in the sequential order to be acknowledged and may include the segment in the second set of segments.
In some aspects, the wireless device 602 may include means for verifying a content of the notification when determined that the notification has been received. In an example, the means for generating the second set of segments may generate the second set of segments based on the content of the notification.
In some aspects, the means for verifying the content of the notification may determine that the content of the notification includes an acknowledgment of the one or more first segments of the first set of segments received in the sequential order. In an example, based on the content of the notification, the means for generating the second set of segments may determine a segment that has not been previously transmitted and is next in the sequential order to be transmitted and may include the segment in the second set of segments
In some aspects, the means for verifying the content of the notification may determine that the content of the notification indicates that the one or more first segments of the first set of segments was received by the second wireless device out of sequence. In an example, based on the content of the notification, the means for generating the second set of segments may determine a segment that has not been previously acknowledged and is next in the sequential order to be acknowledged and may include the segment in the second set of segments.
In some aspects, the means for verifying the content of the notification may determine that the content of the notification indicates that one or more first segments of the first set of segments was not received by the second wireless device. In an example, based on the content of the notification, the means for generating the second set of segments may determine a segment that has not been previously acknowledged and is next in the sequential order to be acknowledged and may include the segment in the second set of segments.
In some aspects, the wireless device 602 may include means for storing the plurality of segments in a buffer of the transmitting device. The sequential order may be based on a sequential order of the plurality of segments in the buffer and the first set of segments and the second set of segments may be selected from the stored plurality of segments.
The various components of the wireless device 602 may be coupled together by a bus system 626. The bus system 626 may include a data bus, for example, as well as a power bus, a control signal bus, and a status signal bus in addition to the data bus. Components of the wireless device 602 may be coupled together or accept or provide inputs to each other using some other mechanism.
Although a number of separate components are illustrated in
At 710, the apparatus may transmit a first set of segments of a plurality of segments to a second wireless device. For example, referring to
At 715, the apparatus may determine whether a notification corresponding to one or more first segments of the first set of segments has been received from the second wireless device. For example, referring to
At 720, the apparatus may generate a second set of segments of the plurality of segments to be transmitted based on determining whether the notification has been received. In an example, each segment of the second set of segments may be an unreliable command. For example, as shown by
In some aspects, the second set of segments may be further generated based on a send window. For example, referring to
At 725, the apparatus may transmit the second set of segments to the second wireless device.
To initiate data transfer between two devices, the transmitting device (e.g., the third wireless device 220) may send an RWCP segment (e.g., 500) SYN to the receiving device (e.g., the fourth wireless device 240) and wait for acknowledgment. For example, referring to the above discussion of
The receiver 805, the processing system 810, the RWCP component 824, and/or the transmitter 815 may be configured to perform one or more functions discussed above with respect to blocks 705-725 of
The wireless device 902 may include a processor 904 which controls operation of the wireless device 902. The processor 904 may also be referred to as a central processing unit (CPU). Memory 906, which may include both read-only memory (ROM) and random access memory (RAM), may provide instructions and data to the processor 904. A portion of the memory 906 may also include non-volatile random access memory (NVRAM). The processor 904 typically performs logical and arithmetic operations based on program instructions stored within the memory 906. The instructions in the memory 906 may be executable (by the processor 904, for example) to implement the methods described herein.
The processor 904 may include or be a component of a processing system implemented with one or more processors. The one or more processors may be implemented with any combination of general-purpose microprocessors, microcontrollers, digital signal processors (DSPs), field programmable gate array (FPGAs), programmable logic devices (PLDs), controllers, state machines, gated logic, discrete hardware components, dedicated hardware finite state machines, or any other suitable entities that can perform calculations or other manipulations of information.
The processing system may also include machine-readable media for storing software. Software shall be construed broadly to mean any type of instructions, whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise. Instructions may include code (e.g., in source code format, binary code format, executable code format, or any other suitable format of code). The instructions, when executed by the one or more processors, cause the processing system to perform the various functions described herein.
The wireless device 902 may also include a housing 908, and the wireless device 902 may include a transmitter 910 and/or a receiver 912 to allow transmission and reception of data transmissions between the wireless device 902 and a remote device. The transmitter 910 and the receiver 912 may be combined into a transceiver 914. An antenna 916 may be attached to the housing 908 and electrically coupled to the transceiver 914. The wireless device 902 may also include multiple transmitters, multiple receivers, multiple transceivers, and/or multiple antennas.
The wireless device 902 may also include a signal detector 918 that may be used to detect and quantify the level of signals received by the transceiver 914 or the receiver 912. The signal detector 918 may detect such signals as total energy, energy per subcarrier per symbol, power spectral density, and other signals. The wireless device 902 may also include a digital signal processor (DSP) 920 for use in processing signals. The DSP 920 may be configured to generate a packet for transmission. In some aspects, the packet may comprise a PPDU.
The wireless device 902 may further include a user interface 922 in some aspects. The user interface 922 may comprise a keypad, a microphone, a speaker, and/or a display. The user interface 922 may include any element or component that conveys information to a user of the wireless device 902 and/or receives input from the user.
When the wireless device 902 is implemented as a server or receiving device, the wireless device 902 may also comprise a RWCP component 924 that may perform burst notification transmission with a remote device. In one configuration, the wireless device 902 may include means for receiving one or more segments from a first wireless device, wherein the one or more segments are unreliable commands. In another configuration, the wireless device 902 may include means for determining an order of receipt of the one or more segments. In another configuration, the wireless device 902 may include means for transmitting a notification to the first wireless device based on the determined order of receipt.
In some aspects, the means for determining the order of receipt is configured to determine whether there is a gap in the one or more segments based on an expected sequential order and a determined order of receipt. In some aspects, the notification may include an acknowledgment that the one or more segments were received in an expected sequential order. In some aspects, the notification may include an acknowledgment of a previously acknowledged segment to indicate that the one or more segments were not received in an expected sequential order.
The various components of the wireless device 902 may be coupled together by a bus system 926. The bus system 926 may include a data bus, for example, as well as a power bus, a control signal bus, and a status signal bus in addition to the data bus. Components of the wireless device 902 may be coupled together or accept or provide inputs to each other using some other mechanism.
Although a number of separate components are illustrated in
The receiver 1105, the processing system 1110, the RWCP component 1124, and/or the transmitter 1115 may be configured to perform one or more functions discussed above with respect to blocks 1005-1020 of
It is understood that the specific order or hierarchy of blocks in the processes/flowcharts disclosed is an illustration of exemplary approaches. Based upon design preferences, it is understood that the specific order or hierarchy of blocks in the processes/flowcharts may be rearranged. Further, some blocks may be combined or omitted. The accompanying method claims present elements of the various blocks in a sample order, and are not meant to be limited to the specific order or hierarchy presented.
The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects. Thus, the claims are not intended to be limited to the aspects shown herein, but is to be accorded the full scope consistent with the language claims, wherein reference to an element in the singular is not intended to mean “one and only one” unless specifically so stated, but rather “one or more.” The word “exemplary” is used herein to mean “serving as an example, instance, or illustration.” Any aspect described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects. Unless specifically stated otherwise, the term “some” refers to one or more. Combinations such as “at least one of A, B, or C,” “one or more of A, B, or C,” “at least one of A, B, and C,” “one or more of A, B, and C,” and “A, B, C, or any combination thereof” include any combination of A, B, and/or C, and may include multiples of A, multiples of B, or multiples of C. Specifically, combinations such as “at least one of A, B, or C,” “one or more of A, B, or C,” “at least one of A, B, and C,” “one or more of A, B, and C,” and “A, B, C, or any combination thereof” may be A only, B only, C only, A and B, A and C, B and C, or A and B and C, where any such combinations may contain one or more member or members of A, B, or C. All structural and functional equivalents to the elements of the various aspects described throughout this disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims. Moreover, nothing disclosed herein is intended to be dedicated to the public regardless of whether such disclosure is explicitly recited in the claims. The words “module,” “mechanism,” “element,” “device,” and the like may not be a substitute for the word “means.” As such, no claim element is to be construed as a means plus function unless the element is expressly recited using the phrase “means for.”
CROSS-REFERENCE TO RELATED APPLICATION(S) This application claims the benefit of U.S. Provisional Application Ser. No. 62/525,615, entitled “RELIABLE WRITE COMMAND PROTOCOL FOR BLUETOOTH LE ” and filed on Jun. 27, 2017, which is expressly incorporated by reference herein in its entirety.
Number | Date | Country | |
---|---|---|---|
62525615 | Jun 2017 | US |