CN106792490A - A near field communication method and terminal - Google Patents
A near field communication method and terminal Download PDFInfo
- Publication number
- CN106792490A CN106792490A CN201710113274.5A CN201710113274A CN106792490A CN 106792490 A CN106792490 A CN 106792490A CN 201710113274 A CN201710113274 A CN 201710113274A CN 106792490 A CN106792490 A CN 106792490A
- Authority
- CN
- China
- Prior art keywords
- nfc
- nfc device
- working mode
- mode
- field communication
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 38
- 238000000034 method Methods 0.000 title claims abstract description 24
- 238000001514 detection method Methods 0.000 claims description 28
- 238000013459 approach Methods 0.000 abstract description 5
- 230000015654 memory Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 9
- 238000004088 simulation Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000007547 defect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 229920001690 polydopamine Polymers 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
Description
技术领域technical field
本发明涉及近场通讯技术领域,具体涉及一种近场通讯方法和终端。The invention relates to the technical field of near field communication, in particular to a near field communication method and terminal.
背景技术Background technique
近场通信(Near Field Communication,NFC)是一种短距高频的无线电技术,在13.56MHz频率运行于10厘米距离内。目前近场通信已通过成为ISO/IEC IS 18092国际标准、ECMA-340标准与ETSI TS 102 190标准。Near Field Communication (NFC) is a short-range high-frequency radio technology that operates at a frequency of 13.56 MHz within a distance of 10 cm. At present, NFC has passed the ISO/IEC IS 18092 international standard, ECMA-340 standard and ETSI TS 102 190 standard.
NFC设备的工作模式包括卡模式(Card emulation)、点对点模式(P2P mode)和读卡器模式(Reader/writer mode)等三种工作模式。其中,卡模式相当于一张采用RFID技术的IC卡,可以替代大量的IC卡场合商场刷卡、公交卡、门禁管制,车票,门票等等;点对点模式用于数据交换,将两个具备NFC功能的设备连接,能实现数据点对点传输,如下载音乐、交换图片或者同步设备地址薄,因此通过NFC,多个设备如数码相机、PDA、计算机和手机之间都可以交换资料或者服务;读卡器模式则作为非接触读卡器使用,比如从海报或者展览信息电子标签上读取相关信息。在这三种模式中,卡模式属于被动读取模式,NFC设备不向外部发射射频场,而是感应外部的射频场,点对点模式和读卡器模式属于主动读取模式,NFC设备向外部发射射频场。The working modes of NFC devices include card emulation, peer-to-peer mode (P2P mode) and card reader mode (Reader/writer mode). Among them, the card mode is equivalent to an IC card using RFID technology, which can replace a large number of IC cards in shopping malls, bus cards, access control, tickets, tickets, etc.; the point-to-point mode is used for data exchange, and two NFC-enabled The device connection can realize data point-to-point transmission, such as downloading music, exchanging pictures or synchronizing device address book, so through NFC, multiple devices such as digital cameras, PDAs, computers and mobile phones can exchange data or services; card reader Mode is used as a contactless card reader, such as reading relevant information from posters or electronic tags for exhibition information. Among these three modes, the card mode is a passive reading mode, and the NFC device does not emit a radio frequency field to the outside, but senses an external radio frequency field. The point-to-point mode and the card reader mode are active reading modes, and the NFC device emits a RF field.
现有NFC设备在工作时,通常以轮询方式来检测外部NFC设备。在如图1所示的一种现有的NFC设备轮询周期中,NFC控制器从NFC Active阶段开始发射射频场(主动读取模式),检测周围的NFC设备,依次检测NFC-A,NFC-B,NFC-F,other(其他类型的NFC技术,如ISO15693)等NFC设备,之后进入卡模拟阶段(被动读取模式),停止发射射频场。When an existing NFC device is working, it usually detects an external NFC device in a polling manner. In an existing NFC device polling cycle as shown in Figure 1, the NFC controller starts to emit a radio frequency field (active read mode) from the NFC Active stage, detects the surrounding NFC devices, and detects NFC-A, NFC -B, NFC-F, other (other types of NFC technology, such as ISO15693) and other NFC devices, after that enter the card emulation stage (passive read mode) and stop emitting RF fields.
然而,现有的NFC设备存在以下缺陷:当两个互相接近的NFC设备都处在发射射频场的状态时,就会首先进入点对点工作模式,如果用户的本意是将其中一个NFC设备作为卡模拟来使用,则需要将作为卡模拟的设备的点对点功能关掉或者将其灭屏;当两个互相接近的NFC设备中的一方处于发射射频场的状态,另一方处于卡模拟的状态,就会首先进入读写器和卡模拟的工作模式,如果用户本意是点对点分享内容,则只能将双方的卡模拟功能关闭再重新尝试交互。因此,现有NFC设备之间的交互往往不能直接进入所需要的工作模式,存在操作繁琐、用户体验差的缺陷。However, the existing NFC devices have the following defects: when two NFC devices that are close to each other are in the state of transmitting radio frequency fields, they will first enter the point-to-point working mode. If the user's original intention is to use one of the NFC devices as a card simulation To use it, you need to turn off the point-to-point function of the device as a card simulation or turn off the screen; when two NFC devices that are close to each other are in the state of transmitting radio frequency fields, and the other is in the state of card simulation, it will First enter the working mode of the reader and card emulation. If the user intends to share content peer-to-peer, they can only turn off the card emulation function of both parties and try to interact again. Therefore, the interaction between existing NFC devices often cannot directly enter the required working mode, which has the defects of cumbersome operation and poor user experience.
发明内容Contents of the invention
有鉴于此,本发明实施例提供了一种近场通讯方法和终端,以解决现有NFC设备之间的交互操作繁琐、用户体验差的技术问题。In view of this, the embodiments of the present invention provide a near field communication method and a terminal to solve the technical problems of cumbersome interactive operations between existing NFC devices and poor user experience.
本发明实施例第一方面提供了一种近场通讯方法,应用于终端,包括:检测NFC设备;当检测到所述NFC设备时,判断所述NFC设备来自于所述终端的NFC天线的第一方向或第二方向,所述第一方向不同于所述第二方向;当所述NFC设备来自于所述第一方向时,以第一工作模式与所述NFC设备进行通讯,所述第一工作模式是主动读取模式或被动读取模式。The first aspect of the embodiment of the present invention provides a near field communication method applied to a terminal, including: detecting an NFC device; when the NFC device is detected, judging that the NFC device is from the first NFC antenna of the terminal A direction or a second direction, the first direction is different from the second direction; when the NFC device comes from the first direction, communicate with the NFC device in a first working mode, the second A working mode is an active reading mode or a passive reading mode.
结合本发明实施例第一方面,本发明实施例第一方面第一实施方式中,还包括:当所述NFC设备来自于所述第二方向时,以第二工作模式与所述NFC设备进行通讯,所述第二工作模式不同于所述第一工作模式。With reference to the first aspect of the embodiments of the present invention, the first implementation of the first aspect of the embodiments of the present invention further includes: when the NFC device comes from the second direction, communicate with the NFC device in the second working mode Communication, the second working mode is different from the first working mode.
结合本发明实施例第一方面第一实施方式,本发明实施例第一方面第二实施方式中,所述第一工作模式是主动读取模式,所述第二工作模式是被动读取模式,所述检测NFC设备,包括:通过向所述第一方向发射第一NFC射频信号,以检测来自于所述第一方向的所述NFC设备。In combination with the first implementation mode of the first aspect of the embodiment of the present invention, in the second implementation mode of the first aspect of the embodiment of the invention, the first working mode is the active reading mode, and the second working mode is the passive reading mode, The detecting the NFC device includes: detecting the NFC device from the first direction by transmitting a first NFC radio frequency signal to the first direction.
结合本发明实施例第一方面第二实施方式,本发明实施例第一方面第三实施方式中,所述检测NFC设备,包括:当停止向所述第一方向发射所述第一射频信号时,停止检测来自于所述第一方向的所述NFC设备。In combination with the second implementation manner of the first aspect of the embodiment of the present invention, in the third implementation manner of the first aspect of the embodiment of the present invention, the detection of the NFC device includes: when stopping transmitting the first radio frequency signal to the first direction , Stop detecting the NFC device from the first direction.
结合本发明实施例第一方面第一实施方式、第二实施方式或第三实施方式,本发明实施例第一方面第四实施方式中,所述第一工作模式是主动读取模式,所述第二工作模式是被动读取模式,所述检测NFC设备,包括:通过感应来自于所述第二方向的第二NFC射频信号,以检测来自于所述第二方向的所述NFC设备。In combination with the first embodiment, the second embodiment or the third embodiment of the first aspect of the embodiments of the present invention, in the fourth embodiment of the first aspect of the embodiments of the present invention, the first working mode is an active reading mode, and the The second working mode is a passive reading mode, and the detecting the NFC device includes: detecting the NFC device from the second direction by sensing a second NFC radio frequency signal from the second direction.
本发明实施例第二方面提供了一种近场通讯终端,包括:NFC设备检测单元,用于检测NFC设备;NFC设备方向判断单元,用于当检测到所述NFC设备时,判断所述NFC设备来自于所述终端的NFC天线的第一方向或第二方向,所述第一方向不同于所述第二方向;第一通讯控制单元,用于当所述NFC设备来自于所述第一方向时,以第一工作模式与所述NFC设备进行通讯,所述第一工作模式是主动读取模式或被动读取模式。The second aspect of the embodiment of the present invention provides a near-field communication terminal, including: an NFC device detection unit for detecting the NFC device; an NFC device direction judgment unit for judging the NFC device when the NFC device is detected The device comes from the first direction or the second direction of the NFC antenna of the terminal, and the first direction is different from the second direction; the first communication control unit is used when the NFC device comes from the first direction direction, communicate with the NFC device in a first working mode, where the first working mode is an active reading mode or a passive reading mode.
结合本发明实施例第二方面,本发明实施例第二方面第一实施方式中,还包括:第二通讯控制单元,当所述NFC设备来自于所述第二方向时,以第二工作模式与所述NFC设备进行通讯,所述第二工作模式不同于所述第一工作模式。In combination with the second aspect of the embodiment of the present invention, in the first embodiment of the second aspect of the embodiment of the present invention, it further includes: a second communication control unit, when the NFC device comes from the second direction, the second working mode To communicate with the NFC device, the second working mode is different from the first working mode.
结合本发明实施例第二方面第一实施方式,本发明实施例第二方面第二实施方式中,所述第一工作模式是主动读取模式,所述第二工作模式是被动读取模式,所述NFC设备检测单元包括:第一NFC设备检测子单元,用于通过向所述第一方向发射第一NFC射频信号,以检测来自于所述第一方向的所述NFC设备。In combination with the first implementation of the second aspect of the embodiment of the present invention, in the second implementation of the second aspect of the embodiment of the present invention, the first working mode is the active reading mode, and the second working mode is the passive reading mode, The NFC device detection unit includes: a first NFC device detection subunit, configured to detect the NFC device from the first direction by transmitting a first NFC radio frequency signal to the first direction.
结合本发明实施例第二方面第二实施方式,本发明实施例第二方面第三实施方式中,所述第一NFC设备检测子单元还用于,当停止向所述第一方向发射所述第一射频信号时,停止检测来自于所述第一方向的所述NFC设备。In combination with the second implementation manner of the second aspect of the embodiment of the present invention, in the third implementation manner of the second aspect of the embodiment of the present invention, the first NFC device detection subunit is further configured to stop transmitting the NFC device in the first direction When the first radio frequency signal is received, stop detecting the NFC device from the first direction.
结合本发明实施例第二方面第一实施方式、本发明实施例第二方面第二实施方式或本发明实施例第二方面第三实施方式,本发明实施例第二方面第四实施方式中,所述第一工作模式是主动读取模式,所述第二工作模式是被动读取模式,所述NFC设备检测单元包括:第二NFC设备检测子单元,用于通过感应来自于所述第二方向的第二NFC射频信号,以检测来自于所述第二方向的所述NFC设备。In combination with the first implementation manner of the second aspect of the embodiments of the present invention, the second implementation manner of the second aspect of the embodiments of the present invention, or the third implementation manner of the second aspect of the embodiments of the present invention, in the fourth implementation manner of the second aspect of the embodiments of the present invention, The first working mode is an active reading mode, the second working mode is a passive reading mode, and the NFC device detection unit includes: a second NFC device detection subunit for sensing from the second a second NFC radio frequency signal from a direction to detect the NFC device from the second direction.
本发明实施例所提供的近场通讯方法和终端,通过使所述终端的NFC天线的第一方向和第二方向都可以检测NFC设备,且指定特定的方向对应特定的工作模式,使得所述终端可以直接进入所需要的工作模式,从而简化了操作,提高了用户体验。The near field communication method and terminal provided by the embodiments of the present invention enable the NFC device to be detected in both the first direction and the second direction of the NFC antenna of the terminal, and designate a specific direction corresponding to a specific working mode, so that the The terminal can directly enter the required working mode, thereby simplifying the operation and improving the user experience.
附图说明Description of drawings
通过参考附图会更加清楚的理解本发明的特征和优点,附图是示意性的而不应理解为对本发明进行任何限制,在附图中:The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the accompanying drawings:
图1示出了现有NFC设备的轮询周期示意图;FIG. 1 shows a schematic diagram of a polling cycle of an existing NFC device;
图2示出了本发明实施例的一种应用场景示意图;FIG. 2 shows a schematic diagram of an application scenario of an embodiment of the present invention;
图3示出了本发明实施例的一种手机的结构示意图;FIG. 3 shows a schematic structural diagram of a mobile phone according to an embodiment of the present invention;
图4示出了本发发明实施例的一种近场通讯方法的流程图;FIG. 4 shows a flow chart of a near field communication method according to an embodiment of the present invention;
图5示出了本发明实施例的一种NFC设备的轮询周期示意图;FIG. 5 shows a schematic diagram of a polling cycle of an NFC device according to an embodiment of the present invention;
图6示出了本发发明实施例的一种近场通讯终端的示意图。Fig. 6 shows a schematic diagram of a near field communication terminal according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.
如图2所示,是本发明实施例的应用场景示意图。电子设备10A和10B例如是具有NFC功能的手机或智能手表等智能终端,该电子设备10A和10B互相接近以进行通讯。As shown in FIG. 2 , it is a schematic diagram of an application scenario of an embodiment of the present invention. The electronic devices 10A and 10B are smart terminals such as mobile phones or smart watches with NFC functions, and the electronic devices 10A and 10B are close to each other for communication.
该电子设备以手机为例,手机的部分结构的框图如图3所示,手机包括:处理器31、存储器32和NFC模块33,处理器31、存储器32和NFC模块33通过总线30连接。本领域技术人员可以理解,图3中示出手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The electronic device takes a mobile phone as an example. A block diagram of a part of the mobile phone is shown in FIG. 3 . Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 3 does not constitute a limitation to the mobile phone, and may include more or less components than those shown in the figure, or combine some components, or arrange different components.
结合图3对手机的各个构成部件进行具体的介绍:Combined with Figure 3, the various components of the mobile phone are introduced in detail:
处理器31可以是通用处理器,例如中央处理器(CPU),还可以是数字信号处理器(DSP)、专用集成电路(ASIC),或者是被配置成实施发明实施例的一个或多个集成电路。The processor 31 can be a general processor, such as a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the invention. circuit.
总线30可以是工业标准体系结构(ISA)总线、外部设备互连(PCI)总线或扩展标准体系结构(EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。The bus 30 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Standard Architecture (EISA) bus, or the like. The bus can be divided into address bus, data bus, control bus and so on.
存储器32可以是高速随机存取存储器,还可以是非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 32 may be a high-speed random access memory, or a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
NFC模块33包括NFC芯片和NFC天线,其中NFC天线可以是线圈天线,优选是磁性FPC天线。The NFC module 33 includes an NFC chip and an NFC antenna, wherein the NFC antenna may be a coil antenna, preferably a magnetic FPC antenna.
请参阅图4,本发明实施例提供一种近场通讯方法,应用于终端,例如智能终端,包括:Please refer to FIG. 4, an embodiment of the present invention provides a near field communication method applied to a terminal, such as a smart terminal, including:
S41.检测NFC设备;S41. Detecting the NFC device;
具体地,该终端(NFC发起设备、主设备)具有NFC模块,该NFC模块可以工作在主动模式或被动模式,工作在主动模式时,该NFC模块通过NFC天线发射射频场(RF-field),以检测目标设备(从设备),工作在被动模式时,不必发射射频场,而是通过在NFC天线中的感应电流来检测目标设备。另外,该终端的NFC模块至少在其NFC天线的两个不同的方向可以检测NFC设备,例如可以在NFC天线的第一方向和第二方向检测NFC设备。Specifically, the terminal (NFC initiating device, master device) has an NFC module, and the NFC module can work in active mode or passive mode. When working in active mode, the NFC module transmits a radio frequency field (RF-field) through the NFC antenna, To detect the target device (slave device), when working in passive mode, it is not necessary to emit a radio frequency field, but to detect the target device through the induced current in the NFC antenna. In addition, the NFC module of the terminal can detect the NFC device at least in two different directions of its NFC antenna, for example, it can detect the NFC device in the first direction and the second direction of the NFC antenna.
S42.当检测到该NFC设备时,判断该NFC设备来自于该终端的NFC天线的第一方向或第二方向,该第一方向不同于该第二方向;S42. When the NFC device is detected, it is judged that the NFC device comes from the first direction or the second direction of the NFC antenna of the terminal, and the first direction is different from the second direction;
具体地,NFC天线可以是线圈、FPC线圈或者磁性FPC线圈。由此,NFC天线的第一方向可以是其正面或反面,第二方向是与第一方向的反面。Specifically, the NFC antenna may be a coil, an FPC coil, or a magnetic FPC coil. Thus, the first direction of the NFC antenna can be the front or the back thereof, and the second direction is the opposite of the first direction.
S43.当该NFC设备来自于该第一方向时,以第一工作模式与该NFC设备进行通讯,该第一工作模式是主动读取模式或被动读取模式。S43. When the NFC device comes from the first direction, communicate with the NFC device in a first working mode, where the first working mode is an active reading mode or a passive reading mode.
具体地,当该第一工作模式是主动读取模式时,该终端应当通过其NFC天线向该第一方向发射射频场;当该第一工作模式是被动读取模式时,该终端应当控制其NFC天线向该第一方向不发射射频场,仅感应外部的射频场。Specifically, when the first working mode is the active reading mode, the terminal should transmit a radio frequency field in the first direction through its NFC antenna; when the first working mode is the passive reading mode, the terminal should control its The NFC antenna does not emit a radio frequency field in the first direction, but only senses an external radio frequency field.
本发明实施例中,通过使终端的NFC天线的第一方向和第二方向都可以检测NFC设备,且指定特定的方向对应特定的工作模式(如第一方向对应第一工作模式),使得被检测的NFC设备只要从特定的方向接近该终端可以直接进入所需要的工作模式,从而简化了操作,提高了用户体验。In the embodiment of the present invention, the NFC device can be detected by both the first direction and the second direction of the NFC antenna of the terminal, and specifying a specific direction corresponds to a specific working mode (such as the first direction corresponds to the first working mode), so that the detected As long as the detected NFC device approaches the terminal from a specific direction, it can directly enter the required working mode, thereby simplifying the operation and improving the user experience.
可选的,如图4所示,还可以包括:Optionally, as shown in Figure 4, may also include:
步骤S44.当该NFC设备来自于该第二方向时,以第二工作模式与该NFC设备进行通讯,该第二工作模式不同于该第一工作模式。Step S44. When the NFC device comes from the second direction, communicate with the NFC device in a second working mode, which is different from the first working mode.
可选的,该第一工作模式是主动读取模式,该第二工作模式是被动读取模式,该检测NFC设备,包括:Optionally, the first working mode is an active reading mode, and the second working mode is a passive reading mode, and the detection NFC device includes:
通过向该第一方向发射第一NFC射频信号,以检测来自于该第一方向的该NFC设备。The NFC device from the first direction is detected by transmitting a first NFC radio frequency signal to the first direction.
可选的,当停止向该第一方向发射该第一射频信号时,停止检测来自于该第一方向的该NFC设备。Optionally, stop detecting the NFC device from the first direction when stopping transmitting the first radio frequency signal to the first direction.
具体地,向该第一方向发射第一NFC射频信号可参见如图5所示的本实施例检测NFC设备时的轮询示意图,在右半图中,与现有技术类似,从NFC Active阶段开始发射射频场,依次检测NFC-A,NFC-B,NFC-F,other等NFC设备,但与现有技术中结束发射射频场后进入卡模拟阶段不同的是,在本实施例中终端在结束发射射频场之后停止检测NFC设备,即图中的“no work”(不再工作),由此确保被检测NFC设备从第一方向接近该终端时,该终端只能进入主动读取模式,并且可以减少功耗。可选的,上述各检测NFC-A,NFC-B,NFC-F,other等NFC设备的轮询间隔可以加大。Specifically, for transmitting the first NFC radio frequency signal in the first direction, refer to the polling schematic diagram of this embodiment when detecting NFC devices as shown in Figure 5. In the right half figure, similar to the prior art, from the NFC Active stage Start to transmit the radio frequency field, and detect NFC devices such as NFC-A, NFC-B, NFC-F, other in turn, but it is different from entering the card simulation stage after finishing transmitting the radio frequency field in the prior art. In this embodiment, the terminal is in the Stop detecting the NFC device after finishing transmitting the radio frequency field, that is, "no work" in the figure (no longer working), thereby ensuring that when the detected NFC device approaches the terminal from the first direction, the terminal can only enter the active reading mode, And can reduce power consumption. Optionally, the polling intervals for detecting NFC devices such as NFC-A, NFC-B, NFC-F, and other above can be increased.
可选的,该第一工作模式是主动读取模式,该第二工作模式是被动读取模式,该检测NFC设备,包括:Optionally, the first working mode is an active reading mode, and the second working mode is a passive reading mode, and the detection NFC device includes:
通过感应来自于该第二方向的第二NFC射频信号,以检测来自于该第二方向的该NFC设备。The NFC device from the second direction is detected by sensing the second NFC radio frequency signal from the second direction.
具体地,感应来自于该第二方向的第二NFC射频信号可参见如图5所示的本实施例检测NFC设备时的轮询示意图,在左半图中,与现有技术不同,在轮询周期内没有发射射频场的阶段,只有卡模拟的阶段。由此,确保被检测NFC设备从第二方向接近该终端时,该终端只能进入被动读取模式。Specifically, the sensing of the second NFC radio frequency signal from the second direction can refer to the polling schematic diagram of this embodiment when detecting NFC devices as shown in Figure 5. In the left half of the figure, different from the prior art, in the round There is no RF field emission phase in the interrogation cycle, only card emulation phase. Thus, it is ensured that when the detected NFC device approaches the terminal from the second direction, the terminal can only enter the passive reading mode.
上述实施例介绍了本发明的近场通讯方法,下面通过实施例对近场通讯终端进行说明。The above-mentioned embodiments have introduced the near field communication method of the present invention, and the near field communication terminal will be described below through the embodiments.
参见图6,本发明实施例提供了一种近场通讯终端,包括:Referring to FIG. 6, an embodiment of the present invention provides a near field communication terminal, including:
NFC设备检测单元61,用于检测NFC设备;对被检测的NFC设备没有限制,可以处于发射射频场的状态,或者卡模拟状态;The NFC device detection unit 61 is used to detect the NFC device; there is no limit to the detected NFC device, it can be in the state of transmitting the radio frequency field, or the card simulation state;
NFC设备方向判断单元62,用于当检测到该NFC设备时,判断该NFC设备来自于该终端的NFC天线的第一方向或第二方向,该第一方向不同于该第二方向;当NFC天线是线圈时,该第一方向例如可以是该线圈的正面,第二方向可以是反面;NFC device direction judging unit 62, for when detecting this NFC device, judge that this NFC device comes from the first direction or the second direction of the NFC antenna of this terminal, and this first direction is different from this second direction; When NFC When the antenna is a coil, the first direction may be, for example, the front side of the coil, and the second direction may be the back side;
第一通讯控制单元63,用于当该NFC设备来自于该第一方向时,以第一工作模式与该NFC设备进行通讯,该第一工作模式是主动读取模式或被动读取模式。具体地,主动读取模式包括点对点模式或读卡器模式,被动读取模式包括卡模拟模式。The first communication control unit 63 is configured to communicate with the NFC device in a first working mode when the NFC device comes from the first direction, and the first working mode is an active reading mode or a passive reading mode. Specifically, the active reading mode includes a peer-to-peer mode or a card reader mode, and the passive reading mode includes a card emulation mode.
本实施例通过使终端的NFC天线的第一方向和第二方向都可以检测NFC设备,且指定特定的方向对应特定的工作模式(如第一方向对应第一工作模式),使得被检测的NFC设备只要从特定的方向接近终端就可以直接进入所需要的工作模式,从而简化了操作,提高了用户体验。In this embodiment, both the first direction and the second direction of the NFC antenna of the terminal can detect the NFC device, and specify a specific direction corresponding to a specific working mode (such as the first direction corresponding to the first working mode), so that the detected NFC As long as the device approaches the terminal from a specific direction, it can directly enter the required working mode, which simplifies operations and improves user experience.
可选的,该近场通讯终端还包括:Optionally, the near field communication terminal also includes:
第二通讯控制单元64,当该NFC设备来自于该第二方向时,以第二工作模式与该NFC设备进行通讯,该第二工作模式不同于该第一工作模式。具体地,第二通讯控制单元与第一通讯控制单元是互斥的,即不能同时工作,终端不能同时与两个NFC设备进行通讯。The second communication control unit 64, when the NFC device comes from the second direction, communicates with the NFC device in a second working mode, which is different from the first working mode. Specifically, the second communication control unit and the first communication control unit are mutually exclusive, that is, they cannot work at the same time, and the terminal cannot communicate with two NFC devices at the same time.
可选的,该第一工作模式是主动读取模式,该第二工作模式是被动读取模式,该NFC设备检测单元包括:Optionally, the first working mode is an active reading mode, the second working mode is a passive reading mode, and the NFC device detection unit includes:
第一NFC设备检测子单元,用于通过向该第一方向发射第一NFC射频信号,以检测来自于该第一方向的该NFC设备。被检测的该NFC设备的状态没有限定,可以是发射射频场的状态或者卡模拟状态。可选的,当停止向该第一方向发射该第一射频信号时,该第一NFC设备检测子单元停止检测来自于该第一方向的该NFC设备。The first NFC device detection subunit is configured to detect the NFC device from the first direction by transmitting a first NFC radio frequency signal to the first direction. The detected state of the NFC device is not limited, and may be a state of transmitting a radio frequency field or a card simulation state. Optionally, when stopping transmitting the first radio frequency signal to the first direction, the first NFC device detection subunit stops detecting the NFC device from the first direction.
可选的,该第一工作模式是主动读取模式,该第二工作模式是被动读取模式,该NFC设备检测单元包括:Optionally, the first working mode is an active reading mode, the second working mode is a passive reading mode, and the NFC device detection unit includes:
第二NFC设备检测子单元,用于通过感应来自于该第二方向的第二NFC射频信号,以检测来自于该第二方向的该NFC设备。被检测的该NFC设备应当处于发射射频场的状态,以被检测到。The second NFC device detection subunit is configured to detect the NFC device from the second direction by sensing a second NFC radio frequency signal from the second direction. The NFC device to be detected should be in a state of emitting a radio frequency field in order to be detected.
下面以一种手机为例对本发明进一步说明。The present invention will be further described below by taking a mobile phone as an example.
如图3所示,本发明实施例提供了一种手机,包括:至少一个处理器31、存储器32和NFC模块33,图3中以一个处理器为例,处理器31、存储器32和NFC模块33通过总线30连接,存储器32中存储有可被该至少一个处理器执行的指令,该指令被该至少一个处理器执行,以使该至少一个处理器执行上述任一种的近场通讯方法。As shown in Figure 3, the embodiment of the present invention provides a mobile phone, including: at least one processor 31, memory 32 and NFC module 33, a processor is taken as an example in Figure 3, processor 31, memory 32 and NFC module 33 is connected through the bus 30, and the memory 32 stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor executes any one of the above-mentioned near field communication methods.
具体地,该处理器所执行的指令的流程可以是:Specifically, the flow of instructions executed by the processor may be:
检测NFC设备;Detect NFC devices;
当检测到NFC设备时,判断该NFC设备来自于该手机的NFC天线的第一方向或第二方向,该第一方向不同于该第二方向;When the NFC device is detected, it is judged that the NFC device comes from the first direction or the second direction of the NFC antenna of the mobile phone, and the first direction is different from the second direction;
当该NFC设备来自于该第一方向时,以第一工作模式与该NFC设备进行通讯,该第一工作模式是主动读取模式或被动读取模式。When the NFC device comes from the first direction, communicate with the NFC device in a first working mode, and the first working mode is an active reading mode or a passive reading mode.
可选的,当该NFC设备来自于该第二方向时,以第二工作模式与该NFC设备进行通讯,该第二工作模式不同于该第一工作模式。Optionally, when the NFC device comes from the second direction, communicate with the NFC device in a second working mode, where the second working mode is different from the first working mode.
可选的,该第一工作模式是主动读取模式,该第二工作模式是被动读取模式,该检测NFC设备,包括:Optionally, the first working mode is an active reading mode, and the second working mode is a passive reading mode, and the detection NFC device includes:
通过向该第一方向发射第一NFC射频信号,以检测来自于该第一方向的该NFC设备。The NFC device from the first direction is detected by transmitting a first NFC radio frequency signal to the first direction.
可选的,该检测NFC设备,包括:Optionally, the detection NFC device includes:
当停止向该第一方向发射该第一射频信号时,停止检测来自于该第一方向的该NFC设备。When stopping transmitting the first radio frequency signal to the first direction, stop detecting the NFC device from the first direction.
可选的,该第一工作模式是主动读取模式,该第二工作模式是被动读取模式,该检测NFC设备,包括:Optionally, the first working mode is an active reading mode, and the second working mode is a passive reading mode, and the detection NFC device includes:
通过感应来自于该第二方向的第二NFC射频信号,以检测来自于该第二方向的该NFC设备。The NFC device from the second direction is detected by sensing the second NFC radio frequency signal from the second direction.
本发明实施例还提供了一种非暂态计算机存储介质,该计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述任意方法实施例中的近场通讯方法。其中,该存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)、随机存储记忆体(Random Access Memory,RAM)、快闪存储器(Flash Memory)、硬盘(Hard Disk Drive,缩写:HDD)或固态硬盘(Solid-State Drive,SSD)等;该存储介质还可以包括上述种类的存储器的组合。An embodiment of the present invention also provides a non-transitory computer storage medium, the computer storage medium stores computer-executable instructions, and the computer-executable instructions can execute the near field communication method in any of the above method embodiments. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviation: HDD) or a solid-state drive (Solid-State Drive, SSD), etc.; the storage medium may also include a combination of the above types of memories.
具体地,该计算机存储介质存储的计算机可执行指令的流程可以包括:Specifically, the process of the computer-executable instructions stored in the computer storage medium may include:
检测NFC设备;Detect NFC devices;
当检测到NFC设备时,判断该NFC设备来自于该手机的NFC天线的第一方向或第二方向,该第一方向不同于该第二方向;When the NFC device is detected, it is judged that the NFC device comes from the first direction or the second direction of the NFC antenna of the mobile phone, and the first direction is different from the second direction;
当该NFC设备来自于该第一方向时,以第一工作模式与该NFC设备进行通讯,该第一工作模式是主动读取模式或被动读取模式。When the NFC device comes from the first direction, communicate with the NFC device in a first working mode, and the first working mode is an active reading mode or a passive reading mode.
可选的,当该NFC设备来自于该第二方向时,以第二工作模式与该NFC设备进行通讯,该第二工作模式不同于该第一工作模式。Optionally, when the NFC device comes from the second direction, communicate with the NFC device in a second working mode, where the second working mode is different from the first working mode.
可选的,该第一工作模式是主动读取模式,该第二工作模式是被动读取模式,该检测NFC设备,包括:Optionally, the first working mode is an active reading mode, and the second working mode is a passive reading mode, and the detection NFC device includes:
通过向该第一方向发射第一NFC射频信号,以检测来自于该第一方向的该NFC设备。The NFC device from the first direction is detected by transmitting a first NFC radio frequency signal to the first direction.
可选的,该检测NFC设备,包括:Optionally, the detection NFC device includes:
当停止向该第一方向发射该第一射频信号时,停止检测来自于该第一方向的该NFC设备。When stopping transmitting the first radio frequency signal to the first direction, stop detecting the NFC device from the first direction.
可选的,该第一工作模式是主动读取模式,该第二工作模式是被动读取模式,该检测NFC设备,包括:Optionally, the first working mode is an active reading mode, and the second working mode is a passive reading mode, and the detection NFC device includes:
通过感应来自于该第二方向的第二NFC射频信号,以检测来自于该第二方向的该NFC设备。The NFC device from the second direction is detected by sensing the second NFC radio frequency signal from the second direction.
本领域技术人员可以理解,实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,该的存储介质可为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等。Those skilled in the art can understand that all or part of the processes in the methods of the above-mentioned embodiments can be completed by instructing related hardware through computer programs, and the programs can be stored in a computer-readable storage medium. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), and the like.
虽然结合附图描述了本发明的实施例,但是本领域技术人员可以在不脱离本发明的精神和范围的情况下作出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall into the scope of the appended claims. within the limited range.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710113274.5A CN106792490B (en) | 2017-02-28 | 2017-02-28 | Near field communication method and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710113274.5A CN106792490B (en) | 2017-02-28 | 2017-02-28 | Near field communication method and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106792490A true CN106792490A (en) | 2017-05-31 |
CN106792490B CN106792490B (en) | 2019-11-05 |
Family
ID=58959980
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710113274.5A Active CN106792490B (en) | 2017-02-28 | 2017-02-28 | Near field communication method and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106792490B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101790183A (en) * | 2010-01-25 | 2010-07-28 | 中兴通讯股份有限公司 | Mode selection method, mobile terminal and system |
US20100279606A1 (en) * | 2009-02-13 | 2010-11-04 | Qualcomm Incorporated | Wireless power and wireless communication for electronic devices |
CN102255640A (en) * | 2011-07-13 | 2011-11-23 | 宇龙计算机通信科技(深圳)有限公司 | Data exchange method based on near field communication technology and mobile terminal |
CN102832977A (en) * | 2012-09-04 | 2012-12-19 | 深圳盈烨创新通讯技术有限公司 | Method for rapidly switching multiple operating modes of near-field communication equipment |
CN105472534A (en) * | 2014-09-24 | 2016-04-06 | 西安酷派软件科技有限公司 | Switching method and switching system of NFC working mode and terminal |
US20170019783A1 (en) * | 2015-07-13 | 2017-01-19 | Motorola Mobility Llc | Hand held electronic device with Near field communication element and associated sensor |
-
2017
- 2017-02-28 CN CN201710113274.5A patent/CN106792490B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100279606A1 (en) * | 2009-02-13 | 2010-11-04 | Qualcomm Incorporated | Wireless power and wireless communication for electronic devices |
CN101790183A (en) * | 2010-01-25 | 2010-07-28 | 中兴通讯股份有限公司 | Mode selection method, mobile terminal and system |
CN102255640A (en) * | 2011-07-13 | 2011-11-23 | 宇龙计算机通信科技(深圳)有限公司 | Data exchange method based on near field communication technology and mobile terminal |
CN102832977A (en) * | 2012-09-04 | 2012-12-19 | 深圳盈烨创新通讯技术有限公司 | Method for rapidly switching multiple operating modes of near-field communication equipment |
CN105472534A (en) * | 2014-09-24 | 2016-04-06 | 西安酷派软件科技有限公司 | Switching method and switching system of NFC working mode and terminal |
US20170019783A1 (en) * | 2015-07-13 | 2017-01-19 | Motorola Mobility Llc | Hand held electronic device with Near field communication element and associated sensor |
Also Published As
Publication number | Publication date |
---|---|
CN106792490B (en) | 2019-11-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5367847B2 (en) | Terminal supporting enhancement type short-range wireless communication and processing method thereof | |
US20180225486A1 (en) | Information processing device, information processing method, and program | |
US20150382135A1 (en) | Wireless communication apparatus, wireless communication method and computer readable recording medium recording program thereon | |
US11373168B2 (en) | Value added services polling | |
US10021727B2 (en) | Near field communication (NFC) data transfer | |
US9703995B2 (en) | Portable terminal, imaging apparatus, communication system, communication method of portable terminal, communication method of imaging apparatus, and computer readable storage device | |
US11601791B2 (en) | Method for pairing devices using near field communication and electronic apparatus using same | |
WO2016141523A1 (en) | Region prompting method and terminal | |
US20140024309A1 (en) | Nfc radio control in a mobile device | |
CN113553870B (en) | NFC tag identification method and device, NFC equipment and storage medium | |
US9697396B2 (en) | Interactive processing method and device and electronic apparatus | |
CN106358179A (en) | SIM (Subscriber Identification Module) card switching circuit and SIM card switching method | |
US9055432B2 (en) | Targeted muting for communication between electronic appliances | |
US9716967B2 (en) | Communication system, communication terminal apparatus, storage medium having stored therein communication program, and communication method | |
US20200169297A1 (en) | Operating method of electronic device performing near field communication functions | |
CN110536274A (en) | NFC device control method, device, NFC device and storage medium | |
CN204557497U (en) | Double frequency intelligent RF identification integrated system | |
US8977198B2 (en) | Communication method between electronic appliances, and corresponding appliances | |
KR101739522B1 (en) | Apparatus and method for firmware update using nfc bridge circuit supporting | |
CN106792490B (en) | Near field communication method and terminal | |
CN105519003B (en) | Touch communication device and method for performing touch communication | |
US20150212783A1 (en) | Method of controlling permission and touch link electronic device utilizing the same | |
CN107155164B (en) | NFC power management device and method | |
US20170014165A1 (en) | Pedicle screw engaging control instrument with a guidewire capturing system | |
JP6096497B2 (en) | Communication program, information processing apparatus, communication system, and communication method |
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 |