simple connect register throws warnings and takes long
Hi, I use a "Quectel Wireless Solutions Co., Ltd. RM520N-GL" to connect to cellular neworks (in this example 1nce) After setting the initialbearer mmcli -m any --3gpp-set-initial-eps-bearer-settings="apn=iot.1nce.net,ip-type=ipv4v6" Modifying the nmcli connection nmcli c mod wwan gsm.apn iot.1nce.net autoconnect yes and trying to bring up the connection. nmcli c up wwan The modem takes a really long time to connect to the network. It seems that the nmcli does wait for the modem state to be connected. I did grep the journal of mmcli to check what is taking that long and I got some warnings in simple connect state (6/10): register. Aug 16 08:26:09 ModemManager[456]: [modem0] 3GPP registration state changed (roaming -> registering) Aug 16 08:26:09 ModemManager[456]: [modem0] 3GPP registration state changed (registering -> roaming) Aug 16 08:26:10 ModemManager[456]: [modem0] 3GPP registration state changed (roaming -> unknown) Aug 16 08:26:10 ModemManager[456]: [modem0] state changed (registered -> enabled) Aug 16 08:26:19 ModemManager[456]: [modem0] simple connect started... Aug 16 08:26:19 ModemManager[456]: [modem0] simple connect state (6/10): register Aug 16 08:26:26 ModemManager[456]: [modem0] couldn't reload extended signal information: No way to load extended signal information Aug 16 08:26:36 ModemManager[456]: [modem0] couldn't reload extended signal information: No way to load extended signal information Aug 16 08:26:47 ModemManager[456]: [modem0] couldn't reload extended signal information: No way to load extended signal information Aug 16 08:26:56 ModemManager[456]: [modem0] couldn't reload extended signal information: No way to load extended signal information Aug 16 08:27:06 ModemManager[456]: [modem0] couldn't reload extended signal information: No way to load extended signal information Aug 16 08:27:17 ModemManager[456]: [modem0] couldn't reload extended signal information: No way to load extended signal information Aug 16 08:27:19 ModemManager[456]: [modem0] network reject indication received Aug 16 08:27:19 ModemManager[456]: [modem0] service domain: ps Aug 16 08:27:19 ModemManager[456]: [modem0] radio interface: 5gnr Aug 16 08:27:19 ModemManager[456]: [modem0] reject cause: (null) Aug 16 08:27:19 ModemManager[456]: [modem0] mcc: 262 Aug 16 08:27:19 ModemManager[456]: [modem0] mnc: 1 Aug 16 08:27:19 ModemManager[456]: [modem0] closed subscriber group: 27 Aug 16 08:27:19 ModemManager[456]: [modem0] 3GPP registration state changed (unknown -> idle) Aug 16 08:27:19 ModemManager[456]: [modem0] simple connect started... Aug 16 08:27:19 ModemManager[456]: [modem0] simple connect state (6/10): register Aug 16 08:27:20 ModemManager[456]: [modem0] 3GPP registration state changed (idle -> unknown) Aug 16 08:27:21 ModemManager[456]: [modem0] 3GPP registration state changed (unknown -> registering) Aug 16 08:27:21 ModemManager[456]: [modem0] 3GPP registration state changed (registering -> roaming) Aug 16 08:27:21 ModemManager[456]: [modem0] state changed (enabled -> registered) Aug 16 08:27:22 ModemManager[456]: [modem0] 3GPP registration state changed (roaming -> registering) Aug 16 08:27:22 ModemManager[456]: [modem0] 3GPP registration state changed (registering -> roaming) Aug 16 08:27:22 ModemManager[456]: [modem0] simple connect state (7/10): wait to get packet service state attached Aug 16 08:27:22 ModemManager[456]: [modem0] simple connect state (8/10): bearer Aug 16 08:27:22 ModemManager[456]: [modem0] simple connect state (9/10): connect Aug 16 08:27:22 ModemManager[456]: [modem0] state changed (registered -> connecting) Aug 16 08:27:23 ModemManager[456]: [modem0/bearer3] QMI IPv4 Settings: Aug 16 08:27:23 ModemManager[456]: [modem0/bearer3] address: 100.76.105.26/30 Aug 16 08:27:23 ModemManager[456]: [modem0/bearer3] gateway: 100.76.105.25 Aug 16 08:27:23 ModemManager[456]: [modem0/bearer3] DNS #1: 8.8.8.8 Aug 16 08:27:23 ModemManager[456]: [modem0/bearer3] DNS #2: 8.8.4.4 Aug 16 08:27:23 ModemManager[456]: [modem0/bearer3]MTU: 1500 Aug 16 08:27:23 ModemManager[456]: mm_utils_bin2hexstr: assertion 'bin != NULL' failed Aug 16 08:27:23 ModemManager[456]: [modem0/bearer3] reloading stats is supported by the device Aug 16 08:27:23 ModemManager[456]: [modem0] state changed (connecting -> connected) Aug 16 08:27:23 ModemManager[456]: [modem0] simple connect state (10/10): all done It seems like the connection process takes a long time during the errors "couldn't reload extended signal information: No way to load extended signal information". Any idea or recommendation, how I can fix it? Best regards, Dominik Dominik Nille Technology Innovation Management [http://assets.balluff.com/JPG_original_size/E-Mail-Footer_Ve
SIM PIN unlock timeout
Good afternoon, I am currently trying to unlock my Quectel RM520N-GL on Linux Debian with the ModemManager (Version 1.20.4). mmcli -i any --pin= >> error: couldn't send PIN code to the SIM: 'Timeout was reached' Runs into a timeout and still manages to unlock the SIM-Card. Afterwards the state changes from "locked" to "registered". For debugging, I did grep the journal: systemd[1]: Starting ModemManager.service - Modem Manager... ModemManager[4418]: ModemManager (version 1.20.4) starting in system bus... systemd[1]: Started ModemManager.service - Modem Manager. ModemManager[4418]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/3080.bus/30be.ethernet': not supported by any plugin ModemManager[4418]: [base-manager] couldn't check support for device '/sys/devices/platform/soc@0/3380.pcie/pci:00/:00:00.0/:01:00.0': not supported by any pl> ModemManager[4418]: [device /sys/devices/platform/soc@0/32c0.bus/32e5.usb/ci_hdrc.1/usb2/2-1/2-1.2<mailto:/sys/devices/platform/soc@0/32c0.bus/32e5.usb/ci_hdrc.1/usb2/2-1/2-1.2>] creating modem with plugin 'quectel' and '6' ports ModemManager[4418]: [plugin/quectel] could not grab port ttyUSB2: Cannot add port 'tty/ttyUSB2', unhandled port type ModemManager[4418]: [plugin/quectel] could not grab port ttyUSB1: Cannot add port 'tty/ttyUSB1', unhandled port type ModemManager[4418]: [plugin/quectel] could not grab port ttyUSB0: Cannot add port 'tty/ttyUSB0', unhandled port type ModemManager[4418]: [base-manager] modem for device '/sys/devices/platform/soc@0/32c0.bus/32e5.usb/ci_hdrc.1/usb2/2-1/2-1.2' successfully created ModemManager[4418]: [modem0] state changed (unknown -> locked) ModemManager[4418]: [modem0/sim0] couldn't load IMSI: Couldn't read data from UIM: QMI protocol error (82): 'AccessDenied' ModemManager[4418]: [modem0/sim0] couldn't load operator identifier: Couldn't get home network: QMI protocol error (37): 'UimUninitialized' ModemManager[4418]: [modem0/sim0] couldn't load operator name: Couldn't get home network: QMI protocol error (37): 'UimUninitialized' ModemManager[4418]: [modem0/sim0] couldn't load list of emergency numbers: Failed to parse CRSM query result '+CRSM: 148,8,""' ModemManager[4418]: [modem0/sim0] couldn't load list of preferred networks: Couldn't get preferred networks: QMI protocol error (37): 'UimUninitialized' ModemManager[4418]: [modem0/sim0] couldn't load GID1: Couldn't read data from UIM: QMI protocol error (82): 'AccessDenied' ModemManager[4418]: [modem0/sim0] couldn't load GID2: Couldn't read data from UIM: QMI protocol error (82): 'AccessDenied' ModemManager[4418]: [modem0] couldn't load list of own numbers: Couldn't get MSISDN: QMI protocol error (37): 'UimUninitialized' ModemManager[4418]: [modem0] error initializing: Modem is currently locked, cannot fully initialize ModemManager[4418]: [modem0] SIM imsi has changed: -> *** ModemManager[4418]: [device /sys/devices/platform/soc@0/32c0.bus/32e5.usb/ci_hdrc.1/usb2/2-1/2-1.2<mailto:/sys/devices/platform/soc@0/32c0.bus/32e5.usb/ci_hdrc.1/usb2/2-1/2-1.2>] creating modem with plugin 'quectel' and '6' ports ModemManager[4418]: [plugin/quectel] could not grab port ttyUSB2: Cannot add port 'tty/ttyUSB2', unhandled port type ModemManager[4418]: [plugin/quectel] could not grab port ttyUSB1: Cannot add port 'tty/ttyUSB1', unhandled port type ModemManager[4418]: [plugin/quectel] could not grab port ttyUSB0: Cannot add port 'tty/ttyUSB0', unhandled port type ModemManager[4418]: [modem1/sim1] couldn't load list of emergency numbers: Failed to parse CRSM query result '+CRSM: 148,8,""' ModemManager[4418]: [modem1] couldn't load supported assistance data types: Failed to receive indication with the predicted orbits data source ModemManager[4418]: [modem1] state changed (unknown -> disabled) ModemManager[4418]: [modem1] state changed (disabled -> enabling) ModemManager[4418]: [modem1] power state updated: on ModemManager[4418]: [modem1] state changed (enabling -> enabled) ModemManager[4418]: [modem1] 3GPP registration state changed (unknown -> registering) ModemManager[4418]: [modem1] 3GPP registration state changed (registering -> home) ModemManager[4418]: [modem1] state changed (enabled -> registered) ModemManager[4418]: [modem0] couldn't load unlock retries: Couldn't peek QMI port I did also follow the serial communication on /dev/ttyUSB2 Port: +CPIN: READY +Q
AW: SIM PIN unlock timeout
Hey Aleksander, hey Dan, I ran the ModemManager with debug logs and produced the same behavior as in the previous mail again. Maybe, you can gain some knowledge from the debug log I attached. Any ideas, why the command keeps failing, but after waiting a little the state changes from “locked” to “registered”? BR Dominik Von: Aleksander Morgado Gesendet: Mittwoch, 11. Dezember 2024 09:46 An: Dominik Nille Cc: modemmanager-devel@lists.freedesktop.org Betreff: Re: SIM PIN unlock timeout Hey Dominik, I am currently trying to unlock my Quectel RM520N-GL on Linux Debian with the ModemManager (Version 1.20.4). mmcli -i any --pin= >> error: couldn't send PIN code to the SIM: 'Timeout was reached' Runs into a timeout and still manages to unlock the SIM-Card. Afterwards the state changes from “locked” to “registered”. Please run MM with debug logs (use "mmcli -G DEBUG" or follow https://modemmanager.org/docs/modemmanager/debugging/), as that will give us much more information about the specific sequence in place here. -- Aleksander Dominik Nille Technology Innovation Management [http://assets.balluff.com/JPG_original_size/E-Mail-Footer_Vertrieb_Logo.jpg] Balluff GmbH · Schurwaldstrasse 9 · 73765 Neuhausen a.d.F. · Germany Phone +497158173-8020 · Fax +4971585010 · dominik.ni...@balluff.de<mailto:dominik.ni...@balluff.de> · www.balluff.com<https://www.balluff.com> [Facebook]<https://de-de.facebook.com/balluff.gmbh> [LinkedIn] <https://www.linkedin.com/company/balluff-gmbh-germany> [Twitter] <https://twitter.com/balluff?lang=de> [Youtube] <https://www.youtube.com/user/BalluffSensors> [Xing] <https://www.xing.com/companies/balluffgmbh> [Blog] <https://www.innovating-automation.blog/?lang=de> Place of incorporation/Sitz der Gesellschaft: Neuhausen a.d.F., Germany · Register court/Registergericht: Amtsgericht Stuttgart, Germany Trade register/Handelsregister: HRB 214038 · Managing directors/Geschäftsführer: Katrin Stegmaier-Hermle, Florian Hermle, Frank Nonnenmann Chairman board of directors/Vorsitzender des Aufsichtsrats: Michael Unger · VAT ID/USt-ID: DE213 402 337 [http://assets.balluff.com/JPG_original_size/E-Mail-Footer_Vertrieb_Claim.jpg] ModemManager[4639]: [1737381534.102008] [modem1] state changed (disabled -> enabling) ModemManager[4639]: [1737381534.102609] [modem1] skipping initialization: not required ModemManager[4639]: [1737381534.102727] [ttyUSB2/at] device open count is 2 (open) ModemManager[4639]: [1737381534.102765] [ttyUSB3/at] opening serial port... ModemManager[4639]: [1737381534.103954] [ttyUSB3/at] setting up baudrate: 57600 ModemManager[4639]: [1737381534.104063] [ttyUSB3/at] no flow control explicitly requested for device ModemManager[4639]: [1737381534.104106] [ttyUSB3/at] port attributes not fully set ModemManager[4639]: [1737381534.104181] [ttyUSB3/at] device open count is 1 (open) ModemManager[4639]: [1737381534.104204] [ttyUSB3/at] running init sequence... ModemManager[4639]: [1737381534.104258] [modem1] flashing primary AT port before enabling... ModemManager[4639]: [1737381534.104365] [ttyUSB3/at] --> 'ATE0' ModemManager[4639]: [1737381534.104450] [modem1] need to check whether autoconnect is disabled or not... ModemManager[4639]: [1737381534.104542] [/dev/cdc-wdm0] sent message... ModemManager[4639]: [1737381534.104591] [/dev/cdc-wdm0] sent generic request (translated)... ModemManager[4639]: [1737381534.108728] [ttyUSB3/at] <-- '+CPIN: READY+QUSIM: 1+QIND: SMS DONE' ModemManager[4639]: [1737381534.109129] [modem1] (quectel) checking SIM swap ModemManager[4639]: [1737381534.109191] [modem1] checking if SIM was swapped... ModemManager[4639]: [1737381534.109267] [modem1/sim1] loading SIM identifier... ModemManager[4639]: [1737381534.109412] [/dev/cdc-wdm0] sent message... ModemManager[4639]: [1737381534.109523] [/dev/cdc-wdm0] sent generic request (translated)... ModemManager[4639]: [1737381534.111661] [ttyUSB3/at] <-- '+QIND: PB DONE' ModemManager[4639]: [1737381534.112255] [ttyUSB3/at] <-- 'OK' ModemManager[4639]: [1737381534.121070] [/dev/cdc-wdm0] received message... ModemManager[4639]: [1737381534.121203] [/dev/cdc-wdm0] received generic response (translated)... ModemManager[4639]: [1737381534.121376] [modem1] autoconnect is already disabled ModemManager[4639]: [1737381534.121496] [modem1] getting device operating mode... ModemManager[4639]: [1737381534.121599] [/dev/cdc-wdm0] sent message... ModemManager[4639]: [1737381534.121661] [/dev/cdc-wdm0] sent generic request (translated)... ModemManager[4639]: [1737381534.153318] [/dev/cdc-wdm0] received message... ModemManager[4639]: [1737381534.153504] [/dev/cdc-wdm0] received generic response (translated)... ModemManager[4639]: [1737381534.153761] [modem1] SIM identifier has not changed ModemM
AW: SIM PIN unlock timeout
Hey, I tested the MR 1318 with two different modems. The Quectel RM520-GL and the Quectel RM500Q-GL. For both of them, the SIM PIN unlock was executed perfectly without any errors! Thank you very much! BR, Dominik -Ursprüngliche Nachricht- Von: Dan Williams Gesendet: Sonntag, 23. März 2025 20:04 An: Robert Marko Cc: Dominik Nille ; Aleksander Morgado ; modemmanager-devel@lists.freedesktop.org Betreff: Re: SIM PIN unlock timeout On Sun, 2025-03-23 at 18:44 +0100, Robert Marko wrote: > On Sat, Mar 22, 2025 at 1:23 AM Dan Williams > wrote: > > > > On Sat, 2025-03-08 at 10:19 -0600, Dan Williams wrote: > > > Hey, > > > > > > > On Mar 3, 2025, at 2:44 AM, Dominik Nille > > > > wrote: > > > > > > > > Hey, > > > > > > > > the modem is directly connected to the power supply of the > > > > device. > > > > I logged in on the device after startup, stopped MM and started > > > > it in debug mode. > > > > > > > > I ran the startup phase in the modemmanager_debug.log. > > > > > > > > I ran the startup phase and additionally tried to unlock with > > > > the command "mmcli -I any --pin=" in the > > > > modemmanager_debug_simpin.log > > > > > > > > Are you able to figure out the problem? > > > > > > Working on it… I see from your logs it may be connected to an > > > issue MM currently has with PIN entry that causes it to clean up, > > > dispose, and then re-detect the modem because it sees the PIN > > > entry as a SIM hot-swap. I have a modem somewhere that can > > > reproduce the problem, but couldn’t find it the other day. > > > > > > It may be the case that mmcli handles this badly and waits for the > > > operation to complete on the original modem, when MM has already > > > destroyed that one and redetected it as a new device. > > > > > > I’ll try again with a couple other devices. > > > > > > In the mean time, would you be willing to re-do your logging with > > > the “—pin=” bit, but run MM with the —debug-personal-info > > > option (I forget what it's named exactly right now), and send me > > > the debug log _privately_? That will show what the IMSI and ICCID > > > are before the unlock, and what MM thinks they are after, and that > > > could help establish the scenario. Again, send privately if you > > > are willing to do this. > > > > I think in your case, the combination of the Quectel plugin + QMI is > > necessary for the problem to occur. For reasons I don't understand > > the Quectel plugin uses AT-based SIM swap notifications with > > QMI-based devices rather than the generic QMI methods. > > > > What happens is that after the PIN has been verified the modem sends > > the QUSIM URC indicating that the USIM is now available and active. > > The > > Quectel plugin uses that for hot-swap detection and interrupts the > > normal QMI flow for PIN entry. That causes the SIM swap detection to > > run a bit too early, before the QMI code has been able to re-read > > the IMSI. > > > > In any case, I've attached a patch that (hopefully?) solves the > > problem by treating the PIN unlock case specially. Would you be able > > to try the patch out? > > Hi Dan, > If this is the same as PR #1318 then I can confirm that it fixes the > cancellation for me on Quectel RM520N after entering the PIN. The patch had an error which I fixed in the MR. Thanks for testing! Dominik, would you be able to test out the changes in MR 1318? Ignore the patch. Dan > > Regards, > Robert > > > > (note; only the mm-broadband-modem.c bit is relevant for your modem > > but I wanted to do the code for both paths anyways) > > > > Thanks, > > Dan > > > > > > > > > > Thanks, > > > Dan > > > > > > > > > > > Thank you very much! > > > > > > > > BR > > > > Dominik > > > > > > > > -Ursprüngliche Nachricht- > > > > Von: Dan Williams > > > > Gesendet: Donnerstag, 27. Februar 2025 16:25 > > > > An: Dominik Nille ; Aleksander Morgado > > > > > > > > Cc: modemmanager-devel@lists.freedesktop.org > > > > Betreff: Re: AW: AW: SIM PIN unlock timeout > > > > > > > > On Wed, 2025-02-26 at 10:19 +, Dominik Nille wrote: > > > > > Hey, > > >
AW: AW: SIM PIN unlock timeout
Hey, thank you very much for your reply. I was not expecting that type of behavior. I did only connect one modem, so I was expecting the "any" keyword to work. I am wondering why ModemManager lists two different Modems. I tried it again and "mmcli -m any" lists the modem as modem0 and SIM0 before sending the command. When I send the command "mmcli -i any --pin=", the timeout will be reached. Afterwards, the same modem will be listed as Modem1 with Sim1. Result of "lsusb": Bus 002 Device 003: ID 2c7c:0801 Quectel Wireless Solutions Co., Ltd. RM520N-GL Result of "mmcli --list-modems" /org/freedesktop/ModemManager1/Modem/1 [Quectel] RM520N-GL "mmcli -m any" lists also only one modem. These outputs do not match the information of a second modem being connected. Are you able to explain the behavior? Thank you very much! Best regards, Dominik -Ursprüngliche Nachricht- Von: Dan Williams Gesendet: Mittwoch, 19. Februar 2025 19:36 An: Dominik Nille ; Aleksander Morgado Cc: modemmanager-devel@lists.freedesktop.org Betreff: Re: AW: SIM PIN unlock timeout [Sie erhalten nicht häufig E-Mails von d...@ioncontrol.co. Weitere Informationen, warum dies wichtig ist, finden Sie unter https://aka.ms/LearnAboutSenderIdentification ] On Mon, 2025-01-20 at 14:34 +, Dominik Nille wrote: > > > > Hey Aleksander, hey Dan, > > I ran the ModemManager with debug logs and produced the same behavior > as in the previous mail again. > > Maybe, you can gain some knowledge from the debug log I attached. > > Any ideas, why the command keeps failing, but after waiting a little > the state changes from “locked” to “registered”? Looks like you've got two modems on the system, and the other one (modem0) isn't happy: ModemManager[4639]: [1737381559.914951] [modem0] couldn't check if unlock required: Couldn't peek QMI port ModemManager[4639]: [1737381559.915068] [modem0] retrying (22) unlock required check so what happens is that modem1 gets unlocked just fine, but because you sent "-i any" MM will try to unlock both modems, and the other one times out. We could debug why modem0 isn't happy, or alternatively you could send the PIN to modem1's SIM and it shouldn't take long. Dan > > BR > Dominik > > > > Von: Aleksander Morgado > Gesendet: Mittwoch, 11. Dezember 2024 09:46 > An: Dominik Nille > Cc: modemmanager-devel@lists.freedesktop.org > Betreff: Re: SIM PIN unlock timeout > > > > > > Hey Dominik, > > > > > > > > > > > > > > > > > > > I am currently trying to unlock myQuectel RM520N-GL on Linux Debian > > with the ModemManager (Version1.20.4). > > > > mmcli -i any --pin= > > > > error: couldn't send PIN code to the SIM: 'Timeout was reached' > > > > Runs into atimeout and still manages to unlock the SIM-Card. > > Afterwards the state changes from “locked” to “registered”. > > > > > > > > > Please run MM with debug logs (use "mmcli -G DEBUG" or > followhttps://modemmanager.org/docs/modemmanager/debugging/), as that > will give us much more information about the specific sequence in > place here. > > > > -- > > > > > > > Aleksander > > > Dominik Nille > Technology > Innovation Management > > > > > Balluff GmbH · Schurwaldstrasse 9 · 73765 Neuhausen a.d.F. · Germany > Phone +497158173-8020 · Fax +4971585010 · dominik.ni...@balluff.de · > www.balluff.com > > Facebook > LinkedIn > Twitter > Youtube > Xing > Blog > > > Place of incorporation/Sitz der Gesellschaft: Neuhausen a.d.F., > Germany · Register court/Registergericht: Amtsgericht Stuttgart, > Germany Trade register/Handelsregister: HRB 214038 · Managing > directors/Geschäftsführer: Katrin Stegmaier-Hermle, Florian Hermle, > Frank Nonnenmann Chairman board of directors/Vorsitzender des > Aufsichtsrats: Michael Unger · VAT ID/USt-ID: DE213 402 337 > > >