Reputation: 659
I used following in the code to connect card and get channel
card = terminal.connect("T=1");
channel = card.getBasicChannel();
Here T=1 i.e. protocol is hardcoded. Is there any way from which we can find protocol of the card inserted in card reader ?
javacard.framework.APDU has method getProtocol() but I want protocol at the time of connecting with card.
Upvotes: 1
Views: 690
Reputation: 17534
From the javadoc of CardTerminal.connect(String protocol)
protocol - the protocol to use ("T=0", "T=1", or "T=CL"), or "*" to connect using any available protocol.
So it looks like you could use the wildcard.
Upvotes: 2