PN7160 NfcFactoryTestApp functional mode not working

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

PN7160 NfcFactoryTestApp functional mode not working

109 次查看
NZP
Contributor III

Hello experts, 

I am working on pn7160 nfc reader while using NfcFactoryTestApp i am getting below logs.

----------------------------
NFC Factory Test Application
----------------------------
>> 20 00 01 01 
<< 40 00 01 00 
<< 60 00 09 02 01 20 04 04 61 12 50 09 
>> 20 00 01 01 
<< 40 00 01 00 
<< 60 00 09 02 01 20 04 04 61 12 50 09 
>> 20 01 02 00 00 
<< 40 01 1e 00 1a 7e 06 02 01 d0 02 ff ff 01 ff 00 08 00 00 01 00 02 00 03 00 80 00 82 00 83 00 84 00 
PN7160 NFC controller detected
>> 2f 00 01 00 
<< 4f 00 01 00 
Select the test to run:
         1. Continuous RF ON mode
         2. Functional mode
         3. PRBS mode
         4. Standby mode
         5. Dump RF settings
         6. Set RF setting
         7. Get NCI parameter value
         8. Set NCI parameter value
         9. Get proprietary parameter value
        10. Set proprietary parameter value
enter 0 to leave the application
Your choice: 2
Functional test mode, starting discovery loop ...
>> 21 03 09 04 00 01 01 01 02 01 06 01 
<< 41 03 01 00 
NFC Controller is now in functional mode - Press Crtl^Z to stop

 

However, when I tap tag, I am not able to read any data or tag. but if i kill this app and do i2c get i am receiving below data, from below log I suspect that i2c is getting some data but i am not able to detect tag, so please help me in this issue.

root@raam:~/linux_NfcFactoryTestApp# i2cget -y 2 0x28
0x61
root@raam:~/linux_NfcFactoryTestApp# i2cget -y 2 0x28
0x23
root@raam:~/linux_NfcFactoryTestApp# i2cget -y 2 0x28
0x00
root@raam:~/linux_NfcFactoryTestApp# i2cget -y 2 0x28
0x61
root@raam:~/linux_NfcFactoryTestApp# i2cget -y 2 0x28
0x23
root@raam:~/linux_NfcFactoryTestApp# i2cget -y 2 0x28
0x00

 

0 项奖励
回复
3 回复数

91 次查看
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @NZP

Hope you are doing well.

Just to confirm, once "NFC Controller is now in functional mode - Press Crtl^Z to stop" message is printed, and after tapping a card/tag, the application does not react at all and you are not getting any other response, is this correct?

What is the tag you are using for the test? By any chance, have you tried reading the tag with another device to check that it is working properly? You could use, for example, a mobile phone with TagWriter iOS | Android or NFC TagInfo by NXP.

Regards,
Eduardo.

0 项奖励
回复

85 次查看
NZP
Contributor III

Hi @EduardoZamora ,

Thanks for your comments.

1.  Yes, below is correct.

The application does not react at all, and you are not getting any other response, is this correct?

2. Tag I am using is recognized by NFC TagInfo by NXP  android Application. Card details recognized by Taginfo application is as below.

IC Type : Unknown MIFARE Classic IC, possibly cloned.

Technology Supported: ISO/IEC 14443-3 (TYPE A) compatible.

3. I was debugging NfcFactoryTestApp.c application and put debug prints inside 

static void Functional (int handle) function, and I found that instead of (Answer[0] != 0x61) || ((Answer[1] != 0x05) && (Answer[1] != 0x03)) I am getting 

Answer[0] = 0x61

Answer[1]  = 0x23

Answer[2] = 0x00

 

static void Functional (int handle)                                                                
{                                                                              
    char NCIStartDiscovery[] = {0x21, 0x03, 0x09, 0x04, 0x00, 0x01, 0x01, 0x01, 0x02, 0x01, 0x06, 0x01};
    char NCIRestartDiscovery[] = {0x21, 0x06, 0x01, 0x03};
    char Answer[256];                                                                                                                                                                        
    printf("Functional test mode, starting discovery loop ...\n");                                                  
    tml_transceive(handle, NCIStartDiscovery, sizeof(NCIStartDiscovery), Answer, sizeof(Answer));
    if((Answer[0] != 0x41) || (Answer[1] != 0x03) || (Answer[3] != 0x00)) {           
        printf("Cannot start discovery loop\n");                                                 
        return;                                                                       
    }                                                                                                   
    printf("NFC Controller is now in functional mode - Press Crtl^Z to stop\n");                        
    while(1) {                                                                   
        do {                                                                     
            tml_receive(handle,  Answer, sizeof(Answer));                            
                for(int i=0;i<3;i++){                                                              
                        printf("0x%x\r\n", Answer[i]);                                 
                }                                                                                      
        } while ((Answer[0] != 0x61) || ((Answer[1] != 0x05) && (Answer[1] != 0x03)));
        printf(" - tag discovered, restarting discovery loop ...\n"); tml_transceive(handle, NCIRestartDiscovery, sizeof(NCIRestartDiscovery), Answer, sizeof(Answer));
    }                                                                                                   
} 

 

0 项奖励
回复

64 次查看
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

By any chance, are you using a PN7160-based custom board or is it one of our Development Kits for PN7160? I will recommend you testing the application by using another tag/card.

Is the card you are using from a third-party manufacturer? If that is the case, please contact the card manufacturer for further support on this part.

Regards,
Eduardo.

0 项奖励
回复