Method of controlling communication of data packets of communication device and communication device
By introducing the second antenna module as an auxiliary reception channel in the communication device, the data packet loss problem during the switching of ZigBee stack and Bluetooth stack is solved, and zero loss reception of data packets of the two communication protocols is achieved, improving the user experience.
Patent Information
- Application Number
- CN202380048694.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-08-26
- Filing Date
- 2023-06-19
- Publication Date
- 2025-02-18
AI Technical Summary
In communication devices, dynamic switching between ZigBee stack and Bluetooth stack can lead to loss of data packets, resulting in poor user experience.
By introducing a second or slave antenna module in the communication device, as an auxiliary reception channel, data packets of communication protocols not currently received by the first antenna module are detected and received, thereby realizing zero loss reception of data packets of the two communication protocols.
It effectively prevents data packet loss due to communication protocol switching, ensures improvement of user experience, and realizes almost zero packet loss without complex hardware modification.
Smart Images

Figure CN119487756A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of network communications, and more particularly to a method and a communication device for controlling communication of data packets of a communication device. Background Art
[0002] The rapid development of IoT networks allows more and more electronic devices to access network connections. In order to enable network connections with electronic devices, device developers are faced with multiple choices from different wireless interfaces and corresponding communication protocols, each with different characteristics.
[0003] EP2258125A1 relates to dynamically allocating home link addresses and prefix indicators for a network using a mobile internet protocol (MIP). It discloses that a MIMO system uses multiple (NT) transmit antennas and multiple (NR) receive antennas for data transmission. A multiple access wireless communication system 900 includes multiple cells. Each cell includes a Node B, and the Node B includes multiple sectors. Multiple sectors can be formed by antenna groups, where each antenna is responsible for communicating with UEs in a portion of the cell.
[0004] As examples, WiFi allows high-speed video or data transmission, 802.15.4 with Zigbee or Thread is known to be suitable for low-power sensors, and Supports excellent peer-to-peer communications for audio or file transfer. Traditionally, devices operating on different communication protocols cannot interoperate, which causes great frustration to end users because it prevents them from fully enjoying the promise of seamless interactive devices.
[0005] The introduction of so-called combo chips that support multiple communication protocols simultaneously with a single chip provides a good solution to the above problems. Combo chips enable communication devices to support multiple communication protocols and allow developers to focus on their applications rather than inter-platform communication, thereby simplifying development and accelerating device time to market. For the end user, they can get simplified settings and seamless control of their smart devices.
[0006] In its operation, a communication device including a combo chip can communicate with other communication devices according to multiple communication protocols supported by the combo chip. The same antenna can be arranged to communicate data of two different communication protocols with the same frequency band, such as ZigBee and Bluetooth protocols. In this case, the communication according to, for example, the two communication protocols is performed in a time-sharing manner, that is, the device dynamically switches between the Zigbee mode and the Bluetooth mode in a time-sharing manner, alternately communicating Zigbee data and Bluetooth data.
[0007] The antenna of the communication device is connected to the combo chip via a common radio peripheral system, which includes a radio frequency RF front end and radio control. Through a radio controller, radio scheduler or radio manager, the radio part of the communication device switches between Bluetooth and Zigbee, allowing the Bluetooth stack and the ZigBee stack to run simultaneously on the same radio.
[0008] However, the dynamic switching of the ZigBee stack and the Bluetooth stack may cause some data packet loss during communication. As a result, some IoT communication devices may not operate as expected according to the communicated commands, resulting in a poor user experience.
[0009] Therefore, there is a real need for a method and a communication device for preventing data packet loss that occurs when a communication device switches between different communication protocols supported by a combo chip included in the communication device. Summary of the invention
[0010] In a first aspect of the present disclosure, a method for controlling communication of data packets of a communication device is provided, wherein the communication device supports at least a first communication protocol and a second communication protocol, and the communication device comprises a control module; a first antenna module and a second antenna module respectively and communicatively connected to the control module, wherein the first antenna module is configured to receive and / or transmit data packets, and the second antenna module is configured to only receive data packets, and the method is performed by the control module and comprises the steps of:
[0011] - controlling the first antenna module to operate alternately according to the first communication protocol and the second communication protocol by switching the first antenna module between operating according to the first communication protocol and operating according to the second communication protocol; and
[0012] - controlling the second antenna module to operate according to one of the first communication protocol and the second communication protocol, while the first antenna module
[0013] The present disclosure is based on the insight into data packet loss occurring in a communication device and adopts a combo chip supporting at least two communication protocols. As a result of switching a single first antenna module of the communication device between a first communication protocol and a second communication protocol, the loss can be effectively prevented by adopting a second or subordinate antenna module to supplement the single first antenna module.
[0014] A second or slave antenna module is employed that is connected to a control module, typically a software module running on a combo chipset, for establishing an auxiliary receive channel separate from the primary communication channel provided by the first antenna module.
[0015] Based on the solution of the present disclosure, when the first antenna module is dynamically switched between the first communication protocol and the second communication protocol, the auxiliary receiving channel provided by the second antenna module starts to work to detect and receive data packets of the communication protocol that the first antenna module is not currently receiving.
[0016] In a sense, the first antenna module and the second antenna module operate alternately or complementarily for communicating data packets of the first communication protocol and the second communication protocol. At any time, the data packets of each communication protocol in the communication protocol are received by the first antenna module or by the second antenna module. Therefore, it can effectively receive and retain the data packets of the two communication protocols, thereby achieving zero packet loss in the combo network.
[0017] Any potential packet losses that might occur can thus be prevented, since the data packets of the communication protocol that are not now received by the first antenna module are safely retained by the second antenna module.
[0018] Such a solution according to the present disclosure does not involve complex hardware modifications or additions to the communication device, because the first antenna module and the second antenna module can share the same radio system. Therefore, adding a receive-only antenna can achieve almost zero packet loss at a limited cost and without any wireless interference from the radio.
[0019] According to the present disclosure, the first antenna module is configured to receive and / or transmit data packets, and the second antenna module is configured to only receive data packets.
[0020] Since the second antenna module is configured to only receive data packets, only the auxiliary receiving channel needs to be designed for the second antenna module, which helps to keep the hardware structure of the communication device simple while meeting the requirement of keeping data packets of both the first communication protocol and the second communication protocol intact and completely received by the communication device.
[0021] In an example of the present disclosure, the first control step includes:
[0022] - According to a switching principle, the first antenna module is switched between the first communication protocol and the second communication protocol.
[0023] The switching between the first communication protocol and the second communication protocol is performed according to a switching principle. The switching principle described herein refers to a way of controlling the switching between communication protocols in terms of, for example, switching frequency, switching conditions, radio resource sharing, etc.
[0024] It will be explained in detail that the switching principle can be configured as required, and fixed or flexible time schemes can be combined to meet different requirements from users.
[0025] In an example of the present disclosure, the communication device further includes a first task scheduler arranged to control data communication performed through the first antenna module and a second task scheduler arranged to control data reception performed through the second antenna module, and the second control step includes:
[0026] - transmitting the current state of the protocol stack of one of the first communication protocol and the second communication protocol currently operated by the first antenna module, received from the first task scheduler, to the second task scheduler, and
[0027] - controlling the second task scheduler to operate a protocol stack of the other communication protocol of the first communication protocol and the second communication protocol.
[0028] Since the control module does not directly interact with the protocol stacks of the first communication protocol and the second communication protocol, the switching is actually achieved by the control module notifying the second task scheduler of the protocol stack currently operated by the first task scheduler, thereby allowing the second task scheduler to switch to operating the protocol stack not operated by the first task scheduler.
[0029] In combination with the above switching principle, in practice, the first task scheduler controls the switching principle between the protocol stacks. This is how the main processor of the communication device operates and does not require additional software updates to the general operating principle of the main processor.
[0030] In an example of the present disclosure, the controlling step includes:
[0031] - periodically switching the first antenna module between the first communication protocol and the second communication protocol.
[0032] The switching of the first antenna module between the first communication protocol and the second communication protocol can be performed according to a fixed schedule. That is, the first antenna module is configured to operate according to the first communication protocol during a first time period, and then operate according to the second communication protocol during a second time period.
[0033] Note that when the first antenna module switches between the first communication protocol and the second communication protocol, the second antenna module also switches between the first communication protocol and the second communication protocol in a relative manner.
[0034] The time period may be configured according to applications of the communication device operating based on the first communication protocol and the second communication protocol, thereby allowing different applications to operate in a manner most suitable for the application according to the supported communication protocols.
[0035] In an example of the present disclosure, the method further includes the steps of:
[0036] - In the event that the first antenna module is idle while the second antenna module is receiving a data packet, switching the first antenna module to operate according to the communication protocol of the data packet received by the second antenna module.
[0037] It is likely that no data packet is currently being received by the first antenna module, in which case when a data packet is received by the second antenna module, the first antenna module can be immediately switched to operate according to the communication protocol in which the second antenna module receives the data packet. This is particularly beneficial when the first antenna module is configured to operate according to one communication protocol for a significantly longer time than according to another communication protocol. The overall efficiency of data communications of the communication device is thereby improved.
[0038] In an example of the present disclosure, the switching step includes:
[0039] - receiving an indication of a priority for receiving the data packets by the second antenna module, and
[0040] - Based on the priority of the data packet received by the second antenna module, determining to switch the first antenna module to operate according to the communication protocol of the received data packet.
[0041] This allows the communication device to be switched between the first communication protocol and the second communication protocol according to a flexible schedule. Specifically, when a data packet is received via the second antenna module and it is determined that the data has a higher priority and the protocol stack corresponding to the communication protocol currently processed by the first antenna module is idle, the control module switches the first antenna module to operate according to the communication protocol of the received data packet, thereby allowing the received data packet to be processed immediately.
[0042] In an example of the present disclosure, the communication device includes a data buffer, wherein the data packets received by the second antenna module are stored in the data buffer, and the method further includes the following steps after the switching step:
[0043] - retrieve data packets from the data buffer, and
[0044] -Processing data packets.
[0045] The data packets received by the second antenna module are processed accordingly and any necessary subsequent actions or operations of the communication device may be performed accordingly, thereby preventing the user of the communication device from experiencing any degraded service.
[0046] In an example of the present disclosure, the first communication protocol includes ZigBee, and the second communication protocol includes Bluetooth, or vice versa.
[0047] IoT devices often operate according to both Zigbee and Bluetooth protocols. The described method can be advantageously used for such devices.
[0048] A second aspect of the present disclosure provides a communication device, the communication device is configured so that the communication of its data packets is controlled according to the first aspect of the present disclosure, the communication device supports at least a first communication protocol and a second communication protocol, the communication device comprises a control module; a first antenna module and a second antenna module respectively and communicatively connected to the control module, wherein the first antenna module is configured to receive and / or transmit data packets, and the second antenna module is configured to only receive data packets,
[0049] The control module is configured as follows:
[0050] - controlling the first antenna module to operate alternately according to the first communication protocol and the second communication protocol by switching the first antenna module between operating according to the first communication protocol and operating according to the second communication protocol; and
[0051] - controlling the second antenna module to operate according to one of the first communication protocol and the second communication protocol, while the first antenna module operates according to the other of the first communication protocol and the second communication protocol.
[0052] The data communication of such a communication device is controlled by using a second antenna module, which complements the first antenna module, achieving the above-mentioned beneficial advantages described in conjunction with the first aspect of the present disclosure.
[0053] In an example of the present disclosure, the control module is configured to:
[0054] - periodically switching the first antenna module between the first communication protocol and the second communication protocol, or
[0055] - In case the first antenna module is idle while the second antenna module is receiving a data packet, switching the first antenna module to operate according to the communication protocol of the data packet received by the second antenna module.
[0056] The communication device can switch between the first communication protocol and the second communication protocol according to a fixed or flexible schedule. In either case, data loss that may occur due to the switch is prevented, presenting an improved user experience.
[0057] In an example of the present disclosure, the communication device includes a data buffer, wherein the data packets received by the second antenna module are stored in the data buffer, and the control module is further configured to:
[0058] - retrieve data packets from the data buffer, and
[0059] -Processing data packets.
[0060] Data packets that may be lost are retained by the second antenna module and then processed in a timely manner, allowing the communication device to operate in accordance with all instructions and commands communicated to the communication device.
[0061] In an example of the present disclosure, the first communication protocol includes ZigBee and the second communication protocol includes Bluetooth, or vice versa.
[0062] A third aspect of the present disclosure provides a computer program product, which includes a computer-readable storage medium, the computer-readable storage medium storing instructions, and when the instructions are executed on at least one processor, the at least one processor executes the method according to the first aspect of the present disclosure.
[0063] The above and other features and advantages of the present disclosure can be best understood from the following description with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same parts or parts that perform the same or similar functions or operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a block diagram schematically illustrating a communication device for controlling data packet communication according to the present disclosure.
[0065] Figure 2 Exemplary operation schemes of the first antenna module and the second antenna module according to the present disclosure are schematically illustrated.
[0066] Figure 3 The system diagram schematically illustrates Figure 1 A control diagram for data packet communication of a communication device.
[0067] Figure 4 Embodiments of a method of controlling data packet communication according to the present disclosure are schematically illustrated in a flowchart type diagram.
[0068] Figure 5 Schematically illustrates Figure 4 An alternative embodiment of the embodiment of .
[0069] Figure 6 An embodiment of a method of controlling data packet communication according to the present disclosure is schematically illustrated in a protocol diagram. DETAILED DESCRIPTION
[0070] Embodiments contemplated by the present disclosure will now be described in more detail with reference to the accompanying drawings. The disclosed subject matter should not be construed as being limited to the embodiments set forth herein. Instead, the illustrated embodiments are provided by way of example to convey the scope of the subject matter to those skilled in the art.
[0071] The inventive concepts of the present disclosure will be described with reference to an exemplary network including a communication device configured to operate simultaneously according to the Bluetooth and ZigBee protocols via a combo chipset supporting both protocols and a single antenna configured to communicate data for both protocols. However, a skilled person will appreciate that the principles described herein are also applicable to other combo networks in which the communication device includes a single chip that supports two or more communication protocols using a single antenna.
[0072] The antenna module as used herein may be configured to include suitable hardware, logic, circuit devices and / or codes, which may be adapted to communicate data packets of one or more communication protocols. The antenna module may therefore be understood to include an antenna and related intelligent control devices, a radio front-end module arranged to perform preliminary processing on the signal received by the antenna, a radio frequency RF transceiver module arranged to process the RF signal transmitted and / or received by the antenna, and a baseband module arranged to process the baseband signal transmitted to or received from the RF transceiver.
[0073] In this sense, an antenna module operating according to a communication protocol is to be understood as an antenna of the antenna module which receives and transmits signals, the signals comprising data packets of the communication protocol.
[0074] For a combo network, each communication device or terminal device operates according to or switches between two (or more) communication protocols by using a combo chip, also known as a processor or microcontroller. The processor supports two communication protocols designed for the same frequency band, such as the ZigBee protocol and the Bluetooth protocol.
[0075] Each communication device includes an antenna module that is communicatively connected to the processor and is used to transmit and receive, for example, two communication protocols supported by the processor. The antenna module may include suitable hardware that may be adapted to provide transmission and reception of, for example, Bluetooth and ZigBee communications.
[0076] When a communication device dynamically switches between the Zigbee protocol stack and the Bluetooth protocol stack, some data packets may be lost during communication. Therefore, the device cannot operate according to the commands or instructions transmitted via the lost data packets, which will result in a poor user experience.
[0077] In order to prevent packet loss of communication devices in a combo network, the present disclosure proposes to employ a second antenna or a slave antenna to supplement a primary antenna for data communication.
[0078] According to the present disclosure, a communication device that supports two or more communication protocols through a combo chip supports two or more communication protocols, and a single first antenna is provided with a second antenna. The first antenna and the second antenna are both connected to the same RF transceiver, and the RF transceiver is arranged to control the signal transmission and reception of the first antenna and the second antenna.
[0079] The data received by both the first antenna and the second antenna are processed by an RF transceiver, for example, an off-the-shelf RF transceiver chip. The received and processed data are then sent to the main processor of the communication device, which is a combo chip.
[0080] The RF transceiver is controlled by the host processor, for example, by configuration data written to registers of the RF transceiver chip, to switch between the first and second protocols, thereby allowing the first and second antennas to receive data of the first and second protocols.
[0081] The switching of the communication device between operating according to the first communication protocol and the second communication protocol is achieved by scheduling the operating system of the communication device to switch between the first communication stack and the second communication stack. Such switching is beyond the scope of the present disclosure and will not be described in detail herein.
[0082] The present disclosure thus proposes a communication device operative to switch between two communication protocols, the communication device utilizing a first antenna and a second antenna to prevent possible packet loss of one of the communication protocols, for example due to the device operating according to one protocol for a long time.
[0083] Figure 1 is a block diagram schematically illustrating a communication device 10 for controlling data packet communication according to the present disclosure. The communication device 10 includes a combo chip or processor 11 supporting at least two communication protocols and a first antenna module or primary antenna module or master antenna module and a second antenna module or slave antenna module.
[0084] Two or more of the supported communication protocols are designed for the same frequency band, and both the first antenna module and the second antenna module operate within the frequency band.
[0085] The communication device may include other antennas operating in other frequency bands supported by the communication device. This is beyond the scope of the disclosed subject matter and is not described herein.
[0086] The first antenna module is shown to include a first antenna 12 and an exemplary Belle filter module 14 and a radio baseband module 15. The second antenna module is shown to include a second antenna 13 and a Belle filter module 14 and a radio baseband module 15.
[0087] Those skilled in the art will appreciate that the radio baseband module 15 is described for illustrative purposes only, and the present disclosure is not limited to the described structure and configuration. The radio baseband module 15 may be configured to include suitable logic, circuit devices and / or codes, which may be adapted to process data packets of the communication protocol supported by the processor 11.
[0088] The first antenna 12 and the second antenna 13 are connected to a radio baseband module 15 via respective Belle filter modules 14 , thereby connecting the antennas 12 and 13 to the processor 11 .
[0089] The radio baseband module 15 comprises a radio transceiver including a frequency synthesizer 151 as well as a power amplifier 152 for the transmission branch and a low noise amplifier 153 for the reception branch, a mixer 154 and an analog-to-digital converter 155 .
[0090] A separate reception branch is also constructed for the second antenna or slave antenna 13 via a low noise amplifier 156 , a mixer 157 and an analog-to-digital converter 158 .
[0091] The radio baseband module 15 also includes a baseband module including a modulator 161 for modulating a baseband signal into an RF signal and a demodulator 162 for demodulating the signal processed by the receiving branch to retrieve the baseband signal to be subsequently processed.
[0092] The radio baseband module 15 is illustrated as including a control portion 17 configured to process data packets received or transmitted via the first antenna 12 and the second antenna 13 .
[0093] The control portion 17 is connected to a storage device 18 which includes or is communicatively connected to the radio baseband module 15 and is configured to store data packets transmitted or received via the antennas 12 and 13 .
[0094] The interface 19 enables the radio baseband module 15 to be connected to a processor 11 supporting two or more communication protocols, two of which may be processed via a single antenna, such as the first antenna 12 and the second antenna 13 .
[0095] The above describes the main components or parts of the communication device 10. Those skilled in the art will appreciate that those parts or blocks are described for illustration and illustrative purposes only, and the present disclosure is not limited to the details described. Instead, the functional blocks described can be implemented with any suitable logic, circuitry and / or code known to the skilled person to implement the described functions.
[0096] As can be seen from the above architectural overview, the first antenna module is configured to handle both data transmission and data reception. The data to be transmitted is sent from the processor 11 to the control part 17 via the interface 19, which will call certain APIs to perform data transmission via the first antenna 12. The data is then processed by the modulator 161 and further processed by the frequency synthesizer 151. Thereafter, the data is processed by the power amplifier 152 and then prepared for transmission by the first antenna 12.
[0097] An automatic gain controller, ie, AGC 163 controls the gain factor based on input signal detection.
[0098] In addition, the first antenna 12 and the second antenna 13 are both configured to receive data. The received data is then processed by low noise amplifiers 153, 156 and analog-to-digital converters 155, 158 to obtain valid data. These data are processed by a demodulator 162 and fed to a control section 17. The control section can determine whether the data is from the first antenna 12 or the second antenna 13. The data from the second antenna 13 is stored in a storage device 18 for further processing.
[0099] Figure 2 An exemplary operation scheme of the first antenna module and the second antenna module according to the present disclosure is schematically illustrated. The first antenna module and the second antenna module are arranged to communicate signals within a frequency range of, for example, Bluetooth and Zigbee protocols.
[0100] The first antenna module Ant1 is controlled by the operating system or control module of the communication device to receive and transmit data packets of the Bluetooth and Zigbee protocols in a time-alternating manner. Figure 2 As can be seen in FIG. 1 , at time period P1 111, the first antenna module Ant1 is operated to receive and / or transmit Bluetooth data packets, and at the next time period P2 112, the first antenna module Ant1 is operated to receive and / or transmit Zigbee data packets. The first antenna module Ant1 switches back to receiving and / or transmitting Bluetooth data packets at time period P3 113, and so on.
[0101] Meanwhile, the second antenna module Ant2 operates under the control of the operating system or control module of the communication device to supplement the operation of the first antenna module Ant1 and detect and receive data packets of a protocol not currently processed by the first antenna module.
[0102] refer to Figure 2, at time period P1 111, if any data packet of the Zigbee protocol is detected, the second antenna module Ant2 operates to detect and receive the Zigbee data packet. At the next time period P2 112, the second antenna module Ant2 operates to receive the Bluetooth data packet. The second antenna module Ant2 switches back to receiving the Zigbee data packet at time period P3 113, and so on.
[0103] As can be seen from the above, the communication device, in particular the first antenna module and the second antenna module, is controlled in a first time period so that data packets of a first communication protocol are communicated, that is, received and transmitted via the first antenna module, and if data packets of a second communication protocol are detected, the data packets of the second communication protocol are received by the second antenna module.
[0104] The protocol stack and other related processing parts, such as the baseband and transceiver parts, are then switched so that in a second time period after the switching, data packets of the second communication protocol are communicated via the first antenna module, and if data packets of the first communication protocol are detected, the data packets of the first communication protocol are received by the second antenna.
[0105] From the perspective of the communication device, it operates alternately according to the first communication protocol and the second communication protocol in a time-sharing manner. During any time period during which data packets of the first communication protocol are communicated via the first antenna module, the second antenna module supplementarily monitors and receives any data packets of the second communication protocol, and vice versa. This thereby avoids any data packet loss of the first communication protocol or the second communication protocol.
[0106] Hereinafter, the control of data packet communication by the communication device 10 will be described in detail from a system perspective.
[0107] Figure 3 The system diagram schematically illustrates Figure 1 Figure 20 shows control of data packet communication by a communication device.
[0108] From communication equipment, such as Figure 1 From a system perspective of the communication device shown, application software 21 that handles system functions runs on a control module or operating system, ie, OS 22, of the communication device.
[0109] The application software 21 may generate data to be communicated to other communication devices in the network or to a remotely located management device or server device through the communication device 10. In addition, data or messages received from other communication devices or management devices or server devices are processed by the application software 21. Such data is exchanged between the application software 21 and the control module 22.
[0110] The control module or OS 22 is responsible for the message transmission between different tasks and schedules the task operations for the Zigbee stack and the Bluetooth stack according to the program cycle and trigger events.
[0111] In order to realize the dual antenna module configuration as described above, the control module 22 controls the main task 221 and the receiving Rx task 222, the main task 221 is configured to control data communication via the main antenna module or the first antenna module, and the receiving Rx task 222 is configured to control data reception via the slave antenna module or the second antenna module.
[0112] The main task 221 processes the message transmission and reception of the first antenna module. The main task 221 can process, for example, a Zigbee stack, a Bluetooth stack or other wireless stacks, and determine the switching principle between different protocol stacks.
[0113] A switching principle is described herein to refer to the way of controlling switching between communication protocols, in particular switching between different protocol stacks, in terms of, for example, switching frequency, switching conditions, radio resource sharing, etc.
[0114] The Rx task 222 processes the Zigbee and Bluetooth messages received by the slave antenna module. For simplicity, the Rx task 222 is configured to support only the Zigbee and Bluetooth stacks, and not other wireless stacks.
[0115] Both the main task 221 and the Rx task 222 may access a storage device such as a data buffer 23 to store received data. The storage device 23 may be internal to a processor of the communication device, or communicatively connected to the communication device.
[0116] In the operation of a communication device supporting two or more protocols, switching between a first protocol, such as a ZigBee protocol, and a second protocol, such as a Bluetooth protocol, is typically viewed as handling switching of data packets of each protocol between a ZigBee stack 241 and a Bluetooth stack 242 under the control of a main task 221 and an Rx task 222.
[0117] Although the main task 221 and the Rx task 222 Figure 2 24 and 243. In the diagram, it is depicted as controlling a separate ZigBee stack 241 and Bluetooth stack 242, but this is for convenience only and the skilled person will understand that there is one protocol stack for each protocol.
[0118] In the event that the processor of the communication device further supports other wireless protocols, messages or data of these protocols are processed via other wireless stacks 243. This is beyond the scope of the present disclosure and is not discussed herein.
[0119] The switching principles and configuration data determined by the main task 221 and the Rx task 222 are passed to the radio controller 25. The radio controller 25 controls the message routing for the Zigbee or Bluetooth stack. Additionally, if other wireless stacks, such as Wi-Fi protocols or proprietary protocols are used, the messages can bypass the radio controller 25 and exchange directly with other communication devices.
[0120] The radio controller 25 is configured to coordinate with the Zigbee and Bluetooth stacks to control the RF portion of the communication device to route corresponding data packets to the first antenna 27 or the second antenna 28 via the hardware adaptation layer 26. The hardware adaptation layer 26 contains a hardware driver for using the first antenna 27.
[0121] For the second antenna 28, the radio controller 25 and the hardware adaptation layer 26 have the same functions as the first antenna 27. After the message is received via the second antenna 28, the Rx task 222 stores the message in the data buffer 23.
[0122] The Rx task 222 then transmits an indication to the control module 22 that the message was received by the slave antenna. The control module 22 will notify the master task 221 of the retrieved message and process the same message in the same manner as if the message was received via the first antenna.
[0123] In the following, reference Figure 4 Controlling the communication of data packets by means of a communication device 10 is described, Figure 4 An embodiment of a method of controlling data packet communication of a communication device according to the present disclosure is schematically illustrated in a flowchart-type diagram.
[0124] As a preparatory step, a combo network is formed in which all nodes support both Zigbee and Bluetooth protocols. For each communication device, the Zigbee stack and the Bluetooth stack dynamically switch between each other to take over the system, allowing the communication device to communicate data packets alternately or in a time-sharing manner according to the ZigBee protocol and the Bluetooth protocol.
[0125] Those skilled in the art will appreciate that switching between the Zigbee stack and the Bluetooth stack may be configured based on the requirements of a specific application.
[0126] After the combo network is formed, each communication device starts operating and according to the following conditions: Figure 2 The predefined schedule shown switches between the Zigbee and Bluetooth stacks. That is, each communication device operates according to the Zigbee protocol in a first time period and then switches to operating according to the Bluetooth protocol in a second time period, and so on. The process repeats over time.
[0127] The ratio between the first time period of the first protocol and the second time period of the second protocol may be configured by application software and different software may configure the ratio in different ways.
[0128] In the example of the present disclosure, the Zigbee stack is configured to occupy more time than the Bluetooth stack, which means that the combo network mainly works in Zigbee mode.
[0129] It is discussed that the first antenna is configured to handle message transmission and reception for Zigbee and Bluetooth packets, while the second antenna is configured to only receive messages without transmitting.
[0130] When switching between the Zigbee stack and the Bluetooth stack, the main task 221 will inform the Rx task 222 of the current stack state via the control module 22. The Rx task 222 will then switch the stack accordingly.
[0131] At step 31, the communication device operates in ZigBee mode and data packets of the ZigBee protocol are communicated via the first antenna. Simultaneously, the second antenna is used to monitor Bluetooth data packets.
[0132] If any valid Bluetooth packet in the operating channel is detected by the second antenna, then at step 32 the Rx task will receive the Bluetooth packet, decode the packet and store the data in the data buffer.
[0133] When a Bluetooth packet is received, an indication that Bluetooth data has been received is transmitted from the Rx task to the main task via the control module at step 33. When the main task switches to operating the Bluetooth stack, the Bluetooth data packet will be processed by the main task.
[0134] The communication device operates in Zigbee for a specified period of time. When the period of time expires, at step 34, the control module controls the switching between the Zigbee stack and the Bluetooth stack.
[0135] The switching is described as procedural steps for easy understanding of the present disclosure.
[0136] At step 35, the communication device operates in Bluetooth mode and data packets of the Bluetooth protocol are communicated via the first antenna. Simultaneously, the second antenna is used to monitor the operating channel for Zigbee data packets.
[0137] In the same way, the Zigbee packets received by the second antenna at step 36 are decoded and stored in the data buffer. The instruction is sent to the main task by means of the control module. Therefore, when the main task operates the Zigbee stack, the Zigbee packets in the data buffer can be processed by the main task. For simplicity, this is Figure 4are not shown as separate steps.
[0138] At step 36, when the time period for operating the Bluetooth protocol expires, the control module controls switching again between the Zigbee stack and the Bluetooth stack. The process then returns to step 31 and the steps repeat over time.
[0139] Whenever a switch between the Zigbee and Bluetooth stacks occurs, the data buffer is cleared.
[0140] The cycle period of Zigbee and Bluetooth is determined by the application software and can be configured as needed. The radio controller will then route packet transmission and reception for the Zigbee or Bluetooth stack. Moreover, the ratio of Zigbee and Bluetooth in the working circle is related to the task type and can also be configured.
[0141] Those skilled in the art can envision that the above process is applicable in the same manner to a first antenna operating in Bluetooth mode, and a second antenna receiving a Zigbee packet and then switching to Zigbee mode.
[0142] In the above process, the switching of the operating mode occurs when the first time period expires. The switching may also be performed according to the operating state of the protocol stack.
[0143] Figure 5 An alternative embodiment of a method of controlling data packet communication according to the present disclosure is schematically illustrated in a flow chart type diagram.In this embodiment, switching is performed according to a flexible schedule.
[0144] Steps 41 to 43 and 45 to 46 are the same as Figure 3 Steps 31 to 33 and 35 to 36 of are identical, whereas the switching at steps 44 and 46 is performed in a different manner. According to this embodiment, the switching occurs when a data packet is received by the second antenna and the protocol stack processing the data packet for the first antenna is idle.
[0145] Specifically, the indication transmitted from the Rx task to the main task via the control module includes information indicating the priority of the data received via the Rx task. After receiving the indication from the Rx task, the main task will analyze the Bluetooth packet type and determine whether it needs to switch to the Bluetooth stack immediately.
[0146] If the Zigbee stack is still in the process of Zigbee packet processing, the master task will not switch. If the Zigbee stack is idle, the master task can command the radio controller to switch to the Bluetooth stack immediately.
[0147] Then, the Bluetooth packet received by the second antenna will be combined with the data packet received by the first antenna. If the Bluetooth stack cannot be switched immediately, the second antenna can continuously store valid Zigbee packets in the data buffer to wait for the main task to process.
[0148] The above-mentioned fixed or flexible switching schemes can be advantageously combined with the general switching principles described above to meet the different requirements of different applicants.
[0149] In order to better understand the present disclosure, reference will be made to Figure 6 The protocol type diagram shown is used to describe the above process.
[0150] At 501, the main task operates the Zigbee stack so that the first antenna is operated for communicating Zigbee messages. Simultaneously with 502, the Rx task operates the Bluetooth stack so that the second antenna is operated for detected Bluetooth data.
[0151] When the Bluetooth data packet is detected and received by the second antenna at 503, the Rx task transmits an indication to the control module indicating that the Bluetooth data is received at 504. The Rx task also stores the received Bluetooth data packet at the data buffer.
[0152] At 505, the control module transmits the instruction to the master task. At 506, the control module switches the Zigbee and Bluetooth stacks. Note that the switch can occur when the first time period expires, or when the master task determines that it will switch to the Bluetooth stack immediately. The detailed process is referred to above. Figure 4 to describe and will not be repeated here.
[0153] At 507, the main task operates the Bluetooth stack so that the first antenna is operated for communicating Bluetooth messages. Simultaneously with 508, the Rx task operates the Zigbee stack so that the second antenna is operated for the detected Zigbee data.
[0154] When the Zigbee data packet is detected and received by the second antenna at 509, the Rx task transmits an indication to the control module indicating that the Zigbee data packet is received at 510. The Rx task also stores the received data packet at the data buffer.
[0155] At 511, the control module transmits the instruction to the main task. At 512, the control module switches the Zigbee and Bluetooth stacks.
[0156] Thereafter, the main task operates the Zigbee stack as at 501, and the process repeats and continues as described above.
[0157] The present disclosure is not limited to the examples disclosed above and may be modified and enhanced by those skilled in the art outside the scope of the present disclosure disclosed in the appended claims without applying creative skills, and used in any data communication, data exchange and data processing environment, system or network.
Claims
1. A method for controlling communication of data packets of a communication device (10), the communication device (10) supporting at least a first communication protocol and a second communication protocol, the communication device comprising: Control module (11); A first antenna module (Ant1) and a second antenna module (Ant2), the first antenna module and the second antenna module are respectively and communicatively connected to the control module (11), wherein the first antenna module (Ant1) is configured to receive and / or transmit data packets, and the second antenna module (Ant2) is configured to only receive data packets, the method being performed by the control module (11) and comprising the following steps: - controlling the first antenna module (Ant1) to operate alternately according to the first communication protocol and the second communication protocol by switching the first antenna module (Ant1) between operating according to the first communication protocol and operating according to the second communication protocol; as well as - controlling the second antenna module (Ant2) to operate according to one of the first communication protocol and the second communication protocol, while the first antenna module (Ant1) operates according to the other of the first communication protocol and the second communication protocol.
2. The method according to claim 1, wherein the first controlling step comprises: - According to a switching principle, switching the first antenna module (Ant1) between the first communication protocol and the second communication protocol.
3. The method according to claim 1 or 2, wherein the communication device (10) further comprises a first task scheduler and a second task scheduler, the first task scheduler being arranged to control data communication performed through the first antenna module (Ant1), the second task scheduler being arranged to control data reception performed through the second antenna module (Ant2), the second control step comprising: - transmitting the current state of the protocol stack of one of the first communication protocol and the second communication protocol currently operated by the first antenna module (Ant1) received from the first task scheduler to the second task scheduler, and - controlling the second task scheduler to operate a protocol stack according to the other of the first communication protocol and the second communication protocol.
4. The method according to claim 1 or 2, further comprising the steps of: - periodically switching said first antenna module (Ant1) between operating according to said first communication protocol and operating according to said second communication protocol.
5. The method according to claim 1 or 2, further comprising the steps of: - In the case where the first antenna module (Ant1) is idle while the second antenna module (Ant2) is receiving a data packet, switching the first antenna module (Ant1) to operate according to the communication protocol of the data packet received by the second antenna module (Ant2).
6. The method according to claim 1 or 2, wherein the switching step comprises: - receiving an indication representative of the priority of the data packets received by said second antenna module (Ant2), and - based on the priority of the data packet received by the second antenna module (Ant2), determining to switch the first antenna module (Ant1) to operate according to the communication protocol of the received data packet.
7. The method according to claim 5 or 6, wherein the communication device (10) comprises a data buffer (23), wherein the data packets received by the second antenna module (Ant2) are stored in the data buffer (23), wherein the method further comprises the following steps after the switching step: - retrieving data packets from said data buffer (23), and - processing said data packets.
8. The method according to claim 2, wherein the data buffer (23) is cleared after the switching step.
9. The method according to claim 1 or 2, wherein the first communication protocol comprises ZigBee and the second communication protocol comprises Bluetooth, or the first communication protocol comprises Bluetooth and the second communication protocol comprises ZigBee.
10. A communication device (10), the communication device (10) being configured such that communication of its data packets is controlled according to the method of any one of the preceding claims 1 to 9, the communication device (10) supporting at least a first communication protocol and a second communication protocol, the communication device (10) comprising: Control module (11); a first antenna module (Ant1) and a second antenna module (Ant2), the first antenna module and the second antenna module being respectively and communicatively connected to the control module (11), wherein the first antenna module (Ant1) is configured to receive and / or transmit data packets, and the second antenna module (Ant2) is configured to only receive data packets, The control module (11) is configured as follows: - controlling the first antenna module (Ant1) to operate alternately according to the first communication protocol and the second communication protocol by switching the first antenna module (Ant1) between operating according to the first communication protocol and operating according to the second communication protocol; as well as The second antenna module (Ant2) is controlled to operate according to one of the first communication protocol and the second communication protocol, while the first antenna module (Ant1) is controlled to operate according to the other of the first communication protocol and the second communication protocol.
11. The communication device (10) according to claim 10, wherein the control module is configured to: - periodically switching the first antenna module (Ant1) between the first communication protocol and the second communication protocol, or - In the case where the first antenna module (Ant1) is idle while the second antenna module (Ant2) is receiving a data packet, switching the first antenna module (Ant1) to operate according to the communication protocol of the data packet received by the second antenna module (Ant2).
12. The communication device (10) according to claim 10 or 11, wherein the communication device (10) comprises a data buffer (23), wherein the data packets received by the second antenna module (Ant2) are stored in the data buffer (23), and the control module (11) is further configured to: - retrieving data packets from said data buffer (23), and - processing said data packets.
13. The communication device (10) according to claim 10 or 11, wherein the first communication protocol comprises ZigBee and the second communication protocol comprises Bluetooth, or the first communication protocol comprises Bluetooth and the second communication protocol comprises ZigBee.
14. A computer program product, comprising a computer-readable storage medium storing instructions which, when executed on at least one processor, cause the at least one processor to perform the method according to any one of the preceding claims 1 to 9.