Truphone / LPAdesktop

LPA Simulator
Apache License 2.0
191 stars 50 forks source link

When the number of esims in the card is greater than one, the card information cannot be loaded. #6

Open chx818 opened 1 year ago

chx818 commented 1 year ago

The specific performance is that the software interface will be stuck, and processing will always be displayed. The log is as follows C:\Users\chx81\Downloads\lpa>java -jar LPA-1.0.0.0-jar-with-dependencies.jar Feb 24, 2023 10:29:38 pm com.truphone.lpap.LPAUI Information: STARTING Feb 24, 2023 10:29:43 pm com.truphone.lpap.card.ApduChannelImpl Info: Send Terminal Capabilities Feb 24, 2023 10:29:43 pm com.truphone.lpap.card.ApduChannelImpl Information: 80aa00000aa9088100820101830107 Feb 24, 2023 10:29:43 pm com.truphone.lpap.card.ApduChannelImpl Information: 0x9000 Feb 24, 2023 10:29:43 pm com.truphone.lpap.card.ApduChannelImpl Information: Open Logical Channel and Select ISD-R Feb 24, 2023 10:29:43 pm com.truphone.lpap.card.ApduChannelImpl Information: 00a4040010a0000005591010ffffffff8900000100 Feb 24, 2023 10:29:43 pm com.truphone.lpap.card.ApduChannelImpl Information: 0x9000 Feb 24, 2023 10:29:43 pm com.truphone.lpap.card.ApduChannelImpl Information: Send Status Feb 24, 2023 10:29:43 pm com.truphone.lpap.card.ApduChannelImpl Info: 80f2000c00 Feb 24, 2023 10:29:43 pm com.truphone.lpap.card.ApduChannelImpl Information: 0x9000 Feb 24, 2023 10:29:43 pm com.truphone.lpa.impl.LocalProfileAssistantImpl Information: - SM-DP connection initiated. Feb 24, 2023 10:29:43 pm com.truphone.util.LogStub logDebug Information: - Getting Profiles Feb 24, 2023 10:29:43 pm com.truphone.util.LogStub logDebug Information: List profiles APDU: 81E2910003BF2D00 Feb 24, 2023 10:29:44 pm com.truphone.lpa.impl.ListProfilesWorker run Severe: - Unexpected end of sequence, length tag: 112, actual sequence length: 73 java.io.IOException: Unexpected end of sequence, length tag: 112, actual sequence length: 73 at com.truphone.rsp.dto.asn1.rspdefinitions.ProfileInfo.decode(ProfileInfo.java:537) at com.truphone.rsp.dto.asn1.rspdefinitions.ProfileInfoListResponse$ProfileInfoListOk.decode(ProfileInfoListResponse.java:102) at com.truphone.rsp.dto.asn1.rspdefinitions.ProfileInfoListResponse.decode(ProfileInfoListResponse.java:246) at com.truphone.rsp.dto.asn1.rspdefinitions.ProfileInfoListResponse.decode(ProfileInfoListResponse.java:229) at com.truphone.lpa.impl.ListProfilesWorker.decodeProfiles(ListProfilesWorker.java:74) at com.truphone.lpa.impl.ListProfilesWorker.run(ListProfilesWorker.java:37) at com.truphone.lpa.impl.LocalProfileAssistantImpl.getProfiles(LocalProfileAssistantImpl.java:95) at com.truphone.lpap.LpaSrc.getProfiles(LpaSrc.java:57) at com.truphone.lapp.LPAUI.listProfiles(LPAUI.java:810) at com.truphone.lapp.LPAUI.access$1800(LPAUI.java:55) at com.truphone.lapp.LPAUI$18.doInBackground(LPAUI.java:590) at javax.swing.SwingWorker$1.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at javax.swing.SwingWorker.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

XIAZY commented 12 months ago

Looks like an upstream problem, probably worth looking into https://github.com/Truphone/LPAd_SM-DPPlus_Connector/blob/master/lpad-sm-dp-plus-connector/src/main/java/com/truphone/lpa/impl/ListProfilesWorker.java#L74

XIAZY commented 12 months ago

Actually, this has been fixed by PR https://github.com/Truphone/LPAd_SM-DPPlus_Connector/pull/9 Confirmed to be working with this LPADesktop project

qingz2004 commented 11 months ago

How can I get the fix? I recompiled LPAdesktop, still the same problem.

XIAZY commented 11 months ago

Recompilation should fix the problem, chances are you don't have the updated dependencies. But honestly even if you do there are other problems as well, like enabling profiles, I'm getting non GSMA defined behaviour

qingz2004 commented 11 months ago

I think you are right. How can I get the updated dependencies?

XIAZY commented 11 months ago

I think you are right. How can I get the updated dependencies?

Just use this branch and recompile https://github.com/Truphone/LPAd_SM-DPPlus_Connector/pull/9 Unfortunately Truphone appears to have stopped maintaining these projects, which is sad

qingz2004 commented 11 months ago

That works. I can now list the profile now. Thanks!

qingz2004 commented 11 months ago

I can only list the profiles, sometimes I can disable a profile, but not able to enable a profile. Didn't try delete profile yet.

XIAZY commented 11 months ago

I can only list the profiles, sometimes I can disable a profile, but not able to enable a profile. Didn't try delete profile yet.

Yea, it doesn't work. I looked into it, reason is getting non GSMA defined response codes from SMART card reader. So im guessing either the card I use isn't compliant or the software doesn't handle such responses. Either way I have gave up