From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v2 2/3] network-registration.c: implement CIND forTelit UC864-G
Date: Tue, 24 May 2011 02:18:45 -0500 [thread overview]
Message-ID: <4DDB5BD5.7010303@gmail.com> (raw)
In-Reply-To: <1306350484.2681.38.camel@aeonflux>
[-- Attachment #1: Type: text/plain, Size: 2405 bytes --]
Hi Marcel,
On 05/25/2011 02:08 PM, Marcel Holtmann wrote:
> Hi Bernhard,
>
>> *UC864 has an incompatible CIND
>> *add a Telit specific check for "not measurable" strength
>>
>> Co-authored-by: Christopher Vogl <Christopher.Vogl@hale.at>
>> ---
>> drivers/atmodem/network-registration.c | 40 +++++++++++++++++++++++++++++--
>> 1 files changed, 37 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
>> index b3aa511..984e85e 100644
>> --- a/drivers/atmodem/network-registration.c
>> +++ b/drivers/atmodem/network-registration.c
>> @@ -666,7 +666,20 @@ static void ciev_notify(GAtResult *result, gpointer user_data)
>> if (!g_at_result_iter_next_number(&iter, &strength))
>> return;
>>
>> - strength = (strength * 100) / (nd->signal_max - nd->signal_min);
>> + switch (nd->vendor) {
>> + case OFONO_VENDOR_TELIT:
>> + /* Check for "signal not measurable" */
>> + if (strength == 99)
>> + strength = 0;
>> + else
>> + strength = (strength * 100) / (nd->signal_max -
>> + nd->signal_min);
>> + break;
>> + default:
>> + strength = (strength * 100) / (nd->signal_max - nd->signal_min);
>> + break;
>> + }
>> +
>
> this is something that does not look like vendor quirk. The 99 is always
> a special value and we should just do this for all modems.
>
> Denis, any thoughts?
>
99 is used by +CSQ and certain vendor extensions to CSQ to denote an
unmeasurable / unknown RSSI value. This is already handled by
at_util_convert_signal_strength.
Some modems / protocols (e.g. mbm, hfp) use CIND style indicators for
signal strength instead, however the indicator values are contiguous
(e.g. 0-5) and oFono's logic assumes this behavior.
It seems that the Telit modem uses a contiguous range (0-5) and the
special value 99 to denote unmeasurable value. The Telit modem is the
first one I have seen that uses this behavior. From that standpoint I
really have no preference here, but it seems that generalizing the logic
to handle 99 should be easy enough.
However, I really don't like this patch hardcoding the signal
index/min/max inside at_creg_set_cb. Telit is a nicely compliant modem,
we should be able to trust what it reports.
Bernhard, a question for you: what does the UC864-G return when issuing:
'AT+CIND=?'
Regards,
-Denis
next prev parent reply other threads:[~2011-05-24 7:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 13:14 [PATCH v2 1/3] Add basic Telit UC864-G support: Bernhard.Guillon
2011-05-25 13:14 ` [PATCH v2 2/3] network-registration.c: implement CIND forTelit UC864-G Bernhard.Guillon
2011-05-25 19:08 ` Marcel Holtmann
2011-05-24 7:18 ` Denis Kenzior [this message]
2011-06-07 12:01 ` [PATCH v2 2/3] network-registration.c: implement CIND forTelitUC864-G Bernhard Guillon
2011-06-07 12:04 ` [PATCH] network-registration.c: enhance CIND=? support Bernhard.Guillon
2011-06-06 5:24 ` Denis Kenzior
2011-06-07 12:12 ` Bernhard Guillon
2011-05-25 13:14 ` [PATCH v2 3/3] udev: add Telit UC864-G and update udev rules Bernhard.Guillon
2011-05-25 19:10 ` Marcel Holtmann
2011-05-25 19:04 ` [PATCH v2 1/3] Add basic Telit UC864-G support: Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DDB5BD5.7010303@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox