Forum Replies Created

  • Re: Reply To: Registration failed error

    31. October 2018 at 12:25
    in reply to: Registration failed error
    Hi Team,

    Please find the information.

    What is the “EMT handset”?

    This is the Famoco device
    https://www.famoco.com/android-devices/handheld-devices/fx200/
    Specs https://www.famoco.com/android-devices/handheld-devices/fx200/#specs


    Which Android version is used?
    Android version on the FX200 that I have is 4.4.2

    Which TapLinx version is used? 1.2

    Thanks,
    Shiva
    + 0  |  - 0

    Re: Reply To: InvalidResponseLength Exception when trying to write to a DESFire EV1 card

    29. March 2018 at 13:20
    in reply to: InvalidResponseLength Exception when trying to write to a DESFire EV1 card
    Hi,

    There could be issue with your phone. Please try with other phone.

    Thanks,
    Shiva
    + 0  |  - 0

    Re: Reply To: how to work com.nxp.nfclib liberary with external Acr122u nfc reader

    30. November 2017 at 7:28
    in reply to: how to work com.nxp.nfclib liberary with external Acr122u nfc reader
    Hi Avinash,

    I think NXP people can help you on this.

    Thanks,
    Shiva
    + 1  |  - 0

    Re: Reply To: how to work com.nxp.nfclib liberary with external Acr122u nfc reader

    30. November 2017 at 7:09
    in reply to: how to work com.nxp.nfclib liberary with external Acr122u nfc reader
    Hi,

    I can give you some reference and you can go through it. Currently, i am currently integrating the app with desfire ev2 card.

    if you are .net developer you can read this code quickly.

    http://www.smartcard-magic.net/en/pc-sc-reader/csharppcsc-wrapper/

    Thanks,
    Shiva

    + 1  |  - 0

    Re: Reply To: how to work com.nxp.nfclib liberary with external Acr122u nfc reader

    30. November 2017 at 6:59
    in reply to: how to work com.nxp.nfclib liberary with external Acr122u nfc reader
    Thanks, Please let me know if any issues.

    THanks,
    Shiva




    + 1  |  - 0

    Re: Reply To: how to work com.nxp.nfclib liberary with external Acr122u nfc reader

    30. November 2017 at 6:06
    in reply to: how to work com.nxp.nfclib liberary with external Acr122u nfc reader
    Hi Avinash,

    in order to work external reader, you have to use pcsc or apdu commands.

    This library works only in android.

    Please correct me if i wrong.

    Thanks,
    Shiva
    + 1  |  - 0

    Re: Reply To: security Implications of Master and application key

    20. November 2017 at 6:36
    in reply to: security Implications of Master and application key
    Hi Max,

    Please find the sample method. I am to successfully write/read.

    Please let me know if you face any issue.

    private void desfireEV2CardLogic() {
    byte[] appId = new byte[]{0x12, 0x00, 0x00};
    int fileSize = 100;
    byte[] data = new byte[]{0x11, 0x11, 0x11, 0x11,
    0x11};

    int timeOut = 2000;
    int fileNo = 0;


    tv.setText(" ");
    showImageSnap(R.drawable.desfire_ev2);
    showMessage("Card Detected : " + desFireEV2.getType().getTagName(), 'n');

    try {
    desFireEV2.getReader().setTimeout(timeOut);
    showMessage(
    "Version of the Card : "
    + Utilities.dumpBytes(desFireEV2.getVersion()),
    'd');
    showMessage(
    "Existing Applications Ids : " + Arrays.toString(desFireEV2.getApplicationIDs()),
    'd');


    desFireEV2.selectApplication(0);

    desFireEV2.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.THREEDES, objKEY_2KTDES);

    /* Do the following only if write checkbox is selected */
    if (bWriteAllowed) {
    desFireEV2.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.THREEDES, objKEY_2KTDES);

    desFireEV2.getReader().setTimeout(timeOut);
    desFireEV2.format();
    EV1ApplicationKeySettings.Builder appsetbuilder = new EV1ApplicationKeySettings.Builder();

    EV1ApplicationKeySettings appsettings = appsetbuilder.setAppKeySettingsChangeable(true)
    .setAppMasterKeyChangeable(true)
    .setAuthenticationRequiredForFileManagement(false)
    .setAuthenticationRequiredForDirectoryConfigurationData(false)
    .setKeyTypeOfApplicationKeys(KeyType.TWO_KEY_THREEDES).build();

    desFireEV2.createApplication(appId, appsettings);
    desFireEV2.selectApplication(appId);

    desFireEV2.createFile(fileNo, new DESFireFile.StdDataFileSettings(
    IDESFireEV1.CommunicationType.Plain, (byte) 0,(byte) 0, (byte)0, (byte)0, fileSize));

    desFireEV2.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.TWO_KEY_THREEDES, objKEY_2KTDES);
    desFireEV2.writeData(0, 0, data);
    showMessage(
    "Data Read from the card : "
    + new String(desFireEV2.readData(0, 0,
    100)), 'd');
    showMessage(
    "Free Memory of the Card : " + desFireEV2.getFreeMemory(),
    'd');
    desFireEV2.getReader().close();
    }

    // Set the custom path where logs will get stored, here we are setting the log folder DESFireLogs under
    // external storage.
    String spath = Environment.getExternalStorageDirectory().getPath() + File.separator + "DESFireLogs";
    NxpLogUtils.setLogFilePath(spath);
    // if you don't call save as below , logs will not be saved.
    NxpLogUtils.save();

    } catch (Exception e) {
    showMessage("IOException occurred... check LogCat", 't');
    e.printStackTrace();
    }
    }

    + 0  |  - 0

    Re: Reply To: getting invalid response when write data to file (Desfire EV2)

    10. November 2017 at 9:06
    in reply to: getting invalid response when write data to file (Desfire EV2)
    Hi Team,

    I tried with s8 plus today and getting same error.

    Please review the below code and share me the log file. (Also please use the below code )

    private void desfireEV2CardLogic() {
    byte[] appId = new byte[]{0x12, 0x00, 0x00};
    int fileSize = 100;
    //String patientProfileToString="{|0x33ec859e|FORCE_UPDATE|SNA-123456|6398|1499264618|}{|Ambassa|muthulakshmi|bala|Mahalakshmi Nagar|2nd street|-|Antrim|-|India|1980-07-01|Female|muthulakshmi.bal@gmail.com|123456|+91|9500939009|NO|-|}{|Ambassador|siva|saravanan|+91|9500939009|Daughter|}{[|Baclopar Tablets 10 mg|15|20|DENTAL][|test |15|test |test 1]}{[Almond|Anaphylactic shock]}{[]}{[]}{[|Aviva insurance|Life Health|112233|1 Year|123456789]}";
    //byte[] data=patientProfileToString.getBytes();
    byte[] data = new byte[]{0x11, 0x11, 0x11, 0x11,
    0x11};
    int timeOut = 2000;
    int fileNo = 0;

    tv.setText(" ");
    showImageSnap(R.drawable.desfire_ev2);
    showMessage("Card Detected : " + desFireEV2.getType().getTagName(), 'n');
    byte[] companyKeyBytes = new byte[]{
    (byte) 0x55, (byte) 0x55, (byte) 0x55, (byte) 0x55,
    (byte) 0x55, (byte) 0x55, (byte) 0x55, (byte) 0x55,
    (byte) 0xAA, (byte) 0xAA, (byte) 0xAA, (byte) 0xAA,
    (byte) 0xAA, (byte) 0xAA, (byte) 0xAA, (byte) 0xAA};
    byte[] companyKeyBytes1 = new byte[]{
    (byte) 0x66, (byte) 0x66, (byte) 0x66, (byte) 0x66,
    (byte) 0x66, (byte) 0x66, (byte) 0x66, (byte) 0x66,
    (byte) 0xAA, (byte) 0xAA, (byte) 0xAA, (byte) 0xAA,
    (byte) 0xAA, (byte) 0xAA, (byte) 0xAA, (byte) 0xAA};
    byte[] NEW_KEY = {(byte) 0xEE, (byte) 0xFF,
    (byte) 0xBB, (byte) 0xDD, (byte) 0xAF, (byte) 0xDF, (byte) 0xFF,
    (byte) 0xCC, (byte) 0xBB, (byte) 0xAF, (byte) 0xDF, (byte) 0xFF,

    (byte) 0xDD, (byte) 0xCC, (byte) 0xAF, (byte) 0xDF};

    SecretKeySpec companyKeySpec = new SecretKeySpec(companyKeyBytes, "DESede");
    KeyData companyKey = new KeyData();
    companyKey.setKey(companyKeySpec);

    SecretKeySpec companyKeySpec1 = new SecretKeySpec(companyKeyBytes, "DESede");
    KeyData companyKey1 = new KeyData();
    companyKey.setKey(companyKeySpec);

    try {
    desFireEV2.getReader().setTimeout(timeOut);
    showMessage(
    "Version of the Card : "
    + Utilities.dumpBytes(desFireEV2.getVersion()),
    'd');
    showMessage(
    "Existing Applications Ids : " + Arrays.toString(desFireEV2.getApplicationIDs()),
    'd');


    desFireEV2.selectApplication(0);

    desFireEV2.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.THREEDES, objKEY_2KTDES);

    /* Do the following only if write checkbox is selected */
    if (bWriteAllowed) {
    desFireEV2.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.THREEDES, objKEY_2KTDES);

    desFireEV2.getReader().setTimeout(timeOut);
    desFireEV2.format();
    EV2ApplicationKeySettings appSettings = new EV2ApplicationKeySettings.Builder()
    .setAppKeySettingsChangeable(true)
    .setAppMasterKeyChangeable(true)
    .setAuthenticationRequiredForFileManagement(false)
    .setAuthenticationRequiredForDirectoryConfigurationData(false)
    .setKeyTypeOfApplicationKeys(KeyType.AES128)
    .setApplicationKeySets(true)
    .setMaxNumberOfApplicationKeys(2)
    .setNumberOfKeySets(3)
    .build();


    KeyData appKeyData = new KeyData();

    appKeyData.setKey(new SecretKeySpec(SampleAppKeys.KEY_AES128_ZEROS, "AES"));
    KeyData appKeyData1 = new KeyData();
    appKeyData1.setKey(new SecretKeySpec(NEW_KEY, "AES"));

    desFireEV2.createApplication(appId, appSettings);
    desFireEV2.selectApplication(appId);
    desFireEV2.authenticateEV2First(0, appKeyData, new byte[]{0, 0, 0, 0, 0, 0});
    //desFireEV2.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.TWO_KEY_THREEDES, objKEY_2KTDES);
    desFireEV2.initializeKeySet((byte) 0x01, KeyType.AES128);

    desFireEV2.ev2ChangeKey(1, 0, KeyType.AES128, SampleAppKeys.KEY_AES128_ZEROS, NEW_KEY, (byte) 2);
    desFireEV2.finalizeKeySet((byte) 0x1, (byte) 0x1);
    desFireEV2.rollKeySet((byte) 0x01);
    // desFireEV2.ev2ChangeKey(0, 0, KeyType.AES128, SampleAppKeys.KEY_AES128_ZEROS, NEW_KEY, (byte) 2);
    desFireEV2.authenticateEV2First(0, appKeyData1, new byte[]{0, 0, 0, 0, 0, 0});
    // desFireEV2.authenticateEV2First(0, appKeyData1, new byte[]{0, 0, 0, 0, 0, 0});

    //desFireEV2.changeKey(5, KeyType.THREEDES, SampleAppKeys.KEY_AES128_ZEROS, companyKeyBytes, (byte) 0);
    // desFireEV2.authenticate(5, IDESFireEV1.AuthType.Native, KeyType.AES128, companyKey);
    desFireEV2.createFile(fileNo, new DESFireFile.StdDataFileSettings(
    IDESFireEV1.CommunicationType.Plain, (byte) 0xE,(byte) 0xE, (byte)0xE, (byte)0xE, fileSize));

    // desFireEV2.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.TWO_KEY_THREEDES, objKEY_2KTDES);
    // desFireEV2.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.AES128, companyKey);
    desFireEV2.authenticateEV2First(0, appKeyData1, new byte[]{0, 0, 0, 0, 0, 0});
    // desFireEV2.authenticateEV2First(0, appKeyData1, new byte[]{0, 0, 0, 0, 0, 0});
    desFireEV2.writeData(fileNo, 0, data);
    // showMessage(
    // "Data Read from the card : "
    // + Utilities.dumpBytes(desFireEV2.readData(0, 0,
    // 5)), 'd');
    showMessage(
    "Free Memory of the Card : " + desFireEV2.getFreeMemory(),
    'd');
    desFireEV2.getReader().close();
    }

    // Set the custom path where logs will get stored, here we are setting the log folder DESFireLogs under
    // external storage.
    String spath = Environment.getExternalStorageDirectory().getPath() + File.separator + "DESFireLogs";
    NxpLogUtils.setLogFilePath(spath);
    // if you don't call save as below , logs will not be saved.
    NxpLogUtils.save();

    } catch (Exception e) {
    showMessage("IOException occurred... check LogCat", 't');
    e.printStackTrace();
    }
    }


    Thanks,
    Shiva
    + 0  |  - 0

    Re: Reply To: getting invalid response when write data to file (Desfire EV2)

    8. November 2017 at 16:10
    in reply to: getting invalid response when write data to file (Desfire EV2)
    Hi Team,

    I tried without authentication however, still getting same exception.

    If you modify the code and send me back that will be more helpful.


    //desFireEV2.authenticateEV2First(0, appKeyData1, new byte[]{0, 0, 0, 0, 0, 0});

    desFireEV2.writeData(fileNo, 3000, data);
    //Also tried with this line desFireEV2.writeData(fileNo, 0, data);


    Thanks.
    Shiva
    + 0  |  - 0

    Re: Reply To: getting invalid response when write data to file (Desfire EV2)

    8. November 2017 at 11:53
    in reply to: getting invalid response when write data to file (Desfire EV2)
    Hi Team,

    If I create an application without application key(Default key), It works fine.

    But my scenario, I have to create an application key to manage the particular application.

    Please provide me an example code with application key (using app settings, change key from default to our own, authenticate and create file and write data to file).
    or Modify the below code me.

    So Below are the app settings.

    byte[] appId = new byte[]{0x12, 0x00, 0x00};

    int fileSize = 4000;

    byte[] data = new byte[]{0x11, 0x11, 0x11, 0x11,

    0x11};

    int timeOut = 2000;

    int fileNo = 0;

    EV2ApplicationKeySettings appSettings = new EV2ApplicationKeySettings.Builder()
    .setAppKeySettingsChangeable(true)
    .setAppMasterKeyChangeable(true)
    .setAuthenticationRequiredForFileManagement(true)
    .setAuthenticationRequiredForDirectoryConfigurationData(false)
    .setKeyTypeOfApplicationKeys(KeyType.AES128)
    .setApplicationKeySets(true)
    .setMaxNumberOfApplicationKeys(2)
    .setNumberOfKeySets(3)
    .build();

    KeyData appKeyData = new KeyData();
    appKeyData.setKey(new SecretKeySpec(SampleAppKeys.KEY_AES128_ZEROS, "AES"));

    desFireEV2.createApplication(appId, appSettings);
    desFireEV2.selectApplication(appId);

    desFireEV2.authenticateEV2First(0, appKeyData, new byte[]{0, 0, 0, 0, 0, 0});


    desFireEV2.initializeKeySet((byte) 0x01, KeyType.AES128);
    desFireEV2.ev2ChangeKey(1, 0, KeyType.AES128, SampleAppKeys.KEY_AES128_ZEROS, NEW_KEY, (byte) 2);
    desFireEV2.finalizeKeySet((byte) 0x1, (byte) 0x1);
    desFireEV2.rollKeySet((byte) 0x01);

    KeyData appKeyData1 = new KeyData();
    appKeyData1.setKey(new SecretKeySpec(NEW_KEY, "AES"));

    desFireEV2.authenticateEV2First(0, appKeyData1, new byte[]{0, 0, 0, 0, 0, 0});


    desFireEV2.createFile(fileNo, new DESFireFile.StdDataFileSettings(
    IDESFireEV1.CommunicationType.Plain, (byte) 0xE,(byte) 0xE, (byte)0xE, (byte)0xE, fileSize));


    Because, when i am writing data to file, I am getting "Length Error". (Attached file for your reference

    desFireEV2.authenticateEV2First(0, appKeyData1, new byte[]{0, 0, 0, 0, 0, 0});
    desFireEV2.writeData(fileNo, 3000, data);



    Please provide me the solution.

    Thanks,
    Shiva

    + 0  |  - 0

    Re: Reply To: getting invalid response when write data to file (Desfire EV2)

    26. October 2017 at 11:28
    in reply to: getting invalid response when write data to file (Desfire EV2)
    Hi Team,

    Any update on this ticket.

    Thanks,
    Shiva

    + 0  |  - 0

    Re: Reply To: Application Change key failed

    12. September 2017 at 13:53
    in reply to: Application Change key failed
    Hi Team,

    There are two key settings one is for picc and another one is for application key setting.

    First, I changed the picc key settings with below settings.

    isAuthenticationRequiredForApplicationManagement() - true
    isPiccKeySettingsChangeable - false
    isAuthenticationRequiredForDirectoryConfigurationData - false
    isPiccMasterKeyChangeable - false

    After that i can create application (eg: app id= 18 ), but when i try to change the application key from default to company key . it throws integrity error.

    Please review the below code and let me know if i miss.


    byte[] TEST_APP_KEY_1_AES128_KEY = {

    (byte) 0x04, (byte) 0x01, (byte) 0x04, (byte) 0x01,

    (byte) 0x03, (byte) 0x02, (byte) 0x03, (byte) 0x02,

    (byte) 0x02, (byte) 0x03, (byte) 0x02, (byte) 0x03,

    (byte) 0x01, (byte) 0x04, (byte) 0x01, (byte) 0x04};

    byte[] appId = new byte[]{0x12, 0x00, 0x00};
    desFireEV1.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.THREEDES, objKEY_2KTDES);

    desFireEV1.format();

    EV1ApplicationKeySettings.Builder appsetbuilder = new EV1ApplicationKeySettings.Builder();



    EV1ApplicationKeySettings appsettings = appsetbuilder.setAppKeySettingsChangeable(true)

    .setAppMasterKeyChangeable(true)

    .setAuthenticationRequiredForFileManagement(true)

    .setAuthenticationRequiredForDirectoryConfigurationData(true)

    .setKeyTypeOfApplicationKeys(KeyType.TWO_KEY_THREEDES).build();



    desFireEV1.createApplication(appId, appsettings);

    desFireEV1.selectApplication(appId);



    desFireEV1.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.TWO_KEY_THREEDES, objKEY_2KTDES);





    desFireEV1.changeKey(0, KeyType.AES128,

    DEFAULT_KEY_2KTDES_16,

    TEST_APP_KEY_1_AES128_KEY, (byte) 0x01);


    Thanks,
    Shiva

    + 0  |  - 0

    Re: Reply To: getting Incomplete response when select application – Desfire EV1 card

    14. August 2017 at 15:02
    in reply to: getting Incomplete response when select application – Desfire EV1 card
    Hi Team,

    I followed the same steps you mentioned below.

    However When executing the selectApplication(0) method, It throws the "Incomplete response" error.

    even I tried to execute this method, it throws the error. (desFireEV1.getVersion())

    Please help me resolve the problem.

    Thanks,
    Shiva

    selectApplication( 0 )
    authenticate( )
    createApplication( xxxx )
    selectApplication( xxxx )
    authenticate( ) // this is here the default 00...00
    createFile( … )
    + 0  |  - 0

    Re: Reply To: getting Incomplete response when select application – Desfire EV1 card

    10. August 2017 at 16:07
    in reply to: getting Incomplete response when select application – Desfire EV1 card
    Hi Team,

    I am really to stuck to select application.

    In the below example, it is throwing the exception.

    Please send me some sample code.

    Also how to change the behavior of the PICC Master Key settings to set some restrictions. (send some sample codes)

    private void desfireEV1CardLogic() {

    byte[] appId = new byte[]{0x12, 0x00, 0x00};
    int fileSize = 100;
    byte[] data = new byte[]{0x11, 0x11, 0x11, 0x11,
    0x11};
    int timeOut = 2000;
    int fileNo = 0;

    tv.setText(" ");
    showImageSnap(R.drawable.desfire_ev1);
    showMessage("Card Detected : " + desFireEV1.getType().getTagName(), 'n');

    try {
    desFireEV1.getReader().setTimeout(timeOut);

    showMessage(
    "Version of the Card : "
    + Utilities.dumpBytes(desFireEV1.getVersion()),
    'd');
    showMessage(
    "Existing Applications Ids : " + Arrays.toString(desFireEV1.getApplicationIDs()),
    'd');

    desFireEV1.selectApplication(0);

    desFireEV1.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.THREEDES, objKEY_2KTDES);

    /* Do the following only if write checkbox is selected */
    if (bWriteAllowed) {
    desFireEV1.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.THREEDES, objKEY_2KTDES);
    desFireEV1.format();
    EV1ApplicationKeySettings.Builder appsetbuilder = new EV1ApplicationKeySettings.Builder();

    EV1ApplicationKeySettings appsettings = appsetbuilder//.setAppKeySettingsChangealbe(true)
    .setAppMasterKeyChangeable(true)
    //.setAuthenticationRequiredForApplicationManagment(false)
    .setAuthenticationRequiredForDirectoryConfigurationData(false).build();
    //.setKeyTypeOfApplciationKeys(KeyType.TWO_KEY_THREEDES);

    desFireEV1.createApplication(appId, appsettings);
    desFireEV1.selectApplication(appId);

    desFireEV1.createFile(fileNo, new DESFireFile.StdDataFileSettings(
    IDESFireEV1.CommunicationType.Plain, (byte)0, (byte)0, (byte)0, (byte)0, fileSize));

    desFireEV1.authenticate(0, IDESFireEV1.AuthType.Native, KeyType.TWO_KEY_THREEDES, objKEY_2KTDES);

    desFireEV1.writeData(0, 0, data);
    showMessage(
    "Data Read from the card : "
    + Utilities.dumpBytes(desFireEV1.readData(0, 0,
    5)), 'd');
    showMessage(
    "Free Memory of the Card : " + desFireEV1.getFreeMemory(),
    'd');
    }

    desFireEV1.getReader().close();

    // Set the custom path where logs will get stored, here we are setting the log folder DESFireLogs under
    // external storage.
    String spath = Environment.getExternalStorageDirectory().getPath() + File.separator + "DESFireLogs";
    NxpLogUtils.setLogFilePath(spath);
    // if you don't call save as below , logs will not be saved.
    NxpLogUtils.save();

    } catch (Exception e) {
    showMessage("IOException occurred... check LogCat", 't');
    e.printStackTrace();
    }

    }

    + 0  |  - 0

    Re: Reply To: MIFARE SDK Sample App Build Error

    10. August 2017 at 8:44
    in reply to: MIFARE SDK Sample App Build Error
    Hi Team,

    I have downloaded the sample app and when i am trying to build, getting the below error.

    Please let me know the resolution.

    Thanks,
    Shiva

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