GNOME Bugzilla – Bug 636040
Query signal strength with +CIND if modem does not support +CSQ
Last modified: 2012-10-05 12:34:29 UTC
Some 3G modem devices only support AT+CIND to report signal strength, for example the Teracom (Linktop LW273) devices distributed by BSNL in India, only reports signal strength of UMTS network via AT+CIND command. It will be great if ModemManager add support for CIND by default and fallback to CSQ if CIND is not supported. This is already the behavior of OFONO. See the original bug report here (https://bugs.launchpad.net/modemmanager/+bug/682282).
Created attachment 175450 [details] modem-manager --debug The +CIND support which has been added in revision dc95f531adc38166cb4ec0ec08e40527dd04385a doesn't work with my device. Here I am attaching the modem-manager debug log (tested with rev 1df1ff38b0ad93d80647895115251033ffc38e65).
Created attachment 175452 [details] minicom.log When the device connects to UMTS network (3G mode) the +CSQ always returns +CSQ: 99, 99 but +CIND works fine. Here is the output of minicom session where I tried few AT commands manually. You can see in the log that when I switch to 3G mode with AT+CFUN=6 then +CSQ always returns +CSQ: 99, 99 while +CIND works perfect.
Ok, lets try: ea0797cbec7cae4d93807e8ac3a796650ff209a9 which will prefer +CIND when the modem supports it. Let me know!
Created attachment 175606 [details] modem-manager --debug I have just tested the latest revision and it's now working perfect. Here I am attaching the debug log. Thanks for the quick fix!
Created attachment 175826 [details] [review] fixes cind tests This fixes various CIND related tests
Hi Dan, I have few questions regarding this improvements. Why do you use 1-based indexes in `mm_parse_cind_query_response`? This breaks the modem-helper tests. I tried with 0-based indexes then everything works perfect. Another issue, my device (LW273) doesn't work perfect with CIEV events when using CIND. However, the issue is random. What happens is, when device get connected , the ciev callback is not called anymore but when I disconnect the device I see a long CIEV output like this: ** (modem-manager:21714): DEBUG: <1291471991.490274> (ttyACM1): <-- '<CR><LF>+CIEV: 2,1<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF><CR><LF>+CIEV: 2,2<CR><LF>' So I disabled CIEV feature and tried with CIND only then it was working perfect without any random issue.
I confirm that there is something wrong with unsolicited message handlers. If I disable CIEV messages with +CMER=0 then CIND is working perfect. However, +CIND and +CIEV both works find in oFono so I think it's ModemManager issue.
Created attachment 175843 [details] [review] 0-based index BTW, here is another patch to fix the +CIND, +CIEV index issue.
The indexes are 1-based because the modem's CIEV response uses 1-based indexes. I figured it would be easier that way, hopefully it's not the cause of a bug. I tested the CIEV/CIND/CMER handling with two different devices that support this reporting (Ericsson MBM and a Sierra device) and it seemed to work well there. Do these patches actually fix the issue for you, or is there still a problem?
No it doesn't but just fixes the unit test where 0-based index is used.
It seems that you have fixed the +CIND test keeping 1-based indices. It resolved the issue.
Seems like the fix for this bug is creating problems for LTE modems, where +CSQ works, but +CIND not: https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/1060831
(In reply to comment #12) > Seems like the fix for this bug is creating problems for LTE modems, where +CSQ > works, but +CIND not: > > https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/1060831 Possible 0.6 hack: if CIND reports 0 strength, try CSQ too?
(In reply to comment #13) > (In reply to comment #12) > > Seems like the fix for this bug is creating problems for LTE modems, where +CSQ > > works, but +CIND not: > > > > https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/1060831 > > Possible 0.6 hack: if CIND reports 0 strength, try CSQ too? Marius, can you try current MM_06 head?
The hack seems to work fine, thanks. Note to downstream: required commits (MM_06): From 1dee45e011cc8c0627597aa75110500983aae486 Mon Sep 17 00:00:00 2001 From: Dan Williams <dcbw@redhat.com> Date: Thu, 04 Oct 2012 14:20:46 +0000 Subject: trivial: move CIND processing function down a bit Makes the next change clearer. From 8bd6903c30e52e65a4afbebf85ba59e6c0fada71 Mon Sep 17 00:00:00 2001 From: Dan Williams <dcbw@redhat.com> Date: Thu, 04 Oct 2012 14:34:01 +0000 Subject: gsm: fall back to +CSQ if +CIND reports no signal (bgo #636040) Some devices say they support +CIND signal reporting, but either actually don't, or they report signal for a non-current access technology that we don't care about. So if +CIND reports zero signal, fall back to +CSQ.
Just wondering; should I cherry-pick this new commit for git master? Have we seen this behaviour in non-QMI LTE modems?
Aleksander, yes please do that. I see the same problem in git master: "signal quality: '0'". Remember that some of the QMI based LTE modems can be used with AT commands as well (if qmi_wwan driver is not available, or if libqmi is unavailable?), and some can be switched between QMI and AT mode.
Done; fix is also in git master now.