Cinterion plugin - unsupported ^SIND="simstatus"
Colin Helliwell
colin.helliwell at ln-systems.com
Sat Dec 30 15:30:16 UTC 2017
> On 30 December 2017 at 15:07 Colin Helliwell wrote:
>
>
> The Cinterion plugin tries 'AT^SIND="simstatus",2' in after_sim_unlock(). I have two Cinterion modems, neither of which - according to their AT Command Set spec - support the simstatus indicator on this command, and so instead return "+CME ERROR: 21" (invalid index).
> Nonetheless, the operation continues with all 15 of its retries. Should there perhaps be a 'if (!response)' trap in simstatus_check_ready() so that it bombs out?
> I ask for comment, since I'm not sure (a) exactly what the retries are waiting for; and, in particular (b) what the response would be while its waiting. (I don't have a modem which does support the indicator).
>
I imagine not even getting a good response can be treated as unsupported, let alone needing to parse it for ^SIND content . Hence
plugins/cinterion/mm-broadband-modem-cinterion.c | 99 ++++++++++++++++++++----
1 file changed, 6 insertions(+), 1 deletions(-)
diff --git a/plugins/cinterion/mm-broadband-modem-cinterion.c b/plugins/cinterion/mm-broadband-modem-cinterion.c
index 64c5e08..1034d5c 100644
--- a/plugins/cinterion/mm-broadband-modem-cinterion.c
+++ b/plugins/cinterion/mm-broadband-modem-cinterion.c
@@ -1590,7 +1629,12 @@ simstatus_check_ready (MMBaseModem *self,
const gchar *response;
response = mm_base_modem_at_command_finish (self, res, NULL);
- if (response) {
+ if (!response) {
+ /* "simstatus" not supported, go on anyway */
+ g_task_return_boolean (task, TRUE);
+ g_object_unref (task);
+ return;
+ } else {
gchar *descr = NULL;
guint val = 0;
More information about the ModemManager-devel
mailing list