madhanraj / seek-for-android

Automatically exported from code.google.com/p/seek-for-android
0 stars 0 forks source link

Applet with the defined aid does not exist in the SE #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What's the problem?

Sometimes, we get an IOException "Applet with the defined aid does not exist in 
the SE" when we are trying to open a logical channel. However, the Applet 
exists on the Secure Element.

What steps will reproduce the problem?
1. Connect to a reader and open a logical channel, do some apdu exchanges
2. Close the channel and the session.
3. Open a new session and a new logical channel to another aid.
4. Reopen a logical channel to the first aid, and the exception will be thrown.

What is the expected output? What do you see instead?
we get an IOException "Applet with the defined aid does not exist in the SE" 
instead of an opened logical channel 

What version of the product are you using? On what operating system?
MSC Smartcard Service 2.3.0 which correspond to my issue.

I have seen a new method in SEService since the 2.3.0 release :
private void checkIfAppletAvailable(SmartcardError error) throws IOException {
            Exception exp = error.createException();
            if (exp != null) {
                if(exp instanceof NoSuchElementException) {
                    throw new IOException("Applet with the defined aid does not exist in the SE");
                }
            }
        }

Please provide any additional information below.

Original issue reported on code.google.com by sebastie...@gmail.com on 17 Feb 2012 at 3:18

GoogleCodeExporter commented 9 years ago
Logcat output :

02-17 18:54:01.464: W/System.err(6861): java.util.NoSuchElementException: 
Applet with the defined aid does not exist in the SE
02-17 18:54:01.480: W/System.err(6861):     at 
org.simalliance.openmobileapi.SEService.checkIfAppletAvailable(SEService.java:54
2)
02-17 18:54:01.480: W/System.err(6861):     at 
org.simalliance.openmobileapi.SEService.openLogicalChannel(SEService.java:364)
02-17 18:54:01.480: W/System.err(6861):     at 
org.simalliance.openmobileapi.Session.openLogicalChannel(Session.java:131)

Original comment by sebastie...@gmail.com on 17 Feb 2012 at 5:59

GoogleCodeExporter commented 9 years ago
Cannot reproduce the issue yet on Galaxy S with MSC_SmartcardService-2_3_0 and 
the attached test activity.
Executing multiple times without NoSuchElementException

Original comment by Daniel.A...@gi-de.com on 22 Feb 2012 at 11:41

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, you can closed this issue. Some channels were not properly closed in our 
integration layer.

It works very well now with two reader : the default micro SD secure element 
and our homemade reader using an AddonTerminal .

Many thanks for your help.

Original comment by sebastie...@gmail.com on 22 Feb 2012 at 1:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Closed

Original comment by Daniel.A...@gi-de.com on 10 May 2012 at 4:29