diff options
author | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2019-06-12 17:23:03 +0300 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2019-06-12 17:31:15 +0300 |
commit | acb40ca0033a48cedfeb118dcc216f60e4dd8c45 (patch) | |
tree | fd63a2dbcde588f076ae6049aa3827e30ff5e6b7 /src/MTS_IO_QuectelRadio.cpp | |
parent | d388f51c9611d0f5009abf105aba44c85fcee4b0 (diff) | |
download | libmts-io-acb40ca0033a48cedfeb118dcc216f60e4dd8c45.tar.gz libmts-io-acb40ca0033a48cedfeb118dcc216f60e4dd8c45.tar.bz2 libmts-io-acb40ca0033a48cedfeb118dcc216f60e4dd8c45.zip |
[MTS-MTQ] QuectelRadio implementation
Fixed parsing of RSSI dBm in QuectelRadio::getNetworkStatus for GSM mode.
As stated in the datasheet[1], we should substract "111" from the value
in <rxlev> field in order to get a proper value in dBm.
The thing is that the values returned by a real device are already
out of the "0-63" range stated in a datasheet. And looks like those
values are already in a dBm scale. [2]
This commit removes additional substraction and saves the value of <rxlev> field
directly without any modifications.
Sources:
- [1] QuectelEC2x26EG9x26EM05QuecCellATCommandsManualV10.929966385.pdf, page 9, <rxlev> field description.
- [2] +QENG: "servingcell","NOCONN","GSM",REDACTED,REDACTED,REFACTED,REDACTED,8,522,0,-66,255,255,0,41,41,1,-,-,-,-,-,-,-,-,-,""
Diffstat (limited to 'src/MTS_IO_QuectelRadio.cpp')
-rw-r--r-- | src/MTS_IO_QuectelRadio.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/MTS_IO_QuectelRadio.cpp b/src/MTS_IO_QuectelRadio.cpp index 20a2a21..af7fc7c 100644 --- a/src/MTS_IO_QuectelRadio.cpp +++ b/src/MTS_IO_QuectelRadio.cpp @@ -273,13 +273,7 @@ CellularRadio::CODE QuectelRadio::getNetworkStatus(Json::Value& jData) { jData[KEY_ABND] = sValue; } - if (MTS::Text::parse(iValue, vParts[10])) { - // Number format. RX level value for base station selection in dB (see 3GPP 25.304). - // Range: 0-63. Subtracting 111 from the RX level value, a dBm value will be got. - int rssi = iValue - 111; - jData[KEY_RSSIDBM] = MTS::Text::format(rssi); - } - + jData[KEY_RSSIDBM] = vParts[10]; // Values already negative. No need to substract 111 as stated in a datasheet jData[KEY_TXPWR] = vParts[11]; jQuectelDebug["rla"] = vParts[12]; jQuectelDebug["drx"] = vParts[13]; |