CN106788610A - A kind of control method of short-range communication, device and mobile terminal - Google Patents

A kind of control method of short-range communication, device and mobile terminal Download PDF

Info

Publication number
CN106788610A
CN106788610A CN201510831057.0A CN201510831057A CN106788610A CN 106788610 A CN106788610 A CN 106788610A CN 201510831057 A CN201510831057 A CN 201510831057A CN 106788610 A CN106788610 A CN 106788610A
Authority
CN
China
Prior art keywords
smart card
nfc communication
status word
data
instruction
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
CN201510831057.0A
Other languages
Chinese (zh)
Other versions
CN106788610B (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.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai 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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN201510831057.0A priority Critical patent/CN106788610B/en
Publication of CN106788610A publication Critical patent/CN106788610A/en
Application granted granted Critical
Publication of CN106788610B publication Critical patent/CN106788610B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/72Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for local intradevice communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/77Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for interrogation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a kind of control method of short-range communication, device and mobile terminal, methods described includes:Receive the instruction for obtaining data related to NFC communication on smart card that application layer sends;Corresponding instruction is sent to obtain related data to smart card in batches, and the result that smart card is returned every time is preserved, and is judged on smart card in the absence of the related data that can read until passing through returned result;In the absence of after the data on smart card is judged, the result that the smart card that will be preserved every time is returned reports application layer in batches, wherein, on acquisition smart card is received after the instruction of related data, if receiving other instructions for accessing smart card again, after then controlling other treatment for instructing and wait until and to judge not existing the related data that can read on smart card, just process other and instruct.The present invention ensure that ongoing NFC communication is not interrupted by traditional communication and other NFC communications.

Description

A kind of control method of short-range communication, device and mobile terminal
Technical field
The present invention relates to close range communication techniques field, more particularly to a kind of control method of short-range communication, Device and mobile terminal.
Background technology
With developing rapidly for integrated circuit technique, the disposal ability of mobile terminal constantly strengthens;With network, The continuous progress of the communication technology, the application scenarios of mobile terminal also more enrich, and mobile terminal is from simple Call instrument be changed into an integrated information processing platform.Mobile terminal is integrated with increasing function, closely Distance communication (Near Field Communication, NFC) is exactly one of which.Using NFC function, User no longer needs to carry with mass transit card, subway card, or even bank card, can as long as carrying mobile terminal Arbitrarily to go on a journey.The function not only needs mobile terminal to support NFC function in itself, it is also desirable to which for example user knows Other module (SIM:Subscriber Identity Module) block or USIM (USIM: Universal Subscriber Identity Module) card smart card support NFC function.With NFC work( Public transport card information, or subway card information, even bank card information are saved in the USIM/SIM cards of energy, When needing to obtain these information, terminal is interacted by application layer and USIM/SIM cards, and reading needs Data, or change corresponding data.In order to by traditional communication in these data and USIM/SIM cards Data are separated, and are in the prior art distinguished NFC communication and traditional communication by passage.Mobile terminal Serve as the direct interaction that passage is carried out between application layer and USIM/SIM cards in protocol stack part.Mobile terminal exists When carrying out traditional communication, the operation such as it is read out, writes to card on main channel, and is carrying out NFC communication When, then interacted with card in logical channel.
In existing design, used as card reader, mobile terminal protocol stack part is as just logical for mobile terminal Road is without doing other any treatment.Although such design ensure that NFC function and telecommunications to a certain extent The communication process of regulation is independent of each other, but when mobile terminal needs to pass through telecommunication path and NFC communication simultaneously When being operated to USIM/SIM cards, because USIM/SIM cards are a serial communication devices, it cannot The operation of both is carried out simultaneously, therefore certainly will there is conflict in conventional telecommunications communication and the realization of NFC communication, Meanwhile, it is multiple when application layer needs to operate USIM/SIM cards in multiple logical channels simultaneously NFC communication can also interact.
Realize it is of the invention during, inventor find at least there is following technical problem in the prior art:
When data interaction is carried out by NFC communication and card in logical channel, the data interaction may be by Traditional communication on main channel is interrupted, it is also possible to interrupted by the NFC communication in other logical channels, So as to lead to not carry out complete data interaction, the NFC communication is influenceed.
The content of the invention
The present invention provides a kind of control method of NFC communication, device and mobile terminal, ensure that and enter Capable NFC communication is not interrupted by traditional communication and other NFC communications, protects data not to be lost, and is accelerated Digital independent in NFC application communications.
On the one hand, the present invention provides a kind of control method of NFC communication, including:
Receive the instruction for obtaining data related to NFC communication on smart card that application layer sends;
Corresponding instruction is sent to obtain the data related to the NFC communication to the smart card in batches, and The result that the smart card is returned every time is preserved, the intelligence is judged until passing through returned result Can not exist the data related to the NFC communication that can read on card;
Do not exist on the smart card is judged after the data related to the NFC communication that can read, incite somebody to action The result that the smart card for being preserved every time is returned reports application layer in batches,
Wherein, after the instruction for obtaining data related to the NFC communication on smart card is received, such as Fruit receives other instructions for accessing the smart card again, then control the treatment of other instructions to be waited, After judging not existing the data related to the NFC communication that can read on the smart card, just process Described other instructions.
Alternatively, when described other instructions are for multiple, include the step of other instructions described in the treatment: According to the sequencing that other are instructed is received, described other instructions are processed successively.
Alternatively, it is described to send corresponding instruction to obtain and the NFC communication phase to the smart card in batches The data of pass, and the result that the smart card is returned every time is preserved, until passing through returned knot The step of fruit is judged on the smart card in the absence of related to the NFC communication data that can read includes:
The instruction of the data related to the NFC communication is sent to institute on the acquisition smart card that will be received State smart card;
Receive the status word that the smart card is returned;
Judge whether the status word indicates related to the NFC communication in the presence of what be can read on the smart card Data, if it is, preserve the status word, send corresponding instruction to obtain to the smart card in batches The data related to the NFC communication and status word are simultaneously preserved, until the status word acquired in judgement refers to Show on the smart card in the absence of the data related to the NFC communication that can read.
Alternatively, it is described to send corresponding instruction to obtain and the NFC communication phase to the smart card in batches The data and status word of pass are simultaneously preserved, until the status word acquired in judgement is indicated on the smart card not The step of in the presence of related to the NFC communication data that can read, includes:
Corresponding instruction is sent to smart card according to the status word for being received, is obtained related to the NFC communication Data and status word;
Preserve acquired data and status word;
Judge whether acquired status word indicates to exist on the smart card can read with the NFC communication Related data;
If it is, repeat the step of above, until the status word acquired in judgement is indicated on the smart card not In the presence of the data related to the NFC communication that can read.
Alternatively, the result that the smart card that will be preserved every time is returned reports application layer in batches The step of include:
The status word for being preserved for the first time is reported to application layer, the acquisition number of application layer transmission is being received every time After according to the instruction with corresponding state word, the instruction according to application layer reports preserved data and phase to application layer Answer status word.
Alternatively, it is described to include the step of the result that the smart card is returned every time is preserved:Will be described The result that smart card is returned every time is stored in the same chained list corresponding to the NFC communication successively.
On the other hand, the present invention provides a kind of control device of NFC communication, including:
First receiver module, for number related to NFC communication on the acquisition smart card for receiving application layer transmission According to instruction;
First sending module, for sending corresponding instruction to obtain and the NFC to the smart card in batches Communicate related data, until judge module judge not exist on the smart card it is can read with the NFC Communicate related data;
Second receiver module, for receiving the smart card every time in response to the corresponding of the first sending module transmission Instruction and the result that returns;
Preserving module, for preserving the corresponding finger that the smart card sends in response to the first sending module every time The result for making and returning;
Judge module, the result for being returned every time using the second receiver module judge be on the smart card It is no to there are the data related to the NFC communication that can read;
Second sending module, for the judge module judge on the smart card in the absence of can read with After the related data of the NFC communication, the result that the smart card that will be preserved every time is returned is in batches Report application layer;
Control module, for receiving logical with the NFC on the acquisition smart card in first receiver module After believing the instruction of related data, when other instructions for accessing the smart card are received again, control it is described its The treatment that he instructs is waited, and control the treatment of other instructions on the smart card is judged not In the presence of just being proceeded by after the data related to the NFC communication that can read.
Alternatively, when described other instructions for it is multiple when, the control module be used for according to receive it is described other The sequencing of instruction, processes described other instructions successively
Alternatively, first sending module is used on the acquisition smart card that will be received and the NFC The instruction of the related data that communicate is sent to the smart card;Second receiver module is used to receive the intelligence The status word for returning can be blocked;The judge module is used to judge whether the status word indicates the smart card In the presence of the data related to the NFC communication that can read;The preserving module is used to preserve smart card return Status word;Second sending module is used to judge that the status word indicates the intelligence in the judge module Exist on blocking after the data related to the NFC communication that can read, sent to the smart card in batches Instruct to obtain the data and status word related to the NFC communication accordingly, until the judge module is sentenced Acquired status word of breaking is indicated on the smart card in the absence of the number related to the NFC communication that can read According to.
Alternatively, second sending module, for sending corresponding to smart card according to the status word for being received Instruction;Second receiver module, for obtaining the data and status word related to the NFC communication; The preserving module, for preserving acquired data and status word.
Alternatively, second sending module is used to be reported to application layer the status word for being preserved for the first time, After the instruction of the acquisition data and corresponding state word that receive application layer transmission every time, according to the instruction of application layer Preserved data and corresponding state word is reported to application layer.
Alternatively, the preserving module be used for the result that is returned to the smart card every time be stored in successively it is right In the same chained list of NFC communication described in Ying Yu.
Another further aspect, the present invention provides a kind of mobile terminal, its control device for including the NFC communication.
The control method of NFC communication, device and mobile terminal that the present invention is provided, when NFC communication process is needed Will repeatedly and smart card is when interacting, protocol stack is no longer handed over as just between application layer and smart card Mutual passage, but participate, after the instruction for receiving application layer, the entrance for preventing other from instructing, and Serve as application layer and smart card is interacted, preserve the data that smart card is returned every time, until smart card is accused Tell that this process terminates;Afterwards, protocol stack will be preserved the data is activation obtained from smart card to application layer, When protocol stack and application layer are interacted, other instructions can also be interacted with card, not influence this NFC to lead to completely Letter process.Compared with prior art, the present invention divides by by protocol stack and smart card, application layer and protocol stack Drive row repeatedly interaction into, protocol stack is obtained the cache pool of intelligent card data as application layer such that it is able to protect Demonstrate,prove ongoing NFC communication not interrupted by traditional communication and other NFC communications, it is to avoid losing for data Lose, and accelerate the reading of data.
Brief description of the drawings
The flow chart of the control method of the NFC communication that Fig. 1 is provided for one embodiment of the invention;
The flow chart of the NFC communication control method that Fig. 2 is provided for another embodiment of the present invention;
The flow chart of the NFC communication control method that Fig. 3 is provided for further embodiment of this invention;
Fig. 4 is a kind of structural representation of the control device of NFC communication provided in an embodiment of the present invention;
Fig. 5 is a kind of structural representation of mobile terminal provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clearly Chu, it is fully described by, it is clear that described embodiment is only a part of embodiment of the invention, rather than Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creation Property work under the premise of all other embodiment for being obtained, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of control method of short-range communication, as shown in figure 1, methods described bag Include:
S101, the instruction for receiving data related to certain NFC communication on the acquisition smart card that application layer sends;
S102, to smart card send instruction to obtain the data related to the NFC communication, and general in batches The result that smart card is returned every time is preserved, and judges not deposited on smart card until passing through returned result In the data related to the NFC communication that can read;
S103, judge in the absence of after the data related to the NFC communication that can read on smart card, by institute The result that the smart card of preservation is returned reports application layer in batches,
S104, carry out in step S102 during, if receiving other instructions for accessing smart card again, control The treatment of other instructions wait until and judges do not exist the can read and NFC communication phase on smart card After the data of pass, ability start to process other instruction.
When above-mentioned other instructions are for multiple, can be according to the sequencing for receiving other instructions, sequential processes Other instructions.Wherein, described other instructions can be the instruction related to NFC communication from logical channel, Can also be the instruction related to traditional communication for carrying out autonomous channel.
Preferably, the step of result that the smart card that will be preserved is returned reports application layer in batches includes: The result for being preserved for the first time is reported to application layer, after the instruction for receiving application layer transmission every time, according to The instruction of application layer reports follow-up each preserved result to application layer.
The control method of short-range communication provided in an embodiment of the present invention, when NFC communication process need repeatedly and When smart card is interacted, protocol stack no longer as just the passage interacted between application layer and smart card, But participate, after the instruction for receiving application layer, the entrance for preventing other from instructing, and serve as application layer Interacted with smart card, the data that smart card is returned every time are preserved, until smart card tells this process knot Beam;Afterwards, protocol stack will be preserved the data is activation that is obtained from smart card to application layer, in protocol stack and When application layer is interacted, other instructions can also be interacted with card, not influence this NFC communication process completely.With Prior art is compared, and the present invention is separately carried out repeatedly by by protocol stack and smart card, application layer and protocol stack Interaction, protocol stack is obtained the cache pool of intelligent card data as application layer such that it is able to which guarantee is carried out NFC communication do not interrupted by traditional communication and other NFC communications, it is to avoid the loss of data, and accelerating The reading of data.
The embodiment of the present invention also provides a kind of control method of short-range communication.In the present embodiment, NFC is worked as When communication is operated to smart card, traditional communication is also required to access smart card.As shown in Fig. 2 institute The control method for stating short-range communication includes:
S201, the application layer of mobile terminal send to smart card in logical channel and instruct, and obtain on smart card Data required for certain NFC communication, herein, the smart card can be usim card or SIM, be somebody's turn to do Data for example can be balance amount information, information of deducting fees etc..
S202, protocol stack transfer the instructions to smart card after above-mentioned instruction is received.
S203, smart card inform application layer after the instruction transmitted by application layer is received by returning to status word The implementation status of the instruction, so that application layer knows that next step needs that what does.
In NFC communication, the main status word used is exactly process byte 61XX and 9FXX, wherein, 61XX is the process byte of usim card, and 9FXX is the process byte of SIM, and both of which represents intelligence Can there are the valid data that can read on card.For example during usim card transmission process byte " 61XX ", it shows The data for still having XX bytes on card can be returned.
S204, protocol stack judge whether status word indicates intelligence after the status word for receiving smart card return Can there are the valid data that can read in card.
For example, judging whether status word is process byte 61XX or 9FXX.When protocol stack judges status word not When being process byte 61XX or 9FXX, status word is reported into application layer so that application layer is according to reporting Status word, terminate flow.
S205, when it is process byte 61XX or 9FXX that protocol stack judges status word, then status word is entered Row is preserved.
S206, protocol stack send command adapted thereto to smart card, obtain data and status word that smart card is returned.
The data and status word that S207, protocol stack return to smart card are preserved.
S208, protocol stack judge whether acquired status word is process byte 61XX or 9FXX, if it is, Then return to step S206.
If S209, protocol stack judge that acquired status word is not process byte 61XX or 9FXX, by the The status word for once being preserved reports application layer, and here, the status word for being preserved for the first time is process byte 61XX or 9FXX.
S210, application layer receive the status word that is reported of protocol stack and are processed, and judge that the status word is No is process byte 61XX or 9FXX, if it is not, then terminating flow.
If S211, application layer judge that the status word is process byte 61XX or 9FXX, continue to Protocol stack sends instruction and obtains data and status word, and data to receiving are processed, until judging The status word of acquisition is not process byte 61XX or 9FXX.
S212, protocol stack report the data and corresponding status word of its preservation according to the instruction of application layer.
S213, carry out in step S203 to S209 during, if receive carry out autonomous channel the need for access intelligence The instruction of the traditional communication that can block, such as the instruction authenticated by smart card the need for carrying out automatic network, then So that the instruction of traditional communication carries out waiting until that protocol stack judges its state from smart card for being received When word is not process byte 61XX or 9FXX, i.e., protocol stack judges no longer there is what be can read on smart card During valid data, ability start to process traditional communication.
Wherein, protocol stack will can be received from the status word or data and status word on smart card every time Sequencing according to receiving is stored in a chained list, so as to ensure when application layer and protocol stack are interacted, Data and state sequentially can be sent to application layer from chained list.
The embodiment of the present invention also provides a kind of control method of short-range communication.In the present embodiment, when one When NFC communication is operated to smart card, another NFC communication also sends to be grasped to smart card The instruction of work.As shown in figure 3, the control method of the short-range communication includes:
S301~S312 is identical with above-mentioned steps S201~S212, will not be repeated here.
S313, carry out in step S303 to S309 during, if receiving from another road logical channel The instruction of access smart card is needed, then causes that the instruction in another road logical channel carries out waiting until agreement Stack judges its status word from smart card for being received when not being process byte 61XX or 9FXX, that is, assist During related to the first NFC communication data that view stack judges on smart card that no longer presence can read, ability beginning Reason is from the instruction in another road logical channel.To the treatment of the instruction in another road logical channel according to it is preceding The essentially identical flow in face is carried out.Similarly, if more multichannel logical channel instruction being waited, The sequencing for then being reached according to the instruction in each road logical channel, is carried out successively according to essentially identical flow The treatment of instruction.
Wherein, protocol stack can preserve respective data and status word, logic according to different logical channels It is independent of each other between passage.Optionally, protocol stack can preserve obstructed logical channel by different chained lists On data and status word.For example, have overlap of 3 logical channels to the operation existence time of smart card, Then need 3 chained lists of preservation data.
Wherein, when NFC communication is operated to smart card, protocol stack receive again come autonomous channel with The related instruction of traditional communication and related to NFC communication from other road logical channels access smart card Instruct, then protocol stack no longer has the number related to first via NFC communication that can read on smart card is confirmed According to when, the sequencing for just starting to be reached according to subsequent instructions processes subsequent instructions successively.Certainly, subsequently Instruction is not limited to two-way.
The embodiment of the present invention also provides a kind of control device of NFC communication, as shown in figure 4, described device bag Include:
First receiver module 101, for related to NFC communication on the acquisition smart card for receiving application layer transmission Data instruction;
First sending module 102, for sending corresponding instruction to obtain and the NFC to smart card in batches Communicate related data, until judge module 105 judge not exist on smart card it is can read with the NFC Communicate related data;
Second receiver module 103, for receiving the phase that smart card sends in response to the first sending module 102 every time The instruction answered and the result for returning;
Preserving module 104, for preserving smart card every time in response to the corresponding of the transmission of the first sending module 102 The result for instructing and returning;
Judge module 105, the result for being returned every time using the second receiver module 103 judges smart card With the presence or absence of the data related to the NFC communication that can read;
Second sending module 106, for judging do not exist can read and institute on smart card in judge module 105 State after the related data of NFC communication, the result that the smart card that will be preserved every time is returned is reported in batches Application layer;
Control module 107, for the first receiver module 101 receive it is described acquisition smart card on the NFC Communicate after the instruction of related data, when other instructions for accessing smart card are received again, control it is described other The treatment of instruction is waited, and controlling treatment of other instructions, do not exist on smart card is judged can Just proceeded by after the data related to the NFC communication for reading.
The control device of the NFC communication that the present invention is provided, when NFC communication process needs repeatedly to be sticked into intelligence During row interaction, protocol stack is no longer as just the passage interacted between application layer and smart card, but ginseng With wherein, after the instruction for receiving application layer, the entrance of other instructions is prevented, and serve as application layer and intelligence Card is interacted, and the data that smart card is returned every time is preserved, until smart card tells that this process terminates;It Afterwards, protocol stack will be preserved the data is activation obtained from smart card to application layer, in protocol stack and application layer During interaction, other instructions can also be interacted with card, not influence this NFC communication process completely.With existing skill Art is compared, and the present invention is separately repeatedly interacted by by protocol stack and smart card, application layer and protocol stack, Protocol stack is obtained the cache pool of intelligent card data as application layer such that it is able to ensure ongoing NFC Communication do not interrupt by traditional communication and other NFC communications, it is to avoid the loss of data, and accelerates data Reading.
When described other instructions are for multiple, control module 107 is used for according to the reception elder generation that other are instructed Order, processes described other instructions successively afterwards.
Further, the first sending module 102 is used to lead to the NFC on the acquisition smart card that will be received Believe that the instruction of related data is sent to smart card;Second receiver module 103 is used to receive smart card return Status word;Judge module 105 be used for judge the status word whether on indicating intelligent card exist can read with The related data of the NFC communication.
Alternatively, when status word is process byte 61XX or 9FXX, exist in the expression smart card The data related to the NFC communication that can read, when status word is not process byte 61XX or 9FXX When, represent in the smart card do not exist the data related to the NFC communication that can read;
Further, preserving module 104 is used to preserve the status word of smart card return;Second sending module 106 are used to judge logical with the NFC in the presence of can read on the status word indicating intelligent card in judge module After believing related data, that is, when to judge the status word be not process byte 61XX or 9FXX, in batches Sent to smart card and instructed to obtain the data and status word related to the NFC communication accordingly, until sentencing Disconnected module 105 is judged on acquired status word indicating intelligent card in the absence of can read with the NFC communication Related data, that is, judge that the status word is process byte 61XX or 9FXX.
Further, the second sending module 106 is used to send phase to smart card according to the status word for being received The instruction answered, the second receiver module 103 is used to obtain the data and status word related to the NFC communication, Preserving module 104 is used to preserve acquired data and status word.
Further, the second sending module 106 is used to be reported to application layer the status word for being preserved for the first time, After the instruction of acquisition data and corresponding state word of application layer transmission is received every time, according to the finger of application layer Make and report preserved data and corresponding state word to application layer.
Yet further, preserving module 104 be used for the result that is returned to smart card every time be stored in successively it is right In the same chained list of NFC communication described in Ying Yu.Intelligence is successively accessed when there is the NFC communication in multiple logical channels When can block, different chained lists correspond to different logical channels.
As shown in figure 5, the embodiment of the present invention also provides a kind of mobile terminal, the mobile terminal includes application Layer and the interface with smart card, the mobile terminal also include the control of the NFC communication described in above-described embodiment Device processed.
Mobile terminal in the embodiment of the present invention can be mobile phone, wearable device, PAD etc., but not only limit In this.Smart card in the embodiment of the present invention can be SIM or usim card, but be not limited only to this.
The control method of embodiment of the present invention short-range communication, device and mobile terminal, go for moving The NFC communication of dynamic terminal is controlled, but is not limited only to this.
One of ordinary skill in the art will appreciate that all or part of flow in realizing above-described embodiment method, Computer program be can be by instruct the hardware of correlation to complete, described program can be stored in a calculating In machine read/write memory medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method. Wherein, described storage medium can for magnetic disc, CD, read-only memory (Read-Only Memory, ) or random access memory (Random Access Memory, RAM) etc. ROM.
The above, specific embodiment only of the invention, but protection scope of the present invention is not limited to This, any one skilled in the art the invention discloses technical scope in, can readily occur in Change or replacement, should all be included within the scope of the present invention.Therefore, protection scope of the present invention Should be defined by scope of the claims.

Claims (13)

1. a kind of control method of short-range communication (NFC), it is characterised in that including:
Receive the instruction for obtaining data related to NFC communication on smart card that application layer sends;
Corresponding instruction is sent to obtain the data related to the NFC communication to the smart card in batches, and preserved the result that the smart card is returned every time, judge on the smart card in the absence of the data related to the NFC communication that can read until passing through returned result;
Do not exist on the smart card is judged after the data related to the NFC communication that can read, the result that the smart card that will be preserved every time is returned reports application layer in batches,
Wherein, after the instruction for obtaining data related to the NFC communication on smart card is received, if receiving other instructions for accessing the smart card again, the treatment of other instructions is then controlled to be waited, after judging not existing the data related to the NFC communication that can read on the smart card, described other instructions are just processed.
2. method according to claim 1, it is characterised in that when described other instructions for it is multiple when, include the step of other instructions described in the treatment:According to the sequencing that other are instructed is received, described other instructions are processed successively.
3. method according to claim 1, it is characterized in that, it is described to send corresponding instruction to obtain the data related to the NFC communication to the smart card in batches, and preserved the result that the smart card is returned every time, include until passing through the step of returned result is judged on the smart card in the absence of related to the NFC communication data that can read:
The instruction of the data related to the NFC communication is sent to the smart card on the acquisition smart card that will be received;
Receive the status word that the smart card is returned;
Judge whether the status word indicates to exist on the smart card data related to the NFC communication that can read, if, preserve the status word, corresponding instruction is sent to the smart card to obtain data related to the NFC communication and status word and be preserved, until the status word acquired in judgement indicates do not exist the data related to the NFC communication that can read on the smart card in batches.
4. method according to claim 3, it is described to send corresponding instruction to the smart card in batches to obtain data related to the NFC communication and status word and be preserved, include the step of the status word acquired in judgement indicates not exist on the smart card related to the NFC communication data that can read:
Corresponding instruction is sent to smart card according to the status word for being received, the data and status word related to the NFC communication are obtained;
Preserve acquired data and status word;
Judge whether acquired status word indicates to exist on the smart card data related to the NFC communication that can read;
If it is, repeat the step of above, until the status word acquired in judgement is indicated on the smart card in the absence of the data related to the NFC communication that can read.
5. method according to claim 3, includes the step of the result that the smart card that will be preserved every time is returned reports application layer in batches:
The status word for being preserved for the first time is reported to application layer, after the instruction of acquisition data and corresponding state word of application layer transmission is received every time, the instruction according to application layer reports preserved data and corresponding state word to application layer.
6. method according to claim 1, it is characterised in that described to include the step of the result that the smart card is returned every time is preserved:The result that the smart card is returned every time is stored in the same chained list corresponding to the NFC communication successively.
7. a kind of control device of short-range communication (NFC), it is characterised in that including:
First receiver module, the instruction for obtaining data related to NFC communication on smart card for receiving application layer transmission;
First sending module, instructs to obtain the data related to the NFC communication accordingly for being sent to the smart card in batches, until judge module is judged on the smart card in the absence of the data related to the NFC communication that can read;
Second receiver module, for receiving the result that the smart card is returned in response to the corresponding instruction of the first sending module transmission every time;
Preserving module, for preserving the result that the smart card is returned in response to the corresponding instruction of the first sending module transmission every time;
Judge module, the result for being returned every time using the second receiver module is judged on the smart card with the presence or absence of the data related to the NFC communication that can read;
Second sending module, after judging not existing the data related to the NFC communication that can read on the smart card in the judge module, the result that the smart card that will be preserved every time is returned reports application layer in batches;
Control module, for after first receiver module receives the instruction for obtaining data related to the NFC communication on smart card, when other instructions for accessing the smart card are received again, treatment of other instructions described in controlling are waited, and control the treatment that other are instructed just to be proceeded by after not existing the data related to the NFC communication that can read on the smart card is judged.
8. device according to claim 7, it is characterised in that when described other instructions for it is multiple when, the control module is used to, according to the sequencing that other are instructed is received, described other instructions are processed successively.
9. device according to claim 7, it is characterised in that first sending module, the instruction for data related to the NFC communication on the acquisition smart card that will be received is sent to the smart card;
Second receiver module, for receiving the status word that the smart card is returned;
The judge module, for judging whether the status word indicates to there are the data related to the NFC communication that can read on the smart card;
The preserving module, the status word for preserving smart card return;
Second sending module, for after the judge module judges that the status word indicates to there are the data related to the NFC communication that can read on the smart card, sent to the smart card in batches and instructed to obtain the data and status word related to the NFC communication accordingly, until the judge module judges that acquired status word is indicated on the smart card in the absence of the data related to the NFC communication that can read.
10. device according to claim 9, it is characterised in that second sending module, for sending corresponding instruction to smart card according to the status word for being received;
Second receiver module, for obtaining the data and status word related to the NFC communication;
The preserving module, for preserving acquired data and status word.
11. devices according to claim 9, it is characterized in that, second sending module, for reporting the status word for being preserved for the first time to application layer, after the instruction of acquisition data and corresponding state word of application layer transmission is received every time, the instruction according to application layer reports preserved data and corresponding state word to application layer.
12. devices according to claim 7, it is characterised in that the preserving module, the result for the smart card to be returned every time is stored in the same chained list corresponding to the NFC communication successively.
13. a kind of mobile terminals, it is characterised in that the mobile terminal includes the control device of the NFC communication as any one of claim 7 to 12.
CN201510831057.0A 2015-11-25 2015-11-25 Control method and device for near field communication and mobile terminal Active CN106788610B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510831057.0A CN106788610B (en) 2015-11-25 2015-11-25 Control method and device for near field communication and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510831057.0A CN106788610B (en) 2015-11-25 2015-11-25 Control method and device for near field communication and mobile terminal

Publications (2)

Publication Number Publication Date
CN106788610A true CN106788610A (en) 2017-05-31
CN106788610B CN106788610B (en) 2020-07-24

Family

ID=58964184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510831057.0A Active CN106788610B (en) 2015-11-25 2015-11-25 Control method and device for near field communication and mobile terminal

Country Status (1)

Country Link
CN (1) CN106788610B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108197515A (en) * 2017-12-20 2018-06-22 珠海市魅族科技有限公司 Card Reader control method and device, terminal installation and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030046621A (en) * 2001-12-16 2003-06-18 한국전자통신연구원 Method for seting communication environment of smart card and mobile entity using layered protocol stack with selective multiple transmission protocols
CN101021896A (en) * 2007-04-06 2007-08-22 中兴通讯股份有限公司 Method for realizing multi-task access smart card
CN101030975A (en) * 2007-02-15 2007-09-05 重庆重邮信科股份有限公司 Processing method for increasing responding speed of protocol AT commands
CN101068405A (en) * 2006-12-28 2007-11-07 中兴通讯股份有限公司 Double-mode mobile terminal using double-mode card and single-card slot and standby method thereof
CN101291491A (en) * 2008-06-10 2008-10-22 重庆重邮信科(集团)股份有限公司 Information interaction method for connection information of user recognition card between application layer and protocol stack
CN101835281A (en) * 2010-02-24 2010-09-15 中兴通讯股份有限公司 Method for carrying out data interaction with subscriber identification card and mobile terminal
CN102111487A (en) * 2009-12-28 2011-06-29 重庆重邮信科通信技术有限公司 Method and device for realizing global system for mobile communications (GSM) terminal to access 3G universal subscriber identity module (USIM) card

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030046621A (en) * 2001-12-16 2003-06-18 한국전자통신연구원 Method for seting communication environment of smart card and mobile entity using layered protocol stack with selective multiple transmission protocols
CN101068405A (en) * 2006-12-28 2007-11-07 中兴通讯股份有限公司 Double-mode mobile terminal using double-mode card and single-card slot and standby method thereof
CN101030975A (en) * 2007-02-15 2007-09-05 重庆重邮信科股份有限公司 Processing method for increasing responding speed of protocol AT commands
CN101021896A (en) * 2007-04-06 2007-08-22 中兴通讯股份有限公司 Method for realizing multi-task access smart card
CN101291491A (en) * 2008-06-10 2008-10-22 重庆重邮信科(集团)股份有限公司 Information interaction method for connection information of user recognition card between application layer and protocol stack
CN102111487A (en) * 2009-12-28 2011-06-29 重庆重邮信科通信技术有限公司 Method and device for realizing global system for mobile communications (GSM) terminal to access 3G universal subscriber identity module (USIM) card
CN101835281A (en) * 2010-02-24 2010-09-15 中兴通讯股份有限公司 Method for carrying out data interaction with subscriber identification card and mobile terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108197515A (en) * 2017-12-20 2018-06-22 珠海市魅族科技有限公司 Card Reader control method and device, terminal installation and computer readable storage medium

Also Published As

Publication number Publication date
CN106788610B (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN108271125A (en) Data transmission, data receiver method and device
CN104216761B (en) It is a kind of that the method for sharing equipment is used in the device that can run two kinds of operating system
CN107944257A (en) Start control method, device, storage medium and the terminal of application with method of service
US20230054157A1 (en) Near field communication nfc communication method and apparatus, and electronic device
US20230140279A1 (en) Inter-processor communication method, electronic assembly, and electronic device
CN109151803A (en) Information interacting method and device, intelligent card chip and terminal
CN105760134B (en) A kind of data processing method and electronic equipment
CN113361293A (en) Card swiping method, card controller, electronic device and storage medium
CN117440401A (en) Processing method of condition configuration, processing device of condition configuration and terminal
CN106788610A (en) A kind of control method of short-range communication, device and mobile terminal
CN109934314A (en) A kind of method for reading data and system of electric power Internet of Things electronic tag
US20080075102A1 (en) Interface
CN107197535A (en) A kind of cluster the whole network call control method and apparatus
CN106572226A (en) Contact person sharing method, address list sharing terminal and address list receiving terminal
CN107466087A (en) A kind of network search method and mobile terminal
CN110650546A (en) File transmission method, device, storage medium and terminal
CN115604653A (en) Smart card application selection method and device, electronic equipment and storage medium
CN108566322A (en) Call method and device, storage medium, electronic device
KR101952793B1 (en) Improvements to Subscriber Identity Module (SIM) Access Profile (SAP)
CN107220570A (en) A kind of STK card writing systems and method based on SIM card
CN114143855A (en) Network automatic connection method and device
CN107844717A (en) Safe input system, method and intelligent terminal
CN109862553B (en) Terminal and communication method
CN102026197A (en) Method and device for acquiring WAPI (wireless LAN authentication and privacy infrastructure) digital certificate
CN101867896A (en) Method and system for controlling service

Legal Events

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