summaryrefslogtreecommitdiff
path: root/src/MTS_IO_QuectelRadio.cpp
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2022-12-16 17:04:08 +0200
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2022-12-19 13:32:47 +0200
commit4b448e3c5daf34062861d0261c5a2253638b8100 (patch)
treef3ba4159fc60dc385b1019dca521dad1b9763fdd /src/MTS_IO_QuectelRadio.cpp
parentc04f0c7224311c2b9828e653ed4014e1ccf7a82f (diff)
downloadlibmts-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_QuectelRadio.cpp')
-rw-r--r--src/MTS_IO_QuectelRadio.cpp46
1 files changed, 45 insertions, 1 deletions
diff --git a/src/MTS_IO_QuectelRadio.cpp b/src/MTS_IO_QuectelRadio.cpp
index ae6200e..3a5924c 100644
--- a/src/MTS_IO_QuectelRadio.cpp
+++ b/src/MTS_IO_QuectelRadio.cpp
@@ -1627,4 +1627,48 @@ ICellularRadio::CODE QuectelRadio::setRxDiversity(const Json::Value& jArgs) {
}
return SUCCESS;
-} \ No newline at end of file
+}
+
+const std::vector<std::string>& QuectelRadio::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+QGMR",
+
+ // Current operator profile on the radio side:
+ "AT+QMBNCFG=\"SELECT\"", "AT+CGSN",
+
+ // SIM card information:
+ "AT+QSIMSTAT?", "AT+QCCID", "AT+CPIN?", "AT+QPINC=\"SC\"",
+
+ // Operating mode of the radio:
+ "AT+CFUN?",
+
+ // Cellular Mode (RAT selection):
+ "AT+QCFG=\"nwscanseq\"", "AT+QCFG=\"nwscanmode\"",
+
+ // Cellular Diversity configuration:
+ "AT+QCFG=\"divctl\",\"lte\"", "AT+QCFG=\"divctl\",\"wcdma\"", "AT+QCFG=\"diversity\"",
+
+ // Voice call support (AT&T, T-Mobile):
+ "AT+QNVFR=\"/nv/item_files/ims/IMS_enable\"",
+ "AT+QNVFR=\"/nv/item_files/modem/mmode/sms_only\"",
+ "AT+QNVR=5280,0",
+
+ // UE Mode of Operation (CEMODE; AT&T):
+ "AT+QCFG=\"servicedomain\"",
+ "AT+QNVFR=\"/nv/item_files/modem/mmode/ue_usage_setting\"",
+
+ // Data connection configuration:
+ "AT+CGDCONT?", "AT+QICSGP=1", "AT+QICSGP=2", "AT+QICSGP=3",
+
+ // Registration and connection to the tower:
+ "AT+CIND?", "AT+CSQ", "AT+COPS?", "AT+CREG?", "AT+CGREG?", "AT+CEREG?",
+ "AT+QENG=\"servingcell\"",
+
+ // Data connection status:
+ "AT+CGACT?", "AT+CGCONTRDP=1", "AT+CGCONTRDP=2", "AT+CGCONTRDP=3"
+ };
+
+ return vCommands;
+}