Forum Replies Created

  • Re: Reply To: MIFARE SDK Sample App Build Error

    9. May 2017 at 15:17
    in reply to: MIFARE SDK Sample App Build Error
    Is there anywhere i can get the last copy of the fixed jar? the one i have doesn't work even with the newer versions of gradle
    + 0  |  - 0

    Re: Reply To: MIFARE SDK Sample App Build Error

    18. April 2017 at 17:53
    in reply to: MIFARE SDK Sample App Build Error
    Any updates on this? I have a number of apps that use the non taplinx api and i'd prefer to not have to rewrite them
    + 0  |  - 0

    Re: Reply To: Problems authenticating UltralightC when using new TapLinx with Android 6

    20. February 2017 at 18:44
    in reply to: Problems authenticating UltralightC when using new TapLinx with Android 6
    I created a new project to make sure no other code we are using is interfering


    package nfcauth.io.myapplication;

    import android.content.Intent;
    import android.os.Build;
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    import android.util.Log;

    import com.nxp.nfclib.CardType;
    import com.nxp.nfclib.NxpNfcLib;
    import com.nxp.nfclib.defaultimpl.KeyData;
    import com.nxp.nfclib.ultralight.IUltralightC;
    import com.nxp.nfclib.ultralight.UltralightFactory;

    import javax.crypto.spec.SecretKeySpec;

    public class MainActivity extends AppCompatActivity {
    public static final byte[] ULC_DEFAULT_KEY ={
    (byte) 0x49, (byte) 0x45, (byte) 0x4D, (byte) 0x4B,
    (byte) 0x41, (byte) 0x45, (byte) 0x52, (byte) 0x42,
    (byte) 0x21, (byte) 0x4E, (byte) 0x41, (byte) 0x43,
    (byte) 0x55, (byte) 0x4F, (byte) 0x59, (byte) 0x46
    };

    private static String taplinxPackageKey = "-------";
    private NxpNfcLib nxpLib;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    nxpLib = NxpNfcLib.getInstance();
    nxpLib.registerActivity(this, taplinxPackageKey);
    }

    @Override
    protected void onPause() {
    nxpLib.stopForeGroundDispatch();
    super.onPause();
    }

    @Override
    protected void onResume() {
    nxpLib.startForeGroundDispatch();
    super.onResume();
    }

    @Override
    public void onNewIntent(Intent intent) {
    super.onNewIntent(intent);

    CardType card = nxpLib.getCardType(intent);
    if(CardType.UltralightC == card){
    IUltralightC ulc = UltralightFactory.getInstance().getUltralightC(nxpLib.getCustomModules());
    try{
    ulc.getReader().connect();
    ulc.getReader().setTimeout(2000);
    Log.d("T", Build.VERSION.RELEASE);
    Log.d("T", Build.MODEL);
    Log.d("T", ulc.getCardDetails().cardName);

    KeyData keyData = new KeyData();
    keyData.setKey(new SecretKeySpec(ULC_DEFAULT_KEY, "DESede"));



    ulc.authenticate(keyData);
    Log.d("T", "authenticated");
    }catch (Throwable t){
    t.printStackTrace();
    }
    }

    }

    }


    Stacktrace:


    D/T: 6.0.1
    D/T: Nexus 5
    D/T: Ultralight C
    W/System.err: com.nxp.nfclib.exceptions.NxpNfcLibException: Transceive failed
    W/System.err: at com.nxp.nfclib.NfcAReader.transceive(:71)
    W/System.err: at com.nxp.nfclib.AndroidApduHandler.apduExchange(:42)
    W/System.err: at com.nxp.nfclib.ultralight.UltralightC.ˎ(:151)
    W/System.err: at com.nxp.nfclib.ultralight.UltralightC.authenticate(:112)
    W/System.err: at nfcauth.io.myapplication.MainActivity.onNewIntent(MainActivity.java:68)
    W/System.err: at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1212)
    W/System.err: at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1224)
    W/System.err: at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2545)
    W/System.err: at android.app.ActivityThread.performNewIntents(ActivityThread.java:2557)
    W/System.err: at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2566)
    W/System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java)
    W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1416)
    W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
    W/System.err: at android.os.Looper.loop(Looper.java:148)
    W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
    W/System.err: at java.lang.reflect.Method.invoke(Native Method)
    W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

    + 0  |  - 0

    Re: Reply To: Problems authenticating UltralightC when using new TapLinx with Android 6

    20. February 2017 at 18:19
    in reply to: Problems authenticating UltralightC when using new TapLinx with Android 6
    This is still not working, if you notice the error in the other thread is different from this one. this issue gives 'Transceive failed' while the one in the other thread is giving 'Authentication failed!'


    public static final byte[] ULC_DEFAULT_KEY ={
    (byte) 0x49, (byte) 0x45, (byte) 0x4D, (byte) 0x4B,
    (byte) 0x41, (byte) 0x45, (byte) 0x52, (byte) 0x42,
    (byte) 0x21, (byte) 0x4E, (byte) 0x41, (byte) 0x43,
    (byte) 0x55, (byte) 0x4F, (byte) 0x59, (byte) 0x46
    };

    ...

    protected void onNfcIntentDetected(Intent intent, String action) {
    CardType card = nxpLib.getCardType(intent);
    if(CardType.UltralightC == card){
    IUltralightC ulc = UltralightFactory.getInstance().getUltralightC(nxpLib.getCustomModules());
    try{
    ulc.getReader().connect();
    ulc.getReader().setTimeout(2000);
    Log.d("T", Build.VERSION.RELEASE);
    Log.d("T", Build.MODEL);
    Log.d("T", ulc.getCardDetails().cardName);

    KeyData keyData = new KeyData();
    keyData.setKey(new SecretKeySpec(ULC_DEFAULT_KEY, "DESede"));



    ulc.authenticate(keyData);
    Log.d("T", "authenticated");
    }catch (Throwable t){
    t.printStackTrace();
    }
    }




    02-20 12:14:56.126 13266-13266/io.nfcauth.tagencoder D/T: 6.0.1
    02-20 12:14:56.126 13266-13266/io.nfcauth.tagencoder D/T: Nexus 5
    02-20 12:14:56.131 13266-13266/io.nfcauth.tagencoder D/T: Ultralight C
    02-20 12:15:36.808 13266-13266/io.nfcauth.tagencoder W/System.err: com.nxp.nfclib.exceptions.NxpNfcLibException: Transceive failed
    02-20 12:15:36.813 13266-13266/io.nfcauth.tagencoder W/System.err: at com.nxp.nfclib.NfcAReader.transceive(:71)
    02-20 12:15:36.816 13266-13266/io.nfcauth.tagencoder W/System.err: at com.nxp.nfclib.AndroidApduHandler.apduExchange(:42)
    02-20 12:15:36.822 13266-13266/io.nfcauth.tagencoder W/System.err: at com.nxp.nfclib.ultralight.UltralightC.ˎ(:151)
    02-20 12:15:36.825 13266-13266/io.nfcauth.tagencoder W/System.err: at com.nxp.nfclib.ultralight.UltralightC.authenticate(:112)
    02-20 12:15:36.829 13266-13266/io.nfcauth.tagencoder W/System.err: at io.nfcauth.tagencoder.MainActivity.onNfcIntentDetected(MainActivity.java:113)
    02-20 12:15:36.833 13266-13266/io.nfcauth.tagencoder W/System.err: at com.skjolberg.nfc.util.activity.NfcDetectorActivity.processIntent(NfcDetectorActivity.java:362)
    02-20 12:15:36.837 13266-13266/io.nfcauth.tagencoder W/System.err: at com.skjolberg.nfc.util.activity.NfcDetectorActivity.onResume(NfcDetectorActivity.java:238)
    02-20 12:15:36.844 13266-13266/io.nfcauth.tagencoder W/System.err: at io.nfcauth.tagencoder.MainActivity.onResume(MainActivity.java:414)
    02-20 12:15:36.848 13266-13266/io.nfcauth.tagencoder W/System.err: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1258)
    02-20 12:15:36.853 13266-13266/io.nfcauth.tagencoder W/System.err: at android.app.Activity.performResume(Activity.java:6327)
    02-20 12:15:36.856 13266-13266/io.nfcauth.tagencoder W/System.err: at android.app.ActivityThread.performNewIntents(ActivityThread.java:2559)
    02-20 12:15:36.862 13266-13266/io.nfcauth.tagencoder W/System.err: at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2566)
    02-20 12:15:36.863 13266-13266/io.nfcauth.tagencoder W/System.err: at android.app.ActivityThread.-wrap12(ActivityThread.java)
    02-20 12:15:36.864 13266-13266/io.nfcauth.tagencoder W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1416)
    02-20 12:15:36.865 13266-13266/io.nfcauth.tagencoder W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
    02-20 12:15:36.866 13266-13266/io.nfcauth.tagencoder W/System.err: at android.os.Looper.loop(Looper.java:148)
    02-20 12:15:36.867 13266-13266/io.nfcauth.tagencoder W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
    02-20 12:15:36.868 13266-13266/io.nfcauth.tagencoder W/System.err: at java.lang.reflect.Method.invoke(Native Method)
    02-20 12:15:36.869 13266-13266/io.nfcauth.tagencoder W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    02-20 12:15:36.871 13266-13266/io.nfcauth.tagencoder W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)


    + 0  |  - 0
Viewing 4 posts - 1 through 4 (of 4 total)