CN105095812A - Self-adaptive resonant frequency method and self-adaptive resonant frequency device - Google Patents

Self-adaptive resonant frequency method and self-adaptive resonant frequency device Download PDF

Info

Publication number
CN105095812A
CN105095812A CN201510541937.4A CN201510541937A CN105095812A CN 105095812 A CN105095812 A CN 105095812A CN 201510541937 A CN201510541937 A CN 201510541937A CN 105095812 A CN105095812 A CN 105095812A
Authority
CN
China
Prior art keywords
misregistration
terminal
yield value
judges
type
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.)
Granted
Application number
CN201510541937.4A
Other languages
Chinese (zh)
Other versions
CN105095812B (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.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies 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 Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201510541937.4A priority Critical patent/CN105095812B/en
Publication of CN105095812A publication Critical patent/CN105095812A/en
Application granted granted Critical
Publication of CN105095812B publication Critical patent/CN105095812B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Detection And Prevention Of Errors In Transmission (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a self-adaptive resonant frequency method and a self-adaptive resonant frequency device. The self-adaptive resonant frequency method comprises the following steps: when a terminal receives a card search request from an upper computer, the terminal executes the following steps: step 1, the terminal carries out card search according to a yield value and obtains a card search result; step 2, the terminal judges whether card search is successful according to the card search result, if so, the terminal returns an operation result to the upper computer, if not, the terminal executes step 3; step 3, the terminal updates an error code according to the card search result; step 4, the terminal adjusts the yield value according to the error code; and step 5, the terminal judges whether the adjusted yield value is in a first default range, if so, the terminal executes the step 1, and if not, the terminal returns card search failure information to the upper computer to finish. By utilizing the self-adaptive resonant frequency method, the yield value of the smart card signal received by the terminal is automatically adjusted according to error type generated in card search process, and the communication efficiency of the terminal and a smart card is improved.

Description

A kind of method and apparatus of self-adapting resonance frequency
Technical field
The present invention relates to the communications field, particularly relate to a kind of method and apparatus of self-adapting resonance frequency.
Background technology
In prior art, in terminal and smart card communications process, due to the manufacture craft problem of smart card, or the growth of the working time along with smart card, the situation that the resonance frequency that there will be smart card changes, cause terminal can not receive the signal of smart card normally, reduce the communication efficiency of terminal and smart card, even make terminal can not communicate with smart card.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, a kind of method and apparatus of self-adapting resonance frequency is provided, according to the type of error occurred in card seeking process, the yield value of Smart card signal is received in automatic adjustment terminal, make the smart card of the different resonance frequency of terminal self-adaptation, improve the communication efficiency of terminal and smart card.
The method of a kind of self-adapting resonance frequency provided by the invention, comprising:
When terminal receives the card seeking request of host computer transmission, perform following steps:
Step S1: described terminal carries out card seeking according to yield value, obtains card seeking result;
Step S2: described terminal judges whether card seeking success according to described card seeking result, is return operating result to described host computer, terminates, otherwise performs step S3;
Step S3: described terminal upgrades error code according to described card seeking result;
Step S4: described terminal adjusts described yield value according to described error code;
Step S5: whether the yield value after the adjustment of described terminal judges, in the first preset range, is return step S1, otherwise returns card seeking failure information to described host computer, terminate.
The invention provides a kind of device of self-adapting resonance frequency, described device comprises: main control chip, contactless chip and communication interface;
The card seeking request that described communication interface sends for receiving host computer;
Described main control chip comprises receiver module, sending module, the first judge module, update module, adjusting module and the second judge module;
Described sending module, for when described communication interface receives described card seeking request, sends to described contactless chip by described yield value, sends card seeking instruction to described contactless chip; When described first judge module judges card seeking success, return operating result by described communication interface to described host computer; When described second judge module judges that the yield value after described adjustment is not in described first preset range, return card seeking failure information by described communication interface to described host computer;
Described receiver module, for receiving the described card seeking result that described contactless chip returns;
Described first judge module, the described card seeking result for receiving according to described receiver module judges whether card seeking success;
Described update module, during for judging card seeking failure when described first judge module, upgrades error code according to described card seeking result;
Described adjusting module, adjusts described yield value for the described error code obtained according to described update module;
Described second judge module, for judging that the yield value after the adjustment of described adjusting module is whether in the first preset range, when the yield value after described adjustment is in described first preset range, triggers described sending module and the yield value after described adjustment is sent to described contactless chip;
The card seeking instruction that described contactless chip sends for receiving described main control chip, sends card seeking instruction to smart card, generates card seeking result, returns described card seeking result to described main control chip.
The present invention compared with prior art, has the following advantages:
The method and apparatus of a kind of self-adapting resonance frequency provided by the invention, according to the type of error occurred in card seeking process, receive the yield value of Smart card signal in automatic adjustment terminal, make the smart card of the different resonance frequency of terminal self-adaptation, improve the communication efficiency of terminal and smart card.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the method for a kind of self-adapting resonance frequency that the embodiment of the present invention 1 provides;
Fig. 2 is a kind of specific implementation process flow diagram of step 107 in the embodiment of the present invention 1;
Fig. 3 is another specific implementation process flow diagram of step 107 in the embodiment of the present invention 1;
Fig. 4 is the module map of the device of a kind of self-adapting resonance frequency that the embodiment of the present invention 2 provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiment 1
Embodiments of the invention 1 provide a kind of method of self-adapting resonance frequency, as shown in Figure 1, when terminal receives the card seeking request of host computer transmission, perform following steps:
Step 101: terminal initialization errors number;
Preferably, the initial value of errors number is 0;
In the present embodiment, this step can also comprise: terminal initialization yield value; Preferably, the initial value of yield value is 4;
Step 102: terminal carries out card seeking according to yield value, obtains card seeking result;
Particularly, yield value is sent to the contactless chip in terminal by terminal, and terminal sends card seeking instruction to contactless chip, receives the card seeking result that contactless chip returns;
Such as, terminal is 0x00FFFF0100 to the card seeking instruction that contactless chip sends;
Particularly, yield value sends to the contactless chip in terminal to be by terminal: yield value is write the gain control register of contactless chip by terminal;
Preferably, yield value is write the high 4 of gain control register ReceiveConfigurationRegister4 by terminal;
Such as, if yield value is 4, then terminal is set to binary number 0100 by high 4 of gain control register ReceiveConfigurationRegister4;
Step 103: terminal judges whether card seeking success according to card seeking result, is return operating result to host computer, terminates, otherwise performs step 104;
Particularly, terminal obtains the return code in card seeking result, judges whether return code is the first preset value, is, determines card seeking success, otherwise determines card seeking failure;
Preferably, the first preset value is 0x00;
Such as, the return code in card seeking result is 0xCE, then terminal judges goes out the return code in card seeking result is not the first preset value, determines card seeking failure;
Step 104: whether terminal judges errors number is greater than maximum times, is, returns card seeking failure information to host computer, terminates, otherwise performs step 105;
Step 105: terminal upgrades errors number, upgrades error code according to card seeking result;
Particularly, error code from adding 1, is set to the return code in card seeking result by errors number by terminal;
Step 106: terminal adjusts yield value according to error code;
Preferably, the corresponding type of error of error code, type of error comprises check errors, frame mistake and time-out error; In addition, terminal also can according to other error codes adjustment yield value;
Step 107: whether the yield value after terminal judges adjustment, in the first preset range, is that terminal returns step 102, otherwise returns card seeking failure information to host computer, terminates;
Preferably, in the present embodiment, the first preset range is 0 to 10;
In the present embodiment, step 106 is specially: terminal, according to error code and Smart card signal intensity adjustment yield value, as shown in Figure 2, comprising:
Step 201: terminal obtains Smart card signal intensity;
Particularly, terminal, by reading signal intensity indicator register, obtains Smart card signal intensity;
Preferably, terminal obtains high 4 bit data of signal intensity indicator register RSSIDisplayRegister as Smart card signal intensity;
Such as, high 4 bit data of the signal intensity indicator register RSSIDisplayRegister that terminal gets are binary number 0110, then the Smart card signal intensity that terminal gets is 6;
In the present embodiment, terminal also comprises after getting Smart card signal intensity: whether the Smart card signal intensity that terminal judges gets, in the second preset range, is perform step 202, otherwise returns card seeking failure information to host computer, terminates;
Particularly, whether the Smart card signal intensity that terminal judges gets, in preset range, is, determines that Smart card signal intensity is correct, otherwise determines that Smart card signal intensity is incorrect;
Preferably, the second preset range is 0 to 12;
After step 201, can also comprise: terminal clear signal intensity indicator register;
Step 202: the size of terminal judges Smart card signal intensity, if Smart card signal intensity is less than the 4th preset value, performs step 203, if Smart card signal intensity is greater than the 5th preset value, performs step 204, if other values then perform step 205;
Particularly, in the present embodiment, the 4th preset value is less than the 5th preset value;
Preferably, in the present embodiment, the 4th preset value is the 4, five preset value is 8;
Step 203: yield value is reduced first and presets step-length by terminal, performs step 107;
Step 204: yield value is increased first and presets step-length by terminal, performs step 107;
Step 205: terminal according to error code misjudgment type, if check errors then performs step 206, if frame mistake then performs step 207, if time-out error then performs step 208;
Particularly, the value of terminal judges error code, if the 6th preset value then determines that type of error is check errors, if the 7th preset value then determines that type of error is frame mistake, if the 8th preset value then determines that type of error is time-out error;
Preferably, the 6th preset value is 0xCE, and the 7th preset value is 0xC6, and the 8th preset value is 0xF9;
Step 206: yield value is increased first and presets step-length by terminal, performs step 107;
Step 207: yield value is increased second and presets step-length by terminal, performs step 107;
Step 208: yield value is reduced first and presets step-length by terminal, performs step 107;
Particularly, the first default step-length is greater than the second default step-length;
Preferably, in the present embodiment, the first default step-length is the 2, second default step-length is 1;
In addition, in the present embodiment, step 106 is specially: terminal, according to error code and errors number adjustment yield value, as shown in Figure 3, can also be:
Step 301: terminal according to error code misjudgment type, if check errors then performs step 302, if frame mistake then performs step 308, if time-out error then performs step 314;
Particularly, the value of terminal judges error code, if the 6th preset value then determines that type of error is check errors, if the 7th preset value then determines that type of error is frame mistake, if the 8th preset value then determines that type of error is time-out error;
Preferably, the 6th preset value is 0xCE, and the 7th preset value is 0xC6, and the 8th preset value is 0xF9;
Step 302: whether terminal judges errors number is preset times, is perform step 303, otherwise perform step 304;
Particularly, preset times is 1;
Step 303: yield value is increased second and presets step-length by terminal, misregistration is set to check errors, performs step 107;
Particularly, the value of misregistration is set to the 6th preset value by terminal;
Step 304: the type of terminal judges misregistration, if check errors then performs step 305, if frame mistake then performs step 306, if time-out error then performs step 307;
Particularly, the value of terminal judges misregistration, if the 6th preset value then determines that the type of misregistration is check errors, if the 7th preset value then determines that the type of misregistration is frame mistake, if the 8th preset value then determines that the type of misregistration is time-out error;
Step 305: yield value is increased first and presets step-length by terminal, misregistration is set to check errors, performs step 107;
Particularly, the value of misregistration is set to the 6th preset value by terminal;
Step 306: yield value is increased second and presets step-length by terminal, misregistration is set to check errors, performs step 107;
Step 307: yield value is reduced second and presets step-length by terminal, misregistration is set to check errors, performs step 107;
Step 308: whether terminal judges errors number is preset times, is perform step 309, otherwise perform step 310;
Step 309: yield value is increased first and presets step-length by terminal, misregistration is set to frame mistake, performs step 107;
Particularly, the value of misregistration is set to the 7th preset value by terminal;
Step 310: the type of terminal judges misregistration, if check errors then performs step 311, if frame mistake then performs step 312, if time-out error then performs step 313;
Step 311: yield value is increased first and presets step-length by terminal, misregistration is set to frame mistake, performs step 107;
Particularly, the value of misregistration is set to the 7th preset value by terminal;
Step 312: yield value is increased first and presets step-length by terminal, misregistration is set to frame mistake, performs step 107;
Step 313: yield value is increased second and presets step-length by terminal, misregistration is set to frame mistake, performs step 107;
Step 314: whether terminal judges errors number is preset times, is perform step 315, otherwise perform step 316;
Step 315: yield value is reduced first and presets step-length by terminal, misregistration is set to time-out error, performs step 107;
Particularly, the value of misregistration is set to the 8th preset value by terminal;
Step 316: the type of terminal judges misregistration, if check errors then performs step 317, if frame mistake then performs step 318, if time-out error then performs step 319;
Step 317: yield value is reduced first and presets step-length by terminal, misregistration is set to time-out error, performs step 107;
Particularly, the value of misregistration is set to the 8th preset value by terminal;
Step 318: yield value is reduced second and presets step-length by terminal, misregistration is set to time-out error, performs step 107;
Step 319: whether terminal judges yield value is less than the 9th preset value, is perform step 320, otherwise perform step 321;
Preferably, the 9th preset value is 0;
Step 320: yield value is set to the tenth preset value by terminal, performs step 322;
Preferably, the tenth preset value is 4;
Step 321: yield value is reduced first and presets step-length by terminal, performs step 322;
Step 322: misregistration is set to time-out error by terminal, performs step 107;
Particularly, the first default step-length is greater than the second default step-length;
Preferably, in the present embodiment, the first default step-length is the 2, second default step-length is 1.
The method of a kind of self-adapting resonance frequency provided in the present embodiment, according to the type of error occurred in card seeking process, receive the yield value of Smart card signal in automatic adjustment terminal, make the smart card of the different resonance frequency of terminal self-adaptation, improve the communication efficiency of terminal and smart card.
Embodiment 2
Embodiments of the invention 2 provide a kind of device of self-adapting resonance frequency, as shown in Figure 4, comprising: main control chip 401, contactless chip 402 and communication interface 403;
The card seeking request that communication interface 403 sends for receiving host computer;
Yield value, for when communication interface 403 receives card seeking request, is sent to contactless chip 402 by main control chip 401; Card seeking instruction is sent to contactless chip 402; Receive the card seeking result that contactless chip 402 returns; Card seeking success is judged whether according to the card seeking result received; When judging card seeking success, return operating result by communication interface 403 to host computer; When judging card seeking failure, upgrade error code according to card seeking result; According to error code adjustment yield value; Judge that the yield value after adjusting is whether in the first preset range, when the yield value after adjusting is in the first preset range, yield value after adjustment is sent to contactless chip 402, when the yield value after adjusting is not in the first preset range, return card seeking failure information by communication interface 403 to host computer;
The card seeking instruction that contactless chip 402 sends for receiving main control chip 401, sends card seeking instruction to smart card, generates card seeking result, returns card seeking result to main control chip 401;
Particularly, main control chip 401 comprises receiver module, sending module, the first judge module, update module, adjusting module and the second judge module;
Sending module, for when communication interface 403 receives card seeking request, sends to contactless chip 402, sends card seeking instruction to contactless chip 402 by yield value; When the first judge module judges card seeking success, return operating result by communication interface 403 to host computer; When the second judge module judges that the yield value after adjusting is not in the first preset range, return card seeking failure information by communication interface 403 to host computer;
Receiver module, for receiving the card seeking result that contactless chip 402 returns;
First judge module, the card seeking result for receiving according to receiver module judges whether card seeking success;
Update module, during for judging card seeking failure when the first judge module, upgrades error code according to card seeking result;
Adjusting module, for the error code adjustment yield value obtained according to update module;
Second judge module, for judging that the yield value after adjusting module adjustment is whether in the first preset range, when the yield value after adjusting is in the first preset range, triggers sending module and the yield value after adjustment is sent to contactless chip 402;
In the present embodiment, sending module, specifically for when communication interface 403 receives card seeking request, writes the gain control register of contactless chip 402 by yield value; When the first judge module judges card seeking success, return operating result by communication interface 403 to host computer; When the second judge module judges that the yield value after adjusting is not in the first preset range, return card seeking failure information by communication interface 403 to host computer;
Preferably, sending module, writes the high 4 of gain control register ReceiveConfigurationRegister4 by yield value;
In the present embodiment, the first judge module, specifically for obtaining the return code in card seeking result, judges whether the return code in card seeking result is the first preset value, is, determines card seeking success, otherwise determines card seeking failure;
Main control chip 401 also comprises initialization module and the 3rd judge module;
Initialization module, for initialization errors number;
Update module, time also for judging card seeking failure when the first judge module, upgrades errors number;
Whether the 3rd judge module, be greater than maximum times for the errors number after judging update module renewal;
Sending module, time also for judging that when the 3rd judge module the errors number after upgrading is greater than maximum times, returns card seeking failure information by communication interface 403 to host computer;
Update module, time also for judging that when the 3rd judge module the errors number after upgrading is not more than maximum times, upgrades error code according to card seeking result;
When update module is specifically for judging that when the 3rd judge module the errors number after upgrading is not more than maximum times, error code is set to the return code in card seeking result;
In the present embodiment, communication interface 403 includes but not limited to USB interface, blue tooth interface, earphone interface.
In the present embodiment, adjusting module comprises: the first acquiring unit, the first judging unit, the first adjustment unit and the second judging unit;
First acquiring unit is for obtaining Smart card signal intensity;
First judging unit, for judging the size of the Smart card signal intensity that the first acquiring unit gets;
Second judging unit, during for judging that Smart card signal intensity is not less than the 4th preset value and is not more than the 5th preset value when the first judging unit, according to error code misjudgment type;
First adjustment unit, for when the first judging unit judges that Smart card signal intensity is less than the 4th preset value, reduces first by yield value and presets step-length; When the first judging unit judges that Smart card signal intensity is greater than the 5th preset value, yield value is increased first and presets step-length; When according to error code, the second judging unit judges that type of error is check errors, yield value is increased first and presets step-length; When according to error code, the second judging unit judges that type of error is frame mistake, yield value is increased second and presets step-length; When according to error code, the second judging unit judges that type of error is time-out error, yield value is reduced first and presets step-length;
4th preset value is less than the 5th preset value;
First acquiring unit, specifically for by reading signal intensity indicator register, obtains Smart card signal intensity;
Preferably, the first acquiring unit is for obtaining high 4 bit data of signal intensity indicator register RSSIDisplayRegister as Smart card signal intensity;
In addition, adjusting module also comprises the 3rd judging unit, for judging the Smart card signal intensity that gets whether in the second preset range, be trigger the size that the first judging unit judges the Smart card signal intensity got, otherwise triggering sending module return card seeking failure information by communication interface 403 to host computer;
In addition, adjusting module also comprises clearing cell, for after the first acquiring unit gets Smart card signal intensity, and clear signal intensity indicator register;
Preferably, in the present embodiment, the 4th preset value is the 4, five preset value is 8;
In the present embodiment, second judging unit is specifically for the value of misjudgment code, if the 6th preset value then determines that type of error is check errors, if the 7th preset value then determines that type of error is frame mistake, if the 8th preset value then determines that type of error is time-out error;
Particularly, in the present embodiment, first presets step-length is greater than the second default step-length;
Preferably, in the present embodiment, the first default step-length is the 2, second default step-length is 1;
In addition, in the present embodiment, main control chip 401 also comprises initialization module and the 3rd judge module;
Initialization module, for initialization errors number;
Update module, time also for judging card seeking failure when the first judge module, upgrades errors number;
Adjusting module comprises: the 4th judging unit, the 5th judging unit, the 6th judging unit and the second adjustment unit
4th judging unit, for according to error code misjudgment type;
5th judging unit, for when according to error code, the 4th judging unit judges that type of error is check errors, whether misjudgment number of times is preset times;
Second adjustment unit, for when the 5th judging unit judges that errors number is preset times, increases second by yield value and presets step-length, misregistration is set to check errors;
6th judging unit, during for judging errors number when the 5th judging unit not for preset times, judges the type of misregistration;
Second adjustment unit, for when the type that the 6th judging unit judges misregistration is check errors, increases first by yield value and presets step-length, misregistration is set to check errors; When the type that the 6th judging unit judges misregistration is frame mistake, yield value is increased second and presets step-length, misregistration is set to check errors; When the type that the 6th judging unit judges misregistration is time-out error, yield value is reduced second and presets step-length, misregistration is set to check errors;
5th judging unit, for when according to error code, the 4th judging unit judges that type of error is frame mistake, whether misjudgment number of times is preset times;
Second adjustment unit, for when the 5th judging unit judges that errors number is preset times, increases first by yield value and presets step-length, misregistration is set to frame mistake;
6th judging unit, during for judging errors number when the 5th judging unit not for preset times, judges the type of misregistration;
Second adjustment unit, for when the type that the 6th judging unit judges misregistration is check errors, increases first by yield value and presets step-length, misregistration is set to frame mistake; When the type that the 6th judging unit judges misregistration is frame mistake, yield value is increased first and presets step-length, misregistration is set to frame mistake; When the type that the 6th judging unit judges misregistration is time-out error, yield value is increased second and presets step-length, misregistration is set to frame mistake;
5th judging unit, for when according to error code, the 4th judging unit judges that type of error is time-out error, whether misjudgment number of times is preset times;
Second adjustment unit, for when the 5th judging unit judges that errors number is preset times, reduces first by yield value and presets step-length, misregistration is set to time-out error;
6th judging unit, during for judging errors number when the 5th judging unit not for preset times, judges the type of misregistration;
Second adjustment unit, for when the type that the 6th judging unit judges misregistration is check errors, reduces first by yield value and presets step-length, misregistration is set to time-out error; When the type that the 6th judging unit judges misregistration is frame mistake, yield value is reduced second and presets step-length, misregistration is set to time-out error; When the type that the 6th judging unit judges misregistration is time-out error, judge whether yield value is less than the 9th preset value; When yield value is less than the 9th preset value, yield value is set to the tenth preset value, misregistration is set to time-out error; When yield value is not less than the 9th preset value, yield value is reduced first and presets step-length, misregistration is set to time-out error;
In the present embodiment, 4th judging unit is specifically for the value of misjudgment code, if the 6th preset value then determines that type of error is check errors, if the 7th preset value then determines that type of error is frame mistake, if the 8th preset value then determines that type of error is time-out error;
In the present embodiment, 6th judging unit is specifically for judging the value obtaining misregistration, if the 6th preset value then determines that the type of misregistration is check errors, if the 7th preset value then determines that the type of misregistration is frame mistake, if the 8th preset value then determines that the type of misregistration is time-out error;
In the present embodiment, the second adjustment unit is used for that misregistration is set to check errors and is specially: main control chip 401 is for being set to the 6th preset value by the value of misregistration;
In the present embodiment, the second adjustment unit is used for that misregistration is set to frame mistake and is specially: main control chip 401 is for being set to the 7th preset value by the value of misregistration;
In the present embodiment, the second adjustment unit is used for that misregistration is set to time-out error and is specially: main control chip 401 is for being set to the 8th preset value by the value of misregistration.
The device of a kind of self-adapting resonance frequency provided in the present embodiment, according to the type of error occurred in card seeking process, receive the yield value of Smart card signal in automatic adjustment terminal, make the smart card of the different resonance frequency of terminal self-adaptation, improve the communication efficiency of terminal and smart card.
The above; be only the present invention's preferably embodiment, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in technical scope disclosed by the invention; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (25)

1. a method for self-adapting resonance frequency, is characterized in that, described method comprises: when terminal receives the card seeking request of host computer transmission, perform following steps:
Step S1: described terminal carries out card seeking according to yield value, obtains card seeking result;
Step S2: described terminal judges whether card seeking success according to described card seeking result, is return operating result to described host computer, terminates, otherwise performs step S3;
Step S3: described terminal upgrades error code according to described card seeking result;
Step S4: described terminal adjusts described yield value according to described error code;
Step S5: whether the yield value after the adjustment of described terminal judges, in the first preset range, is return step S1, otherwise returns card seeking failure information to described host computer, terminate.
2. method according to claim 1, it is characterized in that, described terminal judges whether card seeking success according to described card seeking result, be specially: described terminal obtains the return code in described card seeking result, judge whether described return code is the first preset value, be determine card seeking success, otherwise determine card seeking failure.
3. method according to claim 1, is characterized in that, also comprises before described step S1:
Step S0: described terminal initialization errors number;
When terminal described in described step S2 judges card seeking failure according to described card seeking result, also comprise: described terminal upgrades described errors number;
Described step S2 comprises after judging card seeking failure: described in described terminal judges, whether errors number is greater than maximum times, is, returns card seeking failure information to described host computer, terminates, otherwise performs step S3.
4. method according to claim 1, is characterized in that, described step S4 specifically comprises:
Step P01: described terminal obtains Smart card signal intensity;
Step P02: the size of Smart card signal intensity described in described terminal judges, if described Smart card signal intensity is less than the 4th preset value, perform step P03, if described Smart card signal intensity is greater than the 5th preset value, perform step P04, if described Smart card signal intensity is other values, perform step P05;
Step P03: described yield value is reduced first and presets step-length by described terminal, performs step S5;
Step P04: described yield value is increased first and presets step-length by described terminal, performs step S5;
Step P05: described terminal according to described error code misjudgment type, if check errors then performs step P06, if frame mistake then performs step P07, if time-out error then performs step P08;
Step P06: described yield value is increased first and presets step-length by described terminal, performs step S5;
Step P07: described yield value is increased second and presets step-length by described terminal, performs step S5;
Step P08: described yield value is reduced first and presets step-length by described terminal, performs step S5;
Described 4th preset value is less than described 5th preset value.
5. method according to claim 4, is characterized in that, described terminal obtains Smart card signal intensity, is specially: described terminal, by reading signal intensity indicator register, obtains described Smart card signal intensity.
6. method according to claim 4, it is characterized in that, also comprise after described step P01: whether Smart card signal intensity described in described terminal judges, in the second preset range, is perform step P02, otherwise return card seeking failure information to described host computer, terminate.
7. method according to claim 4, it is characterized in that, described terminal is according to described error code misjudgment type, be specially: the value of error code described in described terminal judges, if the 6th preset value then determines that type of error is check errors, if the 7th preset value then determines that type of error is frame mistake, if the 8th preset value then determines that type of error is time-out error.
8. method according to claim 4, is characterized in that, described first presets step-length is greater than the described second default step-length.
9. method according to claim 1, is characterized in that, also comprises before described step S1:
Step S0: described terminal initialization errors number;
When terminal described in described step S2 judges card seeking failure according to described card seeking result, also comprise: described terminal upgrades described errors number;
Described step S4 specifically comprises:
Step Q01: described terminal according to described error code misjudgment type, if check errors then performs step Q02, if frame mistake then performs step Q05, if time-out error then performs step Q08;
Step Q02: whether errors number described in described terminal judges is preset times, is perform step Q03, otherwise perform step Q04;
Step Q03: described yield value is increased second and presets step-length by described terminal, misregistration is set to check errors, performs step S5;
Step Q04: the type of misregistration described in described terminal judges, if check errors then described terminal described yield value increased first preset step-length, described misregistration is set to check errors, performs step S5; If described yield value is increased the second default step-length by frame mistake then described terminal, described misregistration is set to check errors, performs step S5; If described yield value is reduced the second default step-length by time-out error then described terminal, described misregistration is set to check errors, performs step S5;
Step Q05: whether errors number described in described terminal judges is preset times, is perform step Q06, otherwise perform step Q07;
Step Q06: described yield value is increased first and presets step-length by described terminal, misregistration is set to frame mistake, performs step S5;
Step Q07: the type of misregistration described in described terminal judges, if check errors then described terminal described yield value increased first preset step-length, described misregistration is set to frame mistake, performs step S5; If described yield value is increased the first default step-length by frame mistake then described terminal, described misregistration is set to frame mistake, performs step S5; If described yield value is increased the second default step-length by time-out error then described terminal, described misregistration is set to frame mistake, performs step S5;
Step Q08: whether errors number described in described terminal judges is preset times, is perform step Q09, otherwise perform step Q10;
Step Q09: described yield value is reduced first and presets step-length by described terminal, misregistration is set to time-out error, performs step S5;
Step Q10: the type of misregistration described in described terminal judges, if check errors then described terminal described yield value reduced first preset step-length, described misregistration is set to time-out error, performs step S5; If described yield value is reduced the second default step-length by frame mistake then described terminal, described misregistration is set to time-out error, performs step S5; If time-out error then performs step Q11;
Step Q11: whether yield value described in described terminal judges is less than the 9th preset value, is, described yield value is set to the tenth preset value by described terminal, and described misregistration is set to time-out error, performs step S5; Otherwise described yield value is reduced first by described terminal presets step-length, described misregistration is set to time-out error, performs step S5.
10. method according to claim 9, it is characterized in that, described terminal is according to described error code misjudgment type, be specially: the value of error code described in described terminal judges, if the 6th preset value then determines that type of error is check errors, if the 7th preset value then determines that type of error is frame mistake, if the 8th preset value then determines that type of error is time-out error.
11. methods according to claim 9, it is characterized in that, the type of misregistration described in described terminal judges, be specially: the value of misregistration described in described terminal judges, if the 6th preset value then determines that the type of misregistration is check errors, if the 7th preset value then determines that the type of misregistration is frame mistake, if the 8th preset value then determines that the type of misregistration is time-out error.
12. methods according to claim 9, is characterized in that, described first presets step-length is greater than the described second default step-length.
The device of 13. 1 kinds of self-adapting resonance frequencies, is characterized in that, described device comprises: main control chip, contactless chip and communication interface;
The card seeking request that described communication interface sends for receiving host computer;
Described main control chip comprises receiver module, sending module, the first judge module, update module, adjusting module and the second judge module;
Described sending module, for when described communication interface receives described card seeking request, sends to described contactless chip by described yield value, sends card seeking instruction to described contactless chip; When described first judge module judges card seeking success, return operating result by described communication interface to described host computer; When described second judge module judges that the yield value after described adjustment is not in described first preset range, return card seeking failure information by described communication interface to described host computer;
Described receiver module, for receiving the described card seeking result that described contactless chip returns;
Described first judge module, the described card seeking result for receiving according to described receiver module judges whether card seeking success;
Described update module, during for judging card seeking failure when described first judge module, upgrades error code according to described card seeking result;
Described adjusting module, adjusts described yield value for the described error code obtained according to described update module;
Described second judge module, for judging that the yield value after the adjustment of described adjusting module is whether in the first preset range, when the yield value after described adjustment is in described first preset range, triggers described sending module and the yield value after described adjustment is sent to described contactless chip;
The card seeking instruction that described contactless chip sends for receiving described main control chip, sends card seeking instruction to smart card, generates card seeking result, returns described card seeking result to described main control chip.
14. devices according to claim 13, is characterized in that, described sending module, specifically for when described communication interface receives described card seeking request, described yield value are write the gain control register of described contactless chip; When described first judge module judges card seeking success, return operating result by described communication interface to described host computer; When described second judge module judges that the yield value after described adjustment is not in described first preset range, return card seeking failure information by described communication interface to described host computer.
15. devices according to claim 13, it is characterized in that, described first judge module, specifically for obtaining the return code in described card seeking result, judges whether the return code in described card seeking result is the first preset value, be determine card seeking success, otherwise determine card seeking failure.
16. devices according to claim 13, is characterized in that, described main control chip also comprises initialization module and the 3rd judge module;
Described initialization module, for initialization errors number;
Described update module, time also for judging card seeking failure when described first judge module, upgrades described errors number;
Whether described 3rd judge module, be greater than maximum times for the errors number after judging the renewal of described update module;
Described sending module, time also for judging that when described 3rd judge module the errors number after upgrading is greater than maximum times, returns card seeking failure information by described communication interface to described host computer;
Described update module, time also for judging that when described 3rd judge module the errors number after upgrading is not more than maximum times, upgrades error code according to described card seeking result.
17. devices according to claim 13, is characterized in that, described adjusting module comprises: the first acquiring unit, the first judging unit, the first adjustment unit and the second judging unit;
Described first acquiring unit is for obtaining Smart card signal intensity;
Described first judging unit, for judging the size of the described Smart card signal intensity that described first acquiring unit gets;
Described second judging unit, for when described first judging unit judges that described Smart card signal intensity is not less than the 4th preset value and is not more than the 5th preset value, according to described error code misjudgment type;
Described first adjustment unit, for when described first judging unit judges that described Smart card signal intensity is less than the 4th preset value, reduces first by described yield value and presets step-length; When described first judging unit judges that described Smart card signal intensity is greater than the 5th preset value, described yield value is increased first and presets step-length; When according to described error code, described second judging unit judges that type of error is check errors, described yield value is increased first and presets step-length; When according to described error code, described second judging unit judges that type of error is frame mistake, described yield value is increased second and presets step-length; When according to described error code, described second judging unit judges that type of error is time-out error, described yield value is reduced first and presets step-length;
Described 4th preset value is less than described 5th preset value.
18. devices according to claim 17, is characterized in that, described first acquiring unit, specifically for by reading signal intensity indicator register, obtains described Smart card signal intensity.
19. devices according to claim 17, it is characterized in that, described adjusting module also comprises the 3rd judging unit, for judging the Smart card signal intensity that gets whether in the second preset range, be trigger the size that described first judging unit judges the described Smart card signal intensity got, otherwise trigger described sending module and return card seeking failure information by described communication interface to described host computer.
20. devices according to claim 17, it is characterized in that, described second judging unit is specifically for judging the value of described error code, if the 6th preset value then determines that type of error is check errors, if the 7th preset value then determines that type of error is frame mistake, if the 8th preset value then determines that type of error is time-out error.
21. devices according to claim 17, is characterized in that, described first presets step-length is greater than the described second default step-length.
22. devices according to claim 13, is characterized in that, described main control chip also comprises initialization module and the 3rd judge module;
Described initialization module, for initialization errors number;
Described update module, time also for judging card seeking failure when described first judge module, upgrades described errors number;
Described adjusting module comprises: the 4th judging unit, the 5th judging unit, the 6th judging unit and the second adjustment unit
Described 4th judging unit, for according to described error code misjudgment type;
Described 5th judging unit, for when according to described error code, described 4th judging unit judges that type of error is check errors, judges whether described errors number is preset times;
Described second adjustment unit, for when described 5th judging unit judges that described errors number is preset times, increases second by described yield value and presets step-length, misregistration is set to check errors;
Described 6th judging unit, during for judging described errors number when described 5th judging unit not for preset times, judges the type of described misregistration;
Described second adjustment unit, for when described 6th judging unit judges that the type of described misregistration is check errors, increases first by described yield value and presets step-length, described misregistration is set to check errors; When described 6th judging unit judges that the type of described misregistration is frame mistake, described yield value is increased second and presets step-length, described misregistration is set to check errors; When described 6th judging unit judges that the type of described misregistration is time-out error, described yield value is reduced second and presets step-length, described misregistration is set to check errors;
Described 5th judging unit, for when according to described error code, described 4th judging unit judges that type of error is frame mistake, judges whether described errors number is preset times;
Described second adjustment unit, for when described 5th judging unit judges that described errors number is preset times, increases first by described yield value and presets step-length, misregistration is set to frame mistake;
Described 6th judging unit, during for judging described errors number when described 5th judging unit not for preset times, judges the type of described misregistration;
Described second adjustment unit, for when described 6th judging unit judges that the type of described misregistration is check errors, increases first by described yield value and presets step-length, described misregistration is set to frame mistake; When described 6th judging unit judges that the type of described misregistration is frame mistake, described yield value is increased first and presets step-length, described misregistration is set to frame mistake; When described 6th judging unit judges that the type of described misregistration is time-out error, described yield value is increased second and presets step-length, described misregistration is set to frame mistake;
Described 5th judging unit, for when according to described error code, described 4th judging unit judges that type of error is time-out error, judges whether described errors number is preset times;
Described second adjustment unit, for when described 5th judging unit judges that described errors number is preset times, reduces first by described yield value and presets step-length, misregistration is set to time-out error;
Described 6th judging unit, during for judging described errors number when described 5th judging unit not for preset times, judges the type of described misregistration;
Described second adjustment unit, for when described 6th judging unit judges that the type of described misregistration is check errors, reduces first by described yield value and presets step-length, described misregistration is set to time-out error; When described 6th judging unit judges that the type of described misregistration is frame mistake, described yield value is reduced second and presets step-length, described misregistration is set to time-out error; When described 6th judging unit judges that the type of described misregistration is time-out error, judge whether described yield value is less than the 9th preset value; When described yield value is less than the 9th preset value, described yield value is set to the tenth preset value, described misregistration is set to time-out error; When described yield value is not less than the 9th preset value, described yield value is reduced first and presets step-length, described misregistration is set to time-out error.
23. devices according to claim 22, it is characterized in that, described 4th judging unit is specifically for judging the value of described error code, if the 6th preset value then determines that type of error is check errors, if the 7th preset value then determines that type of error is frame mistake, if the 8th preset value then determines that type of error is time-out error.
24. devices according to claim 22, it is characterized in that, described 6th judging unit is specifically for judging the value obtaining misregistration, if the 6th preset value then determines that the type of misregistration is check errors, if the 7th preset value then determines that the type of misregistration is frame mistake, if the 8th preset value then determines that the type of misregistration is time-out error.
25. devices according to claim 22, is characterized in that, described first presets step-length is greater than the described second default step-length.
CN201510541937.4A 2015-08-28 2015-08-28 A kind of method and apparatus of self-adapting resonance frequency Active CN105095812B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510541937.4A CN105095812B (en) 2015-08-28 2015-08-28 A kind of method and apparatus of self-adapting resonance frequency

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510541937.4A CN105095812B (en) 2015-08-28 2015-08-28 A kind of method and apparatus of self-adapting resonance frequency

Publications (2)

Publication Number Publication Date
CN105095812A true CN105095812A (en) 2015-11-25
CN105095812B CN105095812B (en) 2017-11-28

Family

ID=54576209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510541937.4A Active CN105095812B (en) 2015-08-28 2015-08-28 A kind of method and apparatus of self-adapting resonance frequency

Country Status (1)

Country Link
CN (1) CN105095812B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106446739A (en) * 2016-09-22 2017-02-22 飞天诚信科技股份有限公司 Method and apparatus for self-adaptive gain adjustment
CN112929099A (en) * 2019-12-06 2021-06-08 惠州视维新技术有限公司 Signal detection method, terminal and storage medium
CN114024579A (en) * 2021-11-03 2022-02-08 Oppo广东移动通信有限公司 Method, device, chip, terminal and readable storage medium for adjusting resonant frequency
WO2022083523A1 (en) * 2020-10-19 2022-04-28 深圳市力博得科技有限公司 Control method and system for preventing incorrect identification in near-field transmission, and device and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722687A (en) * 2012-05-30 2012-10-10 飞天诚信科技股份有限公司 Method for detecting departure of non-contact type CPU card from radio frequency field
CN103810451A (en) * 2013-12-20 2014-05-21 利尔达科技集团股份有限公司 Radio frequency card detection device and radio frequency card detection method thereof
CN104636696A (en) * 2015-02-27 2015-05-20 飞天诚信科技股份有限公司 Device and method for detecting card-in-field

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722687A (en) * 2012-05-30 2012-10-10 飞天诚信科技股份有限公司 Method for detecting departure of non-contact type CPU card from radio frequency field
US20150091699A1 (en) * 2012-05-30 2015-04-02 Zhou Lu Method for detecting that contactless cpu card leaves radio-frequency field
CN103810451A (en) * 2013-12-20 2014-05-21 利尔达科技集团股份有限公司 Radio frequency card detection device and radio frequency card detection method thereof
CN104636696A (en) * 2015-02-27 2015-05-20 飞天诚信科技股份有限公司 Device and method for detecting card-in-field

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106446739A (en) * 2016-09-22 2017-02-22 飞天诚信科技股份有限公司 Method and apparatus for self-adaptive gain adjustment
CN106446739B (en) * 2016-09-22 2019-03-05 飞天诚信科技股份有限公司 A kind of method and device of adaptive gain regulating
CN112929099A (en) * 2019-12-06 2021-06-08 惠州视维新技术有限公司 Signal detection method, terminal and storage medium
CN112929099B (en) * 2019-12-06 2022-10-11 惠州视维新技术有限公司 Signal detection method, terminal and storage medium
WO2022083523A1 (en) * 2020-10-19 2022-04-28 深圳市力博得科技有限公司 Control method and system for preventing incorrect identification in near-field transmission, and device and medium
CN114024579A (en) * 2021-11-03 2022-02-08 Oppo广东移动通信有限公司 Method, device, chip, terminal and readable storage medium for adjusting resonant frequency

Also Published As

Publication number Publication date
CN105095812B (en) 2017-11-28

Similar Documents

Publication Publication Date Title
CN105095812A (en) Self-adaptive resonant frequency method and self-adaptive resonant frequency device
US10412207B2 (en) Mobile terminal, power adapter, and upgrade method thereof
CN109343873A (en) A kind of intelligent appliance remote upgrade control method
CN106874054B (en) Method and system for on-line upgrading module program in repeater
CN110475000B (en) Touch screen point reporting method and related equipment
CN103019892A (en) NV data backup and recovery method based on high-pass platform
CN113115351B (en) Network exception processing method, processing device, terminal equipment and medium
CN105491635A (en) Wireless device matching method, device and system
CN105159724A (en) Cross-version upgrade method for software, client and server
US20110151832A1 (en) Mobile phone and sim card operation method thereof
CN104732329A (en) Device tracking method and system
US11062634B2 (en) Drive control method, assembly and display device
US10028334B2 (en) Antenna function extension apparatus, device, and method
CN103823447B (en) The communication method of the upper and lower computer of semiconductor devices and communication system
CN103812695A (en) Software debugging method and device for SFP (small form pluggable) ONU (optical network unit)
CN105740025A (en) Bluetooth based firmware program upgrading method and apparatus
CN104618888A (en) Updating system and updating method for mobile terminal NFC chip firmware
CN111756858A (en) Remote development processing system, method and device of embedded equipment
CN105653288A (en) Method and device for automatic identification of hardware by software of module product
CN109246166B (en) Communication method and device and unmanned aerial vehicle
CN104483680A (en) Mobile positioning system and anti-interference method thereof
US20200383212A1 (en) Server and printed circuit board printing method
CN110687910A (en) Equipment control method and device, storage medium and lower computer
EP2770755B1 (en) Near field communication tag type identification
CN110177009A (en) The motor sequence number configuration method and device of Remote Control Unit

Legal Events

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