PN7160 SPI EVK (OM27160B1EVK) on Raspberry Pi4 : no NFC tag detected

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

PN7160 SPI EVK (OM27160B1EVK) on Raspberry Pi4 : no NFC tag detected

跳至解决方案
11,786 次查看
fr5
Contributor IV

Hi,

I followed instructions provided in these documents :
https://www.nxp.com/docs/en/application-note/AN12991.pdf
https://www.nxp.com/docs/en/application-note/AN13287.pdf
https://community.nxp.com/t5/NXP-Designs-Knowledge-Base/Easy-set-up-of-NFC-on-Raspberry-Pi/ta-p/1099... by @jeremygeslin 

I have tested with nfcDemoApp on two different configurations.

On first configuration I used a Raspberry yocto image with https://github.com/NXPNFCLinux/meta-nxp-nfc/blob/master/recipes-nfc/nxp_nfc/nxp-nfc_git.bb recipe, with SRC_URI overrided to git://github.com/NXPNFCLinux/linux_libnfc-nci.git;branch=NCI2.0_PN7160 and SRCREV to "6bf9f42b94e267f6384043009bda84c11e7ebbaa".

On second configuration I used directly Raspberry debian distribution (debian version 11.2) on which I installed linux_libnfc-nci library got from git clone https://github.com/NXPNFCLinux/linux_libnfc-nci.git -b NCI2.0_PN7160

In both cases I am not able to detect a NFC tag (I attach the corresponding log files).

Can anyone help on this please ?

Regards,

Fabien

标签 (1)
标记 (3)
0 项奖励
1 解答
11,741 次查看
jeremygeslin
NXP Employee
NXP Employee

Hi Fabien,

From your logs, I can observe the discovery loop is started with the following NCI command:

21031309000101010201030180018101060174017701

This RF_DISCOVER_CMD is rejected by PN7160 with SYNTAX_ERROR:

41030105

 

FYI, the command detail is:

[NCI][COMMAND][21 03 13 09 00 01 01 01 02 01 03 01 80 01 81 01 06 01 74 01 77 01]
   RF_DISCOVER_CMD
      * Number of Configurations = 9 [0x09]
         --> Configuration N° 1
            - RF Technology and Mode = {Std} NFC_A_PASSIVE_POLL_MODE [0x00]
            - Discovery Frequency    = RF Technology and Mode will be executed in every discovery period [0x01]

         --> Configuration N° 2
            - RF Technology and Mode = {Std} NFC_B_PASSIVE_POLL_MODE [0x01]
            - Discovery Frequency    = RF Technology and Mode will be executed in every discovery period [0x01]

         --> Configuration N° 3
            - RF Technology and Mode = {Std} NFC_F_PASSIVE_POLL_MODE [0x02]
            - Discovery Frequency    = RF Technology and Mode will be executed in every discovery period [0x01]

         --> Configuration N° 4
            - RF Technology and Mode = {Std} NFC_A_ACTIVE_POLL_MODE (RFU) [0x03]
            - Discovery Frequency    = RF Technology and Mode will be executed in every discovery period [0x01]

         --> Configuration N° 5
            - RF Technology and Mode = {Std} NFC_A_PASSIVE_LISTEN_MODE [0x80]
            - Discovery Frequency    = RF Technology and Mode will be executed in every discovery period [0x01]

         --> Configuration N° 6
            - RF Technology and Mode = {Std} NFC_B_PASSIVE_LISTEN_MODE [0x81]
            - Discovery Frequency    = RF Technology and Mode will be executed in every discovery period [0x01]

         --> Configuration N° 7
            - RF Technology and Mode = {Std} NFC_15693_PASSIVE_POLL_MODE (RFU) [0x06]
            - Discovery Frequency    = RF Technology and Mode will be executed in every discovery period [0x01]

         --> Configuration N° 8
            - RF Technology and Mode = Reserved for Proprietary Technologies in Poll Mode [0x74]
            - Discovery Frequency    = RF Technology and Mode will be executed in every discovery period [0x01]

         --> Configuration N° 9
            - RF Technology and Mode = Reserved for Proprietary Technologies in Poll Mode [0x77]
            - Discovery Frequency    = RF Technology and Mode will be executed in every discovery period [0x01]

 

The "RF Technology and Mode" value 0x77 relates to KOVIO, as defined for PN7150, while it should be 0x70 for PN7160. We are currently analyzing why the proper value is not internally used by the libnfc-nci, but nevertheless disabling KOVIO from POLLING_TECH_MASK should remove the related configuration in the RF_DISCOVER_CMD.

 

Thus can you please verify the configuration files located under /usr/local/etc/, since those are the one dynamically loaded during libnfc-nci initialization (there are copied there during "make install" operation).

 

Regards,

Jeremy.

 

 

 

在原帖中查看解决方案

24 回复数
959 次查看
MJY
Contributor I

This patch can only fix the poll mode; other modes are still facing the same error

0 项奖励
191 次查看
MJY
Contributor I

It worked; I forgot to run 'make install'

0 项奖励
192 次查看
andraz_skupek
NXP Employee
NXP Employee

Hi,

can you please send the error message?

 

Best regards,

Andraz

0 项奖励
2,687 次查看
steve_delahunty
Contributor II

Yes, this patch will fix the issue. Good luck!

 

0 项奖励