A kind of jamproof device and method of shared channelTechnical field
The present invention relates to the jamproof device of shared channel in network communication field, more particularly to a kind of network routing deviceAnd method.
Background technology
With the continuous development of wireless technology, increasing occasion, which needs to use, is wirelessly transmitted data,Because it is easily installed, flexibility is strong, avoids the locality of wired connection, thus is gradually used by various occasions, and withConstantly increasing for demand, is wirelessly transferred the pattern that a simple hair one is received that has been no longer limited to, but received and dispatched towards multiple spotComplex data transmission development.
At present, some existing network routing devices have been provided with the wireless communication protocol mode while work of two kinds and the aboveThe technology of work, but two or more wireless communication protocols in same frequency segment occur that what is interfered asks at workTopic, the normal work of whole network routing device is influenceed, such as:A kind of network routing device used on the market now, itsTwo kinds of wireless communication protocols of WiFi and ZigBee are inside integrated with, the two is worked by respective microprocessor operation independent respectively.User both can carry out wireless networking by the WiFi module in it, can set up ZigBee wireless networks by ZigBee module again,ZigBee application systems are built, realizes and the terminal device in network is controlled.Above-mentioned technical scheme can bring one when realizingA little defects:Because the working frequency range of the two is 2.4GHz frequency ranges, if just both are in same covering frequency range (for example WiFiIn 2402M, ZigBee is in 2405M).The two is in working condition, when WiFi wireless communication protocols carry out big data transmission,The data transfer of ZigBee wireless communication protocols can be caused strong influence by a certain degree of interference, influence wholeThe normal operation of ZigBee application systems.
Above-mentioned technical problem is directed to, how to efficiently solve same frequency range multichannel in data transfer from interferenceAs the important topic of industry technical field personnel research.
The content of the invention
It is same in the prior art to solve it is an object of the invention to provide a kind of jamproof device and method of shared channelThe problem of multichannel is with occurring channel disturbance in one wireless routing device during band operation.
To reach above-mentioned purpose, the jamproof device of a kind of shared channel of the invention, it includes:First wireless transmissionDevice, the second wireless launcher, the first wireless receiver, the second wireless receiver, microcontroller, antenna and memory, this is micro-Controller is connected with above-mentioned each part respectively, first wireless launcher, the first wireless receiver and the second wireless launcher,Two wireless receivers are in same band operation, and the transmission of respective wireless data is carried out respectively by the antenna of connection;MicrocontrollerThe working condition of each transmitter and receiver is controlled, whether the wireless launcher of microcontroller real-time judge first needs to send dataInformation, when needing to send, microprocessor control closes the second wireless launcher, the first wireless receiver and the second wireless receivingThe data transfer of device;When not needed, then whether the wireless launcher of real-time judge second needs to send data message, if the second nothingLine transmitter needs to send then microprocessor control and closes the first wireless receiver, the data transfer of the second wireless receiver, ifSecond wireless launcher need not be sent, and microcontroller compartment of terrain switches the first wireless receiver and entered with the second wireless receiverRow data transfer.
Preferably, the first above-mentioned wireless launcher and the first wireless receiver transmission ZigBee wireless communication datas.
Preferably, the second above-mentioned wireless launcher and the second wireless receiver transmission WiFi wireless communication datas.
Preferably, above-mentioned memory internal memory contains ZigBee and WiFi execute program instructions coded data.
Preferably, above-mentioned microcontroller is controlled by RF switch with antenna is connected.
A kind of shared channel anti-disturbance method of the present invention, including step are as follows:
1) microcontroller compartment of terrain switches the first wireless receiver, the second wireless receiver receives extraneous wireless data letterNumber;
2) whether the wireless launcher of microcontroller real-time judge first is needed to send data message, and step is entered if "Yes"3);Enter step 4) if "No";
3) microcontroller controls the first wireless launcher to carry out respective wireless instruction according to the wireless data information receivedThe transmission of signal;
4) whether the wireless launcher of microcontroller real-time judge second is needed to send data message, and step is entered if "Yes"5);Step 1) is backed into if "No";
5) microcontroller controls the second wireless launcher to carry out respective wireless instruction according to the wireless data information receivedThe transmission of signal, then repeat step 1);
The priority that the first above-mentioned wireless launcher sends data message is sent without line number higher than the second wireless launcherIt is believed that the priority of breath.
Preferably, the first above-mentioned wireless launcher and the first wireless receiver transmission ZigBee wireless communication datas.
Preferably, the second above-mentioned wireless launcher and the second wireless receiver transmission WiFi wireless communication datas.
Preferably, the wireless hair of the first above-mentioned wireless receiver, the second wireless receiver, the first wireless launcher and secondEmitter carries out the transmission of wireless data signal based on the same antenna.
The jamproof device and method of shared channel of the present invention, in a network routing device, two kinds and the aboveShared channel can be completed when transmitting wireless data by an antenna, and data are transmitted in shared channel using time-division multiplex technologyShi Shixian channels are anti-interference, control different transmitters and receiver is sent or time and the priority of receiving radio data;Keep awayThe problem of multichannel is with occurring channel disturbance in consolidated network routing device during band operation is in the prior art exempted from.
Brief description of the drawings
Fig. 1 illustrates the structural principle block diagram of the jamproof device of shared channel of the present invention.
Fig. 2 illustrates the step flow chart of shared channel anti-disturbance method of the present invention.
Embodiment
For the ease of the understanding of those skilled in the art, the present invention is made further with reference to embodiment and accompanying drawingBright, the content that embodiment refers to not is limitation of the invention.
Shown in reference picture 1, the jamproof device of a kind of shared channel of the invention, refer specifically to route for a kind of wireless networkEquipment, it includes:First wireless launcher, the second wireless launcher, the first wireless receiver, the second wireless receiver, micro-controlDevice, antenna and memory processed, the microcontroller are connected with above-mentioned each part respectively, first wireless launcher, first wirelessReceiver and the second wireless launcher, the second wireless receiver are in same band operation, are carried out respectively respectively by the antenna of connectionFrom the transmission of wireless data;The working condition of each transmitter of microprocessor control and receiver, microcontroller real-time judge firstWhether wireless launcher needs to send data message, and when needing to send, microprocessor control closes the second wireless launcher, theThe data transfer of one wireless receiver and the second wireless receiver;When not needed, then judge whether the second wireless launcher needsData message is sent, microprocessor control closes the first wireless receiver, second if the second wireless launcher needs to sendThe data transfer of wireless receiver, microcontroller compartment of terrain switches first and wirelessly connect if the second wireless launcher need not be sentDevice is received with the second wireless receiver to carry out data transmission.
Specifically, the first above-mentioned wireless launcher be ZigBee transmitter modules, the first wireless receiver be that ZigBee connectsReceive module, the second wireless launcher be WiFi transmitter modules, the second wireless receiver be WiFi receiving modules, respectively with microcontrollerDevice is connected, and by the respective working condition of microprocessor control, memory memory storage controls the programmed instruction number of each wireless moduleAccording to when the above-mentioned each wireless module of microprocessor control works, the priority orders controlled are:It is ZigBee transmitter modules first;Secondly it is WiFi transmitter modules;It is finally ZigBee receiving modules and WiFi receiving modules;I.e. microcontroller is preferentially analyzedWhether ZigBee transmitter modules are needed to send ZigBee wireless data informations, and when needing to send, microcontroller is opened by radio frequencyThe data transfer that WiFi transmitter modules, ZigBee receiving modules or WiFi receiving modules are closed in control is closed, it is wireless to carry out ZigBeeThe transmission of data message;When that need not send ZigBee wireless data informations, then whether microcontroller analysis WiFi transmitter modules needWiFi wireless data informations are sent, when needing to send, then microcontroller is controlled by RF switch closes ZigBee receptionsThe data transfer of module, WiFi receiving modules, carry out the transmission of WiFi wireless data informations;As ZigBee transmitter modules and WiFiWhen transmitter module need not send wireless data, then microcontroller compartment of terrain switching ZigBee receiving modules receive mould with WiFiBlock carries out data transmission, and the switching time of the two switches at intervals of Millisecond;
In the jamproof device of shared channel of the present invention, ZigBee transmitter modules, ZigBee receiving modules, WiFi transmittingsModule, WiFi receiving modules can share an antenna, that is, support the antenna of 2.4GHz frequency ranges, and each module passes through 2.4GHz frequency rangesAntenna carries out the transmission of wireless data, the ZigBee and WiFi execute program instructions that microcontroller is contained by memory internal memoryCoded data is controlled to each module transceiving data, is controlled according to the priority of above-mentioned each module, that is, is controlled antennaThe reception or transmission of a kind of wireless data signal are within a specified time only carried out, avoids the wireless signal of same frequency range different agreementThe problem of channel disturbance occurs when transmitting at the same time, influence the transmission quality of ZigBee wireless signals.
Shown in reference picture 2, a kind of shared channel anti-disturbance method of the invention, including step are as follows:
Step 11:Microcontroller compartment of terrain switches the first wireless receiver, the second wireless receiver receives the external world without line numberIt is believed that number;Microcontroller controls ZigBee receiving modules (i.e. the first wireless receiver) and WiFi to connect by controlling RF switchThe data transmission state of module (i.e. the second wireless receiver) is received, compartment of terrain collects corresponding wireless data signal, between the twoSelf-defined setting, preferably Millisecond can be carried out as needed every the time;
Step 12:Microcontroller according to the extraneous wireless data signal real-time judge ZigBee transmitter modules received (i.e.First wireless launcher) whether need to send data message, step 13 is entered if "Yes";Enter step 14 if "No";
Step 13:Microcontroller is analyzed the wireless data information received, and in corresponding to extraction in memoryWireless instructions coded data controls the first wireless launcher to carry out the transmission of respective wireless command signal, while passes through RF switchThe data transfer of WiFi transmitter modules, ZigBee receiving modules or WiFi receiving modules is closed in control;
Step 14:Whether microcontroller real-time judge WiFi transmitter modules (i.e. the second wireless launcher) need to send dataInformation, step 15 is entered if "Yes";Step 11 is backed into if "No";
Step 15:Microcontroller controls WiFi transmitter modules progress respective wireless to refer to according to the wireless data information receivedThe transmission of signal is made, then repeat step 11;
The priority that above-mentioned ZigBee transmitter modules send data message sends wireless data higher than WiFi transmitter modulesThe priority of information.
Concrete application approach of the present invention is a lot, and described above is only the preferred embodiment of the present invention, it is noted that forFor those skilled in the art, under the premise without departing from the principles of the invention, some improvement can also be made, thisA little improve also should be regarded as protection scope of the present invention.