CN109474969B - Hybrid communication method and system based on IEEE802.15.4 and Bluetooth low energy protocol stack - Google Patents

Hybrid communication method and system based on IEEE802.15.4 and Bluetooth low energy protocol stack Download PDF

Info

Publication number
CN109474969B
CN109474969B CN201811552624.9A CN201811552624A CN109474969B CN 109474969 B CN109474969 B CN 109474969B CN 201811552624 A CN201811552624 A CN 201811552624A CN 109474969 B CN109474969 B CN 109474969B
Authority
CN
China
Prior art keywords
protocol stack
ble
bluetooth
transmission
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811552624.9A
Other languages
Chinese (zh)
Other versions
CN109474969A (en
Inventor
李波
燕元超
高卉
石文斌
刘长浩
聂兰顺
杨松贵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suxin Iot Solutions Nanjing Co ltd
Original Assignee
Suxin Iot Solutions Nanjing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suxin Iot Solutions Nanjing Co ltd filed Critical Suxin Iot Solutions Nanjing Co ltd
Priority to CN201811552624.9A priority Critical patent/CN109474969B/en
Publication of CN109474969A publication Critical patent/CN109474969A/en
Application granted granted Critical
Publication of CN109474969B publication Critical patent/CN109474969B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0248Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal dependent on the time of the day, e.g. according to expected transmission activity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/12Wireless traffic scheduling
    • H04W72/1215Wireless traffic scheduling for collaboration of different radio technologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention provides a hybrid communication method and a system based on IEEE802.15.4 and low-power-consumption Bluetooth dual protocol stacks, wherein IEEE802.15.4 is used for communication when low-power-consumption communication is required, Bluetooth with low power consumption is switched to for communication when large data volume communication is required, sensing equipment is in an 802.15.4 transmission mode by default, and whether Bluetooth data is transmitted or not is intercepted by periodically switching from IEEE802.15.4 to Bluetooth with low power consumption. When finding that the Bluetooth data is transmitted, the sensing equipment is kept in a BLE transmission mode, establishes connection with the Bluetooth equipment and transmits data, and immediately switches back to an 802.15.4 transmission mode after the transmission is finished. The invention provides a novel dual-protocol-stack hybrid communication method, which integrates two protocol stacks of IEEE802.15.4 and Bluetooth with low power consumption on the limited central processing unit and storage resources, can realize stable switching, has the advantages of low power consumption communication and high-speed communication, increases the transmission rate to 1Mbps at most, realizes the reliable transmission of large data volume in IEEE802.15.4 equipment, and obviously improves the characteristics of communication bandwidth, stability and energy consumption.

Description

Hybrid communication method and system based on IEEE802.15.4 and Bluetooth low energy protocol stack
Technical Field
The invention relates to the technical field of wireless communication, in particular to a hybrid communication method and a system based on IEEE802.15.4 and low-power Bluetooth dual protocol stacks.
Background
With the rapid development of communication technology, the demand for communication within a range of several meters near a person himself has been raised, and thus the concepts of Personal Area Network (PAN) and Wireless Personal Area Network (WPAN) have emerged. WPAN networks establish wireless connections for devices within a short range, connecting multiple devices within a range of several meters together in a wireless manner, so that they can communicate with each other and even access the LAN or the Internet.
IEEE802.15.4 introduction
IEEE802.15.4 is the basis of specifications such as ZigBee, WirelessHART, MiWi, etc., describes the physical layer and media access control protocol of a low-rate wireless personal area network, and belongs to the IEEE802.15 working group. The data transmission rate can reach up to 250kbps in an ISM frequency band of 868/915M and 2.4 GHz. The advantages of low power consumption and low cost make it widely used in many fields.
An IEEE802.15.4 network refers to a collection of devices that use the same wireless channel within one POS and communicate with each other through the IEEE802.15.4 standard, also known as an LR-WPAN network. In this network, full-function devices (FFDs) and reduced-function devices (RFDs) may be classified according to communication capabilities of the devices. Communication is possible between the FFD devices and the RFD devices. The RFD devices can not directly communicate with each other, only can communicate with the FFD device, or forward data outwards through one FFD device. This FFD device associated with the RFD is referred to as the coordinator (coordinator) of the RFD. The RFD device is mainly used for simple control applications, such as a lamp switch, a passive infrared sensor, and the like, and has a small amount of transmitted data and occupies little transmission resources and communication resources, so that the RFD device can adopt a very cheap implementation scheme.
The 802.15.4 protocol stack based on the real-time operating system is composed of an application layer, a transport layer, a network layer, a 6LoWPAN layer, a MAC layer, an RDC layer and a physical layer, as shown in FIG. 1.
The application layer is positioned at the topmost layer, has the function of processing, and can calculate, process and mine knowledge of data collected by the sensing layer, so that real-time control, accurate management and scientific decision of the physical world are realized.
The low-power-consumption lossy Routing Protocol (RPL) is a routing protocol specially designed for the sensor network, and can realize ad hoc networking between sensor nodes. Each node sends a data packet dedicated to networking for communication between the nodes, and the optimal path is determined through an elaborate algorithm design. In addition, when the network is changed or crashed, corresponding local repair and global repair mechanisms exist.
The transmission control protocol/user datagram protocol (TCP/UDP) implements the network transport layer protocols TCP and UDP protocols as in the conventional internet.
Network control message protocol (ICMP): the RPL layer sends information with the ICMPv6 protocol header added.
Internet protocol version 6 (IPv 6): by using the IP protocol stack of the traditional Internet for reference, a light IP protocol stack is realized, only a memory of a few kB is occupied, and the method is very suitable for running on an embedded microcontroller with limited memory. And meanwhile, an IPV6 address architecture is realized, and as the number of IPV4 addresses is less and less, the IPV6 is a future trend.
The IPv 6-based low power wireless personal area network protocol (6LoWPAN) functions to compress headers of network layer packets, reduce the amount of data to be transmitted, and packetize data of the network layer. Because the 802.15.4 transmission mode has limited bandwidth and unstable wireless transmission, the smaller the transmission data amount is, the better the transmission data amount is, and therefore, the longer the header of the network layer data packet needs to be compressed. The maximum number of bytes of each transmission of 802.15.4 is 127, and when the data volume is larger than 127, packetization is required.
The Media Access Control (MAC) layer adopts CSMA/CA protocol to realize carrier wave monitoring multiple access and conflict avoidance, and when wireless data conflicts or can not be normally transmitted to a target node due to wireless interference, a retransmission mechanism is adopted to ensure the stability of data transmission.
Wireless periodic sleep (RDC): the periodic dormancy of the nodes is realized, and the low-power operation is ensured.
The physical layer (PHY) employs the low power consumption, low rate wireless standard IEEE 802.15.4.
Bluetooth Low energy introduction
Bluetooth Low Energy (Bluetooth Low Energy): the wireless communication system is a wireless technology standard, and can realize short-distance data exchange (using UHF radio waves of ISM wave band of 2.4-2.485 GHz) among fixed equipment, mobile equipment and a building personal area network.
The BLE frequency range is 2400 MHz-2480 MHz, and the channel width is 2 MHz; 40 radio channels are used, 3 broadcast channels, 37 data channels; and (2) self-Adaptive Frequency Hopping (AFH) is used to ensure that BLE can still transmit data in the face of severe interference.
The architecture of the BLE protocol stack is shown in fig. 2:
physical Layer (PHY): is a GFSK radio frequency with 1Mbps self-adaptive frequency hopping, and works in a license-free 2.4GHz ISM (industrial, scientific and medical) frequency band.
Link Layer (LL): for controlling the radio frequency state of a device, the device will be in one of five states: wait, broadcast, scan, initialize, connect. The broadcasting equipment can send data without establishing connection, and the scanning equipment receives the data sent by the broadcasting equipment; the device initiating the connection responds to the broadcaster by sending a connection request, and if the broadcaster accepts the connection request, the broadcaster and the device initiating the connection enter a connected state. The device initiating the connection is called the master and the device accepting the connection request is called the slave.
Host Controller Interface (HCI): a standard communication interface is provided between the host and the controller. This layer may be a software or hardware interface such as UART, SPI, USB, etc.
Logical Link Control and Adaptation Protocol (L2 CAP): data encapsulation services are provided for upper layers, allowing logical point-to-point data communication.
Security management layer (SM): defines the pairing and key distribution mode and provides services for the secure connection and data exchange between other layers of the protocol stack and another device.
Attribute protocol layer (atttribute protocol, ATT): a device is allowed to expose a particular piece of data, called an "attribute," to another device. In an ATT environment, the device that exhibits the "attribute" is called a server and the device that is paired with it is called a client. The link layer states (master and slave) are independent of the ATT role of the device. For example: the host equipment can be an ATT server or an ATT client; the slave device may be an ATT server or an ATT client.
Generic Attribute profile layer (GATT): a service framework using ATT is defined. GATT specifies the structure of a configuration file (profile). In BLE, all data blocks used by the profile or service are called "properties", and all data communication between two devices establishing a connection is handled by the GATT subroutine. The GATT layer is used for data communication between connected bluetooth devices, and the GATT layer is directly used by applications and profiles.
General Access Profile layer (GAP): is responsible for handling device access patterns and procedures including device discovery, establishing connections, terminating connections, initializing security features, and device configuration.
IEEE802.15.4 and Bluetooth dual stack compatibility
The invention patent (201610095148.3) discloses a communication gateway between Zigbee and rate-based Bluetooth, which can realize smooth communication between Bluetooth and Zigbee devices. However, the rate-based bluetooth has a disadvantage of high power consumption, and is not suitable for portable devices and sensor nodes.
The invention patent (201210076976.8) discloses a wireless gateway data recorder mixing Zigbee and Bluetooth, which integrates a Zigbee module, a low-power Bluetooth module, a storage module and a control module into one device to realize communication between a Zigbee network and a Bluetooth network. However, there are disadvantages in that an additional bluetooth module is added to the Zigbee device, the device cost is increased, and only a small amount of data can be transmitted.
The utility model discloses a Zigbee wireless transmission device based on bluetooth is disclosed in utility model (201220622245.4), combines bluetooth and Zigbee radio frequency technology, has realized that bluetooth equipment treats the remote network deployment of controlgear to the lower extreme to controlgear's control and data transmission are treated to the lower extreme. However, there are disadvantages in that an additional bluetooth module is added to the Zigbee device, the device cost is increased, and only a small amount of data can be transmitted.
Disclosure of Invention
The technical problem to be solved by the invention is that a hybrid communication method and a hybrid communication system which integrate an 802.15.4 protocol stack and a low-power-consumption Bluetooth protocol stack on one processor and can select the protocol stack to transmit according to the data volume are lacked in the prior art.
The invention solves the technical problems through the following technical scheme:
a hybrid communication method based on IEEE802.15.4 and low-power consumption Bluetooth dual protocol stack is applied to sensing equipment; the method comprises the following steps: the sensing equipment is in an 802.15.4 transmission mode by default, and periodically switches from IEEE802.15.4 to low-power Bluetooth to listen whether Bluetooth data is transmitted or not; when finding that the Bluetooth data is transmitted, the sensing equipment is kept in a BLE transmission mode, establishes connection with the Bluetooth equipment and transmits data, and immediately switches back to the 802.15.4 transmission mode after the transmission is finished.
Preferably, the method specifically comprises the following steps:
step 1: the device is operated in an 802.15.4 transmission mode by default, and the power consumption is reduced by utilizing a dormancy awakening mechanism;
step 2: in the awakening period, the equipment monitors a channel, and if 802.15.4 data transmission exists, the equipment is maintained in an 802.15.4 mode for data transmission until the transmission is finished;
and step 3: in the wake-up period, after the 802.15.4 data transmission is completed, the device saves the 802.15.4 network parameters and then switches to a BLE protocol stack; if the switching fails, entering step 7;
and 4, step 4: after the BLE protocol stack is successfully switched, if the BLE protocol stack is used as BLE slave equipment, BLE broadcast is sent; if the wireless local area network is taken as a BLE master device, monitoring BLE broadcast;
and 5: if the master device receives a BLE broadcast or a scanning response, or the slave device receives a scanning request or a connection request after sending the BLE broadcast, then step 6 is performed; otherwise, step 7 is entered, the device returns to the 802.15.4 transmission mode according to the preset protocol stack switching cycle;
step 6: the equipment keeps a BLE transmission mode and establishes Bluetooth connection; if the Bluetooth connection fails, entering step 7; otherwise, completing large data volume transmission in the BLE transmission mode; in the transmission process, if the Bluetooth connection is interrupted, the step 7 is carried out;
and 7: ending the BLE transmission mode, the device switching back to 802.15.4 transmission mode;
and 8: after the 802.15.4 protocol stack is successfully switched, reading 802.15.4 network parameters from the memory, and adding the original 802.15.4 wireless sensor network again; otherwise, returning to the step 2.
Preferably, the switching period of the dual protocol stack, wherein the listening channel time ratio of the 802.15.4 transmission mode to the BLE transmission mode is 1: 1.
preferably, the switching method of the protocol stack switch is as follows:
step 1, initializing an 802.15.4 protocol stack, applying for an RAM memory, configuring a radio frequency module register, and starting the 802.15.4 protocol stack;
step 2, the device monitors an 802.15.4 channel and judges whether an 802.15.4 data packet is monitored or not, if yes, the step 3 is carried out, and if not, the step 4 is carried out;
step 3.802.15.4 data transmission;
step 4.802.15.4, when the listening time is over, or after the 802.15.4 data transmission is over, the 802.15.4 protocol stack is over, and the RAM memory is released;
step 5, initializing a BLE protocol stack, applying for an RAM memory, configuring a radio frequency module register, and starting a new protocol stack;
step 6, the equipment monitors a BLE channel or sends a broadcast on the BLE channel, whether a BLE data packet is transmitted or not is judged, if yes, the step 7 is carried out, and if not, the step 8 is carried out;
step 7, BLE data transmission;
and 8, ending the BLE interception time or ending the BLE data transmission, ending the BLE protocol stack, and entering the step 1.
The invention also provides a hybrid communication system based on IEEE802.15.4 and low-power Bluetooth dual protocol stacks, which is applied to the method; the system comprises a processor, wherein an 802.15.4 protocol, a low-power Bluetooth protocol and a protocol stack switching module are integrated on the processor; the processor is communicated with the protocol stack switching module to realize that the 802.15.4 transmission mode and the BLE transmission mode are respectively in communication connection with the protocol stack switching module;
the protocol stack switching module has a preset protocol stack switching period and is in an 802.15.4 protocol stack by default; and the protocol stack switching module releases the RAM memory of the original protocol stack according to the switching period under the condition that the current protocol stack mode has no data transmission, then starts to apply for the RAM memory for the new protocol stack, starts the new protocol stack by configuring a radio frequency module register, and successfully finishes the switching process.
The invention has the advantages that:
the invention provides a novel dual-protocol stack hybrid communication method, which has the technical core that two protocol stacks of IEEE802.15.4 and Bluetooth with low power consumption can be efficiently integrated on an embedded sensor node with extremely limited processor and memory resources, and flexible and stable switching between the two protocol stacks is realized, so that the communication technology has the advantages of high-speed communication besides the low-power consumption characteristic of IEEE 801.15.4, the transmission rate is increased to 1Mbps at most, the reliable transmission of large data volume in IEEE802.15.4 equipment can be realized, and the communication bandwidth, the stability and the energy consumption characteristic are obviously improved.
The hybrid communication method provided by the invention can complete the integration and switching of IEEE802.15.4 and BLE dual-protocol stacks under limited radio frequency hardware, and has the advantages of high integration level, small volume and equipment cost saving compared with the traditional equipment.
Drawings
FIG. 1 is a prior art IEEE802.15.4 protocol stack architecture;
figure 2 is a background art BLE protocol stack architecture;
figure 3 is a flow chart of connection between a BLE master device and a BLE slave device according to embodiment 1 of the present invention;
fig. 4 is a schematic diagram of a hybrid communication method of the device in embodiment 1 of the present invention;
fig. 5 is a flowchart of dual stack switching according to embodiment 1 of the present invention;
fig. 6 is a functional diagram of a dual stack switch according to embodiment 1 of the present invention;
Detailed Description
So that the manner in which the above recited features of the present invention can be understood and readily understood, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings, wherein:
the hardware platform of the implementation uses a dual-core chip and comprises a Cortex-M3 processor and a Cortex-M0 processor; the wireless radio frequency module is integrated and is separately managed by a Cortex-M0 processor; and 2.4GHz frequency band wireless transmission is supported.
Example 1
As shown in fig. 3 and 4, a hybrid communication method based on IEEE802.15.4 and bluetooth low energy dual protocol stacks is as follows:
step 1: the device is operated in an 802.15.4 transmission mode by default, and the power consumption is reduced by utilizing a dormancy awakening mechanism;
step 2: in the awakening period, the equipment monitors a channel, if 802.15.4 data is received or 802.15.4 data needs to be sent, the equipment is maintained in an 802.15.4 mode for data transmission, and whether the receiving is finished or not is judged according to the fact that the received data is single packet or multiple packets; judging whether the transmission is finished or not according to the fact that the transmission data are single packets or multiple packets and combining with a transmission state register;
and step 3: in the wake-up period, after the 802.15.4 data transmission is completed, the device saves the 802.15.4 protocol stack and the network parameters; the system calls a BLE protocol stack initialization interface to complete the register configuration of the RF controller and select a BLE protocol mode; completing broadcast parameters of BLE slave equipment or broadcast scanning and connection parameter configuration of the main equipment, and executing switching of a BLE protocol stack; if the switching fails, entering step 7;
and 4, step 4: after the BLE protocol stack is successfully switched, if the BLE protocol stack is used as slave equipment, BLE broadcast is sent; if the device is used as a master device, the BLE broadcast is intercepted;
and 5: if the master device receives a BLE broadcast or a scanning response, or the slave device receives a scanning request or a connection request after sending the BLE broadcast, then step 6 is performed; otherwise, step 7 is entered, the device returns to the 802.15.4 transmission mode according to the preset protocol stack switching cycle;
step 6: the equipment keeps a BLE transmission mode and establishes Bluetooth connection; if the Bluetooth connection fails, entering step 7; otherwise, completing large data volume transmission in the BLE transmission mode; in the transmission process, if the Bluetooth connection is interrupted, the step 7 is carried out;
and 7: the primary device or the secondary device initiates a connection termination request to end the BLE transmission mode; the system reads 802.15.4 protocol stack parameters from the memory, calls an 802.15.4 protocol stack initialization interface, completes the register configuration of the RF controller and selects an 802.15.4 protocol mode; setting parameters such as dormancy awakening of a protocol stack and the like, and switching the equipment back to an 802.15.4 transmission mode;
and 8: after the 802.15.4 protocol stack is successfully switched, reading 802.15.4 network parameters from the memory, and adding the original 802.15.4 wireless sensor network again; otherwise, returning to the step 2;
in the switching cycle of the dual protocol stack according to this embodiment, a listening channel time ratio of the 802.15.4 transmission mode to the BLE transmission mode is 1: 1.
from the perspective of the slave device, for the BLE master device, the hybrid communication method is as follows:
step 1: the device defaults to operating in 802.15.4 transmission mode, following the awake period of the 802.15.4 device;
step 2: in the awakening period, the equipment monitors a channel, if 802.15.4 data is received or 802.15.4 data needs to be sent, the equipment is maintained in an 802.15.4 mode for data transmission, and whether the receiving is finished or not is judged according to the fact that the received data is single packet or multiple packets; judging whether the transmission is finished or not according to the fact that the transmission data are single packets or multiple packets and combining with a transmission state register;
and step 3: in the awakening period, after the equipment finishes the 802.15.4 interception time or finishes 802.15.4 data transmission, the 802.15.4 protocol stack and the network parameters are saved; the system calls a BLE protocol stack initialization interface to complete the register configuration of the RF controller and select a BLE protocol mode; completing broadcasting parameters of BLE slave equipment or broadcasting scanning and connection parameter configuration of the main equipment, and executing switching of a BLE transmission mode to become the BLE main equipment; if the switching fails, entering step 6;
and 4, step 4: after the BLE protocol stack is successfully switched, the primary equipment monitors BLE broadcast, and if finding that the slave equipment sends the broadcast, the method enters step 5; otherwise, entering step 5;
and 5: the method comprises the steps that the master device listens to a broadcast sent by the slave device, replies a scanning request to the slave device, then keeps a BLE transmission mode, establishes connection with the slave device and transmits data; in the transmission process, if the Bluetooth connection is interrupted, entering step 6;
step 6: the primary device or the secondary device initiates a connection termination request to end the BLE transmission mode; the system reads 802.15.4 protocol stack parameters from the memory, calls an 802.15.4 protocol stack initialization interface, completes the register configuration of the RF controller and selects an 802.15.4 protocol mode; setting parameters such as dormancy awakening of a protocol stack and the like, and switching the main equipment back to an 802.15.4 transmission mode;
and 7: after the 802.15.4 protocol stack is successfully switched, the 802.15.4 network parameters are read from the memory and added into the original 802.15.4 wireless sensor network again.
For a BLE slave device, the hybrid communication method is as follows:
step 1: the slave device defaults to operating in 802.15.4 transmission mode, following the awake period of the 802.15.4 device;
step 2: in the awakening period, the equipment monitors a channel, if the 802.15.4 data is received or the 802.15.4 data needs to be sent, the equipment is maintained in an 802.15.4 mode for data transmission, and whether the receiving is finished or not is judged according to the fact that the received data is a single packet or a plurality of packets; judging whether the transmission is finished or not according to the fact that the transmission data are single packets or multiple packets and combining with a transmission state register;
and step 3: in the awakening period, after the equipment finishes the 802.15.4 interception time or finishes 802.15.4 data transmission, the 802.15.4 protocol stack and the network parameters are saved; the system calls a BLE protocol stack initialization interface to complete the register configuration of the RF controller and select a BLE protocol mode; completing broadcast parameters of BLE slave equipment or broadcast scanning and connection parameter configuration of master equipment, and executing switching of a BLE transmission mode to become BLE slave equipment;
and 4, step 4: after the BLE protocol stack is successfully switched, the slave equipment sends BLE broadcast, and if a scanning request or a connection request replied by the master equipment is found during the BLE transmission, the step 4 is carried out; otherwise, entering step 5;
and 5: the slave device listens a scanning request or a connection request sent by the master device, keeps a BLE transmission mode, establishes connection with the master device and transmits data; in the transmission process, if the Bluetooth connection is interrupted, entering step 6;
step 6: the primary device or the secondary device initiates a connection termination request to end the BLE transmission mode; the system reads 802.15.4 protocol stack parameters from the memory, calls an 802.15.4 protocol stack initialization interface, completes the register configuration of the RF controller and selects an 802.15.4 protocol mode; setting parameters such as dormancy awakening of a protocol stack and the like, and switching the slave equipment back to an 802.15.4 transmission mode;
and 7: after the 802.15.4 protocol stack is successfully switched, the 802.15.4 network parameters are read from the memory and added into the original 802.15.4 wireless sensor network again.
As shown in fig. 5, the switching method of the protocol stack switch is as follows:
step 1, initializing an 802.15.4 protocol stack, applying for an RAM memory, configuring a radio frequency module register, and starting the 802.15.4 protocol stack;
step 2, the device monitors an 802.15.4 channel and judges whether an 802.15.4 data packet is monitored or not, if yes, the step 3 is carried out, and if not, the step 4 is carried out;
step 3.802.15.4 data transmission;
step 4.802.15.4, when the listening time is over, or after the 802.15.4 data transmission is over, the 802.15.4 protocol stack is over, and the RAM memory is released;
step 5, initializing a BLE protocol stack, applying for an RAM memory, configuring a radio frequency module register, and starting a new protocol stack;
step 6, the equipment monitors a BLE channel or sends a broadcast on the BLE channel, whether a BLE data packet is transmitted or not is judged, if yes, the step 7 is carried out, and if not, the step 8 is carried out;
step 7, BLE data transmission;
and 8, ending the BLE interception time or ending the BLE data transmission, ending the BLE protocol stack, and entering the step 1.
Example 2
A hybrid communication system based on IEEE802.15.4 and bluetooth low energy dual protocol stacks, the device being applied to the method of the above embodiment 1; the system comprises a processor, wherein an 802.15.4 protocol, a low-power Bluetooth protocol and a protocol stack switching module are integrated on the processor; the processor is communicated with the protocol stack switching module to realize an 802.15.4 transmission mode and a BLE transmission mode;
the protocol stack switching module is preset with a protocol stack switching period and is in an 802.15.4 protocol stack by default; and the protocol stack switching module releases the RAM memory of the original protocol stack according to the switching period under the condition that the current protocol stack mode has no data transmission, then starts to apply for the RAM memory for the new protocol stack, starts the new protocol stack by configuring a radio frequency module register, and successfully finishes the switching process.
Example 3
In a hybrid communication system based on IEEE802.15.4 and bluetooth low energy dual protocol stacks, in the embodiment, the device is applied to the method of embodiment 1, in which the wake-up time of the 802.15.4 device is set to 125 ms, and the sleep time is set to 875 ms; the time for transmitting a data packet in the 802.15.4 protocol is about 8 milliseconds, and the low-power Bluetooth can establish connection, send data and disconnect within about 3 milliseconds; the switching time of the 802.15.4 protocol stack and the BLE protocol stack is in a microsecond time range; therefore, the complete set of protocol stack switching and hybrid communication processes of switching from the 802.15.4 protocol stack to the BLE protocol stack and switching back from the BLE protocol stack to the 802.15.4 protocol stack during at least one 802.15.4 wake-up period can be realized.
The working principle is as follows:
the embodiment provides a new dual-protocol stack hybrid communication method, wherein an 802.15.4 protocol, a low-power consumption Bluetooth protocol and a protocol stack switching module are respectively integrated on a processor of wireless sensing equipment; when the low-power-consumption communication requirement exists, IEEE802.15.4 is used for communication, when the large-data-volume communication requirement exists and the energy consumption limitation is low, the Bluetooth low-power-consumption communication is flexibly switched to, the sensing equipment is in an 802.15.4 transmission mode by default, and whether the Bluetooth data is transmitted or not is intercepted by periodically switching from IEEE802.15.4 to the Bluetooth low-power-consumption. When finding that the Bluetooth data is transmitted, the sensing equipment is kept in a BLE transmission mode, establishes connection with the Bluetooth equipment and transmits data, and immediately switches back to an 802.15.4 transmission mode after the transmission is finished.
The Bluetooth technology with low power consumption is used, the BLE protocol stack is adopted, the cutting performance is high, for example, aiming at specific functional requirements, the complexity of an ATT attribute protocol can be greatly reduced, the safety management function can also simplify the flow and even cancel the encryption function, the logic link control and adaptation protocol can omit the connection parameter updating function according to the requirements, and the like, and on the limited hardware resources, the integration and switching of the 802.15.4 and BLE dual protocol stacks are completed by one set of radio frequency hardware. Based on the characteristic, the software compiling file has the characteristic of controllable size, and the characteristic solves the problem of insufficient Flash. For the problem of insufficient RAM, a memory allocation application technology is adopted, namely, when any protocol is started, memory allocation is applied to a system; and releasing the memory when the operation is finished. The technology can solve the problem of insufficient RAM.
The protocol stack switching module has a preset protocol stack switching period and is in an 802.15.4 protocol stack by default. And the protocol stack switching module releases the RAM memory of the original protocol stack according to the switching period under the condition that the current protocol stack mode has no data transmission, then starts to apply for the RAM memory for the new protocol stack, starts the new protocol stack by configuring a radio frequency module register, and successfully finishes the switching process.
In summary, by utilizing the characteristics of tailorable low-power consumption Bluetooth protocol stack and the memory application and release technology, the hardware platform of the dual-core chip can well support the dual-protocol stack integration and switching functions.
The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are merely illustrative of the principles of the invention, but that various changes and modifications may be made without departing from the spirit and scope of the invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (5)

1. A hybrid communication method based on IEEE802.15.4 and Bluetooth low energy dual protocol stacks is characterized in that: application to sensing devices; an 802.15.4 protocol, a low-power-consumption Bluetooth protocol and a protocol stack switching module are respectively integrated on a processor of the sensing equipment; when the low-power-consumption communication requirement exists, IEEE802.15.4 is used for communication, and when the large-data-volume communication requirement exists and the energy consumption limitation is less, the Bluetooth with low power consumption is flexibly switched to carry out communication; the sensing equipment is in an 802.15.4 transmission mode by default, and periodically switches from IEEE802.15.4 to Bluetooth low energy to listen whether Bluetooth data is transmitted or not; when finding that the Bluetooth data is transmitted, the sensing equipment is kept in a BLE transmission mode, establishes connection with the Bluetooth equipment and transmits data, and immediately switches back to the 802.15.4 transmission mode after the transmission is finished.
2. The hybrid communication method according to claim 1, wherein the hybrid communication method is based on IEEE802.15.4 and bluetooth low energy dual protocol stacks, and comprises: the method specifically comprises the following steps:
step 1: the device is operated in an 802.15.4 transmission mode by default, and the power consumption is reduced by utilizing a dormancy awakening mechanism;
step 2: in the awakening period, the equipment monitors a channel, and if 802.15.4 data transmission exists, the equipment is maintained in an 802.15.4 mode for data transmission until the transmission is finished;
and step 3: in the wake-up period, after the 802.15.4 data transmission is completed, the device saves the 802.15.4 network parameters and then switches to a BLE protocol stack; if the switching fails, entering step 7;
and 4, step 4: after the BLE protocol stack is successfully switched, if the BLE protocol stack is used as BLE slave equipment, BLE broadcast is sent; if the wireless local area network is taken as a BLE master device, monitoring BLE broadcast;
and 5: if the master device receives a BLE broadcast or a scanning response, or the slave device receives a scanning request or a connection request after sending the BLE broadcast, then step 6 is performed; otherwise, step 7 is entered, the device returns to the 802.15.4 transmission mode according to the preset protocol stack switching cycle;
step 6: the equipment keeps a BLE transmission mode and establishes Bluetooth connection; if the Bluetooth connection fails, entering step 7; otherwise, completing large data volume transmission in the BLE transmission mode; in the transmission process, if the Bluetooth connection is interrupted, the step 7 is carried out;
and 7: ending the BLE transmission mode, the device switching back to 802.15.4 transmission mode;
and 8: after the 802.15.4 protocol stack is successfully switched, reading the 802.15.4 network parameters from the memory, and adding the original 802.15.4 network again; and returning to the step 2.
3. The hybrid communication method according to claim 1 or 2, wherein the hybrid communication method is based on IEEE802.15.4 and bluetooth low energy dual protocol stacks, and comprises: the switching period of the dual protocol stack is: the ratio of the listening channel time of the 802.15.4 transmission mode to the BLE transmission mode is 1: 1.
4. the hybrid communication method according to claim 1 or 2, wherein the hybrid communication method is based on IEEE802.15.4 and bluetooth low energy dual protocol stacks, and comprises: the switching method of the protocol stack switcher comprises the following steps:
step 1, initializing an 802.15.4 protocol stack, applying for an RAM memory, configuring a radio frequency module register, and starting the 802.15.4 protocol stack;
step 2, the device monitors an 802.15.4 channel and judges whether an 802.15.4 data packet is monitored or not, if yes, the step 3 is carried out, and if not, the step 4 is carried out;
step 3.802.15.4 data transmission;
step 4.802.15.4, when the listening time is over, or after the 802.15.4 data transmission is over, the 802.15.4 protocol stack is over, and the RAM memory is released;
step 5, initializing a BLE protocol stack, applying for an RAM memory, configuring a radio frequency module register, and starting a new protocol stack;
step 6, the equipment monitors a BLE channel or sends a broadcast on the BLE channel, whether a BLE data packet is transmitted or not is judged, if yes, the step 7 is carried out, and if not, the step 8 is carried out;
step 7, BLE data transmission;
and 8, ending the BLE interception time or ending the BLE data transmission, ending the BLE protocol stack, and entering the step 1.
5. A hybrid communication system based on IEEE802.15.4 and bluetooth low energy dual protocol stacks, characterized in that: the apparatus is applied to the method of any one of the preceding claims 1 to 4; the system comprises a processor, wherein an 802.15.4 protocol, a low-power Bluetooth protocol and a protocol stack switching module are integrated on the processor; the processor is communicated with the protocol stack switching module to realize an 802.15.4 transmission mode and a BLE transmission mode;
the protocol stack switching module is preset with a protocol stack switching period and is in an 802.15.4 protocol stack by default; and the protocol stack switching module releases the RAM memory of the original protocol stack according to the switching period under the condition that the current protocol stack mode has no data transmission, then starts to apply for the RAM memory for the new protocol stack, starts the new protocol stack by configuring a radio frequency module register, and successfully finishes the switching process.
CN201811552624.9A 2018-12-19 2018-12-19 Hybrid communication method and system based on IEEE802.15.4 and Bluetooth low energy protocol stack Active CN109474969B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811552624.9A CN109474969B (en) 2018-12-19 2018-12-19 Hybrid communication method and system based on IEEE802.15.4 and Bluetooth low energy protocol stack

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811552624.9A CN109474969B (en) 2018-12-19 2018-12-19 Hybrid communication method and system based on IEEE802.15.4 and Bluetooth low energy protocol stack

Publications (2)

Publication Number Publication Date
CN109474969A CN109474969A (en) 2019-03-15
CN109474969B true CN109474969B (en) 2021-03-05

Family

ID=65676545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811552624.9A Active CN109474969B (en) 2018-12-19 2018-12-19 Hybrid communication method and system based on IEEE802.15.4 and Bluetooth low energy protocol stack

Country Status (1)

Country Link
CN (1) CN109474969B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109921968B (en) * 2019-03-26 2021-02-02 佛山市顺德区美的洗涤电器制造有限公司 Intelligent control device, and networking control method and system of household electrical appliance
CN109951833B (en) * 2019-03-26 2021-04-13 佛山市顺德区美的洗涤电器制造有限公司 Intelligent control device, household appliance and networking control method and system thereof
CN110381488B (en) * 2019-07-17 2022-12-16 钟代笛 Universal personal health equipment data characteristic value transmission method based on low-power-consumption Bluetooth
CN110545318B (en) * 2019-08-19 2021-11-30 钟代笛 Data communication method and system for carrying out adaptation depending on GATT and indication
CN110545265B (en) * 2019-08-19 2021-12-31 重庆大学 Data communication system and method for carrying out adaptation depending on ATT and indication
CN110493775B (en) * 2019-08-23 2021-10-12 重庆大学 Communication method and system adapted by ATT and exception handling
CN111436039B (en) * 2019-10-23 2023-05-09 珠海市杰理科技股份有限公司 Bluetooth reconnection method and system, bluetooth master and slave equipment reconnection method and Bluetooth master and slave equipment
CN111065080B (en) * 2019-12-20 2023-07-18 深圳市椰壳信息科技有限公司 Data transmission method based on Bluetooth router and Bluetooth router
CN111132111B (en) * 2019-12-26 2023-12-22 歌尔股份有限公司 BLE-based audio sharing method, system and computer readable storage medium
CN110891073B (en) * 2019-12-30 2021-06-25 西安电子科技大学 Multi-protocol stack communication method for mobile communication core network
CN113068161B (en) * 2020-01-02 2022-12-13 广东博智林机器人有限公司 Bluetooth low-energy-consumption communication method, device and system and storage medium
CN111355704B (en) * 2020-01-09 2022-04-29 重庆高开清芯智联网络科技有限公司 IPV6 network system based on bluetooth low-power consumption
CN111328056B (en) * 2020-01-20 2023-03-24 钟代笛 Communication method and system for carrying out protocol adaptation based on ATT (advanced technology transfer) and read-write command
CN114070706A (en) * 2020-08-05 2022-02-18 中标软件有限公司 Method for realizing low-power consumption Bluetooth equipment communication under domestic operating system
CN112153686B (en) * 2020-09-24 2023-03-03 中国电子科技集团公司第二十八研究所 Service self-networking method based on service discovery data synchronization
CN113206689B (en) * 2020-12-31 2022-05-17 珠海市杰理科技股份有限公司 Communication method and device, Bluetooth slave device and Bluetooth communication system
CN112822643B (en) * 2021-01-14 2021-11-30 深圳市芯中芯科技有限公司 Bluetooth device multi-connection networking method and system based on BLE broadcasting

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101471704A (en) * 2007-12-26 2009-07-01 陈澎 Dual-mode equipment and network management method
WO2012076405A1 (en) * 2010-12-10 2012-06-14 Telefonica, S.A. Method for the reduction of energy consumption and radio interference in a radio access node
CN103828479A (en) * 2011-09-30 2014-05-28 英特尔公司 Device, system and method of bluetooth communication
CN105657639A (en) * 2015-12-25 2016-06-08 泰凌微电子(上海)有限公司 Dual-mode device and synchronous communication realizing method thereof
CN108900883A (en) * 2018-06-07 2018-11-27 深圳市亿联智能有限公司 It is a kind of using Bluetooth transmission remote signal and the transmission method of audio data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101471704A (en) * 2007-12-26 2009-07-01 陈澎 Dual-mode equipment and network management method
WO2012076405A1 (en) * 2010-12-10 2012-06-14 Telefonica, S.A. Method for the reduction of energy consumption and radio interference in a radio access node
CN103828479A (en) * 2011-09-30 2014-05-28 英特尔公司 Device, system and method of bluetooth communication
CN105657639A (en) * 2015-12-25 2016-06-08 泰凌微电子(上海)有限公司 Dual-mode device and synchronous communication realizing method thereof
CN108900883A (en) * 2018-06-07 2018-11-27 深圳市亿联智能有限公司 It is a kind of using Bluetooth transmission remote signal and the transmission method of audio data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Time-domain cooperative coexistence of BLE and IEEE 802.15.4 networks;Onur Carhacioglu;《IEEE》;20180215;全文 *

Also Published As

Publication number Publication date
CN109474969A (en) 2019-03-15

Similar Documents

Publication Publication Date Title
CN109474969B (en) Hybrid communication method and system based on IEEE802.15.4 and Bluetooth low energy protocol stack
Nikoukar et al. Low-power wireless for the internet of things: Standards and applications
CN107105386B (en) Method, apparatus and computer program product for wireless short-range communication channel selection
Bhagwat Bluetooth: technology for short-range wireless apps
EP2484173B1 (en) Wlan peer-to-peer group owner negotiation
US6950645B1 (en) Power-conserving intuitive device discovery technique in a bluetooth environment
Zhou et al. Crowded spectrum in wireless sensor networks
CN101069386B (en) Detecting legacy spoofing in reduced functionality user terminals
US9655116B2 (en) Method for channel switching in wireless communication system and apparatus therefor
EP2993943B1 (en) Method and apparatus for performing wireless docking service
Koubâa et al. IEEE 802.15. 4 for wireless sensor networks: a technical overview
US20070149123A1 (en) Multiple radio usage in a wireless communications device
CN101262393B (en) Industrial wireless sensing network and communication method based on distributed coordinated frequency
US20070147332A1 (en) Multimode support for wireless communications
KR20170017865A (en) Network range extender with multi-rf radio support for plurality of network interfaces
US20160134709A1 (en) Method, apparatus, and computer program product for a node to advertise its presence and service profiles thereof in a wireless environment
JP2008538167A (en) Method and apparatus for operating a wireless PAN network using an overlay protocol that enhances coexistence with the wireless LAN network
US20180184377A1 (en) Method for extending wur packet to multiple devices/technologies and enable wur packet aggregation
CN107809756B (en) Bluetooth controller, module, terminal, system and Bluetooth connection method
KR20140045314A (en) Method and apparatus for scheduling wireless personal area network
Bruno et al. WLAN Technologies for mobile ad hoc networks
Elsts et al. Instant: A TSCH schedule for data collection from mobile nodes
KR101283063B1 (en) Network system and formation method of network
CN108934046B (en) Method and device for reducing mutual interference between WiFi and ZigBee
KR101214617B1 (en) Coexistence system to integrate heterogeneous wireless network devices using the same frequency band into one hardware board and its operation method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant