Summary of the invention
The technical problem to be solved in the present invention to detect the defect of communication interference, provides a kind of and can detect the wireless module communication interference detection method of the existence that communication is disturbed and corresponding wireless module communication interference detecting apparatus rapidly and accurately.
The present invention solves above-mentioned technical problem by following technical proposals: a kind of wireless module communication interference detection method, its feature is, it comprises: S1, arrange a SNR (SignaltoNoiseRatio, signal to noise ratio) fiducial value, an erroneous frame EDV (ErrorDetectionValue, error detection value) initial value, be less than the erroneous frame EDV threshold value of the initial value of this erroneous frame EDV; S2, startup communication Interference Detection; S3, detect the Serving cell of this wireless module and the SNR of adjacent cell, and this SNR is compared with this SNR fiducial value, if this SNR is more than or equal to this SNR fiducial value, then again perform step S3, if this SNR is less than this SNR fiducial value, then perform step S4; S4, detecting the erroneous frame that this wireless module receives, when receiving an erroneous frame, the currency of this erroneous frame EDV being subtracted 1; S5, the currency of this erroneous frame EDV to be compared with this erroneous frame EDV threshold value, if the currency of this erroneous frame EDV is more than or equal to this erroneous frame EDV threshold value, then again perform step S4, if the currency of this erroneous frame EDV is less than this erroneous frame EDV threshold value, then perform step S6; There is communication interference in S6, prompting.
Preferably, between step S5 and S6, the method also comprises: S51, arrange a frequency baseline mean and a frequency benchmark variance; S52, an execution full range scanning, calculate frequency average and the frequency variance of each frequency in each frequency range; S53, by this frequency average and frequency variance respectively with this frequency baseline mean and frequency benchmark variance ratio comparatively, if this frequency average is less than or equal to this frequency baseline mean or this frequency variance is more than or equal to this frequency benchmark variance, then again perform step S3, if this frequency average is greater than this frequency baseline mean and this frequency variance is less than this frequency benchmark variance, then perform step S6.
Preferably, the initial value of this erroneous frame EDV be greater than 5 natural number.
Preferably, this erroneous frame EDV threshold value is 2.
Preferably, this frequency baseline mean is 50.
Preferably, this frequency benchmark variance is 10.
Another technical scheme of the present invention is: a kind of wireless module communication interference detecting apparatus for realizing above-mentioned wireless module communication interference detection method, its feature is, this device comprises: a SNR comparison module, for the SNR of the Serving cell and adjacent cell of detecting this wireless module, and this SNR is compared with this SNR fiducial value, only call an erroneous frame detection module when this SNR is less than this SNR fiducial value; This erroneous frame detection module, for subtracting 1 when receiving an erroneous frame by the currency of this erroneous frame EDV; One erroneous frame EDV comparison module, for being compared with this erroneous frame EDV threshold value by the currency of this erroneous frame EDV, only calls a reminding module when the currency of this erroneous frame EDV is less than this erroneous frame EDV threshold value; , there is communication interference for prompting in this reminding module.
Preferably, arrange a frequency baseline mean and a frequency benchmark variance, this device also comprises: a full range scan module, for performing a full range scanning, and calculates frequency average and the frequency variance of each frequency in each frequency range; One frequency comparison module, for by this frequency average and frequency variance respectively with this frequency baseline mean and frequency benchmark variance ratio comparatively, only call this reminding module when this frequency average is greater than this frequency baseline mean and this frequency variance is less than this frequency benchmark variance; This full range scan module and this frequency comparison module start when the currency of this erroneous frame EDV is less than this erroneous frame EDV threshold value.
Preferably, the initial value of this erroneous frame EDV be greater than 5 natural number.
Preferably, this erroneous frame EDV threshold value is 2.
Preferably, this frequency baseline mean is 50.
Preferably, this frequency benchmark variance is 10.
Positive progressive effect of the present invention is: utilize the present invention, after wireless module enters the region that there is communication interference, just the existence that communication is disturbed can be detected quickly and accurately, and reported user, interference range is entered with reminding user, thus be convenient to user and take correct counter-measure promptly to solve this communication failure, such as avoid the region being provided with interference unit in time, or start certain security protection means etc.
Embodiment
Present pre-ferred embodiments is provided, to describe technical scheme of the present invention in detail below in conjunction with accompanying drawing.
With reference to figure 1, this wireless module communication interference detection method of the present invention is described.The method mainly comprises the following steps:
Step 100, before the detection starting to carry out communication interference, arranges a SNR fiducial value, the initial value of an erroneous frame EDV and an erroneous frame EDV threshold value in advance.Wherein, this erroneous frame EDV threshold value should be less than the initial value of this erroneous frame EDV, and the initial value of this erroneous frame EDV is recommended to be taken as the natural number being greater than 5, and be such as taken as 8, this erroneous frame EDV threshold value then recommends to be taken as 2.
Step 101, starts the communication interference check function of this wireless module, and this starting operation can realize by inputting corresponding AT order in the computer be connected with this wireless module or MCU (micro control unit).The concrete AT command statement of input is conventionally known to one of skill in the art, therefore does not repeat.
Step 102, detect the Serving cell of this wireless module and the SNR of adjacent cell, and this SNR and this SNR fiducial value of detecting acquisition are compared, wherein, this SNR fiducial value should be taken as does not exist the SNR numerical value detected under the common communication condition of any communication interference, this SNR fiducial value can measure acquisition objectively by the routine techniques means in this area, therefore does not repeat its concrete value mode at this.If detect this SNR obtained to be more than or equal to this SNR fiducial value, then illustrate that now communication condition well, does not exist any communication interference, therefore performs step 102 again; If detect this SNR obtained to be less than this SNR fiducial value, then illustrate now communication condition not good, likely have communication interference in the cell, therefore continue to perform step 103, to judge in fact whether to exist communication interference.
Step 103, detects the erroneous frame that this wireless module receives, and just the currency of this erroneous frame EDV is subtracted 1 when receiving an erroneous frame.Such as, when first time performs step 103, the numerical value of this erroneous frame EDV will subtract 1 from initial value 8 and become 7.
Step 104, the currency of this erroneous frame EDV and this erroneous frame EDV threshold value are compared, if the currency of this erroneous frame EDV is more than or equal to this erroneous frame EDV threshold value, such as after first time performs step 103, now the currency of this erroneous frame EDV is 7, still be greater than this erroneous frame EDV threshold value 2, therefore again perform step 103; If the currency of this erroneous frame EDV has been less than this erroneous frame EDV threshold value, the currency of such as this erroneous frame EDV has dropped under 2, then continue to perform step 105.
, really there is communication interference by reporting URC (UnsolicitedResultCode, initiatively result code) or the mode of control GPIO (universal input/output) pin to point out in step 105.
But, judge whether communication interference exists still to have only by said method and certain may occur misjudgment phenomenon, before step 105, therefore preferably increase series of steps more whether exist Communication Jamming and carry out secondary judgement.Particularly, between step 104 and step 105, following steps are increased:
Step 1000, arrange a frequency baseline mean and a frequency benchmark variance in advance, the recommendation value of these two predetermined values is respectively 50 and 10.
Step 1001, performs a full range scanning, thus calculates the frequency average and frequency variance that obtain each frequency in each frequency range.
Step 1002, compares with this frequency baseline mean and frequency benchmark variance respectively by this frequency average and frequency variance of calculating acquisition.If this frequency average is less than or equal to this frequency baseline mean, or this frequency variance is more than or equal to this frequency benchmark variance, then whether exists communication interference in explanation above-mentioned steps and occurred erroneous judgement, in fact there is not interference phenomenon, therefore again perform step 102; If this frequency average is greater than this frequency baseline mean, and this frequency variance is less than this frequency benchmark variance, then illustrate now really there is interference phenomenon, therefore performs step 105 and occurs that communication is disturbed with prompting.
In order to realize above-mentioned wireless module communication interference detection method, shown in figure 2, wireless module communication interference detecting apparatus of the present invention comprises: a SNR comparison module 1, for the SNR of the Serving cell and adjacent cell of detecting this wireless module, and this SNR and this SNR fiducial value of detecting acquisition are compared, it only just can call an erroneous frame detection module 2 when detecting this SNR obtained and being less than this SNR fiducial value; This erroneous frame detection module 2, for subtracting 1 when receiving an erroneous frame by the currency of this erroneous frame EDV; One erroneous frame EDV comparison module 3, for the currency of this erroneous frame EDV and this erroneous frame EDV threshold value being compared, it only just can call a reminding module 4 when the currency of this erroneous frame EDV is less than this erroneous frame EDV threshold value; , there is communication interference for prompting in this reminding module 4.
Similarly, in order to avoid occurring disturbing to communication the erroneous judgement whether existed, this wireless module communication interference detecting apparatus of the present invention can also comprise: a full range scan module 5, for performing a full range scanning, and calculates frequency average and the frequency variance of each frequency in each frequency range; One frequency comparison module 6, for this frequency average and frequency variance of calculating acquisition are compared with this frequency baseline mean and frequency benchmark variance respectively, it is only greater than this frequency baseline mean in this frequency average, and, when this frequency variance is less than this frequency benchmark variance, just can call this reminding module.Thus, when this erroneous frame EDV comparison module 3 judges that the currency of this erroneous frame EDV is less than this erroneous frame EDV threshold value, and no longer directly call this reminding module 4, but call this full range scan module 5 and this frequency comparison module 6 and carry out secondary judgement to whether there is communication interference, judge more accurately to making communication interference.
Each above-mentioned functional module all can be realized in conjunction with existing software approach under existing hardware condition, therefore does not repeat its specific implementation at this.
In sum, utilize the present invention, after wireless module enters the region that there is communication interference, just the existence that communication is disturbed can be detected quickly and accurately, and reported user, enter interference range with reminding user, thus be convenient to user and take correct counter-measure promptly to solve this communication failure.
Although the foregoing describe the specific embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, protection scope of the present invention is defined by the appended claims.Those skilled in the art, under the prerequisite not deviating from principle of the present invention and essence, can make various changes or modifications to these execution modes, but these change and amendment all falls into protection scope of the present invention.