Correct connection sequence to maximize chances of e.g.: getting connected :)

Enrico Mioso mrkiko.rs at gmail.com
Tue Apr 21 06:57:31 UTC 2020


Hello all!!


So, I was following this ML lately, to notice I am not the only one having the issue of modem not being able to establish a connection sometimes, with errors like "Call failed".
I seen that error many times. I will for sure need to dig deeper into this, but my question was more generic, like:
what's the proper sequence one has to follow to maximize chances of "resetting" the modemstate so that it can get connected with a given configuration?
My following flow of actions looks as follows: (-> = modem transitions from "lower" to "higher" state, >- = modem transitions from "higher" to "lower" state, - = action being taken, * = initial state)
* the modem is in "locked" state:
 	 - try to unlock it
-> modem is in disabled state
 	- if software isn't exiting, then:
 		 - delete all of the bearers pertaining to this modem
 		 - enable modem
-> modem enabled
 	- here one may wait for the modem to get registered, as it happens normally; however, sometimes, explicitly asking the modem to register seems to be needed
 	- if no bearers exist at this time, then create all configured bearers, and start a periodic checker that connects created bearers
>- modem enabled
 	- here one may wait for the modem to get registered, as it happens normally; however, sometimes, explicitly asking the modem to register seems to be needed
-> modem connected
 	- we are happy

I added the bearer checker because I found no way to be able to unref objects in cases where the modem may be removed in some cases.

What I can observe is that, even for the same model of modem module, in some cases all goes as expected and connection comes up in the first attempt, or in one of the first 2 / 3 attempts.
In some other cases, I get a storm of "CallFailed" errors, and simply can't bring up the connection unless:
a - i reset the modem via mmcli
b - just wait

We went as far as getting QMI message timeouts in some cases, but that's another problem.
What's the best strategy to connect a modem as per user configuration when we "get" one visible in ModemManager?
My phone is able to do this all of the time, judging from it's speed, so why can't we? :)


More information about the ModemManager-devel mailing list