A commercially available highly reliable direct communication method from Wi-Fi to ZigBee technology
By using MSK modem and CCK codebook matching in Wi-Fi to ZigBee cross-technical communication, center frequency compensation is performed, signal analog deviation and compatibility problems are solved, and high-reliable cross-technical communication is realized, suitable for commercial equipment , improves communication efficiency and range.
Patent Information
- Application Number
- CN202210510879.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-11
- Publication Date
- 2024-11-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing Wi-Fi to ZigBee cross-technical communications have inherent deviations in signal simulation, which leads to unreliability, and most of them require dedicated software-defined radio hardware or firmware modifications to commercial devices. It is difficult to be compatible with widely deployed commercial devices, limiting commercial applications.
The target phase sequence of ZigBee data frame is obtained through the MSK modem mapping table, matches the Wi-Fi technology CCK codebook, performs center frequency offset compensation, generates data packet payloads compatible with commercial equipment, and upgrades through patches driven by commercial equipment It achieves compatibility, uses the 802.11b protocol stack and CCK modulation method to match the ZigBee phase sequence, and generates a physical layer signal that can be accurately received by commercial ZigBee devices.
It realizes a frame reception rate of about 90% in office building environment, supports high-reliability cross-technical communications at larger ranges and long distances, and solves the problem of center frequency misalignment. It only requires a small amount of driver modification without hardware changes, and is compatible with commercial use. Cross-technical communication from Wi-Fi devices to ZigBee devices.
Smart Images

Figure CN114980204B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a commercial high-reliability direct communication method from Wi-Fi to ZigBee technology. Background Art
[0002] In the era of the Internet of Things, smart cities, smart transportation, smart homes, and smart healthcare have provided great convenience for people's lives. Wireless technologies represented by Wi-Fi, ZigBee, and Bluetooth are widely used in various Internet of Things projects and are generally deployed in various scenarios. However, a large number of wireless communication devices operate in the unlicensed ISM 2.4GHz frequency band, and there is a large overlap between the communication channels of various technologies. Each wireless communication technology regards signals other than its own communication in the same frequency band as interference. The coexistence of devices supporting these protocols in physical space and the overlap of spectrum space lead to the coexistence of heterogeneous networks, resulting in serious cross-technology interference, which leads to a decrease in transmission performance.
[0003] Heterogeneous network communication coordination mainly relies on the use of gateways. Gateways are compatible with different communication protocols. They can realize direct communication with different network devices from the hardware perspective and realize data integration of different network devices from the software perspective. Taking the gateway between ZigBee and Bluetooth as an example, the gateway is compatible with both ZigBee and Bluetooth protocols. After receiving the ZigBee signal, it performs data analysis and then forwards the data in the format of Bluetooth data packets. The use of gateways can ensure that data is accurately transmitted between ZigBee and Bluetooth devices to a certain extent. However, the introduction of gateways also brings many problems. For example, the gateway needs to be compatible with different communication protocols, which increases the hardware cost of gateway devices. In order to better relay heterogeneous network traffic, the deployment of gateways needs to be selected at a specific location according to the network conditions, which increases the complexity of the network to a certain extent and also brings certain challenges to the deployment of gateways. Considering the working mechanism of the gateway, that is, "receive-process-send", the traffic overhead caused by relaying increases, making the originally crowded communication environment worse. And the coordination of heterogeneous networks through gateways fails to solve the cross-technology interference caused by the coexistence of heterogeneous networks.
[0004] The introduction of cross-technology communication provides a new solution to the above problems. At present, the main directions of cross-technology communication are: packet-level cross-technology communication and physical layer signal simulation cross-technology communication.
[0005] Packet-level cross-technology communication mainly realizes cross-technology communication through the length, energy, and beacon timing of the data packet. Among them, B2W2 uses the change of Wi-Fi channel state information (CSI) in the overlapping narrowband Bluetooth channel and broadband wireless Wi-Fi channel to realize data transmission from Bluetooth device to Wi-Fi device. Esense and HoWiEs methods construct corresponding identifiable symbols by modulating the length of Wi-Fi packets. C-Morse uses two different Wi-Fi packet lengths to simulate long and short codes to realize communication from Wi-Fi to ZigBee. Freebee constructs special energy by modulating the sending time of the data packet. The bit rate of such cross-technology communication is limited to 18bps. Although heterogeneous IoT direct communication can be realized based on the characteristics of the data packet, the current solution has the disadvantages of low channel utilization and throughput. A large number of data packets need to be sent to complete the effective transmission of data, and the storage and processing capabilities of the receiving end are required to be high.
[0006] Different from packet-level cross-technology communication, physical layer signal simulation cross-technology communication mainly simulates the waveform of the target wireless technology by carefully selecting payload data, so that heterogeneous devices can be compatible with each other to achieve cross-technology communication. One type of physical layer cross-technology communication is the sender cross-technology communication. For example, WeBee simulates the target ZigBee signal by reversely deducing OFDM modulation and QAM modulation, and loads the signal into the data frame payload to achieve cross-technology communication; BlueBee simulates the target ZigBee signal by reversely deducing GFSK modulation technology to achieve cross-technology communication at the physical layer. Another type of physical layer cross-technology communication is the receiver cross-technology communication. The receiver-side cross-technology communication transfers the complexity of cross-technology communication to the receiver. Among them, XBee realizes cross-protocol communication from ZigBee to Bluetooth by realizing the Bluetooth receiver of cross-coded ZigBee packet signals. PatternBee decodes the received ZigBee symbols to achieve cross-protocol communication by identifying anti-skew segments with zero phase shift regardless of how the sampling offset changes.
[0007] Physical layer cross-technology communication is limited by hardware or modulation methods. For example, Wi-Fi technology modulates signals through OFDM, while ZigBee technology modulates signals through O-QPSK. There are inherent deviations in the simulation of Wi-Fi to ZigBee communication signals. In WEBee, Wi-Fi simulates ZigBee cross-technology communication signals and generates two inherent errors in QAM modulation and cyclic prefix. In the face of such errors, academic research has reduced and compensated for such inherent errors, but has not eliminated such errors. Such inherent errors bring about the problem of unreliable cross-technology communication, resulting in a relatively low frame reception rate. It usually requires multiple packets to achieve a high data transmission accuracy, and some even require multiple preamble sequences. This results in low throughput and low communication efficiency in existing cross-technology communications.
[0008] Most of the existing cross-technology communication implementation solutions need to be implemented through dedicated software-defined radio hardware platforms, such as USRP, or require substantial firmware modifications to commercial devices. XBee needs to use a specific access address to identify cross-technology communication, and introduces a two-dimensional mapping matrix to identify cross-technology communication signal offsets and decode cross-technology communication data packets, which introduces a large degree of firmware modification and workload on the receiving end. This situation makes many cross-technology communication solutions difficult to be compatible with a large number of commercial devices that have been widely deployed, which to a certain extent limits the commercial application of cross-technology communication. The reason why cross-technology communication technology is implemented through dedicated software-defined radio is that many cross-technology communications do not take into account the inconsistency of the center frequencies between different communication technologies. This results in many cross-technology communications being able to operate and communicate well in theory and experimental environments, but in actual commercial devices, normal data transmission cannot be performed.
[0009] In summary, due to the limitations of hardware or modulation methods, the existing Wi-Fi to ZigBee communication signal simulation has inherent deviations, which brings about the problem of unreliable cross-technology communication; and most of the existing cross-technology communications need to be implemented through a dedicated software-defined radio hardware platform, such as USRP, or require major firmware modifications to commercial equipment, resulting in difficulty in compatibility with currently widely deployed commercial equipment, which to some extent limits the commercial application of cross-technology communications. Summary of the invention
[0010] In view of the above-mentioned deficiencies in the prior art, an object of the present invention is to provide a commercially available highly reliable direct communication method from Wi-Fi to ZigBee technology.
[0011] To achieve the above objectives, the present invention adopts the following technical solutions:
[0012] A commercial Wi-Fi to ZigBee technology highly reliable direct communication method comprises the following steps:
[0013] 1. Obtain the target phase sequence of the ZigBee data frame
[0014] Map the target ZigBee data frame bit sequence through the MSK modulation and demodulation mapping table to obtain the target phase sequence of the ZigBee data frame;
[0015] 2. Matching the Wi-Fi Technology CCK Codebook Based on the Target Phase Sequence
[0016] Each group of CCK codebooks is interpolated and resampled respectively, and the ZigBee phase sequence is resampled with the same fine-grainedness as the CCK codebook; the phase matching algorithm is used to match the CCK codebook of the target phase sequence to obtain the Wi-Fi CCK codeword with the highest matching degree with the target phase sequence of the ZigBee data frame;
[0017] 3. Center Frequency Offset Compensation
[0018] The CCK codeword conforms to the following formula after the center frequency offset:
[0019]
[0020] In the above formula, C i Represents each bit in the CCK codebook, f w -f b is the difference in center frequency offset, which is fixed at 2MHz here, n is the nth bit in the CCK codebook, T s It represents the sampling rate of the modulation mode, C' i is the codebook after center frequency offset;
[0021] The original CCK codeword is processed in sequence to generate a center frequency compensation codebook, and then the iterative matching of step 2 is completed;
[0022] 4. Generate Wi-Fi Commercial Device Packet Payload
[0023] 41) Obtain Wi-Fi device preamble information and MAC frame header information;
[0024] 42) According to the information obtained in step 41), and according to the 802.11b protocol stack, the CCK modulation mode sequentially calculates the CCK modulation initial phase and the scrambler initial value of the frame body;
[0025] 43) Calculate the payload of the commercial device data packet according to the initial phase and the initial value of the scrambling code obtained in step 42) and the CCK codebook sequence obtained in step 3;
[0026] 5. Customized modification of commercial equipment to achieve compatibility with commercial equipment.
[0027] Furthermore, in step one, the ZigBee data frame structure to be simulated is generated, each byte is decomposed into a ZigBee technology symbol sequence in units of 4 bits, and each symbol is mapped into a 32-bit chip sequence according to the MSK modulation and demodulation mapping table. The phase sequence obtained by converting the physical layer bit stream composed of the chip sequence is the target phase sequence of the ZigBee data frame.
[0028] Furthermore, in step 1, the step of converting the physical layer bit stream to obtain the phase sequence includes:
[0029] Set the initial phase
[0030] Starting from the first byte B1 of the bit stream, if B1>1, then
[0031] otherwise
[0032] And so on: Bn>1, otherwise
[0033] Furthermore, in step 1, the ZigBee bit sequence can also be obtained through an O-QPSK modulation mapping table, and the target phase sequence of the ZigBee data frame is obtained by performing angle conversion on the obtained waveform.
[0034] Furthermore, a ZigBee data frame structure to be simulated is generated, each byte is arranged in little-endian reverse order, and every 4 bits are divided into a symbol, which is mapped into a physical layer bit sequence according to the O-QPSK modulation direct sequence spread spectrum sequence table, and then formed into a 4MHz sampled waveform complex number through O-QPSK modulation; then the complex number is placed in a constellation diagram, the angle is converted into a phase, and finally the target phase sequence of the ZigBee data frame is formed.
[0035] Preferably, in step 2, the original 11 MHz CCK codebook is resampled to 44 MHz; and the 2 MHz bandwidth ZigBee phase sequence is also resampled to 44 MHz.
[0036] Furthermore, in step 2, the resampling method is:
[0037] or
[0038]
[0039] Further, in step 2, the CCK codebook and target phase matching mechanism is:
[0040] Since the waveform corresponding to the ZigBee phase is x(n)=cosx+i*sinx, the CCK codebook is calculated by the Euler formula e xi =cosx+i*sinx, so the CCK phase is converted into an 8-bit 11MHz complex number, and both are matched through complex numbers:
[0041] For the complex stream corresponding to the target phase, an iterative method is used to match each 32-bit and 256 CCK codewords. The matching method uses the following algorithm for matching selection:
[0042] 21) First, calculate the sum of the Euclidean distances between the 32-bit CCK codeword and the target complex number:
[0043]
[0044] In the above formula, S i is the sum of the Euclidean distances, C i,j is the codeword of the CCK codebook, is the target phase sequence;
[0045] 22) Calculate the distance sum between non-matching codewords in the 32-bit codeword. In order to measure the distance sum between non-matching fields and exclude the influence of multiple non-matching fields, the following definition is used:
[0046] In the case of the same range of Euclidean distance, the farther the distance between the mismatched phases is, the better the low-pass filtering smoothing effect can be obtained, which can be represented by the following formula:
[0047] arg max minI i,k+1 -I i,k
[0048] In the above formula, I i,k is the kth position in the CCK codeword that does not match the target phase;
[0049] Fewer mismatched fields will result in closer waveforms after low-pass filtering, so:
[0050]
[0051] In the above formula, P is defined as the matching metric value, and M is the number of mismatched codewords. When the sum of the Euclidean distances is the same and the distances between the mismatched phases are close, the larger the matching metric value, the closer the corresponding waveforms of the two phases are. Therefore, after each codeword calculation is completed, the codeword with the largest matching metric value is selected as the simulation codeword.
[0052] Furthermore, in step five, the compatibility of commercial devices is achieved by patching and upgrading the drivers of commercial Wi-Fi devices.
[0053] Furthermore, in step 5, the commercial equipment is customized and modified, specifically including the following steps:
[0054] 51) Wi-Fi packet payload design, designing the Wi-Fi packet payload into multiple information elements;
[0055] 52) Modify the Wi-Fi device driver, detect the cross-technology communication packet, and restore the information element;
[0056] 53) Set Wi-Fi device parameters so that the 2.4GHz signal supports the 802.11b protocol and sets the basic rate to 11Mb / s.
[0057] Compared with the prior art, the present invention has the following beneficial effects:
[0058] (1) The CCK modulation method in the Wi-Fi protocol 802.11b and the O-QPSK modulation method in the ZigBee technology of the present invention both transmit information through a phase change of π / 2. By using the CCK modulation method supported by the Wi-Fi technology based on IEEE 802.11b, the CCK codeword and the target ZigBee phase sequence are reasonably matched to generate a physical layer signal with high similarity. The signal can be accurately received by commercial ZigBee devices after filtering by a low-pass filter. In an office building environment, the method of the present invention can still maintain a frame reception rate of about 90% at a distance of 20m, and because the default power of the Wi-Fi device is much greater than the default transmission power of the ZigBee device, compared with traditional ZigBee network communication, the method of the present invention can achieve a larger range and longer distance Wi-Fi to ZigBee high-reliability cross-technology communication.
[0059] (2) The 802.11b protocol stack adopted by the method of the present invention is backward compatible with most Wi-Fi commercial devices, and the present invention solves the incompatibility problem of commercial devices caused by the misalignment of the center frequency of the communication channel from Wi-Fi technology to ZigBee technology. In addition, by using a type of probe request frame in the Wi-Fi protocol management frame, it allows manufacturers to design information elements for data transmission, and embeds the matched CCK codeword into the frame structure of the Wi-Fi commercial device. Only a small amount of patch upgrade is required for the driver of the Wi-Fi commercial device, and no modification is required to the hardware of the sending and receiving ends. It can be fully compatible with the cross-technology communication from commercial Wi-Fi devices to ZigBee devices, thereby realizing stable direct communication from commercial Wi-Fi devices to ZigBee devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0061] Figure 1 It is a schematic diagram of CCK and ZigBee phase representation;
[0062] Figure 2 Schematic diagram of CCK codebook optimization through filtering;
[0063] Figure 3 Flowchart of the cross-technology communication method from Wi-Fi to ZigBee;
[0064] Figure 4 The center frequency of each channel of Wi-Fi technology and ZigBee technology;
[0065] Figure 5 This is a schematic diagram of center frequency offset compensation;
[0066] Figure 6 It is the Wi-Fi data frame structure;
[0067] Figure 7 To generate a payload flow chart for Wi-Fi commercial devices;
[0068] Figure 8 Schematic diagram of the steps to customize the modification for commercial equipment;
[0069] Fig. 9 The frame reception rate at different distances for WiZig and ZigBee technologies;
[0070] Fig.10 RSSI at different distances for WiZig and ZigBee technologies. DETAILED DESCRIPTION
[0071] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements may be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0072] Wi-Fi technology based on IEEE 802.11b supports four modulation modes: 1M DBPSK, 2M DQPSK, 5.5M CCK and 11M CCK, and provides corresponding wireless transmission rates. As for the 11M CCK modulation mode, it encodes 8 bits into a CCK codeword, and each bit is modulated by QPSK, corresponding to one of the four orthogonal phases (0, π / 2, π, -π / 2), and then these bits are transmitted sequentially at a frequency of 11MHz. In fact, the O-QPSK modulation method used by ZigBee technology also transmits information through phase changes, and its degree of change is also π / 2. Therefore, by selecting 256 CCK code chips to simulate the phase change of ZigBee technology, data transmission from Wi-Fi to ZigBee receiver can be realized (see Figure 1 ).
[0073] In fact, the 256 CCK codewords will not perfectly match the phase changes of ZigBee technology. There will always be more or less upward or downward jumps in the codewords. However, each ZigBee device hardware has a low-pass filter to smooth the received signal, which is actually equivalent to calculating the moving average of the signal. This effect will also act on the CCK modulation signal of the Wi-Fi protocol, so that the CCK signal can eliminate the imperfectly matched bits in the codeword through signal smoothing, so as to achieve perfect zero-error reception of the CCK codeword (see Figure 2 ).
[0074] Specifically, the CCK modulation method used in the Wi-Fi technology 802.11b protocol has a data rate of 11Mbps and a duration of 1 / 11us for each bit; ZigBee technology uses O-QPSK modulation with a data rate of 2Mbps and a duration of 0.5us for each bit, so 11 CCK bits are needed to represent 2 O-QPSK bits.
[0075] Since the odd bits of O-QPSK modulation are expressed by the I path, and the even bits are expressed by the Q path, and the Q path has a half-cycle delay, this makes it impossible to directly map the O-QPSK direct sequence spread spectrum sequence table using the physical layer mapping. Here, the MSK spread spectrum sequence mapping table is selected for mapping modulation. Figure 3 , the specific steps are as follows:
[0076] 1. Obtain the target phase sequence of the ZigBee data frame
[0077] Generate the ZigBee data frame structure to be simulated, including 4 bytes "0x00" and the synchronization code "0xA7". The high and low four bits of each byte are swapped to obtain the ZigBee technology symbol sequence. According to the MSK modulation and demodulation mapping table, each symbol is mapped to a 32-bit chip sequence, and the physical layer bit stream corresponding to the chip sequence is used to obtain the target phase sequence of the ZigBee data frame according to the following steps.
[0078] Steps to obtain the phase sequence from the physical layer bit stream:
[0079] Set the initial phase
[0080] Starting from the first byte B1 of the bit stream, if B1>1, then
[0081] otherwise
[0082] And so on: Bn>1, otherwise
[0083] Table 1 MSK demodulation direct sequence spread spectrum sequence
[0084]
[0085]
[0086] The phase sequence of the ZigBee data frame to be simulated can also be obtained by the following method:
[0087] Generate the ZigBee data frame structure to be simulated, including 4 bytes "0x00" and the synchronization code "0xA7". After each byte is reversed in little-endian order, every 4 bits are divided into a symbol, mapped into a physical layer bit sequence according to the O-QPSK modulation direct sequence spread spectrum sequence table, and then formed into a 4MHz sampled waveform complex number through O-QPSK modulation. Then put these complex numbers in the constellation diagram, convert the angle into phase, and finally form the phase sequence of the ZigBee data frame.
[0088] 2. Match Wi-Fi Technology CCK Codebook Based on Target Phase
[0089] In order to match a more accurate CCK codebook, 256 groups of CCK codebooks are interpolated and resampled with a sampling multiple of 4. Thus, the original 11MHz CCK codebook is resampled to 44MHz.
[0090] Similarly, we also resample the 2MHz bandwidth ZigBee phase sequence to 44MHz. The resampling method is:
[0091] It is equivalent to resampling 2 phase values into 22 phase values, namely:
[0092] or
[0093]
[0094] The CCK codebook and target phase matching mechanism is:
[0095] Since the waveform corresponding to the ZigBee phase is x(n)=cosx+i*sinx, the CCK codebook is calculated by the Euler formula e xi =cosx+i*sinx, so the CCK phase is converted into an 8-bit 11MHz complex number, and both are matched through complex numbers:
[0096] For the complex stream corresponding to the target phase, an iterative method is used to match each 32-bit and 256 CCK codewords. The matching method uses the following algorithm for matching selection:
[0097] 21) First, calculate the sum of the Euclidean distances between the 32-bit CCK codeword and the target complex number:
[0098]
[0099] In the above formula, S i is the sum of the Euclidean distances, C i,j is the codeword of the CCK codebook, is the target phase sequence;
[0100] 22) Calculate the distance sum between non-matching codewords in the 32-bit codeword. In order to measure the distance sum between non-matching fields and exclude the influence of multiple non-matching fields, the following definition is used:
[0101] In the case of the same range of Euclidean distance, the farther the distance between the mismatched phases is, the better the low-pass filtering smoothing effect can be obtained, which can be represented by the following formula:
[0102] arg max min I i,k+1 -I i,k
[0103] In the above formula, I i,k is the kth position in the CCK codeword that does not match the target phase;
[0104] Fewer mismatched fields will result in closer waveforms after low-pass filtering, so:
[0105]
[0106] In the above formula, P is defined as the matching metric value, and M is the number of mismatched codewords. When the sum of the Euclidean distances is the same and the distances between the mismatched phases are close, the larger the matching metric value, the closer the corresponding waveforms of the two phases are. Therefore, after each codeword calculation is completed, the codeword with the largest matching metric value is selected as the simulation codeword.
[0107] 3. Center Frequency Offset Compensation
[0108] The design of the above steps is based on the fact that the center frequencies are completely consistent. However, the center frequencies of existing Wi-Fi channels and ZigBee channels are not aligned. In fact, from ZigBee channels 12 to 24, there are corresponding Wi-Fi channel bands covering the ZigBee channel bands, and there is a 2MHz center frequency offset (see Figure 4 The existence of center frequency offset makes the original analog CCK codeword not correctly received at the corresponding frequency receiving end, so CCK codeword matching also requires corresponding offset compensation (see Figure 5 ).
[0109] In fact, the CCK codeword conforms to the following formula after the center frequency is offset:
[0110]
[0111] In the above formula, C i Represents each bit in the CCK codebook, f w -f b is the difference in center frequency offset, which is fixed at 2MHz here, n is the nth bit in the CCK codebook, T s It represents the sampling rate of the modulation mode, C' i is the codebook after center frequency offset.
[0112] The original 256 CCK code words are processed in sequence to generate a center frequency compensation codebook, and then the iterative matching of step 2 is completed.
[0113] 4. Generate Wi-Fi Commercial Device Packet Payload
[0114] The Wi-Fi data frame structure includes the leading sequence, MAC frame header, frame body and CRC check field, such as Figure 6 shown.
[0115] The final phase and waveform of the Wi-Fi payload are affected by the initial scrambling code value and the initial phase value (see Figure 7 ), and in the CCK modulation process, the selection of each CCK codeword will be affected by the initial phase. Each codeword of CCK modulation contains 8 bits, and the phase is determined by the first two bits. Phase relative to the previous symbol All odd-numbered symbols are rotated 180 degrees based on the standard DQPSK modulation, as shown in Table 2 below.
[0116] Table 2 11M CCK codewords Transformation table
[0117]
[0118]
[0119] In this step, the above factors are taken into consideration to generate the commercial equipment load of the target phase.
[0120] 41) Collect device information, including Wi-Fi device address, wireless interface, and parameters such as capabilities and maxmcs, and calculate Wi-Fi device preamble information and frame header information.
[0121] 42) Based on the above information, calculate the CCK modulation initial phase and the scrambler initial value at the frame body.
[0122] 43) Calculate the payload of the commercial device data packet based on the initial phase and scrambling code initial value obtained above and the CCK codebook sequence obtained in step 3.
[0123] 5. Customization and modification of commercial equipment
[0124] Compatibility with commercial devices is achieved through minor modifications to commercial Wi-Fi device drivers. Due to the particularity of Wi-Fi technology CCK modulation, 11 CCK bits express 2 ZigBee technology bits, and ZigBee technology's direct sequence spread spectrum sequence technology causes a simple ZigBee packet structure to generate a large number of CCK bits, which will cause the corresponding Wi-Fi payload to be greater than 256 bytes. Therefore, it is necessary to divide the payload into multiple information units, and then restore the Wi-Fi payload when sending at the bottom layer (see Figure 8 ).
[0125] The steps are:
[0126] 51) Wi-Fi packet payload design, designing the Wi-Fi payload into multiple information elements;
[0127] 52) Modify the Wi-Fi device driver, detect the cross-technology communication packet, and restore the information element;
[0128] 53) Set Wi-Fi device parameters so that the 2.4GHz signal supports the 802.11b protocol and sets the basic rate to 11Mb / s.
[0129] The experimental equipment used in the examples of the present invention is: the Wi-Fi transmitter is a commercial Wi-Fi device GL-AR750S-EXT, and the receiving device is a ZigBee commercial device CC2530, hereinafter referred to as WiZig; for comparison group 1, the transmitter is a ZigBee commercial device CC2530, and the receiving device is a ZigBee commercial device CC2530.
[0130] The examples of the present invention respectively verify the advantages and technical indicators of the communication technology at different communication distances.
[0131] In order to verify the advantages of this communication technology in terms of communication distance, while keeping the communication scenario and transmission power unchanged, 3m, 5m, 8m, 10m, 15m, and 20m were selected as the test distances, and 300 data packets were sent respectively. The frame reception rate (FRR) and receiving signal strength indication (RSSI) of the two experimental groups under the above communication conditions were counted. The test results are shown in Fig. 9 and Fig.10 .
[0132] Depend on Fig. 9 and Fig.10 It can be seen that the WiZig technology of the present invention has a comparable data transmission effect in terms of frame reception rate when the distance is 3m and 5m as compared to the ZigBee technology, and within this distance, the received signal strength of WiZig is stronger than that of ZigBee technology. When the distance is greater than 5m, the present technology has a more excellent effect, and its frame reception rate is still about 90% at 20m, and because of its larger transmission power, the present technology has a stronger anti-interference ability.
[0133] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art may make various modifications or variations within the scope of the claims, which do not affect the essence of the present invention.
Claims
1. A commercial Wi-Fi to ZigBee technology highly reliable direct communication method, characterized in that: The following steps are involved:
1. Obtain the target phase sequence of the ZigBee data frame Map the target ZigBee data frame bit sequence through the MSK modulation and demodulation mapping table to obtain the target phase sequence of the ZigBee data frame; 2. Matching the Wi-Fi Technology CCK Codebook Based on the Target Phase Sequence Each group of CCK codebooks is interpolated and resampled respectively, and the ZigBee phase sequence is resampled with the same fine-grainedness as the CCK codebook. The phase matching algorithm is used to match the CCK codebook of the target phase sequence to obtain the Wi-Fi CCK codeword with the highest matching degree with the target phase sequence of the ZigBee data frame; 3. Center Frequency Offset Compensation The CCK codeword conforms to the following formula after the center frequency offset: In the above formula, C i represents each bit in the CCK codebook, f w -f b is the difference in center frequency offset, which is fixed at 2MHz here, n is the nth bit in the CCK codebook, T s It represents the sampling rate of the modulation mode, C' i is the codebook after center frequency offset; The original CCK codeword is processed in sequence to generate a center frequency compensation codebook, and then the iterative matching of step 2 is completed; 4. Generate Wi-Fi Commercial Device Packet Payload 41) Obtain Wi-Fi device preamble information and MAC frame header information; 42) According to the information obtained in step 41), and according to the 802.11b protocol stack, the CCK modulation mode sequentially calculates the CCK modulation initial phase and the scrambler initial value of the frame body; 43) Calculate the payload of the commercial device data packet according to the initial phase and the initial value of the scrambling code obtained in step 42) and the CCK codebook sequence obtained in step 3; 5. Customized modification of commercial equipment to achieve compatibility with commercial equipment.
2. The commercial Wi-Fi to ZigBee technology highly reliable direct communication method according to claim 1, characterized in that: In step 1, the ZigBee data frame structure to be simulated is generated. Each byte is decomposed into a ZigBee technology symbol sequence in units of 4 bits. According to the MSK modulation and demodulation mapping table, each symbol is mapped to a 32-bit chip sequence. The phase sequence obtained by converting the physical layer bit stream composed of the chip sequence is the target phase sequence of the ZigBee data frame.
3. The commercial Wi-Fi to ZigBee technology highly reliable direct communication method according to claim 2, characterized in that: The steps of converting the physical layer bit stream to obtain the phase sequence include: Set the initial phase Starting from the first byte B1 of the bit stream, if B1>1, then otherwise And so on: Bn>1, otherwise 4. The commercial Wi-Fi to ZigBee technology highly reliable direct communication method according to claim 1, characterized in that: In step 1, the ZigBee bit sequence can also be obtained through an O-QPSK modulation mapping table, and the target phase sequence of the ZigBee data frame is obtained by performing angle conversion on the obtained waveform.
5. The commercial Wi-Fi to ZigBee technology highly reliable direct communication method according to claim 4, characterized in that: Generate the ZigBee data frame structure to be simulated. After each byte is inverted through little-endian arrangement, every 4 bits are divided into a symbol, which is mapped into a physical layer bit sequence according to the O-QPSK modulation direct sequence spread spectrum sequence table, and then formed into a 4MHz sampled waveform complex number through O-QPSK modulation; then put the complex number in the constellation diagram, convert the angle into phase, and finally form the target phase sequence of the ZigBee data frame.
6. The commercial Wi-Fi to ZigBee technology highly reliable direct communication method according to claim 1, characterized in that: In step 2, the original 11MHz CCK codebook is resampled to 44MHz; the 2MHz bandwidth ZigBee phase sequence is also resampled to 44MHz.
7. The commercial Wi-Fi to ZigBee technology highly reliable direct communication method according to claim 1, characterized in that: The resampling method is: or 8. The commercial Wi-Fi to ZigBee technology highly reliable direct communication method according to claim 1, characterized in that: In step 2, the CCK codebook and target phase matching mechanism is: Since the waveform corresponding to the ZigBee phase is x(n)=cosx+i*sinx, the CCK codebook is calculated by the Euler formula e xi =cosx+i*sinx, so the CCK phase is converted into an 8-bit 11MHz complex number, and both are matched through complex numbers: For the complex stream corresponding to the target phase, an iterative method is used to match each 32-bit and 256 CCK codewords. The matching method uses the following algorithm for matching selection: 21) First, calculate the sum of the Euclidean distances between the 32-bit CCK codeword and the target complex number: In the above formula, S i is the sum of the Euclidean distances, C i,j is the codeword of the CCK codebook, is the target phase sequence; 22) Calculate the distance sum between non-matching codewords in the 32-bit codeword. In order to measure the distance sum between non-matching fields and exclude the influence of multiple non-matching fields, the following definition is used: In the case of the same range of Euclidean distance, the farther the distance between the mismatched phases is, the better the low-pass filtering smoothing effect can be obtained, which can be represented by the following formula: arg max min I i,k+1 -IN i,k In the above formula, I i,k is the kth position in the CCK codeword that does not match the target phase; Fewer mismatched fields will result in closer waveforms after low-pass filtering, so: In the above formula, P is defined as the matching metric value, and M is the number of mismatched codewords. When the sum of the Euclidean distances is the same and the distances between the mismatched phases are close, the larger the matching metric value, the closer the corresponding waveforms of the two phases are. Therefore, after each codeword calculation is completed, the codeword with the largest matching metric value is selected as the simulation codeword.
9. The commercial Wi-Fi to ZigBee technology highly reliable direct communication method according to claim 1, characterized in that: In step 5, the compatibility of commercial devices is achieved by patching and upgrading the drivers of commercial Wi-Fi devices.
10. The commercial Wi-Fi to ZigBee technology highly reliable direct communication method according to claim 1, characterized in that: In step 5, the commercial equipment is customized and modified, which specifically includes the following steps: 51) Wi-Fi packet payload design, designing the Wi-Fi packet payload into multiple information elements; 52) Modify the Wi-Fi device driver, detect the cross-technology communication packet, and restore the information element; 53) Set Wi-Fi device parameters so that the 2.4GHz signal supports the 802.11b protocol and sets the basic rate to 11Mb / s.
