stich86 / lpac-libmbim-wrapper

This is a wrapper for LPAC client to used libmbim to manage euICC on Linux client
MIT License
7 stars 2 forks source link

Cannot open AID channel with 0x87430002 #10

Closed robimarko closed 1 week ago

robimarko commented 2 weeks ago

Hi, I am trying this out on Quectel RM520N and after adding the channel-group=1 to AID channel open it seemed that everything was working but now trying to use the same command to open the AID channel is failing with 0x87430002 which is UICC_SELECT_FAILED and not 0x87430003 which was UICC_INVALID_LOGICAL_CHANNEL.

Previously it would list the chip info, profiles and I even got halfway through enrolling a new profile but I seem to have hit a curl+mbedtls bug so I rebuilt with OpenSSL instead and that is when it just plain refuses to open the channel.

Honestly, the modem FW seems buggy as trying to access that AID channel over AT commands or over QMI will always fail, the only thing that worked was MBIM and using the Quectel LPAd previously to enroll profiles (Which I want to avoid and use lpac). I am leaning towards the buggy FW as sometimes it replies to MBIM query instantly while sometimes they timeout and then next one just works.

I have ran out of ideas basically as everything looks like it should work, but its not.

root@OpenWrt:/tmp# ./lpac-mbim --device=/dev/wwan0mbim0 chip info
INFO: Connect
INFO: Open channel with AID a0000005591010ffffffff8900000100
Traceback (most recent call last):
  File "/tmp/./lpac-mbim", line 164, in <module>
    main()
  File "/tmp/./lpac-mbim", line 149, in main
    payload = handle_type_apdu(req["payload"]["func"], req["payload"]["param"])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/./lpac-mbim", line 75, in handle_type_apdu
    channel_id = open_channel(param)
                 ^^^^^^^^^^^^^^^^^^^
  File "/tmp/./lpac-mbim", line 51, in open_channel
    output_cmd = run_mbimcli(f'--ms-set-uicc-open-channel="application-id={aid},channel-group=1"').split('\n')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/./lpac-mbim", line 30, in run_mbimcli
    output_bytes = subprocess.check_output(["mbimcli", "-p", "-d", DEV] + command.split(),
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 466, in check_output
  File "/usr/lib/python3.11/subprocess.py", line 550, in run
  File "/usr/lib/python3.11/subprocess.py", line 1209, in communicate
  File "/usr/lib/python3.11/subprocess.py", line 2109, in _communicate
  File "/usr/lib/python3.11/subprocess.py", line 1253, in _check_timeout
subprocess.TimeoutExpired: Command '['mbimcli', '-p', '-d', '/dev/wwan0mbim0', '--ms-set-uicc-open-channel=application-id=a0000005591010ffffffff8900000100,channel-group=1']' timed out after 10 seconds
root@OpenWrt:/tmp# ./lpac-mbim --device=/dev/wwan0mbim0 chip info
INFO: Connect
INFO: Open channel with AID a0000005591010ffffffff8900000100
Error executing command: error: operation failed: Unknown status 0x87430002

Traceback (most recent call last):
  File "/tmp/./lpac-mbim", line 164, in <module>
    main()
  File "/tmp/./lpac-mbim", line 149, in main
    payload = handle_type_apdu(req["payload"]["func"], req["payload"]["param"])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/./lpac-mbim", line 75, in handle_type_apdu
    channel_id = open_channel(param)
                 ^^^^^^^^^^^^^^^^^^^
  File "/tmp/./lpac-mbim", line 51, in open_channel
    output_cmd = run_mbimcli(f'--ms-set-uicc-open-channel="application-id={aid},channel-group=1"').split('\n')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'
stich86 commented 2 weeks ago

Hi @robimarko does it work under Windows? Just to understand if the firmware is good or not.

I've seen on my last test on ARM machine that MBIM gives some error, while the same procedures works well on x86 environment

robimarko commented 2 weeks ago

I dont have a way to test in Windows, unfortunately.

FW is not happy about something as its returning UICC_SELECT_FAILED instead of UICC_INVALID_LOGICAL_CHANNEL

stich86 commented 2 weeks ago

Is embedded eSIM or physical?

robimarko commented 2 weeks ago

Modem is part of a complete router so I think they soldered the eUICC chip to the PCB and wired it directly to the second RM520N slot. Its almost impossible to disassemble it and look at the PCB bottom where the modem is.

eUICC seems to be live as getting the slot info via QMI utils identifies that its eUICC, present and active as well as prints the EID.

I also have some spare RM520N modems but I would need to get some external eUICC cards to be able to test with them on different boards.

stich86 commented 2 weeks ago

But if it's RM520, you can remove it from the board and put into an adapter using an external eSIM right?

bam80 commented 2 weeks ago

after adding the channel-group=1 to AID channel open it seemed that everything was working but now trying to use the same command to open the AID channel is failing with 0x87430002 which is UICC_SELECT_FAILED

This is perfectly fine - you should manually close the channel before opening it again, as there was a script error and it wasn't closed normally (@stich86 we should think about exception handling for that). Or just reboot the modem with mbimcli --intel-modem-reboot or by any other means.

bam80 commented 2 weeks ago

subprocess.TimeoutExpired: Command '['mbimcli', '-p', '-d', '/dev/wwan0mbim0', '--ms-set-uicc-open-channel=application-id=a0000005591010ffffffff8900000100,channel-group=1']' timed out after 10 seconds

If you don't run ModemManager (better you don't and stop it if you do, for the bring up) - exclude -p option from the script: https://github.com/stich86/lpac-libmbim-wrapper/issues/4

robimarko commented 2 weeks ago

But if it's RM520, you can remove it from the board and put into an adapter using an external eSIM right?

Yes, I even have some spare modems but I dont have any external eUICC cards(If somebody has recommendations for which to get that would be great)

robimarko commented 2 weeks ago

after adding the channel-group=1 to AID channel open it seemed that everything was working but now trying to use the same command to open the AID channel is failing with 0x87430002 which is UICC_SELECT_FAILED

This is perfectly fine - you should manually close the channel before opening it again, as there was a script error and it wasn't closed normally (@stich86 we should think about exception handling for that). Or just reboot the modem with mbimcli --intel-modem-reboot or by any other means.

But that is the thing, I physically rebooted the whole device multiple times and its now refusing to open that AID with a UICC_SELECT_FAILED error instead. I have tried to close the channel but it fails with the same error code.

It will first timeout on most MBIM calls and then will eventually throw the error code, it seems to timeout on the slot query etc via MBIM now.

robimarko commented 2 weeks ago

subprocess.TimeoutExpired: Command '['mbimcli', '-p', '-d', '/dev/wwan0mbim0', '--ms-set-uicc-open-channel=application-id=a0000005591010ffffffff8900000100,channel-group=1']' timed out after 10 seconds

If you don't run ModemManager (better you don't and stop it if you do, for the bring up) - exclude -p option from the script: #4

Yes, I dont have MM running intentionally and will drop the proxy for now.

bam80 commented 2 weeks ago

I physically rebooted the whole device multiple times

FYI - rebooting the router doesn't necessary mean modem reboot, try the command I mentioned, just for the case.

robimarko commented 2 weeks ago

I physically rebooted the whole device multiple times

FYI - rebooting the router doesn't necessary mean modem reboot, try the command I mentioned, just for the case.

Yes, that is why I physically pulled the power multiple times, unfortunately mbimcli --intel-modem-reboot does not seem to be supported.

robimarko commented 2 weeks ago

I think that modem FW or the eUICC FW itself is messed up since now Quectel LPAd also fails on QMI init.

bam80 commented 2 weeks ago

@robimarko the other thing you could try is to update your modem fw to the latest version - my modem (Fibocom) didn't even support all these stuff before I did.

I dont have any external eUICC cards(If somebody has recommendations for which to get that would be great)

https://esim.5ber.com/ (Invitation Code 0PGA4Z), take Standard version https://shop.sysmocom.de/sysmoEUICC1-eUICC-for-consumer-eSIM-RSP/sysmoEUICC1

stich86 commented 2 weeks ago

But if it's RM520, you can remove it from the board and put into an adapter using an external eSIM right?

Yes, I even have some spare modems but I dont have any external eUICC cards(If somebody has recommendations for which to get that would be great)

You can get Lenovo eSIM for 8€ (like the one I've referenced on the readme)

bam80 commented 2 weeks ago

I think that modem FW or the eUICC FW itself is messed up since now Quectel LPAd also fails on QMI init.

I don't know if it helps:


$ mbimcli --help-all |grep -i reset
  --ms-device-reset                                                                             Reset device
  --ms-set-uicc-reset=[(Pass Through Action)]                                                   Set UICC reset
  --ms-query-uicc-reset                                                                         Query UICC reset
robimarko commented 2 weeks ago

@bam80 I am already running the latest FW (I opened a support case with Quectel to see if there is maybe a newer beta one that fixes this)

@stich86 I will try and see if that card is obtainable for me in Croatia as its seems quite rare

robimarko commented 2 weeks ago

Well, today I seem to have managed to reset the modem somehow and now LPAC over AT works for everything expect for profile downloads.

It constantly fails on es10b_authenticate_server and I have tried 2 different profiles that use completely different SM-DP servers.

stich86 commented 2 weeks ago

Are you using OpenSSL? Because LPAC uses curl, if it's with embedded TLS gives an error during profile download

robimarko commented 2 weeks ago

Yes, I tried with both OpenSSL and mbedtls, but fail in the same way. Here is an attempt with the betteroaming, I was able to enroll one BNE SIM today with Quectel LPAd and I could enable/disable/remove it just fine.

Trying to process notifications also fails on the same step.

LPAC_APDU=at LPAC_HTTP=curl AT_DEVICE=/dev/ttyUSB2 LIBEUICC_DEBUG_HTTP=1 LIBEUICC_DEBUG_APDU=1 lpac profile download -a 'LPA:1$rsp.truphone.com$QRF-BETTERROAMING-PMRDGIR2EARDEIT5'
{"type":"progress","payload":{"code":0,"message":"es10b_get_euicc_challenge_and_info","data":"rsp.truphone.com"}}
[DEBUG] [APDU] [TX] CLA: 81, INS: E2, P1: 91, P2: 00, Lc: 03, Data: BF 2E 00 
[DEBUG] [APDU] [RX] SW1: 90, SW2: 00, Data: BF 2E 12 80 10 31 07 99 F4 83 63 28 AE 0C 46 4F 9E 84 27 A3 7D 
[DEBUG] [APDU] [TX] CLA: 81, INS: E2, P1: 91, P2: 00, Lc: 03, Data: BF 20 00 
[DEBUG] [APDU] [RX] SW1: 90, SW2: 00, Data: BF 20 61 82 03 02 02 02 A9 2C 04 14 81 37 0F 51 25 D0 B1 D4 08 D4 C3 B2 32 E6 D2 5E 79 5B EB FB 04 14 77 F0 BD 69 D6 0B DC 9E 31 DA 70 2B 22 1C 32 80 8B B8 E4 2A AA 2C 04 14 81 37 0F 51 25 D0 B1 D4 08 D4 C3 B2 32 E6 D2 5E 79 5B EB FB 04 14 77 F0 BD 69 D6 0B DC 9E 31 DA 70 2B 22 1C 32 80 8B B8 E4 2A 
{"type":"progress","payload":{"code":0,"message":"es9p_initiate_authentication","data":"rsp.truphone.com"}}
[DEBUG] [HTTP] [TX] url: https://rsp.truphone.com/gsma/rsp2/es9plus/initiateAuthentication, data: {"smdpAddress":"rsp.truphone.com","euiccChallenge":"MQeZ9INjKK4MRk+ehCejfQ==","euiccInfo1":"vyBhggMCAgKpLAQUgTcPUSXQsdQI1MOyMubSXnlb6/sEFHfwvWnWC9yeMdpwKyIcMoCLuOQqqiwEFIE3D1El0LHUCNTDsjLm0l55W+v7BBR38L1p1gvcnjHacCsiHDKAi7jkKg=="}
[DEBUG] [HTTP] [RX] rcode: 200, data: {"header":{"functionExecutionStatus":{"status":"Executed-Success"}},"transactionId":"0000000016A5C150","serverSigned1":"MECACAAAAAAWpcFQgRAxB5n0g2MorgxGT56EJ6N9gxByc3AudHJ1cGhvbmUuY29thBDWbjZVo5mI6Jiimbof7wWl","serverSignature1":"XzdAp3XfYIxeqD10QgZre0eno+FvwHKHtmaG9W3LN6xVGfr4jkyTlNTe7CKAE3rlIJZhOIgHjiwXLZGSEw0b+lxBpQ==","euiccCiPKIdToBeUsed":"BBSBNw9RJdCx1AjUw7Iy5tJeeVvr+w==","serverCertificate":"MIICgzCCAiigAwIBAgIQZAVRhSGL0nffpH10bZlDJDAKBggqhkjOPQQDAjBEMRgwFgYDVQQKEw9HU00gQXNzb2NpYXRpb24xKDAmBgNVBAMTH0dTTSBBc3NvY2lhdGlvbiAtIFJTUDIgUm9vdCBDSTEwHhcNMjQwMjI3MDAwMDAwWhcNMjcwMjI2MjM1OTU5WjBsMQswCQYDVQQGEwJHQjEPMA0GA1UEBxMGTG9uZG9uMSUwIwYDVQQKExxUUCBHbG9iYWwgT3BlcmF0aW9ucyBMaW1pdGVkMQwwCgYDVQQLEwNSU1AxFzAVBgNVBAMTDjFHTE9CQUwgU00tRFArMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEb79IWSFYSQw31lOA9s8cFewC+w4Ey5eIo3FzG9KvpifqkGwSvQK3SgXAgWPOHv/cNXMy3NnDE5cpkiIh1qelHKOB0zCB0DAXBgNVHSABAf8EDTALMAkGB2eBEgECAQQwTQYDVR0fBEYwRDBCoECgPoY8aHR0cDovL2dzbWEtY3JsLnN5bWF1dGguY29tL29mZmxpbmVjYS9nc21hLXJzcDItcm9vdC1jaTEuY3JsMA4GA1UdDwEB/wQEAwIHgDAWBgNVHREEDzANiAsrBgEEAYHsRQEBATAdBgNVHQ4EFgQUGPBMVNemFzU7BmLhvQVUdNGc0z8wHwYDVR0jBBgwFoAUgTcPUSXQsdQI1MOyMubSXnlb6/swCgYIKoZIzj0EAwIDSQAwRgIhAL+/2SeUldiglTHlXJcoyZt7dTNin7PVZKwMXK0JQFlyAiEA9Lr0dY6U1AOm9m63RqPG0vvyThkGcSgYLneU+tH6H7o="}
{"type":"progress","payload":{"code":0,"message":"es10b_authenticate_server","data":"rsp.truphone.com"}}
[DEBUG] [APDU] [TX] CLA: 81, INS: E2, P1: 11, P2: 00, Lc: 78, Data: BF 38 82 03 52 30 40 80 08 00 00 00 00 16 A5 C1 50 81 10 31 07 99 F4 83 63 28 AE 0C 46 4F 9E 84 27 A3 7D 83 10 72 73 70 2E 74 72 75 70 68 6F 6E 65 2E 63 6F 6D 84 10 D6 6E 36 55 A3 99 88 E8 98 A2 99 BA 1F EF 05 A5 5F 37 40 A7 75 DF 60 8C 5E A8 3D 74 42 06 6B 7B 47 A7 A3 E1 6F C0 72 87 B6 66 86 F5 6D CB 37 AC 55 19 FA F8 8E 4C 93 94 D4 DE EC 22 80 13 7A E5 20 
[DEBUG] [APDU] [RX] SW1: 90, SW2: 00, Data: 
[DEBUG] [APDU] [TX] CLA: 81, INS: E2, P1: 11, P2: 01, Lc: 78, Data: 96 61 38 88 07 8E 2C 17 2D 91 92 13 0D 1B FA 5C 41 A5 04 14 81 37 0F 51 25 D0 B1 D4 08 D4 C3 B2 32 E6 D2 5E 79 5B EB FB 30 82 02 83 30 82 02 28 A0 03 02 01 02 02 10 64 05 51 85 21 8B D2 77 DF A4 7D 74 6D 99 43 24 30 0A 06 08 2A 86 48 CE 3D 04 03 02 30 44 31 18 30 16 06 03 55 04 0A 13 0F 47 53 4D 20 41 73 73 6F 63 69 61 74 69 6F 6E 31 28 30 26 06 03 55 04 03 
[DEBUG] [APDU] [RX] SW1: 90, SW2: 00, Data: 
[DEBUG] [APDU] [TX] CLA: 81, INS: E2, P1: 11, P2: 02, Lc: 78, Data: 13 1F 47 53 4D 20 41 73 73 6F 63 69 61 74 69 6F 6E 20 2D 20 52 53 50 32 20 52 6F 6F 74 20 43 49 31 30 1E 17 0D 32 34 30 32 32 37 30 30 30 30 30 30 5A 17 0D 32 37 30 32 32 36 32 33 35 39 35 39 5A 30 6C 31 0B 30 09 06 03 55 04 06 13 02 47 42 31 0F 30 0D 06 03 55 04 07 13 06 4C 6F 6E 64 6F 6E 31 25 30 23 06 03 55 04 0A 13 1C 54 50 20 47 6C 6F 62 61 6C 20 4F 70 
[DEBUG] [APDU] [RX] SW1: 90, SW2: 00, Data: 
[DEBUG] [APDU] [TX] CLA: 81, INS: E2, P1: 11, P2: 03, Lc: 78, Data: 65 72 61 74 69 6F 6E 73 20 4C 69 6D 69 74 65 64 31 0C 30 0A 06 03 55 04 0B 13 03 52 53 50 31 17 30 15 06 03 55 04 03 13 0E 31 47 4C 4F 42 41 4C 20 53 4D 2D 44 50 2B 30 59 30 13 06 07 2A 86 48 CE 3D 02 01 06 08 2A 86 48 CE 3D 03 01 07 03 42 00 04 6F BF 48 59 21 58 49 0C 37 D6 53 80 F6 CF 1C 15 EC 02 FB 0E 04 CB 97 88 A3 71 73 1B D2 AF A6 27 EA 90 6C 12 BD 02 
[DEBUG] [APDU] [RX] SW1: 90, SW2: 00, Data: 
[DEBUG] [APDU] [TX] CLA: 81, INS: E2, P1: 11, P2: 04, Lc: 78, Data: B7 4A 05 C0 81 63 CE 1E FF DC 35 73 32 DC D9 C3 13 97 29 92 22 21 D6 A7 A5 1C A3 81 D3 30 81 D0 30 17 06 03 55 1D 20 01 01 FF 04 0D 30 0B 30 09 06 07 67 81 12 01 02 01 04 30 4D 06 03 55 1D 1F 04 46 30 44 30 42 A0 40 A0 3E 86 3C 68 74 74 70 3A 2F 2F 67 73 6D 61 2D 63 72 6C 2E 73 79 6D 61 75 74 68 2E 63 6F 6D 2F 6F 66 66 6C 69 6E 65 63 61 2F 67 73 6D 61 2D 72 
[DEBUG] [APDU] [RX] SW1: 90, SW2: 00, Data: 
[DEBUG] [APDU] [TX] CLA: 81, INS: E2, P1: 11, P2: 05, Lc: 78, Data: 73 70 32 2D 72 6F 6F 74 2D 63 69 31 2E 63 72 6C 30 0E 06 03 55 1D 0F 01 01 FF 04 04 03 02 07 80 30 16 06 03 55 1D 11 04 0F 30 0D 88 0B 2B 06 01 04 01 81 EC 45 01 01 01 30 1D 06 03 55 1D 0E 04 16 04 14 18 F0 4C 54 D7 A6 17 35 3B 06 62 E1 BD 05 54 74 D1 9C D3 3F 30 1F 06 03 55 1D 23 04 18 30 16 80 14 81 37 0F 51 25 D0 B1 D4 08 D4 C3 B2 32 E6 D2 5E 79 5B EB FB 
[DEBUG] [APDU] [RX] SW1: 90, SW2: 00, Data: 
[DEBUG] [APDU] [TX] CLA: 81, INS: E2, P1: 11, P2: 06, Lc: 78, Data: 30 0A 06 08 2A 86 48 CE 3D 04 03 02 03 49 00 30 46 02 21 00 BF BF D9 27 94 95 D8 A0 95 31 E5 5C 97 28 C9 9B 7B 75 33 62 9F B3 D5 64 AC 0C 5C AD 09 40 59 72 02 21 00 F4 BA F4 75 8E 94 D4 03 A6 F6 6E B7 46 A3 C6 D2 FB F2 4E 19 06 71 28 18 2E 77 94 FA D1 FA 1F BA A0 2E 80 22 51 52 46 2D 42 45 54 54 45 52 52 4F 41 4D 49 4E 47 2D 50 4D 52 44 47 49 52 32 45 41 52 
[DEBUG] [APDU] [RX] SW1: 90, SW2: 00, Data: 
[DEBUG] [APDU] [TX] CLA: 81, INS: E2, P1: 91, P2: 07, Lc: 0F, Data: 44 45 49 54 35 A1 08 80 04 35 29 06 11 A1 00 
[DEBUG] [APDU] [RX] SW1: 32, SW2: 33, Data: BF 38 82 06 37 A0 82 06 33 30 82 01 11 80 08 00 00 00 00 16 A5 C1 50 83 10 72 73 70 2E 74 72 75 70 68 6F 6E 65 2E 63 6F 6D 84 10 D6 6E 36 55 A3 99 88 E8 98 A2 99 BA 1F EF 05 A5 BF 22 81 AF 81 03 02 03 01 82 03 02 02 02 83 03 42 62 00 84 0F 81 01 00 82 04 00 0C E7 A8 83 04 00 00 53 15 85 05 06 7F 36 F7 C0 86 03 0D 01 00 87 03 02 03 00 88 02 03 D8 A9 2C 04 14 81 37 0F 51 25 D0 B1 D4 08 D4 C3 B2 32 E6 D2 5E 79 5B EB FB 04 14 77 F0 BD 69 D6 0B DC 9E 31 DA 70 2B 22 1C 32 80 8B B8 E4 2A AA 2C 04 14 81 37 0F 51 25 D0 B1 D4 08 D4 C3 B2 32 E6 D2 5E 79 5B EB FB 04 14 77 F0 BD 69 D6 0B DC 9E 31 DA 70 2B 22 1C 32 80 8B B8 E4 2A 8B 01 02 04 03 01 00 00 0C 14 54 53 2D 43 41 2D 55 50 2D 30 38 32 33 20 20 20 20 20 20 20 A0 2E 80 22 51 52 46 2D 42 45 54 54 45 52 52 4F 41 4D 49 4E 47 2D 50 4D 52 44 47 49 52 32 45 41 52 44 45 49 54 35 A1 08 80 04 35 29 06 11 A1 00 5F 37 40 88 8A 18 F2 02 28 50 B0 F5 74 D3 1E 73 E3 AF A7 27 B0 CF 22 C4 0F 55 2A D3 B4 EF B8 44 89 6E 96 77 DE B3 95 9F 6E 03 4F FF 6F 66 C3 8E 1E 01 F2 0B DB 6A 5E 82 4B E9 73 CD 07 5A 0A E5 75 E4 BF 30 82 02 0A 30 82 01 B0 A0 03 02 01 02 02 11 00 B4 17 EB D8 D3 FA 33 57 B8 B0 29 78 2D 71 6E D9 30 0A 06 08 2A 86 48 CE 3D 04 03 02 30 4D 31 0B 30 09 06 03 55 04 06 13 02 4D 58 31 24 30 22 06 03 55 04 0A 0C 1B 47 45 4D 41 4C 54 4F 20 4D 45 58 49 43 4F 20 53 2E 41 2E 20 44 45 20 43 2E 56 2E 31 18 30 16 06 03 55 04 03 0C 0F 47 65 6D 61 6C 74 6F 20 45 55 4D 20 43 56 41 30 20 17 0D 32 32 30 35 31 35 30 30 30 30 30 30 5A 18 0F 39 39 39 39 31 32 33 31 
{"type":"lpa","payload":{"code":-1,"message":"es10b_authenticate_server","data":""}}
robimarko commented 2 weeks ago

Well, this modem is getting weirder and weirder.

If AT+QESIM="lpa_enable" is set to 1 then you cannot externally open the ISD-R applet, but if you set it to 0 and reset the modem then you can but profile download fails with the es10b_authenticate_server error.

robimarko commented 1 week ago

Ok, I will close this as I found out that AT+QESIM="lpa_enable" in the modem will conflict with the ISD-R applet so you cannot open it externally.

So, disabling it and moving to QMI (I will upstream the generic QMI backend to LPAC) works just fine.