WO2014146229A1 - Nfc设备通信方法、装置和nfc设备 - Google Patents

Nfc设备通信方法、装置和nfc设备 Download PDF

Info

Publication number
WO2014146229A1
WO2014146229A1 PCT/CN2013/072798 CN2013072798W WO2014146229A1 WO 2014146229 A1 WO2014146229 A1 WO 2014146229A1 CN 2013072798 W CN2013072798 W CN 2013072798W WO 2014146229 A1 WO2014146229 A1 WO 2014146229A1
Authority
WO
WIPO (PCT)
Prior art keywords
protocol
nfc
target device
nfc target
supported
Prior art date
Application number
PCT/CN2013/072798
Other languages
English (en)
French (fr)
Inventor
王淼
金志皓
常新苗
Original Assignee
华为终端有限公司
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 华为终端有限公司 filed Critical 华为终端有限公司
Priority to JP2016503504A priority Critical patent/JP6332768B2/ja
Priority to CN201380000832.7A priority patent/CN103609034B/zh
Priority to PCT/CN2013/072798 priority patent/WO2014146229A1/zh
Priority to EP13878681.9A priority patent/EP2945298B1/en
Publication of WO2014146229A1 publication Critical patent/WO2014146229A1/zh
Priority to US14/556,462 priority patent/US9351101B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy 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/72Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for local intradevice communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Definitions

  • Embodiments of the present invention relate to communication technologies, and in particular, to a NFC device communication method and apparatus, and
  • NFC Near Field Communication
  • the NFC device may include a device host (DH), an NFC controller (NFC Controller, NFCC for short), and a security element (SE), where DH is used to manage the NFCC, such as NFCC.
  • DH is used to manage the NFCC, such as NFCC.
  • NFCC is used for data transmission with the target NFC device via the RF interface and antenna
  • SE is used to provide a secure execution environment for NFC applications.
  • the DH can be a processor CPU of the mobile phone.
  • the NFCC can be an NFC chip
  • the SE can be a Subscriber Identity Module (SIM) card or a Secure Digital (SD) card.
  • SIM Subscriber Identity Module
  • SD Secure Digital
  • the NFC device can discover all NFC target devices, and can learn the radio frequency (RF) protocol supported by each NFC target device, and then the NFC device can select an NFC according to the discovery order of the NFC target device.
  • the target device usually the first discovered NFC target device.
  • the first discovered NFC target device often does not meet the needs of NFC devices. Summary of the invention
  • the present invention provides an NFC device communication method, apparatus, and NFC device to solve the problem that the NFC discovery method of the prior art finds an NFC target device that matches the function of the NFCC chip in the native NFC device, and the resulting DH resource consumption and The problem of large power consumption.
  • an embodiment of the present invention provides a near field communication NFC device communication method, including: determining a radio frequency RF protocol supported by at least one discovered NFC target device; The RF protocol for performing NFC communication is selected from the RF protocols supported by the at least one NFC target device to communicate with the NFC target device corresponding to the selected RF protocol according to the RF protocol level or the RF protocol priority.
  • the determining, by the determined, the RF protocol supported by the at least one NFC target device includes:
  • the device host DH receives the advertisement message sent by the near field communication controller NFCC, where the notification message includes information about the RF protocol supported by the at least one NFC target device discovered by the NFCC; the priority according to the RF protocol level or the RF protocol And selecting, by the RF protocol supported by the at least one NFC target device, an RF protocol for performing NFC communication, to communicate with the NFC target device corresponding to the selected determined RF protocol, including:
  • the DH selects an RF protocol for performing NFC communication from the RF protocols supported by the at least one NFC target device to communicate with the NFC target device corresponding to the selected RF protocol according to the RF protocol level or the RF protocol priority.
  • the DH selects an NFC communication from an RF protocol supported by the at least one NFC target device according to an RF protocol priority.
  • the RF protocol before communicating with the NFC target device corresponding to the selected RF protocol, also includes:
  • the DH receives a setting instruction input by a user, and the setting instruction includes information of the RF protocol priority.
  • the method further includes:
  • the DH sends a radio frequency discovery mapping command to the NFCC, where the radio frequency discovery mapping command includes the information of the RF protocol priority, so that the NFCC is supported by the at least one NFC target device according to the RF protocol priority.
  • the RF protocol of the RF protocol is selected to communicate with the NFC target device corresponding to the selected RF protocol.
  • the determining, by the at least one NFC target device, the supported RF protocol includes:
  • the NFCC performs an RF discovery process to determine an RF protocol supported by at least one NFC target device
  • the RF protocol selected for the NFC communication is selected by the RF protocol supported by the backup to communicate with the NFC target device corresponding to the selected RF protocol, including:
  • the NFCC selects an NFC communication from an RF protocol supported by the at least one NFC target device according to an RF protocol priority.
  • the RF protocol before communicating with the NFC target device corresponding to the selected RF protocol, also includes:
  • the NFCC receives the radio frequency discovery mapping command sent by the DH, where the radio frequency discovery mapping command includes information about the priority of the RF protocol.
  • the NFCC performs a radio frequency discovery process, and determines an RF ten-party protocol supported by the at least one NFC target device, including :
  • the NFCC receives a discovery response message fed back by each NFC target device, and the extension field of the discovery response message includes information of an RF protocol supported by the NFC target device.
  • the extension field is a selection response message SEL_RES Indicator bit b4 and indicator bit b5;
  • the extension field is the indication bit Byte1 and the indication bit Byte2 in the NFC device identifier NFCID2 in the probe response message SENSF_RES; if the NFC target device does not support the peer-to-peer P2P technology, then
  • the discovery response message is an attribute detection response message ATR_REQ/RES, and the history byte of the ATR_REQ/RES includes information of an RF protocol supported by the NFC target device.
  • the RF protocol for performing NFC communication is selected in the supported RF protocol to communicate with the NFC target device corresponding to the selected RF protocol, including:
  • the RF protocol for performing NFC communication is selected among the supported RF protocols to communicate with the NFC target device corresponding to the selected RF protocol, including:
  • an NFC device communication device including:
  • a determining module configured to determine a radio frequency RF protocol supported by the at least one discovered NFC target device
  • a selection module configured to select an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device according to an RF protocol level or an RF protocol priority, to perform an NFC target device corresponding to the selected RF protocol. Communication.
  • the device is a DH
  • the determining module is specifically configured to receive an advertisement message sent by the near field communication controller NFCC, where the notification message includes the NFCC discovery Information about the RF protocol supported by at least one NFC target device;
  • the selecting module is specifically configured to select an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device according to an RF protocol level or an RF protocol priority, to select an NFC corresponding to the determined RF protocol.
  • the target device communicates.
  • the method further includes:
  • the selecting module is in accordance with an RF protocol priority, from the Receiving, by the RF protocol supported by the at least one NFC target device, an RF protocol for performing NFC communication, before receiving communication with the NFC target device corresponding to the selected RF protocol, receiving a setting instruction input by the user, where the setting instruction includes the Information on the priority of the RF protocol.
  • the method further includes:
  • a command sending module configured to send a radio frequency discovery mapping command to the NFCC, where the radio frequency discovery mapping command includes information about the priority of the RF protocol, so that the NFCC selects the at least one NFC target according to the RF protocol priority
  • the RF protocol supported by the device selects an RF protocol for performing NFC communication to communicate with an NFC target device corresponding to the selected RF protocol.
  • the device is an NFCC, where the determining module is specifically configured to perform a radio frequency discovery process, and determine an RF protocol supported by the at least one NFC target device;
  • the selecting module is specifically configured to select an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device according to an RF protocol level or an RF protocol priority, to select an NFC corresponding to the determined RF protocol.
  • the target device communicates.
  • the method further includes:
  • a command receiving module configured to select, according to an RF protocol priority, an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device, to select an NFC target corresponding to the determined RF protocol
  • the device receives the radio frequency discovery mapping command sent by the DH, where the radio frequency discovery mapping command includes the information about the priority of the RF protocol.
  • the determining module includes:
  • a sending unit configured to send a probe request message to the at least one NFC target device
  • a receiving unit configured to receive a discovery response message fed back by each NFC target device, where an extension field of the discovery response message includes an NFC target device supported by Information about the RF protocol.
  • the extension field is the indication bit b4 in the selection response message SEL_RES And indicator bit b5;
  • the extension field is a probe response message.
  • the NFC device in the SENSF_RES identifies the indication bit Byte1 and the indication bit Byte2 in the NFCID2; if the NFC target device does not support the peer-to-peer P2P technology, the discovery response message is an attribute detection response message ATR_REQ/RES, the ATR- The history byte of REQ/RES contains information about the RF protocol supported by the NFC target device.
  • the selecting module is specifically configured to determine the at least one NFC Whether the highest-level RF protocol supported by the target device is within the range of the RF protocol that the device can support; if yes, selecting the NFC target device supporting the highest-level RF ten-party from the at least one NFC target device;
  • the selecting module is specifically configured to determine the at least one NFC Whether the highest-priority RF protocol supported by the target device is within the range of the RF protocol that the device can support; if yes, selecting an NFC target device that supports the highest-priority RF protocol from the at least one NFC target device;
  • an embodiment of the present invention provides an NFC device, including: DH and NFCC, where the DH adopts the device according to the device embodiment of the DH provided by any embodiment of the present invention, and the NFCC adopts the present invention.
  • the near field communication NFC device communication method, device, and NFC device provided by the embodiment of the present invention obtain the RF protocol supported by all the NFC target devices by determining the RF RF protocol supported by the at least one NFC target device that is found, and obtain the RF protocol according to the RF protocol. Selecting a basis for a suitable NFC target device; selecting an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device according to an RF protocol level or an RF protocol priority, and selecting a determined RF protocol The corresponding NFC target device communicates, so that the RF protocol supported by the selected NFC target device is more in line with the requirements of the local NFC device, and the NFCC is utilized to the maximum extent.
  • FIG. 1 is a flowchart of Embodiment 1 of a communication method of an NFC device according to the present invention
  • Embodiment 2 is a flowchart of Embodiment 2 of a communication method of an NFC device according to the present invention
  • Embodiment 3 is a flowchart of Embodiment 3 of a communication method of an NFC device according to the present invention.
  • Embodiment 4 is a flowchart of Embodiment 4 of a method for communicating an NFC device according to the present invention
  • Embodiment 5 is a flowchart of Embodiment 5 of a method for communicating an NFC device according to the present invention
  • Embodiment 1 is a schematic structural diagram of Embodiment 1 of a communication device for an NFC device according to the present invention.
  • Embodiment 7 is a schematic structural diagram of Embodiment 2 of a communication device for an NFC device according to the present invention.
  • Embodiment 8 is a schematic structural diagram of Embodiment 3 of a communication device for an NFC device according to the present invention.
  • FIG. 9 is a schematic structural diagram of an embodiment of an NFC device according to the present invention.
  • the technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention.
  • the embodiments are a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
  • the working mode of the NFC device can be Peer to Peer (P2P) mode, read/write mode or card emulation mode.
  • P2P Peer to Peer
  • NFC tags devices that only support the card emulation mode are called NFC tags in the field.
  • NFC Forum Define NFC tags with tags of type 1, type 2, type 3, type 4.
  • an NFC tag and other NFC devices are collectively referred to as an NFC device, that is, all devices having an NFC function are referred to as NFC devices.
  • Embodiment 1 is a flowchart of Embodiment 1 of a method for communicating an NFC device according to the present invention.
  • the executor of the present embodiment is an NFC device. Specifically, the method may be performed by a device host (DH) in an NFC device. It can be executed by the NFC Controller (NFC Controller, NFCC for short). As shown in FIG. 1, the method in this embodiment may include:
  • Step 101 Determine a radio frequency RF protocol supported by the discovered at least one NFC target device.
  • an NFC device discovers an NFC target device, it can acquire all NFC target devices within the valid range of NFC communication, and can obtain the RF protocol supported by each NFC target device.
  • the process of the NFC device discovering the NFC target device is usually performed by the NFCC. Therefore, when the execution subject of the embodiment is the NFCC, the radio frequency RF protocol supported by each NFC target device determined in step 101 may actually be the NFCC execution.
  • the process of radio frequency discovery; when the execution subject of the embodiment is DH, the radio frequency RF protocol supported by each NFC target device determined in step 101 is actually receiving the notification message sent by the NFCC.
  • Step 102 Select an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device according to an RF protocol level or an RF protocol priority, to communicate with an NFC target device corresponding to the selected RF protocol.
  • the prior art NFC device usually selects the first discovered NFC target device according to the chronological order, and generally selects the RF protocol in the first notification message sent by the NFCC received by the HD as the communication protocol. This may exist because the native NFC device supports a higher RF protocol, such as the Logical Link Control Protocol (LLP), and the NFC target device has both NFC target devices supporting the LLCP and only supports lower
  • the RF protocol such as the NFC-Data Exchange Protocol (NFC-DEP), NFC target device, according to the principle of selecting the first discovered NFC target device and the first discovered RF protocol, It may be possible to select an NFC target device that supports only the lower RF protocol as the NFC target device for NFC communication, or even if the local NFC device and the NFC target device support a higher level of RF protocol, it is possible to select a lower level.
  • the RF protocol communicates.
  • the local NFC device cannot fully utilize the characteristics provided by the NFCC chip, and needs to run a higher RF protocol on the DH, increasing the power consumption of the DH and consuming more DH resources.
  • the RF protocol for performing NFC communication and the NFC target device are selected according to the RF protocol level or the RF protocol priority. Specifically, the RF supported by all the NFC target devices determined in step 101 can be selected.
  • the RF protocol is stored in a list, and each RF protocol is sorted according to the protocol level or the RF protocol priority, and the RF protocol with the highest RF protocol level or the highest RF protocol priority is selected, and the NFC target device corresponding to the RF protocol is selected.
  • the selected RF protocol corresponds to multiple NFC target devices, that is, if more than one NFC target device supports the RF protocol, one branch may be randomly selected according to the discovery order. An NFC target device that holds the RF protocol.
  • the RF protocol supported by all the NFC target devices is obtained by determining the radio frequency RF protocol supported by the at least one NFC target device, and the basis for selecting an appropriate NFC target device according to the RF protocol is obtained; Or RF protocol priority, selecting an RF protocol for performing NFC communication from the RF protocols supported by the at least one NFC target device, to communicate with the NFC target device corresponding to the selected determined RF protocol, so that the selected NFC target device is selected.
  • the supported RF protocol is more in line with the requirements of the native NFC device, achieving the maximum utilization of the NFCC function, avoiding the task that the NFCC can perform on the DH, thereby reducing the resource consumption of the DH and the power consumption of the DH.
  • the foregoing embodiment also needs to ensure that the local NFC device also supports the selected RF protocol, and therefore, in the selection process.
  • the internal NFC device can also determine whether the RF protocol to be selected is supported. If not, the RF protocol with the second highest RF protocol or the second highest RF protocol can be selected, and so on, until the selected one is selected.
  • step 102 may include:
  • the range of RF protocols that this unit can support can usually be obtained when the local NFC device is initialized.
  • the NFC device can be turned on for the local NFC device, or the NFC device can be turned on by the local NFC device.
  • the initialization process may include: DH reads the RF interface supported by the NFCC; DH binds each RF interface to its corresponding RF protocol, and sends the RF interface to the NFCC through a radio frequency discovery mapping command, so that both DH and NFCC obtain the original The range of RF protocols that the machine can support.
  • Step 2 if not, determining whether the next highest level RF protocol supported by the at least one NFC target device is within a range of RF protocols that the device can support; if yes, selecting from the at least one NFC target device An NFC target device supporting the sub-high level RF protocol.
  • the sub-high-level RF protocol is not within the range of the RF protocol that the device can support, determining whether the third highest-level RF protocol supported by the at least one NFC target device is in the local device Within the scope of the RF protocol that can be supported, and so on, until the RF protocol with the highest RF protocol level within the native NFC support is selected.
  • step 102 can include:
  • the second step if not, determining whether the second-priority RF protocol supported by the at least one NFC target device is within the range of the RF protocol that the device can support; if yes, from the at least one NFC target device The NFC target device supporting the RF protocol of the second highest priority is selected.
  • the RF protocol with the second highest priority is not within the range of the RF protocol that can be supported by the local device, determine whether the RF protocol with the third highest priority supported by the at least one NFC target device is supported by the local device. Within the scope of the RF protocol, and so on, until the RF protocol with the highest priority of the RF protocol within the scope of native NFC support is selected.
  • the local NFC device can support the RF protocol of the highest RF protocol level currently existing, or it is explicitly known that the local NFC device supports all RF protocols, the above determination can be omitted to determine whether the native NFC device supports the to-be-selected. The process of the RF protocol.
  • Embodiment 2 is a flowchart of Embodiment 2 of a communication method of an NFC device according to the present invention.
  • the execution body of this embodiment is DH.
  • the method in this embodiment may include:
  • Step 201 The DH receives a setting instruction input by the user, where the setting instruction includes information about the priority of the RF protocol.
  • the DFC can store an NFC library file, where the NFC library file stores an RF protocol that can be set, and the DH can provide an interface for the user to write an application, so that the user can input the setting instruction through the interface to call the storage on the DH.
  • the NFC library file allows the user to set the priority of each RF protocol separately.
  • the DH obtains the RF protocol priority by receiving a setting instruction for the user to input information including the priority of the RF protocol, so that when the NFC target device is subsequently selected, it can be selected according to the RF protocol priority.
  • the user can set the priority for each RF protocol to set different priorities for multiple RF protocols, or select only one RF protocol, and DH will not select the RF protocol of the RF protocol.
  • the priority is set to the lowest, that is, the user can specify an RF protocol to make the local NFC device only target the NFC target device that selects the specified RF protocol to improve the efficiency of discovery and selection.
  • Step 202 The DH receives an advertisement message sent by the NFCC, where the advertisement message includes information about an RF protocol supported by the at least one NFC target device discovered by the NFCC.
  • the information of the RF protocol supported by the at least one NFC target device may be acquired by the NFCC in the process of performing radio frequency discovery, and therefore, the DH receives the information of the RF protocol supported by the at least one NFC target device and sent by the NFCC.
  • the notification message acquires information about the RF protocol supported by at least one NFC target device.
  • Step 203 The DH selects an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device according to an RF protocol priority, to communicate with an NFC target device corresponding to the selected RF protocol.
  • the DH determines the priority of the RF protocol by receiving a setting instruction input by the user, so that the user can set the RF protocol priority according to the specific needs of the user or the requirements of the application software required by the user, so as to follow In the selection process, it is possible to select an RF protocol suitable for the user's individual needs and an NFC target device.
  • step 203 the selection of the NFC target device according to the RF protocol priority may be replaced by selecting the NFC target device according to the RF protocol level.
  • step 201 may be omitted, or step 201 may be retained.
  • the NFC target device will be selected according to the RF protocol level as an alternative to meet some special scenarios. For example, the RF protocol priority set by the user is unreasonable, or during the execution of step 203, the satisfaction cannot be found.
  • the NFC target device of the RF protocol priority set by the user may prompt the user to find the NFC target device that meets the priority of the RF protocol set by the user, and at the same time take the NFC target device selected according to the RF protocol level as a result.
  • Embodiment 3 is a flowchart of Embodiment 3 of a method for communicating an NFC device according to the present invention.
  • the executor of this embodiment is DH.
  • the NFCC is based on the RF protocol priority from the at least one NFC target device.
  • the RF protocol for performing NFC communication is selected among the supported RF protocols to communicate with the NFC target device corresponding to the selected RF protocol.
  • the method that the DH needs to perform in this embodiment may include:
  • Step 301 The DH receives a setting instruction input by the user, where the setting instruction includes information about the priority of the RF protocol.
  • Step 302 The DH sends a radio frequency discovery mapping command to the NFCC, where the radio frequency discovery mapping command includes information about the priority of the RF protocol, so that the NFCC selects the at least one NFC target according to the RF protocol priority.
  • the RF protocol supported by the device selects an RF protocol for performing NFC communication to communicate with an NFC target device corresponding to the selected RF protocol.
  • the DH when the DH initializes the NFCC, the DH binds each RF interface to its corresponding RF protocol, and sends the RF interface to the NFCC through the radio frequency discovery mapping command. Therefore, in the foregoing step 302,
  • the information about the priority of the RF protocol may be carried in an extension field of the radio frequency discovery mapping command, and the extension field may be, for example, a new field "Priority" of the radio frequency discovery mapping command.
  • the RF protocol priority obtained by the DH is carried in the radio frequency discovery mapping command and sent to the NFCC, so that the NFCC obtains the RF protocol priority, thereby satisfying the RF protocol priority from the at least one NFC target device.
  • the process of selecting the RF protocol for performing NFC communication in the supported RF protocol is completed by the NFCC; the execution subject that selects the NFC target device is changed from DH to NFCC, and the function of the NFCC can be further utilized to reduce the resources of the DH. Consumption and power consumption.
  • Embodiment 4 is a flowchart of Embodiment 4 of a method for communicating an NFC device according to the present invention.
  • the execution body of this embodiment is an NFCC.
  • the method in this embodiment may include:
  • Step 401 The NFCC performs an RF discovery process to determine an RF protocol supported by at least one NFC target device.
  • Step 402 The NFCC selects an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device according to an RF protocol level or an RF protocol priority, to select an NFC target device corresponding to the determined RF protocol. Communicate.
  • the radio frequency discovery process is performed by the NFCC to determine the radio frequency RF protocol supported by the at least one NFC target device, and the RF protocol supported by all the NFC target devices is obtained, and the basis for selecting an appropriate NFC target device according to the RF protocol is obtained; Selecting, according to an RF protocol level or an RF protocol priority, an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device, to communicate with an NFC target device corresponding to the selected determined RF protocol, so that the selected The RF protocol supported by the NFC target device is more in line with the requirements of the native NFC device, so as to maximize the use of the NFCC function, avoiding the task that the NFCC can perform on the DH, thereby reducing the resource consumption of the DH and the power consumption of the DH. ; and will adopt NFCC As the execution subject selects the NFC target device, the function of the NFCC can be further utilized to reduce the resource consumption and power consumption of the DH.
  • Embodiment 5 is a flowchart of Embodiment 5 of a method for communicating an NFC device according to the present invention.
  • the executor of the present embodiment is an NFCC.
  • This embodiment specifically introduces an NFC target device that the NFCC communicates according to the RF protocol priority selection, and specifically describes the NFCC implementation.
  • the RF transmission process. As shown in FIG. 5, the method in this embodiment may include:
  • Step 501 The NFCC receives the radio frequency discovery mapping command sent by the DH, where the radio frequency discovery mapping command includes the information about the priority of the RF protocol.
  • the method for obtaining the priority of the RF protocol by the NFCC may also be completed by receiving other notification messages sent by the DH, and carrying the information of the RF protocol priority in the radio frequency discovery mapping command is one of the preferred modes, and the implementation of the present invention is implemented. This example does not limit this.
  • Step 502 The NFCC sends a probe request message to the at least one NFC target device.
  • the extension field of the discovery response message also includes information about the RF protocol supported by the NFC target device, but usually only includes a lower-level RF protocol, and does not include a higher level such as LLCP LOW or LLCP HIGH.
  • the RF protocol therefore, step 503 of the present embodiment extends the discovery response message so that the discovery response message can include all RF protocols supported by the NFC target device.
  • the extension field in step 503 may be a new field in the discovery response message, or if there is still a field available in the discovery response message, for example, the original reserved field of the discovery response message,
  • the reserved field may be used as an extension field, the purpose of which is to add a field for indicating information of an RF protocol supported by the NFC target device.
  • extension field of the response message is different according to technologies supported by the NFC target device, and is specifically as follows:
  • the extension field is the indication bit b4 and the indication bit b5 in the selection response message SEL RES;
  • the extension field is the indication bit Byte1 and the indication bit Byte2 in the NFC device identifier NFCID2 in the probe response message SENSF_RES; if the NFC target device does not support the peer-to-peer P2P technology, then Discovery response message is attribute probe
  • the response message ATR_REQ/RES, the history byte of the ATR_REQ/RES contains the information of the RF protocol supported by the NFC target device.
  • the discovery response message in the prior art includes information of the RF protocol supported by a part of the NFC target device.
  • the partial NFC is indicated by the indication bit b6 and the indication bit b7 in the SEL_RES message.
  • the RF protocol supported by the target device is not indicated by the higher-level RF protocol such as LLCP LOW, LLCP HIGH.
  • the bit b4 and the indication bit b5 are indicated by the extension field of the SEL RES message, and the existing indication. Bit b6 and indicator bit b7 are used to indicate all RF protocols supported by the NFC target device.
  • the NFCC when the NFCC receives the discovery response message fed back by each NFC target device, for the SEL_RES message, it is necessary to read the b4-b7 field.
  • Information for an NFC target device supporting NFC-F technology, by extending the assignment range of the indication bit Byte1 and the indication bit Byte2 in the NFCID2 message in the SENSF-RES, all RF protocols supported by the NFC target device are indicated, therefore, When the NFCC receives the discovery response message fed back by each NFC target device, for the SENSF_RES message, the NFCID2 needs to be read.
  • Step 504 The NFCC selects an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device according to an RF protocol priority, to communicate with an NFC target device corresponding to the selected determined RF protocol.
  • the radio frequency discovery mapping command including the RF protocol priority sent by the DH is received by the NFCC, and the RF protocol priority for selecting the NFC target device is obtained.
  • the discovery response message fed back by each NFC target device is received by the NFCC.
  • the RF protocol corresponds to the NFC target device to communicate, so that the selected RF protocol supported by the NFC target device is more in line with the requirements of the local NFC device, so as to maximize the use of the NFCC function and avoid performing NFCC execution on the DH.
  • the task can reduce the resource consumption of DH and the power consumption of DH; and select the NFC target device by using NFCC as the execution subject, and can further utilize the function of NFCC to reduce the resource consumption and power consumption of DH.
  • the specific method of radio frequency discovery of the NFCC and the specific method of obtaining the information of the RF protocol supported by each NFC target device by using the extended field of the response message in step 503 are also applicable to the technical solution of any of the foregoing embodiments.
  • step 504 the selection of the NFC target device according to the RF protocol priority may be replaced by selecting the NFC target device according to the RF protocol level.
  • step 501 may be omitted, or step 501 may be retained.
  • the NFC target device will be selected according to the RF protocol level as an alternative to meet some special scenarios. For example, during the execution of step 504, the NFC target device that satisfies the priority of the RF protocol cannot be found. The user may be prompted not to find an NFC target device that satisfies the RF protocol priority, and the NFC target device selected according to the RF protocol level is taken as a result.
  • FIG. 6 is a schematic structural diagram of Embodiment 1 of a communication device for an NFC device according to the present invention.
  • the device 600 of this embodiment may be DH or NFCC.
  • the apparatus in this embodiment may include: a determining module 11 and a selecting module 12, wherein the determining module 11 is configured to determine a radio frequency RF protocol supported by the discovered at least one NFC target device; The RF protocol for performing NFC communication is selected from the RF protocols supported by the at least one NFC target device to communicate with the NFC target device corresponding to the selected RF protocol according to the RF protocol level or the RF protocol priority.
  • the device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 1 , and has a corresponding function module, and the implementation principle thereof is similar, and details are not described herein again.
  • the technical effect of the device in this embodiment is that the RF protocol supported by all NFC target devices is obtained by determining the RF RF protocol supported by the at least one discovered NFC target device, and the basis for selecting an appropriate NFC target device according to the RF protocol is obtained. Selecting an RF protocol for performing NFC communication and a corresponding NFC target device from the RF protocols supported by the at least one NFC target device according to an RF protocol level or an RF protocol priority, so that the selected NFC target device supports The RF protocol is more in line with the requirements of the native NFC device, achieving the maximum use of the NFCC function, avoiding the task that the NFCC can perform on the DH, thereby reducing the resource consumption of the DH and the power consumption of the DH.
  • the device of the above embodiment is DH, B'J,
  • the determining module 11 is specifically configured to receive an advertisement message sent by the near field communication controller NFCC, where the notification message includes at least one NFC target device discovered by the NFCC.
  • the information of the RF protocol may be used to select an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device according to an RF protocol level or an RF protocol priority.
  • the NFC target device corresponding to the determined RF protocol is selected for communication.
  • the device of the above embodiment is NFCC, B'J,
  • the determining module 11 may be specifically configured to perform a radio frequency discovery process, and determine an RF protocol supported by the at least one NFC target device.
  • the selecting module 12 may be specifically configured to use the RF protocol level or the RF protocol priority according to the RF protocol level or the RF protocol priority.
  • the RF protocol supported by the at least one NFC target device selects an RF protocol for performing NFC communication to communicate with the NFC target device corresponding to the selected RF protocol.
  • FIG. 7 is a schematic structural diagram of Embodiment 2 of a communication device for an NFC device according to the present invention.
  • the device 700 of this embodiment may be a DH.
  • the apparatus of this embodiment may further include: a setting instruction receiving module 13 configured to receive the selection module according to the RF protocol, based on the apparatus shown in FIG. Priority, the RF protocol for performing NFC communication is selected from the RF protocols supported by the at least one NFC target device, and before receiving communication with the NFC target device corresponding to the selected RF protocol, receiving a setting instruction input by the user,
  • the setting instruction includes information of the RF protocol priority.
  • the apparatus in this embodiment may further include: a command sending module 14, where the command sending module 14 may be configured to send a radio frequency discovery mapping command to the NFCC, where the radio frequency discovery mapping command includes the RF protocol priority Information for causing the NFCC to select an RF protocol for performing NFC communication from an RF protocol supported by the at least one NFC target device according to the RF protocol priority to communicate with an NFC target device corresponding to the selected determined RF protocol .
  • the device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 2 or FIG. 3, and has a corresponding function module, and the implementation principle is similar and technical effects, and details are not described herein again.
  • FIG. 8 is a schematic structural diagram of Embodiment 3 of a communication device for an NFC device according to the present invention.
  • the device 800 of this embodiment may be an NFCC.
  • the device of this embodiment may further include: a command receiving module 15 that may be used to select a priority according to an RF protocol in the selecting module, based on the device shown in FIG.
  • Radio frequency The mapping command contains information about the priority of the RF protocol.
  • the determining module 11 may include: a sending unit 111 and a receiving unit 112, where the sending unit 111 may be configured to send a probe request message to the at least one NFC target device, and the receiving unit 112 may And a discovery response message for receiving feedback from each NFC target device, where the extension field of the discovery response message includes information of an RF protocol supported by the NFC target device.
  • the extension field is the indication bit b4 and the indication bit b5 in the selection response message SEL_RES;
  • the extension field is the indication bit Byte 1 and the indication bit Byte2 in the NFC device identifier NFCID2 in the probe response message SENSF_RES; if the NFC target device does not support the peer-to-peer P2P technology, then
  • the discovery response message is an attribute probe response message ATR_REQ/RES, and the history byte of the ATR_REQ/RES includes information of an RF protocol supported by the NFC target device.
  • the device in this embodiment may be used to implement the technical solution of the method embodiment shown in FIG. 4 or FIG. 5, and has a corresponding function module, and the implementation principle is similar and technical effects, and details are not described herein again.
  • the selecting module 12 may be specifically configured to determine whether a highest level of the RF protocol supported by the at least one NFC target device is within a range of RF protocols that can be supported by the local device; if yes, And selecting, from the at least one NFC target device, an NFC target device that supports the highest-level RF protocol; if not, determining whether the next-highest-level RF protocol supported by the at least one NFC target device is capable of being locally capable Within the scope of the supported RF protocol; if so, an NFC target device supporting the sub-high-level RF protocol is selected from the at least one NFC target device.
  • the selecting module 12 may be specifically configured to determine whether the RF protocol with the highest priority supported by the at least one NFC target device is within the range of the RF protocol that the local device can support; if yes, And selecting, from the at least one NFC target device, an NFC target device that supports the highest priority RF protocol; if not, determining whether the second highest priority RF protocol supported by the at least one NFC target device is in the present The range of the RF protocol that the machine can support; if yes, select an NFC target device that supports the second highest priority RF protocol from the at least one NFC target device.
  • FIG. 9 is a schematic structural diagram of an embodiment of an NFC device according to the present invention.
  • the user equipment 900 may include: DH and NFCC, wherein the DH may adopt the structure of the device embodiment shown in FIG. 6 or FIG. 7, and correspondingly, the technical solution of any of the method embodiments of FIG. 1 to FIG. 3 may be performed.
  • the implementation principle and the technical effect are similar, and are not described herein again;
  • the NFCC may adopt the structure of the device embodiment shown in FIG. 6 or FIG. 8 , and correspondingly, the method embodiment of FIG. 1 , FIG. 4 or FIG. 5 may be performed.
  • the technical solution, its implementation principle and technical effect are similar, and will not be described here.

Landscapes

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

Abstract

本发明实施例提供一种近场通信NFC设备通信方法、装置和NFC设备,其中,方法包括:确定发现的至少一个NFC目标设备所支持的射频RF协议;根据RF协议等级或RF协议优先级,从所述至少一个NFC目标设备所支持的RF协议中选择进行NFC通信的RF协议,以与选择确定的RF协议对应的NFC目标设备进行通信。本发明实施例提供的近场通信NFC设备通信方法、装置和NFC设备,以解决现有技术的NFC发现方法找到与本机NFC设备中NFCC芯片功能匹配的NFC目标设备的概率低及其导致的DH资源消耗及功耗较大的问题。

Description

NFC设备通信方法、 装置和 NFC设备
技术领域
本发明实施例涉及通信技术, 尤其涉及一种 NFC设备通信方法、 装置和
NFC设备。 背景技术
近场通信(Near Field Communication, 简称: NFC )技术是一种短距离 无线连接技术, 其利用磁场感应实现电子设备在近距离间的通信。
随着 NFC技术的逐渐普及, 很多用户设备已经集成了 NFC功能。 NFC 设备可以包括设备主机 ( Device Host, 简称: DH ) 、 NFC 控制器 (NFC Controller, 简称: NFCC )和安全单元(Security Element, 简称: SE ) , 其 中 DH用于对 NFCC进行管理 ,如对 NFCC初始化、配置和电源管理等; NFCC 用于通过 RF接口和天线与目标 NFC设备进行数据传输; SE用于为 NFC应 用程序提供安全的执行环境。以智能手机为例, DH可以为手机的处理器 CPU, NFCC可以为 NFC芯片, SE可以为用户识别模块( Subscriber Identity Module , 简称: SIM )卡或安全数字 (Secure Digital, 简称 SD )卡。
在现有技术中, NFC设备可以发现所有 NFC目标设备, 并且可以获知各 个 NFC 目标设备所支持的射频( Radio Frequency, 简称: RF )协议, 然后 NFC设备可以根据 NFC目标设备的发现顺序选择一个 NFC目标设备, 通常 选择第一个被发现的 NFC 目标设备。 但是, 第一个被发现的 NFC 目标设备 往往并不能满足 NFC设备的需要。 发明内容
本发明提供一种 NFC设备通信方法、 装置和 NFC设备, 以解决现有技 术的 NFC发现方法找到与本机 NFC设备中 NFCC芯片功能匹配的 NFC目标 设备的概率低及其导致的 DH资源消耗及功耗较大的问题。
第一方面, 本发明实施例提供一种近场通信 NFC设备通信方法, 包括: 确定发现的至少一个 NFC目标设备所支持的射频 RF协议; 根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC目标设备所 支持的 RF协议中选择进行 NFC通信的 RF协议,以与选择确定的 RF协议对 应的 NFC目标设备进行通信。
在第一方面的第一种可能的实现方式中, 所述确定发现的至少一个 NFC 目标设备所支持的 RF协议, 包括:
设备主机 DH接收近场通信控制器 NFCC发送的通告消息, 所述通告消 息中包含所述 NFCC发现的至少一个 NFC目标设备所支持的 RF协议的信息; 所述根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC 目标设 备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF 协议对应的 NFC目标设备进行通信, 包括:
所述 DH根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC目 标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备进行通信。
根据第一方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所述 DH根据 RF协议优先级, 从所述至少一个 NFC 目标设备所支持的 RF 协议中选择进行 NFC通信的 RF协议 , 以与选择确定的 RF协议对应的 NFC 目标设备进行通信之前, 还包括:
所述 DH接收用户输入的设置指令,所述设置指令中包含所述 RF协议优 先级的信息。
根据第一方面的第一种或第二种可能的实现方式, 在第三种可能的实现 方式中, 还包括:
所述 DH向 NFCC发送射频发现映射命令, 所述射频发现映射命令中包 含所述 RF协议优先级的信息,以使所述 NFCC根据所述 RF协议优先级从所 述至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备进行通信。
在第一方面的第四种可能的实现方式中, 所述确定发现的至少一个 NFC 目标设备所支持的 RF协议, 包括:
NFCC执行射频发现过程, 确定至少一个 NFC目标设备所支持的 RF协 议;
所述根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC 目标设 备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF 协议对应的 NFC目标设备进行通信, 包括:
所述 NFCC根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC 目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定 的 RF协议对应的 NFC目标设备进行通信。
根据第一方面的第四种可能的实现方式, 在第五种可能的实现方式中, 所述 NFCC根据 RF协议优先级,从所述至少一个 NFC目标设备所支持的 RF 协议中选择进行 NFC通信的 RF协议 , 以与选择确定的 RF协议对应的 NFC 目标设备进行通信之前, 还包括:
所述 NFCC接收 DH发送的射频发现映射命令, 所述射频发现映射命令 中包含所述 RF协议优先级的信息。
根据第一方面的第四种或第五种可能的实现方式, 在第六种可能的实现 方式中, 所述 NFCC执行射频发现过程, 确定至少一个 NFC目标设备所支持 的 RF十办议, 包括:
所述 NFCC向所述至少一个 NFC目标设备发送探测请求消息;
所述 NFCC接收各 NFC目标设备反馈的发现响应消息,所述发现响应消 息的扩展字段中包含 NFC目标设备所支持的 RF协议的信息。
根据第一方面的第六种可能的实现方式, 在第七种可能的实现方式中, , 其特征在于, 若 NFC 目标设备支持 NFC-A技术, 则所述扩展字段为选择响 应消息 SEL— RES中的指示位 b4和指示位 b5;
若 NFC 目标设备支持 NFC-F 技术, 则所述扩展字段为探测响应消息 SENSF— RES中的 NFC设备标识 NFCID2中的指示位 Bytel和指示位 Byte2; 若 NFC目标设备不支持点对点 P2P技术,则所述发现响应消息为属性探 测响应消息 ATR— REQ/RES , 所述 ATR— REQ/RES的历史字节中包含 NFC目 标设备所支持的 RF协议的信息。
根据第一方面、 第一方面的第一种至第七种可能的实现方式中的任意一 种, 在第八种可能的实现方式中, 根据 RF协议等级, 从所述至少一个 NFC 目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定 的 RF协议对应的 NFC目标设备进行通信, 包括:
确定所述至少一个 NFC目标设备所支持的最高等级的 RF协议是否在本 机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标设备中选 择支持所述最高等级的 RF协议的 NFC目标设备;
若否, 则确定所述至少一个 NFC目标设备所支持的次高等级的 RF协议 是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标 设备中选择支持所述次高等级的 RF协议的 NFC目标设备。
根据第一方面、 第一方面的第一种至第七种可能的实现方式中的任意一 种,在第九种可能的实现方式中,根据 RF协议优先级,从所述至少一个 NFC 目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定 的 RF协议对应的 NFC目标设备进行通信, 包括:
确定所述至少一个 NFC目标设备所支持的优先级最高的 RF协议是否在 本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标设备中 选择支持所述优先级最高的 RF协议的 NFC目标设备;
若否, 则确定所述至少一个 NFC目标设备所支持的优先级次高的 RF协 议是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目 标设备中选择支持所述优先级次高的 RF协议的 NFC目标设备。
第二方面, 本发明实施例提供一种 NFC设备通信装置, 包括:
确定模块, 用于确定发现的至少一个 NFC目标设备所支持的射频 RF协 议;
选择模块, 用于根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议 , 以与选择 确定的 RF协议对应的 NFC目标设备进行通信。
在第二方面的第一种可能的实现方式中,所述装置为 DH ,所述确定模块 , 具体用于接收近场通信控制器 NFCC发送的通告消息, 所述通告消息中包含 所述 NFCC发现的至少一个 NFC目标设备所支持的 RF协议的信息;
所述选择模块, 具体用于根据 RF协议等级或 RF协议优先级, 从所述至 少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以 与选择确定的 RF协议对应的 NFC目标设备进行通信。
根据第二方面的第一种可能的实现方式, 在第二种可能的实现方式中, 还包括:
设置指令接收模块, 用于所述选择模块在根据 RF协议优先级, 从所述 至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备进行通信之前, 接收用户输入 的设置指令, 所述设置指令中包含所述 RF协议优先级的信息。
根据第二方面的第一种或第二种可能的实现方式, 在第三种可能的实现 方式中, 还包括:
命令发送模块, 用于向 NFCC发送射频发现映射命令, 所述射频发现映 射命令中包含所述 RF协议优先级的信息,以使所述 NFCC根据所述 RF协议 优先级从所述至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信 的 RF协议 , 以与选择确定的 RF协议对应的 NFC目标设备进行通信。
在第二方面的第四种可能的实现方式中, 所述装置为 NFCC, 所述确定 模块, 具体用于执行射频发现过程, 确定至少一个 NFC 目标设备所支持的 RF协议;
所述选择模块, 具体用于根据 RF协议等级或 RF协议优先级, 从所述至 少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以 与选择确定的 RF协议对应的 NFC目标设备进行通信。
根据第二方面的第四种可能的实现方式, 在第五种可能的实现方式中, 还包括:
命令接收模块, 用于在所述选择模块根据 RF协议优先级, 从所述至少 一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与 选择确定的 RF协议对应的 NFC目标设备进行通信之前, 接收 DH发送的射 频发现映射命令, 所述射频发现映射命令中包含所述 RF协议优先级的信息。
根据第二方面的第四种或第五种可能的实现方式, 在第六种可能的实现 方式中, 所述确定模块, 包括:
发送单元, 用于向所述至少一个 NFC目标设备发送探测请求消息; 接收单元, 用于接收各 NFC目标设备反馈的发现响应消息, 所述发现响 应消息的扩展字段中包含 NFC目标设备所支持的 RF协议的信息。
根据第二方面的第六种可能的实现方式, 在第七种可能的实现方式中, 若 NFC目标设备支持 NFC-A技术,则所述扩展字段为选择响应消息 SEL— RES 中的指示位 b4和指示位 b5;
若 NFC 目标设备支持 NFC-F 技术, 则所述扩展字段为探测响应消息 SENSF— RES中的 NFC设备标识 NFCID2中的指示位 Bytel和指示位 Byte2; 若 NFC目标设备不支持点对点 P2P技术,则所述发现响应消息为属性探 测响应消息 ATR— REQ/RES , 所述 ATR— REQ/RES的历史字节中包含 NFC目 标设备所支持的 RF协议的信息。
根据第二方面、 第二方面的第一种至第七种可能的实现方式中的任意一 种, 在第八种可能的实现方式中, 所述选择模块, 具体用于确定所述至少一 个 NFC目标设备所支持的最高等级的 RF协议是否在本机能够支持的 RF协 议范围内; 若是, 则从所述至少一个 NFC目标设备中选择支持所述最高等级 的 RF十办议的 NFC目标设备;
若否, 则确定所述至少一个 NFC目标设备所支持的次高等级的 RF协议 是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标 设备中选择支持所述次高等级的 RF协议的 NFC目标设备。
根据第二方面、 第二方面的第一种至第七种可能的实现方式中的任意一 种, 在第八种可能的实现方式中, 所述选择模块, 具体用于确定所述至少一 个 NFC 目标设备所支持的优先级最高的 RF协议是否在本机能够支持的 RF 协议范围内; 若是, 则从所述至少一个 NFC目标设备中选择支持所述优先级 最高的 RF协议的 NFC目标设备;
若否, 则确定所述至少一个 NFC目标设备所支持的优先级次高的 RF协 议是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目 标设备中选择支持所述优先级次高的 RF协议的 NFC目标设备。
第三方面, 本发明实施例提供一种 NFC设备, 包括: DH和 NFCC, 其 中, 所述 DH采用本发明任意实施例提供的 DH的装置实施例所述的装置, 所述 NFCC采用本发明任意实施例提供的 NFCC的装置实施例所述的装置。
本发明实施例提供的近场通信 NFC设备通信方法、 装置和 NFC设备, 通过确定发现的至少一个 NFC目标设备所支持的射频 RF协议, 获得所有 NFC目标设备所支持的 RF协议, 获得根据 RF协议来选择合适的 NFC目标 设备的基础; 通过根据 RF协议等级或 RF协议优先级,从所述至少一个 NFC 目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定 的 RF协议对应的 NFC目标设备进行通信,使得所选择的 NFC目标设备所支 持的 RF协议更加符合本机 NFC设备的需求, 实现最大程度地利用 NFCC的 功能, 避免在 DH上执行 NFCC能够执行的任务, 从而能够减少 DH的资源 消耗和 DH的功耗。 附图说明 图 1为本发明 NFC设备通信方法实施例一的流程图;
图 2为本发明 NFC设备通信方法实施例二的流程图;
图 3为本发明 NFC设备通信方法实施例三的流程图;
图 4为本发明 NFC设备通信方法实施例四的流程图;
图 5为本发明 NFC设备通信方法实施例五的流程图;
图 6为本发明 NFC设备通信装置实施例一的结构示意图;
图 7为本发明 NFC设备通信装置实施例二的结构示意图;
图 8为本发明 NFC设备通信装置实施例三的结构示意图;
图 9为本发明 NFC设备实施例的结构示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本 发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描 述,显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提 下所获得的所有其他实施例, 都属于本发明保护的范围。
NFC设备的工作模式可以为点对点( Peer to Peer, 简称: P2P )模式、 读 写模式或卡模拟模式,通常,只支持卡模拟模式的设备在本领域中被称为 NFC 标签, 目前, NFC论坛定义 NFC标签有类型 1、 类型 2、 类型 3、 类型 4的 标签。 在本发明实施例中, 为了描述方便, 将 NFC标签和其他的 NFC设备 统称为 NFC设备, 即, 将所有具有 NFC功能的设备均称为 NFC设备。
图 1为本发明 NFC设备通信方法实施例一的流程图,本实施例的执行主 体为 NFC设备,具体地,该方法可以由 NFC设备中的设备主机( Device Host, 简称 DH ) 来执行, 也可以由 NFC控制器(NFC Controller, 简称: NFCC ) 来执行。 如图 1所示, 本实施例的方法可以包括:
步骤 101、 确定发现的至少一个 NFC目标设备所支持的射频 RF协议。 NFC设备发现 NFC目标设备时, 能够获取到 NFC通信的有效范围内的 所有 NFC 目标设备, 并能够获取到每个 NFC 目标设备所支持的 RF协议。 NFC设备发现 NFC 目标设备的过程通常由 NFCC来执行, 因此, 当本实施 例的执行主体为 NFCC时,步骤 101中确定发现的每个 NFC目标设备所支持 的射频 RF协议实际上可以是 NFCC执行射频发现的过程; 而当本实施例的 执行主体为 DH时, 步骤 101中确定发现的每个 NFC目标设备所支持的射频 RF协议实际上是接收 NFCC发送的通告消息。
步骤 102、根据 RF协议等级或 RF协议优先级,从所述至少一个 NFC目 标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备进行通信。
现有技术的 NFC设备根据时间顺序, 通常选择第一个发现的 NFC目 标设备, 并且, 通常选择 HD收到的由 NFCC发送的第一个通告消息中的 RF协议作为通信协议。这就可能存在本机 NFC设备支持较高的 RF协议, 例如逻辑链路控制协议(Logic Link Control Protocol, 简称: LLCP ) , 而 NFC目标设备中同时存在支持 LLCP的 NFC目标设备和只支持较低 RF协 议 , 例如 NFC数据交换协议 ( NFC-Data Exchange Protocol , 简称: NFC-DEP ) , 的 NFC目标设备, 若按照选择第一个发现的 NFC目标设备 以及第一个发现的 RF协议的原则, 就可能会选择只支持较低 RF协议的 NFC目标设备作为进行 NFC通信的 NFC目标设备, 或者, 即使本机 NFC 设备和 NFC目标设备都支持较高等级的 RF协议,也有可能选择一个较低 等级的 RF协议进行通信。 这样, 在 NFC通信过程中, 本机 NFC设备就 不能充分利用 NFCC芯片所提供的特性, 需要在 DH上运行更高的 RF协 议, 增加了 DH的功耗并消耗更多的 DH资源。
而在本实施例的步骤 102中, 根据 RF协议等级或 RF协议优先级来选 择进行 NFC通信的 RF协议以及 NFC 目标设备, 具体地, 可以将步骤 101 中确定的所有 NFC目标设备所支持的射频 RF协议存放在一个列表中, 将各 个 RF协议按协议等级或按 RF协议优先级进行排序, 选择 RF协议等级最高 或 RF协议优先级最高的 RF协议, 并选择该 RF协议对应的 NFC目标设备。
具体实现时, 若选择出的 RF协议对应多个 NFC目标设备, 即有超过一 个 NFC目标设备支持该 RF协议, 则可以按照发现顺序或者随机选择一个支 持该 RF协议的 NFC目标设备。
本实施例,通过确定发现的至少一个 NFC目标设备所支持的射频 RF协 议, 获得所有 NFC目标设备所支持的 RF协议, 获得根据 RF协议来选择合 适的 NFC目标设备的基础; 通过根据 RF协议等级或 RF协议优先级, 从所 述至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备进行通信, 使得所选择的 NFC 目标设备所支持的 RF协议更加符合本机 NFC设备的需求, 实现最大程度地 利用 NFCC的功能, 避免在 DH上执行 NFCC能够执行的任务, 从而能够减 少 DH的资源消耗和 DH的功耗。
在一个实施例中,上述实施例在选择选择 RF协议等级最高或 RF协议优 先级最高的 RF协议的过程中, 还需要保证本机 NFC设备也支持所选择出的 RF协议, 因此, 在选择过程中, 还可以判断本机 NFC设备是否支持所述待 选择的 RF协议, 若不支持, 则可以选择 RF协议等级次高或 RF协议优先级 次高的 RF协议, 以此类推, 直到选出本机 NFC支持范围内的 RF协议等级 最高或 RF协议优先级最高的 RF协议。
具体地, 上述实施例, 若根据 RF协议等级进行选择, 则步骤 102可以 包括:
第一步, 确定所述至少一个 NFC目标设备所支持的最高等级的 RF协议 是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标 设备中选择支持所述最高等级的 RF协议的 NFC目标设备。
本机能够支持的 RF协议范围通常可以在本机 NFC设备在初始化时获取 到 ,初始化例如可以为本机 NFC设备开机 ,或本机 NFC设备打开 NFC功能。 初始化过程可以包括: DH读取 NFCC所支持的 RF接口; DH将各个 RF接 口与其对应的 RF协议进行绑定,并通过射频发现映射命令发送给所述 NFCC, 这样, DH与 NFCC均获得了本机能够支持的 RF协议范围。
第二步, 若否, 则确定所述至少一个 NFC目标设备所支持的次高等级的 RF协议是否在本机能够支持的 RF协议范围内;若是,则从所述至少一个 NFC 目标设备中选择支持所述次高等级的 RF协议的 NFC目标设备。
若所述次高等级的 RF协议也不在本机能够支持的 RF协议范围内,则再 确定所述至少一个 NFC目标设备所支持的第三高等级的 RF协议是否在本机 能够支持的 RF协议范围内, 以此类推, 直到选出本机 NFC支持范围内的 RF 协议等级最高的 RF协议。
若根据 RF协议优先级进行选择, 则步骤 102可以包括:
第一步、 确定所述至少一个 NFC目标设备所支持的优先级最高的 RF协 议是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目 标设备中选择支持所述优先级最高的 RF协议的 NFC目标设备。
第二步、 若否, 则确定所述至少一个 NFC目标设备所支持的优先级次高 的 RF协议是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标设备中选择支持所述优先级次高的 RF协议的 NFC目标设备。
若所述优先级次高的 RF协议也不在本机能够支持的 RF协议范围内,则 再确定所述至少一个 NFC目标设备所支持的优先级第三高的 RF协议是否在 本机能够支持的 RF协议范围内, 以此类推, 直到选出本机 NFC支持范围内 的 RF协议优先级最高的 RF协议。
而若本机 NFC设备能够支持目前存在的最高 RF协议等级的 RF协议, 或者明确已知本机 NFC设备支持所有 RF协议, 则可以省去上述的判断本机 NFC设备是否支持所述待选择的 RF协议的过程。
下面采用几个具体的实施例, 对图 1所示方法实施例的技术方案进行 伴细说明。
图 2为本发明 NFC设备通信方法实施例二的流程图, 本实施例的执行 主体为 DH。 如图 2所示, 本实施例的方法可以包括:
步骤 201、 DH接收用户输入的设置指令, 所述设置指令中包含所述 RF 协议优先级的信息。
具体地, DH上可以存储 NFC库文件, 该 NFC库文件中存放可供设 置的 RF协议, DH可以提供用户编写应用程序的接口, 使用户能够通过 该接口输入设置指令, 来调用存储在 DH上的 NFC库文件, 使用户可以 分别设置各个 RF协议的优先级。 DH通过接收用户输入包含 RF协议优先 级的信息的设置指令, 获取 RF协议优先级,从而在后续对 NFC目标设备进 行选择时, 可以根据所述 RF协议优先级来选择。
此处用户对各个 RF协议设置优先级可以为对多个 RF协议分别设置不同 的优先级, 也可以只选择一个 RF协议, DH将未被选择的 RF协议的 RF协 议优先级置为最低, 即用户可以指定一种 RF协议, 使本机 NFC设备只针对 选择该指定的 RF协议的 NFC目标设备, 以提高发现和选择的效率。
步骤 202、 所述 DH接收 NFCC发送的通告消息, 所述通告消息中包含 所述 NFCC发现的至少一个 NFC目标设备所支持的 RF协议的信息。
所述至少一个 NFC目标设备所支持的 RF协议的信息可以由 NFCC在执 行射频发现的过程获取到, 因此, DH通过接收 NFCC发送的包含所述至少 一个 NFC目标设备所支持的 RF协议的信息的通告消息, 获取至少一个 NFC 目标设备所支持的 RF协议的信息。
步骤 203、 所述 DH根据 RF协议优先级, 从所述至少一个 NFC目标设 备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF 协议对应的 NFC目标设备进行通信。
本实施例, DH通过接收用户输入的设置指令, 确定所述 RF协议优先 级, 使用户能够根据自身具体的需求或用户所需要的应用软件所对应的需求 来设置 RF协议优先级, 从而在后续的选择过程中能够选择适合用户个性化 需求的 RF协议以及 NFC目标设备。
上述实施例, 步骤 203中也可以将根据 RF协议优先级对 NFC目标设备 进行选择替换为根据 RF协议等级对 NFC目标设备进行选择, 此时可以将步 骤 201省去, 或者也可以保留步骤 201 , 而将根据 RF协议等级对 NFC目标 设备进行选择作为一种备选方案以满足一些特殊场景, 例如, 用户设置的 RF 协议优先级不合理, 或者在步骤 203的执行过程中, 未能找出满足用户设置 的 RF协议优先级的 NFC目标设备, 此时可以提示用户未发现满足用户设置 的 RF协议优先级的 NFC目标设备, 同时将根据 RF协议等级选择的 NFC目 标设备作为结果。
图 3为本发明 NFC设备通信方法实施例三的流程图, 本实施例的执行 主体为 DH, 但在本实施例的方法中, 由 NFCC根据 RF协议优先级从所述至 少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以 与选择确定的 RF协议对应的 NFC目标设备进行通信。 如图 3所示, 本实施 例中 DH需要执行的方法可以包括:
步骤 301、 DH接收用户输入的设置指令, 所述设置指令中包含所述 RF 协议优先级的信息。 步骤 302、 所述 DH向 NFCC发送射频发现映射命令, 所述射频发现映 射命令中包含所述 RF协议优先级的信息,以使所述 NFCC根据所述 RF协议 优先级从所述至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信 的 RF协议 , 以与选择确定的 RF协议对应的 NFC目标设备进行通信。
具体地 , 由于在现有技术中 DH对 NFCC进行初始化时 , DH将各个 RF 接口与其对应的 RF 协议进行绑定, 并通过射频发现映射命令发送给所述 NFCC, 因此, 上述的步骤 302中, 所述 RF协议优先级的信息可以携带在该 射频发现映射命令的扩展字段中, 该扩展字段例如可以为该射频发现映射命 令的新增字段 "优先级" "Priority" 。
本实施例,通过 DH将其获得的 RF协议优先级携带在射频发现映射命令 中发送给 NFCC , 使 NFCC获得所述 RF协议优先级, 从而满足 RF协议优先 级从所述至少一个 NFC 目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议的过程由 NFCC来完成的场景; 所述将对 NFC目标设备进行选择的 执行主体由 DH改为 NFCC, 能够进一步利用 NFCC的功能, 减少 DH的资 源消耗以及功耗。
图 4为本发明 NFC设备通信方法实施例四的流程图, 本实施例的执行 主体为 NFCC。 如图 4所示, 本实施例的方法可以包括:
步骤 401、 NFCC执行射频发现过程, 确定至少一个 NFC目标设备所支 持的 RF协议。
步骤 402、 所述 NFCC根据 RF协议等级或 RF协议优先级, 从所述至少 一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与 选择确定的 RF协议对应的 NFC目标设备进行通信。
本实施例,通过 NFCC执行射频发现过程确定至少一个 NFC目标设备所 支持的射频 RF协议, 获得所有 NFC目标设备所支持的 RF协议, 获得根据 RF协议来选择合适的 NFC 目标设备的基础; 通过 NFCC根据 RF协议等级 或 RF协议优先级, 从所述至少一个 NFC 目标设备所支持的 RF协议中选择 进行 NFC通信的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备进 行通信,使得所选择的 NFC目标设备所支持的 RF协议更加符合本机 NFC设 备的需求, 实现最大程度地利用 NFCC的功能, 避免在 DH上执行 NFCC能 够执行的任务,从而能够减少 DH的资源消耗和 DH的功耗;并将采用 NFCC 作为执行主体对 NFC目标设备进行选择, 能够进一步利用 NFCC的功能, 减 少 DH的资源消耗以及功耗。
图 5为本发明 NFC设备通信方法实施例五的流程图, 本实施例的执行 主体为 NFCC,本实施例具体介绍 NFCC根据 RF协议优先级选择进行通信的 NFC目标设备, 并具体描述了 NFCC执行的射频发射过程。 如图 5所示, 本 实施例的方法可以包括:
步骤 501、 NFCC接收 DH发送的射频发现映射命令, 所述射频发现映射 命令中包含所述 RF协议优先级的信息。
NFCC获得所述 RF协议优先级的方法也可以通过接收 DH发送的其他通 知消息来完成, 将所述 RF协议优先级的信息携带在射频发现映射命令中是 其中的一种优选方式, 本发明实施例对此不作限定。
步骤 502、所述 NFCC向所述至少一个 NFC目标设备发送探测请求消息。 步骤 503、 所述 NFCC接收各 NFC目标设备反馈的发现响应消息, 所述 发现响应消息的扩展字段中包含 NFC目标设备所支持的 RF协议的信息。
现有技术中,所述发现响应消息的扩展字段中也包含 NFC目标设备所支 持的 RF协议的信息, 但通常只包含较低等级的 RF协议, 而没有包含 LLCP LOW或 LLCP HIGH等较高等级的 RF协议, 因此本实施例的步骤 503对所 述发现响应消息进行扩展,使所述发现响应消息能够包含 NFC目标设备所支 持的所有 RF协议。
其中, 步骤 503 中的扩展字段可以为所述发现响应消息中的新增字段, 或者, 若所述发现响应消息中的还存在可用的字段, 例如所述发现响应消息 原有的预留字段, 则可以采用所述预留字段作为扩展字段, 其目的是增加用 于指示 NFC目标设备所支持的 RF协议的信息的字段。
进一步地,所述响应消息的扩展字段根据 NFC目标设备支持的技术的不 同而不同, 具体如下:
若 NFC 目标设备支持 NFC-A技术, 则所述扩展字段为选择响应消息 SEL RES中的指示位 b4和指示位 b5;
若 NFC 目标设备支持 NFC-F 技术, 则所述扩展字段为探测响应消息 SENSF— RES中的 NFC设备标识 NFCID2中的指示位 Bytel和指示位 Byte2; 若 NFC目标设备不支持点对点 P2P技术,则所述发现响应消息为属性探 测响应消息 ATR— REQ/RES , 所述 ATR— REQ/RES的历史字节中包含 NFC目 标设备所支持的 RF协议的信息。
现有技术中的发现响应消息中包含部分 NFC目标设备所支持的 RF协议 的信息, 对于支持 NFC-A技术的 NFC目标设备, 通过 SEL— RES消息中的指 示位 b6和指示位 b7指示部分 NFC目标设备所支持的 RF协议, 而对 LLCP LOW, LLCP HIGH等较高等级的 RF协议无法指示, 本发明实施例, 通过 SEL RES消息的扩展字段指示位 b4和指示位 b5 ,以及现有的指示位 b6和指 示位 b7来指示 NFC目标设备所支持的全部 RF协议, 因此, 所述 NFCC接 收各 NFC目标设备反馈的发现响应消息时, 对于 SEL— RES消息, 需要读取 b4-b7 字段中的信息; 对于支持 NFC-F 技术的 NFC 目标设备, 通过扩展 SENSF— RES中的 NFCID2消息中的指示位 Bytel和指示位 Byte2的赋值范围, 来指示 NFC目标设备所支持的全部 RF协议, 因此, 所述 NFCC接收各 NFC 目标设备反馈的发现响应消息时, 对于 SENSF— RES消息, 需要读取 NFCID2 字段中的指示位 Bytel和指示位 Byte2字段中的信息;对于不支持点对点 P2P 技术的 NFC目标设备, 其所支持的 RF协议的信息包含在所述发现响应消息 ATR— REQ/RES的历史字节中, 因此, 所述 NFCC接收各 NFC目标设备反馈 的发现响应消息时, 对于 ATR— REQ/RES , 需要读取其中的历史字节。
步骤 504、 所述 NFCC根据 RF协议优先级, 从所述至少一个 NFC目标 设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF 协议对应的 NFC目标设备进行通信。
本实施例, 通过 NFCC接收 DH发送的包含 RF协议优先级的信息射频 发现映射命令, 获取用于选择 NFC目标设备的 RF协议优先级; 通过接收各 NFC 目标设备反馈的发现响应消息, 并通过读取扩展字段携带的信息获取 NFC目标设备所支持的所有 RF协议; 并根据 RF协议优先级,从所述至少一 个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议 , 以与选 择确定的 RF协议对应的 NFC目标设备进行通信,使得所选择的 NFC目标设 备所支持的 RF 协议更加符合本机 NFC设备的需求, 实现最大程度地利用 NFCC的功能,避免在 DH上执行 NFCC能够执行的任务,从而能够减少 DH 的资源消耗和 DH的功耗;并将采用 NFCC作为执行主体对 NFC目标设备进 行选择, 能够进一步利用 NFCC的功能, 减少 DH的资源消耗以及功耗。 上述实施例中, NFCC的射频发现的具体方法以及步骤 503中具体的通 过响应消息的扩展字段获得各个 NFC目标设备所支持的 RF协议的信息的方 法, 也可以适用于上述任意实施例的技术方案中对应 NFCC执行的方法。
上述实施例, 步骤 504中也可以将根据 RF协议优先级对 NFC目标设备 进行选择替换为根据 RF协议等级对 NFC目标设备进行选择, 此时可以将步 骤 501省去, 或者也可以保留步骤 501 , 而将根据 RF协议等级对 NFC目标 设备进行选择作为一种备选方案以满足一些特殊场景, 例如, 在步骤 504的 执行过程中, 未能找出满足 RF协议优先级的 NFC目标设备, 此时可以提示 用户未发现满足 RF协议优先级的 NFC目标设备, 同时将根据 RF协议等级 选择的 NFC目标设备作为结果。
图 6为本发明 NFC设备通信装置实施例一的结构示意图,本实施例的 装置 600可以为 DH, 也可以为 NFCC。 如图 6所示, 本实施例的装置可 以包括: 确定模块 11和选择模块 12, 其中, 确定模块 11 , 用于确定发现 的至少一个 NFC目标设备所支持的射频 RF协议; 选择模块 12, 用于根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC目标设备所支持的 RF 协议中选择进行 NFC通信的 RF协议 , 以与选择确定的 RF协议对应的 NFC 目标设备进行通信。
本实施例的装置, 可以用于执行图 1所示方法实施例的技术方案, 具 备相应的功能模块, 其实现原理类似, 此处不再贅述。
本实施例的装置的技术效果为, 通过确定发现的至少一个 NFC目标设 备所支持的射频 RF协议, 获得所有 NFC目标设备所支持的 RF协议, 获得 根据 RF协议来选择合适的 NFC目标设备的基础; 通过根据 RF协议等级或 RF协议优先级,从所述至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议以及对应的 NFC目标设备, 使得所选择的 NFC目标设 备所支持的 RF协议更加符合本机 NFC设备的需求, 实现最大程度地利用 NFCC的功能,避免在 DH上执行 NFCC能够执行的任务,从而能够减少 DH 的资源消耗和 DH的功耗。
在一个实施例中, 若上述实施例的装置为 DH, 贝' J ,
所述确定模块 11 , 具体可以用于接收近场通信控制器 NFCC发送的通告 消息,所述通告消息中包含所述 NFCC发现的至少一个 NFC目标设备所支持 的 RF协议的信息; 所述选择模块 12, 具体可以用于根据 RF协议等级或 RF 协议优先级, 从所述至少一个 NFC 目标设备所支持的 RF 协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备进行通 信。
在一个实施例中, 若上述实施例的装置为 NFCC, 贝' J ,
所述确定模块 11 , 具体可以用于执行射频发现过程, 确定至少一个 NFC 目标设备所支持的 RF协议; 所述选择模块 12,具体可以用于根据 RF协议等 级或 RF协议优先级, 从所述至少一个 NFC目标设备所支持的 RF协议中选 择进行 NFC通信的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备 进行通信。
图 7为本发明 NFC设备通信装置实施例二的结构示意图,本实施例的 装置 700可以为 DH。 如图 7所示, 本实施例的装置在图 6所示装置的基 础上, 还可以包括: 设置指令接收模块 13 , 所述设置指令接收模块 13 , 可 以用于所述选择模块在根据 RF协议优先级, 从所述至少一个 NFC目标设备 所支持的 RF协议中选择进行 NFC通信的 RF协议,以与选择确定的 RF协议 对应的 NFC目标设备进行通信之前, 接收用户输入的设置指令, 所述设置指 令中包含所述 RF协议优先级的信息。
进一步地, 本实施例的装置还可以包括: 命令发送模块 14, 所述命令发 送模块 14, 可以用于向 NFCC发送射频发现映射命令, 所述射频发现映射命 令中包含所述 RF协议优先级的信息,以使所述 NFCC根据所述 RF协议优先 级从所述至少一个 NFC 目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议 , 以与选择确定的 RF协议对应的 NFC目标设备进行通信。
本实施例的装置, 可以用于执行图 2或图 3所示方法实施例的技术方 案, 具备相应的功能模块, 其实现原理类似和技术效果, 此处不再贅述。
图 8为本发明 NFC设备通信装置实施例三的结构示意图,本实施例的 装置 800可以为 NFCC。 如图 8所示, 本实施例的装置在图 6所示装置的 基础上, 还可以包括: 命令接收模块 15, 所述命令接收模块 15, 可以用于 在所述选择模块根据 RF协议优先级, 从所述至少一个 NFC目标设备所支持 的 RF协议中选择进行 NFC通信的 RF协议,以与选择确定的 RF协议对应的 NFC目标设备进行通信之前, 接收 DH发送的射频发现映射命令, 所述射频 发现映射命令中包含所述 RF协议优先级的信息。
进一步地, 本实施例的装置, 确定模块 11可以包括: 发送单元 111和接 收单元 112, 其中, 发送单元 111 , 可以用于向所述至少一个 NFC 目标设备 发送探测请求消息; 接收单元 112, 可以用于接收各 NFC目标设备反馈的发 现响应消息, 所述发现响应消息的扩展字段中包含 NFC 目标设备所支持的 RF协议的信息。
在一个实施例中, 若 NFC 目标设备支持 NFC-A技术, 则所述扩展字段 为选择响应消息 SEL— RES中的指示位 b4和指示位 b5;
若 NFC 目标设备支持 NFC-F 技术, 则所述扩展字段为探测响应消息 SENSF— RES中的 NFC设备标识 NFCID2中的指示位 Byte 1和指示位 Byte2; 若 NFC目标设备不支持点对点 P2P技术,则所述发现响应消息为属性探 测响应消息 ATR— REQ/RES , 所述 ATR— REQ/RES的历史字节中包含 NFC目 标设备所支持的 RF协议的信息。
本实施例的装置,可以用于执行图 4或图 5所示方法实施例的技术方案, 具备相应的功能模块, 其实现原理类似和技术效果, 此处不再贅述。
进一步地, 上述各个装置实施例中, 所述选择模块 12, 具体可以用于确 定所述至少一个 NFC目标设备所支持的最高等级的 RF协议是否在本机能够 支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标设备中选择支持 所述最高等级的 RF协议的 NFC目标设备; 若否, 则确定所述至少一个 NFC 目标设备所支持的次高等级的 RF协议是否在本机能够支持的 RF协议范围 内; 若是, 则从所述至少一个 NFC 目标设备中选择支持所述次高等级的 RF 协议的 NFC目标设备。
或者, 上述各个装置实施例中, 所述选择模块 12, 具体可以用于确定所 述至少一个 NFC目标设备所支持的优先级最高的 RF协议是否在本机能够支 持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标设备中选择支持所 述优先级最高的 RF协议的 NFC目标设备; 若否, 则确定所述至少一个 NFC 目标设备所支持的优先级次高的 RF协议是否在本机能够支持的 RF协议范围 内; 若是, 则从所述至少一个 NFC 目标设备中选择支持所述优先级次高的 RF协议的 NFC目标设备。
图 9为本发明 NFC设备实施例的结构示意图, 如图 9所示, 本实施例 的用户设备 900可以包括: DH和 NFCC, 其中, DH可以采用图 6或图 7 所示装置实施例的结构, 其对应地, 可以执行图 1〜图 3中任一方法实施例 的技术方案, 其实现原理和技术效果类似, 此处不再贅述; NFCC可以采 用图 6或图 8所示装置实施例的结构, 其对应地, 可以执行图 1、 图 4或 图 5中任一方法实施例的技术方案, 其实现原理和技术效果类似, 此处不 再赘述。
本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读 取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述 的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序代码的介 最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims

权 利 要 求 书
1、 一种近场通信 NFC设备通信方法, 其特征在于, 包括:
确定发现的至少一个 NFC目标设备所支持的射频 RF协议;
根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC目标设备所 支持的 RF协议中选择进行 NFC通信的 RF协议 ,以与选择确定的 RF协议对 应的 NFC目标设备进行通信。
2、 根据权利要求 1所述的方法, 其特征在于, 所述确定发现的至少一个 NFC目标设备所支持的 RF协议, 包括:
设备主机 DH接收近场通信控制器 NFCC发送的通告消息, 所述通告消 息中包含所述 NFCC发现的至少一个 NFC目标设备所支持的 RF协议的信息; 所述根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC 目标设 备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF 协议对应的 NFC目标设备进行通信, 包括:
所述 DH根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC目 标设备所支持的射频 RF协议中选择进行 NFC通信的 RF协议, 以与选择确 定的 RF协议对应的 NFC目标设备进行通信。
3、 根据权利要求 2所述的方法, 其特征在于, 所述 DH根据 RF协议优 先级,从所述至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信 的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备进行通信之前, 还包括:
所述 DH接收用户输入的设置指令,所述设置指令中包含所述 RF协议优 先级的信息。
4、 根据权利要求 2或 3所述的方法, 其特征在于, 还包括:
所述 DH向 NFCC发送射频发现映射命令, 所述射频发现映射命令中包 含所述 RF协议优先级的信息,以使所述 NFCC根据所述 RF协议优先级从所 述至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备进行通信。
5、 根据权利要求 1所述的方法, 其特征在于, 所述确定发现的至少一个 NFC目标设备所支持的 RF协议, 包括:
NFCC执行射频发现过程, 确定至少一个 NFC目标设备所支持的 RF协 议;
所述根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC 目标设 备所支持的射频 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备进行通信, 包括:
所述 NFCC根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC 目标设备所支持的射频 RF协议中选择进行 NFC通信的 RF协议, 以与选择 确定的 RF协议对应的 NFC目标设备进行通信。
6、 根据权利要求 5所述的方法, 其特征在于, 所述 NFCC根据 RF协议 优先级,从所述至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通 信的 RF协议 , 以与选择确定的 RF协议对应的 NFC目标设备进行通信之前 , 还包括:
所述 NFCC接收 DH发送的射频发现映射命令, 所述射频发现映射命令 中包含所述 RF协议优先级的信息。
7、根据权利要求 5或 6所述的方法, 其特征在于, 所述 NFCC执行射频 发现过程, 确定至少一个 NFC目标设备所支持的 RF协议, 包括:
所述 NFCC向所述至少一个 NFC目标设备发送探测请求消息;
所述 NFCC接收各 NFC目标设备反馈的发现响应消息,所述发现响应消 息的扩展字段中包含 NFC目标设备所支持的 RF协议的信息。
8、根据权利要求 7所述的方法,其特征在于,若 NFC目标设备支持 NFC-A 技术,则所述扩展字段为选择响应消息 SEL— RES中的指示位 b4和指示位 b5; 若 NFC 目标设备支持 NFC-F 技术, 则所述扩展字段为探测响应消息 SENSF— RES中的 NFC设备标识 NFCID2中的指示位 Bytel和指示位 Byte2; 若 NFC目标设备不支持点对点 P2P技术,则所述发现响应消息为属性探 测响应消息 ATR— REQ/RES , 所述 ATR— REQ/RES的历史字节中包含 NFC目 标设备所支持的 RF协议的信息。
9、 根据权利要求 1〜8中任一项所述的方法, 其特征在于, 根据 RF协议 等级, 从所述至少一个 NFC目标设备所支持的射频 RF协议中选择进行 NFC 通信的 RF协议, 包括:
确定所述至少一个 NFC目标设备所支持的最高等级的 RF协议是否在本 机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标设备所支 持的射频 RF协议中选择支持所述最高等级的 RF协议;
若否, 则确定所述至少一个 NFC目标设备所支持的次高等级的 RF协议 是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标 设备所支持的射频 RF协议中选择支持所述次高等级的 RF协议。
10、 根据权利要求 1〜8中任一项所述的方法, 其特征在于, 根据 RF协 议优先级, 从所述至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC 通信的 RF协议, 以与选择确定的 RF协议对应的 NFC 目标设备进行通信, 包括:
确定所述至少一个 NFC目标设备所支持的优先级最高的 RF协议是否在 本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标设备所 支持的射频 RF协议中选择支持所述优先级最高的 RF协议;
若否, 则确定所述至少一个 NFC目标设备所支持的优先级次高的 RF协 议是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目 标设备所支持的射频 RF协议中选择支持所述优先级次高的 RF协议。
11、 一种 NFC设备通信装置, 其特征在于, 包括:
确定模块, 用于确定发现的至少一个 NFC目标设备所支持的射频 RF协 议;
选择模块, 用于根据 RF协议等级或 RF协议优先级, 从所述至少一个 NFC目标设备所支持的射频 RF协议中选择进行 NFC通信的 RF协议 , 以与 选择确定的 RF协议对应的 NFC目标设备进行通信。
12、 根据权利要求 11所述的装置, 其特征在于, 所述装置为 DH, 所述 确定模块, 具体用于接收近场通信控制器 NFCC发送的通告消息, 所述通告 消息中包含所述 NFCC发现的至少一个 NFC目标设备所支持的 RF协议的信 息;
所述选择模块, 具体用于根据 RF协议等级或 RF协议优先级, 从所述至 少一个 NFC目标设备所支持的射频 RF协议中选择进行 NFC通信的 RF协议 , 以与选择确定的 RF协议对应的 NFC目标设备进行通信。
13、 根据权利要求 12所述的装置, 其特征在于, 还包括:
设置指令接收模块, 用于所述选择模块在根据 RF协议优先级, 从所述 至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与选择确定的 RF协议对应的 NFC目标设备进行通信之前 , 接收用户输入 的设置指令, 所述设置指令中包含所述 RF协议优先级的信息。
14、 根据权利要求 12或 13所述的装置, 其特征在于, 还包括: 命令发送模块, 用于向 NFCC发送射频发现映射命令, 所述射频发现映 射命令中包含所述 RF协议优先级的信息,以使所述 NFCC根据所述 RF协议 优先级从所述至少一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信 的 RF协议 , 以与选择确定的 RF协议对应的 NFC目标设备进行通信。
15、 根据权利要求 11所述的装置, 其特征在于, 所述装置为 NFCC, 所 述确定模块, 具体用于执行射频发现过程, 确定至少一个 NFC目标设备所支 持的 RF协议;
所述选择模块, 具体用于根据 RF协议等级或 RF协议优先级, 从所述至 少一个 NFC目标设备所支持的射频 RF协议中选择进行 NFC通信的 RF协议 , 以与选择确定的 RF协议对应的 NFC目标设备进行通信。
16、 根据权利要求 15所述的装置, 其特征在于, 还包括:
命令接收模块, 用于在所述选择模块根据 RF协议优先级, 从所述至少 一个 NFC目标设备所支持的 RF协议中选择进行 NFC通信的 RF协议, 以与 选择确定的 RF协议对应的 NFC目标设备进行通信之前, 接收 DH发送的射 频发现映射命令, 所述射频发现映射命令中包含所述 RF协议优先级的信息。
17、 根据权利要求 15或 16所述的装置, 其特征在于, 所述确定模块, 包括:
发送单元, 用于向所述至少一个 NFC目标设备发送探测请求消息; 接收单元, 用于接收各 NFC目标设备反馈的发现响应消息, 所述发现响 应消息的扩展字段中包含 NFC目标设备所支持的 RF协议的信息。
18、 根据权利要求 17所述的装置, 其特征在于, 若 NFC 目标设备支持 NFC-A技术, 则所述扩展字段为选择响应消息 SEL— RES中的指示位 b4和指 示位 b5;
若 NFC 目标设备支持 NFC-F 技术, 则所述扩展字段为探测响应消息 SENSF— RES中的 NFC设备标识 NFCID2中的指示位 Bytel和指示位 Byte2; 若 NFC目标设备不支持点对点 P2P技术,则所述发现响应消息为属性探 测响应消息 ATR— REQ/RES , 所述 ATR— REQ/RES的历史字节中包含 NFC目 标设备所支持的 RF协议的信息。
19、 根据权利要求 11〜18中任一项所述的装置, 其特征在于, 所述选择 模块, 具体用于确定所述至少一个 NFC目标设备所支持的最高等级的 RF协 议是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目 标设备所支持的射频 RF协议中选择支持所述最高等级的 RF协议;
若否, 则确定所述至少一个 NFC目标设备所支持的次高等级的 RF协议 是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目标 设备所支持的射频 RF协议中选择支持所述次高等级的 RF协议。
20、 根据权利要求 11〜18中任一项所述的装置, 其特征在于, 所述选择 模块, 具体用于确定所述至少一个 NFC 目标设备所支持的优先级最高的 RF 协议是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC 目标设备所支持的射频 RF协议中选择支持所述优先级最高的 RF协议;
若否, 则确定所述至少一个 NFC目标设备所支持的优先级次高的 RF协 议是否在本机能够支持的 RF协议范围内; 若是, 则从所述至少一个 NFC目 标设备所支持的射频 RF协议中选择支持所述优先级次高的 RF协议。
21、 一种 NFC设备, 其特征在于, 包括: DH和 NFCC, 其中, 所述 DH 采用权利要求 12〜14以及 19〜20中任一项权利要求所述的装置, 所述 NFCC 采用权利要求 15〜20中任一项权利要求所述的装置。
PCT/CN2013/072798 2013-03-18 2013-03-18 Nfc设备通信方法、装置和nfc设备 WO2014146229A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2016503504A JP6332768B2 (ja) 2013-03-18 2013-03-18 Nfcデバイスのための通信方法および装置ならびにそのnfcデバイス
CN201380000832.7A CN103609034B (zh) 2013-03-18 2013-03-18 Nfc设备通信方法、装置和nfc设备
PCT/CN2013/072798 WO2014146229A1 (zh) 2013-03-18 2013-03-18 Nfc设备通信方法、装置和nfc设备
EP13878681.9A EP2945298B1 (en) 2013-03-18 2013-03-18 Communication method and apparatus for nfc device, and nfc device
US14/556,462 US9351101B2 (en) 2013-03-18 2014-12-01 Communication method and apparatus for NFC device and NFC device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/072798 WO2014146229A1 (zh) 2013-03-18 2013-03-18 Nfc设备通信方法、装置和nfc设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/556,462 Continuation US9351101B2 (en) 2013-03-18 2014-12-01 Communication method and apparatus for NFC device and NFC device

Publications (1)

Publication Number Publication Date
WO2014146229A1 true WO2014146229A1 (zh) 2014-09-25

Family

ID=50126072

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/072798 WO2014146229A1 (zh) 2013-03-18 2013-03-18 Nfc设备通信方法、装置和nfc设备

Country Status (5)

Country Link
US (1) US9351101B2 (zh)
EP (1) EP2945298B1 (zh)
JP (1) JP6332768B2 (zh)
CN (1) CN103609034B (zh)
WO (1) WO2014146229A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8127984B2 (en) * 2003-06-13 2012-03-06 Varia Holdings Llc Emulated radio frequency identification
WO2016187789A1 (zh) * 2015-05-25 2016-12-01 华为技术有限公司 一种射频接口扩展的冲突解决方法、装置、dh及nfcc
KR102499378B1 (ko) * 2016-08-30 2023-02-13 삼성전자주식회사 통신 장치 및 통신 방법
CN108833225A (zh) * 2018-06-01 2018-11-16 广东美的制冷设备有限公司 家电设备及其通讯方法、装置及计算机可读存储介质
EP3826144A4 (en) * 2018-07-18 2021-05-26 Beijing Xiaomi Mobile Software Co., Ltd. COMMUNICATION METHOD AND DEVICE, POWER RECEIVING DEVICE AND POWER TRANSFER DEVICE
US11606680B2 (en) 2021-01-27 2023-03-14 Capital One Services, Llc Method and device for discriminating one of a group of NFC transmitters

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859516A (zh) * 2005-04-30 2006-11-08 艾威梯软件技术(北京)有限公司 一种蓝牙终端和多个蓝牙网关连接呼叫接听电话的方法
CN101692741A (zh) * 2001-10-16 2010-04-07 索尼株式会社 信息处理设备、方法和系统
CN102857276A (zh) * 2011-06-30 2013-01-02 株式会社电装 短程无线通信设备

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4432787B2 (ja) * 2005-01-31 2010-03-17 ソニー株式会社 通信装置、通信方法、およびプログラム
JP4771272B2 (ja) * 2005-02-15 2011-09-14 ブラザー工業株式会社 無線タグ情報通信システム
JP4177853B2 (ja) * 2006-03-10 2008-11-05 株式会社カシオ日立モバイルコミュニケーションズ 携帯端末及びその制御方法
EP1855229B1 (fr) * 2006-05-10 2010-08-11 Inside Contactless Procédé de routage de données sortantes et entrantes dans un chipset NFC
ES2386164T3 (es) * 2008-03-27 2012-08-10 Motorola Mobility, Inc. Método y aparato para la selección automática de una aplicación de comunicación de campo cercano en un dispositivo electrónico
JP5641323B2 (ja) * 2010-11-29 2014-12-17 ソニー株式会社 通信装置、通信方法、およびプログラム
US8971800B2 (en) * 2011-05-31 2015-03-03 Qualcomm Incorporated Methods and apparatus for improving NFC activation and data exchange reporting mechanisms
US8989658B2 (en) * 2011-06-24 2015-03-24 Qualcomm Incorporated Methods and apparatuses for improving NFC parameter update mechanisms
US9113284B2 (en) * 2011-08-26 2015-08-18 Qualcomm Incorporated Methods and apparatus for improving management of NFC logical connections

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101692741A (zh) * 2001-10-16 2010-04-07 索尼株式会社 信息处理设备、方法和系统
CN1859516A (zh) * 2005-04-30 2006-11-08 艾威梯软件技术(北京)有限公司 一种蓝牙终端和多个蓝牙网关连接呼叫接听电话的方法
CN102857276A (zh) * 2011-06-30 2013-01-02 株式会社电装 短程无线通信设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2945298A4 *

Also Published As

Publication number Publication date
CN103609034A (zh) 2014-02-26
EP2945298A4 (en) 2016-03-09
EP2945298A1 (en) 2015-11-18
CN103609034B (zh) 2016-01-13
JP2016516367A (ja) 2016-06-02
JP6332768B2 (ja) 2018-05-30
US20150087235A1 (en) 2015-03-26
US9351101B2 (en) 2016-05-24
EP2945298B1 (en) 2017-05-10

Similar Documents

Publication Publication Date Title
KR101658495B1 (ko) 통신 접속을 구축하는 방법 및 장치
EP2876913B1 (en) Application hosting method and system, mobile terminal and server
WO2019119544A1 (zh) 嵌入式sim卡的数据访问的方法和设备
US8706943B2 (en) System for interfacing between a terminal and a smart card, method for same, and smart card applied to same
US9351101B2 (en) Communication method and apparatus for NFC device and NFC device
US11057762B2 (en) Electronic device and method for switching electronic device between dual standby mode and single standby mode
CN108605373B (zh) 用于提供网络共享服务的方法和电子装置
US20110111698A1 (en) Electronic apparatus and access control method
CN105474669A (zh) 对无线usb设备提供持久usb服务的方法和装置
WO2014146563A1 (zh) 一种基于近场通信的连接切换方法及相应装置
US10820187B2 (en) Electronic device for managing embedded subscriber identification module and method for same
JP2016524880A (ja) Nfc無線周波数通信制御方法、装置、およびシステム
US12010764B2 (en) Non-transitory computer-readable storage medium for receiving device identifying information and selecting a target device from at least one function executing device
JP6858200B2 (ja) データフレームをルーティングするための方法、近距離無線通信コントローラ、および端末
GB2524646A (en) Communication apparatus, information processing apparatus, and control method for the same
WO2017000244A1 (zh) 一种射频发现方法、芯片和设备
JP6447625B2 (ja) 通信回路、通信装置、通信方法及びコンピュータプログラム
CN115562570B (zh) 数据迁移方法、系统及电子设备
WO2014114044A1 (zh) 近场通信射频发现控制方法、装置和终端设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13878681

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2013878681

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2013878681

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2016503504

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE