diff options
author | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2022-12-16 17:04:08 +0200 |
---|---|---|
committer | Serhii Kostiuk <serhii.o.kostiuk@globallogic.com> | 2022-12-19 13:32:47 +0200 |
commit | 4b448e3c5daf34062861d0261c5a2253638b8100 (patch) | |
tree | f3ba4159fc60dc385b1019dca521dad1b9763fdd /src/MTS_IO_TelitRadio.cpp | |
parent | c04f0c7224311c2b9828e653ed4014e1ccf7a82f (diff) | |
download | libmts-io-4b448e3c5daf34062861d0261c5a2253638b8100.tar.gz libmts-io-4b448e3c5daf34062861d0261c5a2253638b8100.tar.bz2 libmts-io-4b448e3c5daf34062861d0261c5a2253638b8100.zip |
[GP-1195] Cellular debugging - add a query
Define the set of debugging AT commands and a function to execute such
commands. The function executes the commands one-by-one end returns raw command
outputs. To be used by radio-query --diagnostics.
Diffstat (limited to 'src/MTS_IO_TelitRadio.cpp')
-rw-r--r-- | src/MTS_IO_TelitRadio.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/MTS_IO_TelitRadio.cpp b/src/MTS_IO_TelitRadio.cpp index 2a07939..4a0a8b2 100644 --- a/src/MTS_IO_TelitRadio.cpp +++ b/src/MTS_IO_TelitRadio.cpp @@ -1179,3 +1179,35 @@ bool MTS::IO::TelitRadio::isContainsSignChar(const std::string& str) { return true; } + +const std::vector<std::string>& TelitRadio::getDiagCommands(bool) { + // Declare as static to initialize only when used, but cache the results. + const static std::vector<std::string> vCommands { + // Radio model and firmware: + "AT+CGMI", "AT+CGMM", "AT+CGMR", "AT#SWPKGV", "AT#CFVR", + + // Current operator profile on the radio side: + "AT#FWSWITCH?", "AT+CGSN", + + // SIM card information: + "AT#SIMDET?", "AT#CCID", "AT+CPIN?", "AT#PCT", + + // Operating mode of the radio: + "AT+CFUN?", + + // Low-level network settings: + "AT+WS46?", "AT#RXDIV", "AT#CALLDISA?", "AT+CEMODE?", + + // Data connection configuration: + "AT+CGDCONT?", "AT#PDPAUTH?", + + // Registration and connection to the tower: + "AT+CIND?", "AT+CSQ", "AT+COPS?", "AT+CREG?", "AT+CGREG?", "AT+CEREG?", + "AT#RFSTS", "AT#PSNT?", "AT#MONI", + + // Data connection status: + "AT+CGACT?", "AT+CGCONTRDP=1", "AT+CGCONTRDP=2", "AT+CGCONTRDP=3" + }; + + return vCommands; +} |