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

Fails profile list on Quectel EM05-G (propably V2) #11

Closed mastier closed 3 months ago

mastier commented 3 months ago

So basically it fails here at the very beginning, maybe you could help nail the issue Details of the modem:

$ lsusb  |grep Quectel
Bus 001 Device 003: ID 2c7c:0313 Quectel Wireless Solutions Co., Ltd. Quectel EM05-G

The command:

 lpac-mbim --device=/dev/cdc-wdm0 profile list
INFO: Connect
INFO: Open channel with AID a0000005591010ffffffff8900000100
'--ms-set-uicc-open-channel="application-id=a0000005591010ffffffff8900000100"'
Error executing command: error: operation failed: Failure

Traceback (most recent call last):
  File "/home/mastier/.local/bin/lpac-mbim", line 167, in <module>
    main()
  File "/home/mastier/.local/bin/lpac-mbim", line 152, in main
    payload = handle_type_apdu(req["payload"]["func"], req["payload"]["param"])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mastier/.local/bin/lpac-mbim", line 78, in handle_type_apdu
    channel_id = open_channel(param)
                 ^^^^^^^^^^^^^^^^^^^
  File "/home/mastier/.local/bin/lpac-mbim", line 53, in open_channel
    output_cmd = run_mbimcli(f'--ms-set-uicc-open-channel="application-id={aid}"').split('\n')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'

I run the command myself below with full debug:

 mbimcli -p --verbose-full -d /dev/cdc-wdm0 --ms-set-uicc-open-channel="application-id=a0000005591010ffffffff8900000100"
[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] opening device...
[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] read max control message size from descriptors file: 4096
[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] sent message...
<<<<<< RAW:
<<<<<<   length = 88
<<<<<<   data   = 03:00:00:00:58:00:00:00:01:00:00:00:01:00:00:00:00:00:00:00:83:8C:F7:FB:8D:0D:4D:7F:87:1E:D7:1D:BE:FB:B3:9B:01:00:00:00:01:00:00:00:28:00:00:00:0C:00:00:00:1A:00:00:00:1E:00:00:00:2F:00:64:00:65:00:76:00:2F:00:63:00:64:00:63:00:2D:00:77:00:64:00:6D:00:30:00:00:00

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] sent message (translated)...
<<<<<< Header:
<<<<<<   length      = 88
<<<<<<   type        = command (0x00000003)
<<<<<<   transaction = 1
<<<<<< Fragment header:
<<<<<<   total   = 1
<<<<<<   current = 0
<<<<<< Contents:
<<<<<<   service = 'proxy-control' (838cf7fb-8d0d-4d7f-871e-d71dbefbb39b)
<<<<<<   cid     = 'configuration' (0x00000001)
<<<<<<   type    = 'set' (0x00000001)
<<<<<< Fields:
<<<<<<   DevicePath = '/dev/cdc-wdm0'
<<<<<<   Timeout = '30'

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] received message...
>>>>>> RAW:
>>>>>>   length = 48
>>>>>>   data   = 03:00:00:80:30:00:00:00:01:00:00:00:01:00:00:00:00:00:00:00:83:8C:F7:FB:8D:0D:4D:7F:87:1E:D7:1D:BE:FB:B3:9B:01:00:00:00:00:00:00:00:00:00:00:00

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] received message (translated)...
>>>>>> Header:
>>>>>>   length      = 48
>>>>>>   type        = command-done (0x80000003)
>>>>>>   transaction = 1
>>>>>> Fragment header:
>>>>>>   total   = 1
>>>>>>   current = 0
>>>>>> Contents:
>>>>>>   status error = 'None' (0x00000000)
>>>>>>   service      = 'proxy-control' (838cf7fb-8d0d-4d7f-871e-d71dbefbb39b)
>>>>>>   cid          = 'configuration' (0x00000001)

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] sent message...
<<<<<< RAW:
<<<<<<   length = 16
<<<<<<   data   = 01:00:00:00:10:00:00:00:02:00:00:00:00:10:00:00

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] sent message (translated)...
<<<<<< Header:
<<<<<<   length      = 16
<<<<<<   type        = open (0x00000001)
<<<<<<   transaction = 2
<<<<<< Contents:
<<<<<<   max control transfer = 4096

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] received message...
>>>>>> RAW:
>>>>>>   length = 16
>>>>>>   data   = 01:00:00:80:10:00:00:00:02:00:00:00:00:00:00:00

[02 Jul 2024, 14:11:16] [Debug] MBIM Device at '/dev/cdc-wdm0' ready
[02 Jul 2024, 14:11:16] [Debug] Asynchronously setting UICC open channel.
[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] sent message...
<<<<<< RAW:
<<<<<<   length = 80
<<<<<<   data   = 03:00:00:00:50:00:00:00:03:00:00:00:01:00:00:00:00:00:00:00:C2:F6:58:8E:F0:37:4B:C9:86:65:F4:D4:4B:D0:93:67:02:00:00:00:01:00:00:00:20:00:00:00:10:00:00:00:10:00:00:00:00:00:00:00:00:00:00:00:A0:00:00:05:59:10:10:FF:FF:FF:FF:89:00:00:01:00

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] sent message (translated)...
<<<<<< Header:
<<<<<<   length      = 80
<<<<<<   type        = command (0x00000003)
<<<<<<   transaction = 3
<<<<<< Fragment header:
<<<<<<   total   = 1
<<<<<<   current = 0
<<<<<< Contents:
<<<<<<   service = 'ms-uicc-low-level-access' (c2f6588e-f037-4bc9-8665-f4d44bd09367)
<<<<<<   cid     = 'open-channel' (0x00000002)
<<<<<<   type    = 'set' (0x00000001)
<<<<<< Fields:
<<<<<<   AppId = 'a0:00:00:05:59:10:10:ff:ff:ff:ff:89:00:00:01:00'
<<<<<<   SelectP2Arg = '0'
<<<<<<   ChannelGroup = '0'

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] received message...
>>>>>> RAW:
>>>>>>   length = 48
>>>>>>   data   = 03:00:00:80:30:00:00:00:03:00:00:00:01:00:00:00:00:00:00:00:C2:F6:58:8E:F0:37:4B:C9:86:65:F4:D4:4B:D0:93:67:02:00:00:00:02:00:00:00:00:00:00:00

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] received message (translated)...
>>>>>> Header:
>>>>>>   length      = 48
>>>>>>   type        = command-done (0x80000003)
>>>>>>   transaction = 3
>>>>>> Fragment header:
>>>>>>   total   = 1
>>>>>>   current = 0
>>>>>> Contents:
>>>>>>   status error = 'Failure' (0x00000002)
>>>>>>   service      = 'ms-uicc-low-level-access' (c2f6588e-f037-4bc9-8665-f4d44bd09367)
>>>>>>   cid          = 'open-channel' (0x00000002)

error: operation failed: Failure
[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] closing device...
[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] sent message...
<<<<<< RAW:
<<<<<<   length = 12
<<<<<<   data   = 02:00:00:00:0C:00:00:00:04:00:00:00

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] sent message (translated)...
<<<<<< Header:
<<<<<<   length      = 12
<<<<<<   type        = close (0x00000002)
<<<<<<   transaction = 4

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] received message...
>>>>>> RAW:
>>>>>>   length = 16
>>>>>>   data   = 02:00:00:80:10:00:00:00:04:00:00:00:00:00:00:00

[02 Jul 2024, 14:11:16] [Debug] [/dev/cdc-wdm0] channel destroyed
[02 Jul 2024, 14:11:16] [Debug] Device closed

more information on mmcli

$ mmcli -m any
  -----------------------------
  General  |              path: /org/freedesktop/ModemManager1/Modem/1
           |         device id: 37ee3f931cfbbd9af6a717d5db271f036ca66b76
  -----------------------------
  Hardware |      manufacturer: Quectel
           |             model: Quectel EM05-G
           | firmware revision: EM05GFAR07A07M1G
           |    carrier config: default
           |      h/w revision: QUECTEL Mobile Broadband Modul
           |         supported: gsm-umts, lte
           |           current: gsm-umts, lte
           |      equipment id: 016520001101301
  -----------------------------
  System   |            device: /sys/devices/pci0000:00/0000:00:08.1/0000:64:00.3/usb1/1-4
           |           physdev: /sys/devices/pci0000:00/0000:00:08.1/0000:64:00.3/usb1/1-4
           |           drivers: option, cdc_mbim
           |            plugin: quectel
           |      primary port: cdc-wdm0
           |             ports: cdc-wdm0 (mbim), ttyUSB0 (at), wwan0 (net)
  -----------------------------
  Status   |             state: failed
           |     failed reason: sim-missing
           |       power state: low
  -----------------------------
  Modes    |         supported: allowed: 3g; preferred: none
           |                    allowed: 4g; preferred: none
           |                    allowed: 3g, 4g; preferred: 4g
           |                    allowed: 3g, 4g; preferred: 3g
           |           current: allowed: 3g, 4g; preferred: 4g
  -----------------------------
  Bands    |         supported: utran-1, utran-4, utran-6, utran-5, utran-8, utran-2, 
           |                    eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8, 
           |                    eutran-12, eutran-13, eutran-14, eutran-18, eutran-19, eutran-20, 
           |                    eutran-25, eutran-26, eutran-28, eutran-38, eutran-39, eutran-40, 
           |                    eutran-41, eutran-66, eutran-71, utran-19
           |           current: utran-1, utran-4, utran-6, utran-5, utran-8, utran-2, 
           |                    eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8, 
           |                    eutran-12, eutran-13, eutran-14, eutran-18, eutran-19, eutran-20, 
           |                    eutran-25, eutran-26, eutran-28, eutran-38, eutran-39, eutran-40, 
           |                    eutran-41, eutran-66, eutran-71, utran-19
  -----------------------------
  IP       |         supported: ipv4, ipv6, ipv4v6
  -----------------------------
  3GPP     |              imei: <censored>
  -----------------------------
  SIM      |    sim slot paths: slot 1: none (active)
           |                    slot 2: none
mastier commented 3 months ago

Ok, I think I found it, I needed to switch slot for eSIM

$ sudo mbimcli -p -d /dev/cdc-wdm0 --ms-query-device-slot-mappings
[/dev/cdc-wdm0] Slot mappings retrieved:
     Executor '0': slot '0'

$ sudo mbimcli -p -d /dev/cdc-wdm0 --ms-set-device-slot-mappings=1
Asynchronously set device slot mappings
[/dev/cdc-wdm0] Updated slot mappings retrieved:
     Executor '0': slot '1'
 # lpac-mbim --device=/dev/cdc-wdm0 profile list
INFO: Connect
INFO: Open channel with AID a0000005591010ffffffff8900000100
'--ms-set-uicc-open-channel="application-id=a0000005591010ffffffff8900000100"'
['Succesfully retrieved UICC APDU response:', '\t  status: 144', '\tresponse: BF:2D:52:A0:50:E3:4E:5A:0A:98:00:00:00:00:00:00:00:00:21:4F:10:A0:00:00:05:59:10:10:FF:FF:FF:FF:89:00:00:20:00:9F:70:01:00:90:0A:52:26:53:20:43:4D:57:35:30:30:91:0F:52:6F:68:64:65:20:26:20:53:63:68:77:61:72:7A:92:0A:52:26:53:20:43:4D:57:35:30:30:95:01:00']
INFO: Received LPA data. Printing...
{'payload': {'code': 0,
             'data': [{'iccid': '89000000000000000012',
                       'icon': None,
                       'iconType': None,
                       'isdpAid': 'a0000005591010ffffffff8900002000',
                       'profileClass': 'test',
                       'profileName': 'R&S CMW500',
                       'profileNickname': 'R&S CMW500',
                       'profileState': 'disabled',
                       'serviceProviderName': 'Rohde & Schwarz'}],
             'message': 'success'},
 'type': 'lpa'}
INFO: Close channel 1
INFO: Disconnect
Exit code: 0
stich86 commented 3 months ago

good, i close the issue :)

mastier commented 3 months ago

Thanks, @stich86 you may mentioned this hardware in README.md but let me test further.

stich86 commented 3 months ago

ok ping me again when you have done all tests and let me know Pls check if it also work with QMI o AT backend

mastier commented 3 months ago

Switching to QMI require adding VID and MID and possibly some quirks to the kernel at ./drivers/net/usb/qmi_wwan.c , at least what I checked in 6.8 kernel in Ubuntu 24.04. Maybe it is already in the mainline. Will try in the spare time.

After swiitch to QMI I was missing wwan interface, only AT

I sent at+qcfg=“usbnet”,0

And then I saw the following

$ mmcli -m any
  -----------------------------
  General  |              path: /org/freedesktop/ModemManager1/Modem/9
           |         device id: a875b7ef7dc1f31b7256f633798e964e6dfe1517
  -----------------------------
  Hardware |      manufacturer: Quectel
           |             model: EM05-G
           | firmware revision: EM05GFAR07A07M1G
           |         supported: gsm-umts, lte
           |           current: gsm-umts, lte
           |      equipment id: 016520001101301
  -----------------------------
  System   |            device: /sys/devices/pci0000:00/0000:00:08.1/0000:64:00.3/usb1/1-4
           |           physdev: /sys/devices/pci0000:00/0000:00:08.1/0000:64:00.3/usb1/1-4
           |           drivers: option
           |            plugin: quectel
           |      primary port: ttyUSB0
           |             ports: ttyUSB0 (at)
  -----------------------------
  Status   |             state: failed
           |     failed reason: sim-missing
           |       power state: off
  -----------------------------
  Modes    |         supported: allowed: 2g, 3g, 4g; preferred: none
           |           current: allowed: 2g, 3g, 4g; preferred: none
  -----------------------------
  IP       |         supported: ipv4, ipv6, ipv4v6
  -----------------------------
  3GPP     |              imei: <censored>
sudo cat /sys/kernel/debug/usb/devices
...
T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#=  7 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=2c7c ProdID=0313 Rev= 2.00
S:  Manufacturer=Quectel
S:  Product=Quectel EM05-G
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=82(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=84(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
...
mastier commented 3 months ago

So it seems I was able to download the profile

I have run enable profile and now I see on /dev/ttyUSB0

OK

OK

OK

OK

OK

The profile seems enabled

 # lpac-mbim --device=/dev/cdc-wdm0 profile list
INFO: Connect
INFO: Open channel with AID a0000005591010ffffffff8900000100
'--ms-set-uicc-open-channel="application-id=a0000005591010ffffffff8900000100"'
['Succesfully retrieved UICC APDU response:', '\t  status: 144', '\tresponse: BF:2D:82:02:1C:A0:82:02:18:E3:4E:5A:0A:98:00:00:00:00:00:00:00:00:21:4F:10:A0:00:00:05:59:10:10:FF:FF:FF:FF:89:00:00:20:00:9F:70:01:00:90:0A:52:26:53:20:43:4D:57:35:30:30:91:0F:52:6F:68:64:65:20:26:20:53:63:68:77:61:72:7A:92:0A:52:26:53:20:43:4D:57:35:30:30:95:01:00:E3:82:01:C4:5A:0A:98:84:20:23:42:60:16:92:56:F2:4F:10:A0:00:00:05:59:10:10:FF:FF:FF:FF:89:00:00:11:00:9F:70:01:01:91:0B:54:2D:4D:6F:62:69:6C:65:2E:70:6C:92:0B:54:2D:4D:6F:62:69:6C:65:2E:70:6C:93:01:01:94:82:01:7E:89:50:4E:47:0D:0A:1A:0A:00:00:00:0D:49:48:44:52:00:00:00:40:00:00:00:40:04:03:00:00:00:58:47:6C:ED:00:00:00:24:50:4C:54:45:FF:FF:FF:CC:00:66:FF:CC:FF:99:33:66:FF:99:CC:CC:66:99:CC:33:99:CC:33:66:FF:CC:CC:99:00:66:FF:66:99:FF:99:FF:D0:80:4A:B6:00:00:01:15:49:44:41:54:48:C7:ED:D4:BF:4B:C3:40:14:07:F0:C7:A1:90:F5:8B:B6:62:5D:D2:43:A9:1D:BD:2A:CE:41:8B:E8:64:9A:41:74:4B:C7:6E:55:A4:AB:38:75:AD:E8:1F:E0:A0:83:7F:A5:2F:2F:77:A5:60:5E:9C:DA:29:5F:12:1E:97:FB:90:FB:15:42:D4:A4:C9:C6:33:B7:96:AF:E2:7E:A9:06:57:C0:60:81:FD:01:E0:AA:41:82:F6:65:82:83:1B:60:57:03:23:EA:62:4C:47:2A:E8:90:00:93:6B:C0:95:80:AE:DF:AB:C1:FD:AD:07:DB:1A:88:3D:D8:3A:AD:06:59:00:46:03:54:00:9E:48:A4:00:1B:00:CD:F5:ED:96:21:B4:58:7B:2C:E0:D5:5A:69:1F:72:BB:7C:1E:97:20:C5:33:F5:19:A4:F8:28:9A:D1:09:64:2E:D1:34:9C:4D:8A:96:80:9C:2B:C7:F8:33:E1:FA:16:40:87:7A:AC:3F:B9:16:1D:F9:5F:D0:12:90:FA:37:2C:96:C0:0F:91:CD:CE:64:99:D9:4C:C6:36:77:4F:D2:61:CE:77:DC:EA:2A:9C:D4:D5:D9:2F:57:51:EE:C3:63:FD:77:D9:FB:1F:8C:EB:41:37:2C:49:4B:A2:7D:8F:3E:BC:39:ED:B8:A6:FF:62:0A:60:CF:E9:60:F8:F0:F3:3D:F9:1A:35:3F:99:26:EB:CF:2F:46:16:2E:6E:54:C2:1C:C7:00:00:00:00:49:45:4E:44:AE:42:60:82:95:01:02']
INFO: Received LPA data. Printing...
{'payload': {'code': 0,
             'data': [{'iccid': '89000000000000000012',
                       'icon': None,
                       'iconType': None,
                       'isdpAid': 'a0000005591010ffffffff8900002000',
                       'profileClass': 'test',
                       'profileName': 'R&S CMW500',
                       'profileNickname': 'R&S CMW500',
                       'profileState': 'disabled',
                       'serviceProviderName': 'Rohde & Schwarz'},
                      {'iccid': '8948023224066129652',
                       'icon': 'iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAJFBMVEX////MAGb/zP+ZM2b/mczMZpnMM5nMM2b/zMyZAGb/Zpn/mf/QgEq2AAABFUlEQVRIx+3Uv0vDQBQH8MehkPWLtmJd0kOpHb0qzkGL6GSaQXRLx25VpKs4da3oH+Cgg3+lLy93pWBenNopXxIel/uQ+xVC1KTJxjO3lq/ifqkGV8Bggf0B4KpBgvZlgoMbYFcDI+piTEcq6JAAk2vAlYCu36vB/a0H2xqIPdg6rQZZAEYDVACeSKQAGwDN9e2WIbRYeyzg1VppH3K7fB6XIMUz9Rmk+Cia0QlkLtE0nE2KloCcK8f4M+H6FkCHeqw/uRYd+V/QEpD6NyyWwA+Rzc5kmdlMxjZ3T9Jhznfc6iqc1NXZL1dR7sNj/XfZ+x+M60E3LElLon2PPrw57bim/2IKYM/pYPjw8z35GjU/mSbrzy9GFi5uVMIcxwAAAABJRU5ErkJggg==',
                       'iconType': 'png',
                       'isdpAid': 'a0000005591010ffffffff8900001100',
                       'profileClass': 'operational',
                       'profileName': 'T-Mobile.pl',
                       'profileNickname': None,
                       'profileState': 'enabled',   ####<<-------------------------------------------------------
                       'serviceProviderName': 'T-Mobile.pl'}],
             'message': 'success'},
 'type': 'lpa'}
INFO: Close channel 1
INFO: Disconnect
Exit code: 0

but mmcli show enabling, cannot pass pin to eSIM

  ----------------------------- 
   Status   |             state: enabling
           |       power state: low
  -----------------------------
# lpac-mbim --device=/dev/cdc-wdm0 chip info
INFO: Connect
INFO: Open channel with AID a0000005591010ffffffff8900000100
'--ms-set-uicc-open-channel="application-id=a0000005591010ffffffff8900000100"'
['Succesfully retrieved UICC APDU response:', '\t  status: 34153', '\tresponse: (null)']
INFO: Received LPA data. Printing...
{'payload': {'code': -1, 'data': '', 'message': 'es10c_get_eid'}, 'type': 'lpa'}
INFO: Close channel 2
INFO: Disconnect
Exit code: 255
root@earl:~# mbimcli -p -d /dev/cdc-wdm0  --quectel-query-radio-state
[/dev/cdc-wdm0] Radio state retrieved: 'fcc-locked'
root@earl:~# mbimcli -p -d /dev/cdc-wdm0  --quectel-set-radio-state=on
[/dev/cdc-wdm0] Successfully requested to enable radio
root@earl:~# mbimcli -p -d /dev/cdc-wdm0  --quectel-query-radio-state
[/dev/cdc-wdm0] Radio state retrieved: 'on'

Then I got on ttyUSB0

+CFUN: 1

Yet, setting PIN was still failing

AT+CPIN=<PIN>

CME ERROR: 14

I restarted the stack

AT+CFUN=0
AT+CFUN=1

and now it ask for pin

 -----------------------------------
  Status   |                    lock: sim-pin
           |          unlock retries: sim-pin (3)
           |                   state: locked
           |             power state: low
  -----------------------------------

When I passed the pin

+CPIN: READY

now

  -----------------------------------
  Status   |                    lock: sim-pin2
           |          unlock retries: sim-pin (3), sim-pin2 (3)
           |                   state: enabling
           |             power state: low
  -----------------------------------
-----------------------------------
  SIM      |        primary sim path: /org/freedesktop/ModemManager1/SIM/2
           |          sim slot paths: slot 1: none
           |                          slot 2: /org/freedesktop/ModemManager1/SIM/2 (active)

Then I see radio is again locked

root@earl:~# mbimcli -p -d /dev/cdc-wdm0  --quectel-query-radio-state
[/dev/cdc-wdm0] Radio state retrieved: 'fcc-locked'
# mbimcli -p -d /dev/cdc-wdm0  --quectel-set-radio-state=on
[/dev/cdc-wdm0] Successfully requested to enable radio

Then I passed the PIN again

OK

+CPIN: READY

+QUSIM: 1

+QIND: SMS DONE

+QIND: PB DONE

Now seems more stable, but no signal. radio is on, pin unlocked but still no signal

  -----------------------------------
  Status   |                    lock: sim-pin2
           |          unlock retries: sim-pin2 (3)
           |                   state: enabled
           |             power state: on
           |          signal quality: 0% (recent)
  -----------------------------------
+CGDCONT: 1,"IP","internet","0.0.0.0",0,0,0,0
+CGDCONT: 2,"IPV4V6","ims","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0
+CGDCONT

modemmanager show strange message

$ sudo systemctl status ModemManager
● ModemManager.service - Modem Manager
     Loaded: loaded (/usr/lib/systemd/system/ModemManager.service; enabled; preset: enabled)
     Active: active (running) since Thu 2024-07-04 23:41:28 CEST; 4min 43s ago
   Main PID: 129214 (ModemManager)
      Tasks: 7 (limit: 36815)
     Memory: 3.5M (peak: 4.5M)
        CPU: 423ms
     CGroup: /system.slice/ModemManager.service
             ├─129214 /usr/sbin/ModemManager
             └─129264 /usr/libexec/mbim-proxy

Jul 04 23:45:58 earl ModemManager[129214]: <msg> [modem0] 3GPP packet service state changed (unknown -> detached)
Jul 04 23:45:58 earl ModemManager[129214]: <msg> [modem0] 3GPP packet service state changed (detached -> unknown)
Jul 04 23:46:01 earl ModemManager[129214]: <msg> [modem0] 3GPP packet service state changed (unknown -> detached)
Jul 04 23:46:01 earl ModemManager[129214]: <msg> [modem0] 3GPP packet service state changed (detached -> unknown)
Jul 04 23:46:04 earl ModemManager[129214]: <msg> [modem0] 3GPP packet service state changed (unknown -> detached)
Jul 04 23:46:04 earl ModemManager[129214]: <msg> [modem0] 3GPP packet service state changed (detached -> unknown)
Jul 04 23:46:07 earl ModemManager[129214]: <msg> [modem0] 3GPP packet service state changed (unknown -> detached)
Jul 04 23:46:07 earl ModemManager[129214]: <msg> [modem0] 3GPP packet service state changed (detached -> unknown)
Jul 04 23:46:10 earl ModemManager[129214]: <msg> [modem0] 3GPP packet service state changed (unknown -> detached)
mastier commented 3 months ago

@stich86 It worked finally, but I needed to leave it over night! Propably the operator got lag with allowing the registration or bug in the driver. Screenshot from 2024-07-05 10-18-12

Jul 05 10:16:27 earl ModemManager[1512]: <wrn> [modem0/bearer2] connection attempt #4 failed: Failure
Jul 05 10:16:27 earl ModemManager[1512]: <msg> [modem0] state changed (connecting -> registered)
Jul 05 10:16:27 earl ModemManager[1512]: <msg> [modem0/bearer2] connection #4 finished: duration 0s
Jul 05 10:16:27 earl ModemManager[1512]: <wrn> [modem0] couldn't connect bearer: Failure
Jul 05 10:21:27 earl ModemManager[1512]: <msg> [modem0] simple connect started...
Jul 05 10:21:27 earl ModemManager[1512]: <msg> [modem0] simple connect state (6/10): register
Jul 05 10:21:27 earl ModemManager[1512]: <msg> [modem0] simple connect state (7/10): wait to get packet service state attached
Jul 05 10:21:27 earl ModemManager[1512]: <msg> [modem0] simple connect state (8/10): bearer
Jul 05 10:21:27 earl ModemManager[1512]: <msg> [modem0] simple connect state (9/10): connect
Jul 05 10:21:27 earl ModemManager[1512]: <msg> [modem0] state changed (registered -> connecting)
$ speedtest 

   Speedtest by Ookla

      Server: Korbank S.A - Wroclaw (id: 5679)
         ISP: T-mobile Polska
Idle Latency:    35.72 ms   (jitter: 3.38ms, low: 32.73ms, high: 42.33ms)
    Download:    17.66 Mbps (data used: 30.5 MB)                                                   
                196.36 ms   (jitter: 39.90ms, low: 60.12ms, high: 402.32ms)
      Upload:    16.49 Mbps (data used: 24.6 MB)                                                   
                278.49 ms   (jitter: 63.49ms, low: 60.78ms, high: 501.25ms)
 Packet Loss:     0.0%
  Result URL: https://www.speedtest.net/result/c/18f1aa02-2157-410b-acbb-e0c4d33eb1f0