Telpo nfc activation error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Telpo nfc activation error

217 Views
nanayaw1805
Contributor I

E AuthenticateEV2First return error code = -1005
2024-06-12 09:54:03.874 5240-5304 System.err com.example.ev3sdkdemo W java.lang.reflect.InvocationTargetException
2024-06-12 09:54:03.877 5240-5304 System.err com.example.ev3sdkdemo W at java.lang.reflect.Method.invoke(Native Method)
2024-06-12 09:54:03.877 5240-5304 System.err com.example.ev3sdkdemo W at com.telpo.tps550.api.nfc.Nfc.AuthenticateEV2First(Nfc.java:2218)
2024-06-12 09:54:03.879 5240-5304 System.err com.example.ev3sdkdemo W at com.example.ev3sdkdemo.Demo.OP_activateEv2ForNewCard(Demo.java:161)
2024-06-12 09:54:03.879 5240-5304 System.err com.example.ev3sdkdemo W at com.example.ev3sdkdemo.MainActivity$9$1.run(MainActivity.java:1564)
2024-06-12 09:54:03.880 5240-5304 System.err com.example.ev3sdkdemo W at java.lang.Thread.run(Thread.java:919)
2024-06-12 09:54:03.886 5240-5304 System.err com.example.ev3sdkdemo W Caused by: com.common.sdk.iccard.InvalidDeviceStateException
2024-06-12 09:54:03.886 5240-5304 System.err com.example.ev3sdkdemo W at com.common.sdk.TelpoErrorCode.getException(TelpoErrorCode.java:214)
2024-06-12 09:54:03.886 5240-5304 System.err com.example.ev3sdkdemo W at com.common.sdk.nfc.NFCServiceManager.AuthenticateEV2First(NFCServiceManager.java:381)
2024-06-12 09:54:03.886 5240-5304 System.err com.example.ev3sdkdemo W ... 5 more
2024-06-12 09:54:03.887 5240-5304 System.err com.example.ev3sdkdemo W com.telpo.tps550.api.InternalErrorException
2024-06-12 09:54:03.887 5240-5304 System.err com.example.ev3sdkdemo W at com.telpo.tps550.api.nfc.Nfc.AuthenticateEV2First(Nfc.java:2232)
2024-06-12 09:54:03.887 5240-5304 System.err com.example.ev3sdkdemo W at com.example.ev3sdkdemo.Demo.OP_activateEv2ForNewCard(Demo.java:161)
2024-06-12 09:54:03.887 5240-5304 System.err com.example.ev3sdkdemo W at com.example.ev3sdkdemo.MainActivity$9$1.run(MainActivity.java:1564)  

 

This is the error I am getting when I try to run the program below.    

try {
nfc.SelectApplication(AID,AID.length);
} catch (TelpoException e) {
e.printStackTrace();
return _FALSE;
}

try {
nfc.md_auth((byte) 0x00,(byte) 0x00,nKey);
} catch (TelpoException e) {
e.printStackTrace();
return _OK;//no 2K3DES, shall is AES128
}
try {
nfc.ChangeKeyEv1((byte)0x80, key, key.length);
} catch (TelpoException e) {
e.printStackTrace();
return _FALSE;
}
try {
nfc.SelectApplication(AID, AID.length);
} catch (TelpoException e) {
e.printStackTrace();
return _FALSE;
}




try {
nfc.AuthenticateEV2First(key, key.length, (byte)0x00, (byte)0x00);
//nfc.AuthenticateEV2First(key,key.length,(byte)0x00,(byte)0x00);
return _OK;
} catch (TelpoException e) {
e.printStackTrace();
return _FALSE;
} I do not get this error when I run it on the telpo-tps530 but when I run it on the telpo- tps900 I get this error. Your help is welcome

 

0 Kudos
Reply
3 Replies

122 Views
nanayaw1805
Contributor I

how do I select file ID

0 Kudos
Reply

95 Views
KellyLi
NXP TechSupport
NXP TechSupport

Hello @nanayaw1805 

the following log could be helpful to you for your reference.

KellyLi_0-1720169772096.png

 

0 Kudos
Reply

149 Views
KellyLi
NXP TechSupport
NXP TechSupport

Hello @nanayaw1805 

After selecting the AID,  you should select a file ID and then make authentication with AES128.

 

0 Kudos
Reply