Using TapLinx SDK for Java

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

Using TapLinx SDK for Java

1,068 Views
IkarovoPero
Contributor II

Greetings!

I have developed successful solutions for reading DESFire smart cards used in Croatian public services, both for:

  1. Dot Net. Multi platform, using pcsc-sharp and "raw" APDU approach.
  2. Android. Using TapLinx SDK for Android and high level-approach. For example: myDesFire.getUID() instead of raw APDU commands.

Right now, I'm trying to develop multi platform solution in Java, using TapLinx SDK for Java and high-level approach.

I rely on javax.smartcardio for polling connected card terminal to see when smart card is inserted or removed, and it works perfectly. In my testing app (JavaFX if that matters), in onCardInserted event, I'm calling my own cardLogic method. That method tries to connect to smart card.

In Android, it is very simple:

public static Card cardLogic(final Intent intent, NxpNfcLib nxpNfcLib, MyCardKeys keys) {

//... some code ommited for brevity

desFireEV = DESFireFactory.getInstance().getDESFireEV2(nxpNfcLib.getCustomModules());

desFireEV.getReader().connect();

byte[] uid = desFireEV.getUID();

// ...and so on.

In Java, similar method of mine is:

public static Card cardLogic(CardTerminal terminal, MyCardKeys keys) {

//... some code ommited for brevity

javax.smartcardio.Card javaCard = terminal.connect("*");

desFire = DESFireFactory.getInstance().getDESFireEV2(TapLinx.getCustomModules());

// NOW WHAT!???

desFire.getReader().connect(); // This does not work, of course. HOW TO "connect" context of javaCard object with getting a concrete reader, so that...

byte[] uid = desFire.getUID(); //... I can do this without raising an exception?

So, questions are those in comments of the above code snippets. I'm totally stucked. Probably missing something obvious. but I can not figure out the solution, not even when reading code of both sample apps.

Please help.

0 Kudos
Reply
4 Replies

1,044 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @IkarovoPero

Hope you are doing well. 

My apologies, this is not the proper support path for this inquiry. Please, consider redirecting your inquiry to the TapLinx Developer Community, there you may find some additional supporting resources and get in touch with other developers that might have faced similar scenarios.

Regards,
Eduardo.

0 Kudos
Reply

1,032 Views
IkarovoPero
Contributor II

Thanks for reply.

Those old forums were migrated here on 1st of September 2023. Please see the official announcement here:

https://www.mifare.net/support/forum/topic/taplinx-forum-migration-full-transition-on-1st-of-septemb...

It is not possible to create new topics there any more. See screenshot attached, and there's no posts from this year. So, I guess that this forum is the appropriate place for questions about TapLinx SDK.

Well, I'd be really grateful if someone could put me to the right direction.

I did also try raw APDU approach without TapLinx SDK, using just javax.smartcardio, but since smartcardio was actually developed to support contact cards, one can not make more complex operations targeting contactless cards. So, I can read DESFire's UID, select Identity app, read app IDs, but I can not read BER TLV files, for example, even if not encrypted.

So, once more, help, please. I'm sure that I'm on the appropriate forum.

Best regards!

 

 

0 Kudos
Reply

1,012 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

I truly apologize for the confusion.

You can find the available forums for NFC in Identification and Security - NXP Community. Please, consider posting your question in the "TapLinx SDK, TagWriter and TagInfo" forum.

I apologize for the inconvenience.

Regards,
Eduardo.

0 Kudos
Reply

1,009 Views
IkarovoPero
Contributor II

I did so. Thanks for pointing me to the appropriate place.

0 Kudos
Reply