martinpaljak / GlobalPlatformPro

🌐 🔐 Manage applets and keys on JavaCard-s like a pro
https://javacard.pro/globalplatform
GNU Lesser General Public License v3.0
699 stars 212 forks source link

Could not SELECT default selected: 0x6D00 (Invalid INStruction) #268

Closed abir-wind closed 2 years ago

abir-wind commented 3 years ago

Describe the bug

I can't load my applet into the smart card.

Information about your card

PCSC Reader: Gemalto SIM Pro Smart Card Reader 0

JCOP Card J3H145 (JCOP 3 SECID P60): My card's Specification:

I am using gp.exe from command line but when I try to execute any command for example:

gp -list

gp -info

I get this response:

[DEBUG] TerminalManager - Selected the only reader with a card SCardConnect("Gemalto SIM Pro Smart Card Reader 0", T=*) -> T=1, 3BDC18FF8191FE1FC38073C821136605036351000250

GlobalPlatformPro 325fe84 Running on Windows 10 10.0 amd64, Java 1.8.0_291 by Oracle Corporation A>> T=1 (4+0000) 00A40400 00 A<< (0000+2) (6ms) 6D00 Error: Could not SELECT default selected: 0x6D00 (Invalid INStruction) pro.javacard.gp.GPException: Could not SELECT default selected: 0x6D00 (Invalid INStruction) at pro.javacard.gp.GPException.check(GPException.java:64) at pro.javacard.gp.GPSession.discover(GPSession.java:145) at pro.javacard.gp.GPTool.run(GPTool.java:208) at pro.javacard.gp.GPTool.main(GPTool.java:107) SCardDisconnect("Gemalto SIM Pro Smart Card Reader 0", true) tx:5/rx:2

Can you help me to figure out the problem please?

martinpaljak commented 2 years ago

J3H145 is a well supported card, which seems to be in bad state (or interference from reader?). Not much I can do from software side.

You could try with explicit AID for the ISD: gp -connect A00000015100 -ldvi