SURFnet / euicc-android

Communicate with an applet on a euicc from an Android app.
Apache License 2.0
20 stars 7 forks source link

Return Value #1

Open xietian1 opened 6 years ago

xietian1 commented 6 years ago

Hi,

I'm trying to send some APDU command to the SIM. However, no matter what I send via APDU (e.g., Channel 1, CLA 0, Ins A4, P1 4, P2 0, P3 2, Data 6f07), it will always give me '6f00' or error message. Could you please give me some suggestions on how to get any useful response from SIM?

hfmanson commented 6 years ago

Hello,

Initially you should leave Channel empty, you first need to open a channel Try Channel <empty>, CLA 0, Ins A4, P1 0, P2 4, P3 2, Data 3f00 for a start

xietian1 commented 6 years ago

Hi,

thank you very much for your suggestion! I did get the response by selecting the master file.

I have another question regarding accessing the applet (Hello) installed on the SIM via this original Android API.

E.g., using the smart card reader with Pyscard, I can visit the Hello Applet installed on the sim card by two steps. First Step: (select Applet) Send Select APDU command: [0x00, 0xA4, 0x04, 0x00] + [0x06, 0x11, 0x22, 0x33, 0x44, 0x55, 0x00] (AID is 112233445500) Second Step: (Send command) Send [0xB0, 0x11, 0x00, 0x00, 0x05], while I can get the response 'Hello'.

Do you have any idea about to implement this from the phone? I'll appreciate any advice.