From 28b673dd4db086f1957c5cdae281f54980715e36 Mon Sep 17 00:00:00 2001 From: Mykola Salomatin Date: Wed, 29 Sep 2021 16:20:21 +0300 Subject: [MTX-4206] mPower R.6.0: Making Telit and Quectel radios data-only on AT&T network. GP-1364 Add 2 functions for Telit and Quectel modems: - disableVoiceSupport: disable voice support (IMS and CSFB) and enable SMS only registration flag. - getVoiceSupport: get voice support configuration for the current radio. --- include/mts/MTS_IO_ICellularRadio.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'include/mts/MTS_IO_ICellularRadio.h') diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index 58329c4..e061636 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -153,6 +153,8 @@ namespace MTS { static const char *KEY_SIM_CARRIER_CODE; //!< Unique carrier identifier based on the SIM card information. static const char *KEY_SIM_MCC; //!< MCC of the home network from the SIM. static const char *KEY_SIM_MNC; //!< MNC of the home network from the SIM. + static const char *KEY_VOICE_ENABLED; //!< Enable/Disable support of voice calls + static const char *KEY_SMS_ONLY; //!< Enable/Disable "SMS only" registration flag //Network Status Data @@ -592,6 +594,32 @@ namespace MTS { */ virtual CODE getSimMccMnc(std::string& sMccMnc) = 0; virtual CODE getSimMccMnc(std::string& sMcc, std::string& sMnc) = 0; + + /** + * @brief disableVoiceSupport - disable voice support (IMS and CSFB) and enable "SMS only" registration flag. + * + * @return CODE::SUCCESS when disabled successfully, + * CODE::NOT_APPLICABLE when the modem doesn't support this feature, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR", + * CODE::FAILURE otherwise (unexpected response). + */ + virtual CODE disableVoiceSupport() = 0; + + /** + * @brief getVoiceSupport - get voice support configuration for the current radio. + * + * @param bVoiceEnabled - a boolean value indicating that "voice support" is enabled. + * @param bSmsOnly - a boolean value indicating that "SMS only" registration flag is enabled. + * + * @return CODE::SUCCESS when fetched successfully, + * CODE::NOT_APPLICABLE when the modem doesn't support this feature, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR", + * CODE::FAILURE otherwise (unexpected response). + */ + virtual CODE getVoiceSupport(Json::Value& jData) = 0; + virtual CODE getVoiceSupport(bool& bVoiceEnabled, bool& bSmsOnly) = 0; }; } } -- cgit v1.2.3 From 1f7987d546384b6b9ef0079dac5c903148a59210 Mon Sep 17 00:00:00 2001 From: "andrii.davydenko" Date: Tue, 16 Nov 2021 11:51:32 +0200 Subject: Update MODBUS slave feature, Rogers Certification issue --- include/mts/MTS_IO_ICellularRadio.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'include/mts/MTS_IO_ICellularRadio.h') diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index e061636..f3e15e2 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -620,6 +620,42 @@ namespace MTS { */ virtual CODE getVoiceSupport(Json::Value& jData) = 0; virtual CODE getVoiceSupport(bool& bVoiceEnabled, bool& bSmsOnly) = 0; + + /** + * @brief getSelectedBandsRaw - get the raw Selected Bands value for the current radio. + * + * This commands sends the query to the radio, selects first 3 values from the response, + * parses the numbers as dec (Telit GSM and WCDMA fiels) or hex (Quectel GW_band and LTE, + * Telit LTE), formats them as comma-separated hex values and saves the result to sRawBands. + * + * WARNING: The response format is radio-dependent. Please consult the AT command manual + * to interpet the resulting values. + * + * For Telit radios: + * + * - command: `AT#BND?`; + * - example radio response: `#BND: 5,15,800C5`; + * - `sRawBands` format: `[,[,]]`; + * - example `sRawBands` content: `5,F,800C5`. + * + * For Quectel radios: + * + * - command: `AT+QCFG="band"`; + * - example radio response: `+QCFG: "band",0x93,0x80800c5,0x0`; + * - `sRawBands` format: `,,`, + * NOTE: the `` value is duplicated for the first two fields; + * - example `sRawBands` content: `93,93,80800c5`. + * + * @param sRawBands - radio-depended string value, shows the currently selected bands. + * + * @return CODE::SUCCESS when fetched successfully, + * CODE::NOT_APPLICABLE when the modem doesn't support this feature, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR", + * CODE::FAILURE otherwise (unexpected response). + */ + virtual CODE getSelectedBandsRaw(std::string& sRawBands) = 0; + }; } } -- cgit v1.2.3 From b8991e7f15f30ad21725b113df773db7beaa69d8 Mon Sep 17 00:00:00 2001 From: Andrii Davydenko Date: Wed, 2 Nov 2022 15:35:51 +0200 Subject: [MTX-4694][GP-1791] MTCAP3 mPower R.6.1.X: LNA7D support - APN setup behavior when provider is Verizon Implement getting the CGDCONT from the modem Implement setting the CGDCONT to the modem --- include/mts/MTS_IO_ICellularRadio.h | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'include/mts/MTS_IO_ICellularRadio.h') diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index f3e15e2..91ab782 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -205,6 +205,10 @@ namespace MTS { static const char *KEY_ATTEMPTS_PIN; //!< The number of attempts left to unlock the SIM card using PIN code static const char *KEY_ATTEMPTS_PUK; //!< The number of attempts left to unlock the SIM card using PUK code + //PDP Context + static const char *KEY_PDP_CONTEXT_APN; + static const char *KEY_PDP_CONTEXT_IPMODE; + //Values - Type static const char *VALUE_TYPE_LTE; static const char *VALUE_TYPE_GSM; @@ -656,6 +660,43 @@ namespace MTS { */ virtual CODE getSelectedBandsRaw(std::string& sRawBands) = 0; + /** + * @brief Get the list of PDP contexts from the radio + * + * @param jData - an object to be filled with data. + * { + * "": { + * "apn": "", + * "ipMode": "" + * } + * } + * + * @return CODE::SUCCESS when fetched successfully, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR", + * CODE::FAILURE otherwise (unexpected response). + */ + virtual CODE getPdpContexts(Json::Value& jData) = 0; + + /** + * @brief Set the PDP context to the radio + * + * @param sId - a string value that contains an ID of the PDP context to change. + * @param jConfig - a JSON-object that contains: + * an IP mode for the specified PDP context, + * an APN for the specified PDP context. + * { + * "apn": "", + * "ipMode": "" + * } + * + * @return CODE::SUCCESS when fetched successfully, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR", + * CODE::FAILURE otherwise (unexpected response). + */ + virtual CODE setPdpContext(const std::string& sId, const Json::Value& jConfig) = 0; + }; } } -- cgit v1.2.3 From 4b448e3c5daf34062861d0261c5a2253638b8100 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Fri, 16 Dec 2022 17:04:08 +0200 Subject: [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. --- include/mts/MTS_IO_ICellularRadio.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include/mts/MTS_IO_ICellularRadio.h') diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index 91ab782..0523236 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -697,6 +697,27 @@ namespace MTS { */ virtual CODE setPdpContext(const std::string& sId, const Json::Value& jConfig) = 0; + /** + * @brief Execute the diagnostics AT commands and capture their output + * + * NOTE: The list of diagnostic AT commands is radio-specific and changes + * depending on the radio model (code). + * + * NOTE: The method stops its execution if the radio repeatedly ignores + * the commands (returns no execution result for several of them). This + * is required to limit the maximum execution time of the function and + * prevent the process from occupying the radio for too long. In case + * of timeout, the report will contain the output of all commands that + * it managed to execute before the failure. + * + * @param sDiagReport - the AT commands execution report. + * + * @return CODE::SUCCESS when fetched successfully, + * CODE::NO_RESPONSE when the radio ignored several of the AT commands, + * CODE::FAILURE otherwise. + */ + virtual CODE getDiagnostics(std::string& sDiagReport) = 0; + }; } } -- cgit v1.2.3