All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
To: ofono@ofono.org
Subject: Re: Bug/Oversight in gatchat/gatresult.c with negative numbers
Date: Tue, 03 Aug 2021 10:48:48 +0100	[thread overview]
Message-ID: <e74bf986-cc91-287b-9c6b-83d7804333a7@dynamicdevices.co.uk> (raw)
In-Reply-To: <a581d123-5632-ec7f-208e-e7ef7a96a00b@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1698 bytes --]


On 27/07/2021 15:38, Denis Kenzior wrote:
> Hi Alex,
>
> On 7/20/21 11:11 AM, Alex J Lennon wrote:
>> Hi all,
>>
>> I'm doing a bit of work with Ofono again, extending support for a 
>> Quectel EG91 - handling additional cell strength information which 
>> seems necessary for LTE.
>>
>> I'm using Quectel's AT+QCOPS which is returning some negative signal 
>> strengths and after some investigation I've spotted that 
>> gatresult::g_at_result_iter_next_number() doesn't handle negative 
>> numbers.
>
> AT commands do not have a concept of negative numbers.  v.250 Section 
> 5.3.1:
> <number> may be a string of one or more characters from "0" through 
> "9" representing a decimal
> integer value. Commands that expect a <number> are noted in the 
> description of the command (see
> clause 6).
>
> I don't recall any other vendor using negative values in AT commands.
>
> If you want to add a negative number parser to GAtChat, then please 
> make it a separate method, so that it is very clear that a vendor 
> 'extension' is being worked around.
>
> Regards,
> -Denis

Hi Denis,

I have been chasing this up with Quectel and they tell me this the 
correct implementation.

"QCOPS and QENG command show the RSSI、RSRP and SINR value of the 
network, this is in accordance with the 3GPP TS regulations, so it is 
normal for negative numbers to be displayed.image"

This is quite interesting as aside from the parsing, Ofono seems to rely 
on negative numbers being errors (e.g. src/netmon.c)

What are your thoughts? This being correct, one would have thought other 
modem manufacturers would report in the same manner.

Cheers,

Alex



[-- Attachment #2: attachment.htm --]
[-- Type: text/html, Size: 2522 bytes --]

[-- Attachment #3: dhlplbcpkdpfjdoo.png --]
[-- Type: image/png, Size: 25653 bytes --]

  parent reply	other threads:[~2021-08-03  9:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 16:11 Bug/Oversight in gatchat/gatresult.c with negative numbers Alex J Lennon
2021-07-27 14:38 ` Denis Kenzior
2021-07-27 15:02   ` Alex J Lennon
2021-08-03  9:48   ` Alex J Lennon [this message]
2021-08-03 14:28     ` Denis Kenzior
2021-08-03 14:45       ` Alex J Lennon
2021-08-06  9:31       ` Alex J Lennon
2021-08-06 14:06       ` Alex J Lennon
2021-08-06 14:20         ` Denis Kenzior
2021-08-06 14:28           ` Alex J Lennon
2021-08-06 14:44             ` Denis Kenzior
2021-08-06 14:49               ` Alex J Lennon
2021-08-06 15:02                 ` Denis Kenzior
2021-08-09  6:40                   ` Martin =?unknown-8bit?q?Hundeb=C3=B8ll?=

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=e74bf986-cc91-287b-9c6b-83d7804333a7@dynamicdevices.co.uk \
    --to=ajlennon@dynamicdevices.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.